Submission #319505

# Submission time Handle Problem Language Result Execution time Memory
319505 2020-11-05T12:39:32 Z shaf_wa_nur ICC (CEOI16_icc) C++17
0 / 100
473 ms 688 KB
#include <bits/stdc++.h>

#ifndef LOCAL
  #include "icc.h"
#endif 

using namespace std;

void setRoad(int a, int b);
int query(int size_a, int size_b, int a[], int b[]);

void run(int n) {
  set<pair<int, int>> st;
  while (true) {
    for (int x = 1; x <= n; x++) {
      for (int y = x + 1; y <= n; y++) {
        int a[1], b[1];
        a[0] = x;
        b[0] = y;
        int ret = query(1, 1, a, b);
        if (ret and !st.count({x, y}) and !st.count({y, x})) {
          st.emplace(y, x);
          st.emplace(x, y);
          setRoad(x, y);
        }
      }
    }
  }
}
# Verdict Execution time Memory Grader output
1 Correct 79 ms 492 KB Ok! 1379 queries used.
2 Incorrect 13 ms 492 KB Wrong road!
# Verdict Execution time Memory Grader output
1 Incorrect 261 ms 688 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 473 ms 612 KB Number of queries more than 4500 out of 2250
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 423 ms 612 KB Number of queries more than 4000 out of 2000
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 385 ms 492 KB Number of queries more than 3550 out of 1775
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 361 ms 612 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -