Блог пользователя aajjbb

Автор aajjbb, 13 лет назад, По-английски

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://mirror.codeforces.com/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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
13 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      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 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      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 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        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 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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 =________=

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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

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