aajjbb's blog

By aajjbb, 13 years ago, In English

Hi, today I've experienced the weird fact that I'm unable to see the test case which I failed, and the code of other contestants in the Gym problems, I'm practicing in '2011-2012 Stanford Local Contest, 8 October, 2011' problem B: http://codeforces.me/gym/100015/attachments, I'm pretty sure my code is right, but I'm unable to see even my answer for the first test case, which returns to me 'Wrong Answer', does someone knows what is wrong in my code or what is the possible error ?

EDIT: code moved to: http://pastebin.com/creXK21E

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
13 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You can't see tests when you participate in virtual contest, after the end of contest you can solve problems in practice mode, i think there you can see tests.

  • »
    »
    13 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    but I'm not in 'Virtual Contest', I just registered to practice, and submited..

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    You can't see tests in GYM unless you are a coach.

»
13 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Link to the problem is wrong, there is problem B — "Ball painting" but your code solves another problem. It's 20112012 contest, i Think December 20 2011

  • »
    »
    13 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I didn't found this problem, I think the link is actually right, in my submissions history, it's also linked to the right problem 'City Driving'.

    • »
      »
      »
      13 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      City Driving is problem C
      A Another Rock-Paper-Scissors Problem
      B Ball Painting
      C City Driving
      D Drunken Walk
      E Empty Triangles
      F Fighting for Triangles
      G Guessing Game
      H Hidden Code
      I Identity Checker
      It's easy to see, first letter of problem name is... Id of this Problem.

  • »
    »
    13 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    BTW, your Dijkstra algorithm in the given code is wrong. Priority_queue must compare vertices by their dist values, not by their index. use priority_queue<pair<long long, int> > > q; q.push(make_pair(-dist[x], x));

    • »
      »
      »
      13 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      or you can give your comparator to the priority_queue:

      struct MyLess
      {
          bool operator()(int x, int y)
          {
              return dist[x] > dist[y];
          }
      };
      
      int main()
      {
          priority_queue<int, vector<int>, MyLess> q;
      ...
      
      • »
        »
        »
        »
        13 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I just fixed it, but I'm still getting wrong answer, and, I'm sure I'm submitting for problem C, or maybe there's a problem in the submit page, I'm choosing the right 'C — City Driving' in the problem chooser.

»
11 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Anyway this solution doesn't work because it's complexity is O(QNlogN) which is about 2 * 1010 operations.

upd. Oh, God, two years ago =________=

  • »
    »
    11 years ago, # ^ |
      Vote: I like it +28 Vote: I do not like it

    Your picture is very coherent with your upd lol:

    • »
      »
      »
      11 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Lol :DD

    • »
      »
      »
      11 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      upd. Oh, God, two years ago =________=

      not sure if ur talking about the 2·1010 operations, or the age of this blog post! :D

      EDIT: oops, just realized that i mistakenly replied to sergioRG's comment instead of wackloner's!

»
5 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I have this question about how to see details in gym submission. thanks.

UPD: after 6 years ... you can see new comment!

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    you can add this guym problem to your local mash-up, and submit in mash-up