Submission #874234

# Submission time Handle Problem Language Result Execution time Memory
874234 2023-11-16T13:45:01 Z LucaLucaM Super Dango Maker (JOI22_dango3) C++17
2 / 100
73 ms 612 KB
#include "dango3.h"
#ifdef LOCAL
#include "grader.cpp"
#endif // LOCAL

#include <vector>

void Solve(int n, int m) {
  auto query = [&] (std::vector<int> v) {
    return Query(v);
  };

  bool taken[n * m + 1] = {};

  for (int baubau = 0; baubau < m; baubau++) {
    std::vector<int> cur = {};
    for (int i = 1; i <= n * m; i++) {
      if (!taken[i]) {
        cur.push_back(i);
        taken[i] = true;
        break;
      }
    }
    taken[1] = true;

    for (int rep = 2; rep <= n; rep++) {
      std::vector<int> ask = cur;

      for (int i = 1; i <= n * m; i++) {
        if (taken[i]) {
          continue;
        }
        ask.push_back(i);
        if (query(ask) == 1) {
          cur.push_back(i);
          taken[i] = true;
          break;
        }
      }
    }
    Answer(cur);
  }
}
/**


3 2
3 3 1 2 1 2

4 4
2 2 3 2 4 4 3 2 3 1 1 3 4 1 4 1


**/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 348 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 580 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 73 ms 612 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -