Submission #1040478

# Submission time Handle Problem Language Result Execution time Memory
1040478 2024-08-01T05:44:49 Z 변재우(#10999) How to Avoid Disqualification in 75 Easy Steps (CEOI23_avoid) C++17
0 / 100
600 ms 596 KB
#include "avoid.h"
#include <bits/stdc++.h>
using namespace std;

std::pair<int, int> scout(int R, int H) {
  int a=0, b=0;
  for(int s=1, e=1000; s<=e; ) {
    int m=(s+e)/2;
    vector<int> t;
    for(int i=s; i<=m; i++) t.push_back(i);
    send(t);
    if(wait()[0]) a=m, e=m-1;
    else s=m+1;
  }
  for(int s=1, e=1000; s<=e; ) {
    int m=(s+e)/2;
    vector<int> t;
    for(int i=s; i<=m; i++) if(i!=a) t.push_back(i);
    if(t.empty()) s=m;
    else {
      send(t);
      if(wait()[0]) b=m, e=m-1;
      else s=m+1;
    }
  }
  if(!b) b=a;
  return {a, b};
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
2 Correct 1 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
3 Correct 0 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
4 Correct 1 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
5 Correct 0 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
6 Correct 1 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
7 Correct 1 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
8 Correct 1 ms 344 KB Correct: 19 robot(s) used, 19 hour(s) passed
9 Correct 0 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
10 Correct 1 ms 596 KB Correct: 20 robot(s) used, 20 hour(s) passed
11 Correct 1 ms 344 KB Correct: 20 robot(s) used, 20 hour(s) passed
12 Execution timed out 3084 ms 348 KB Time limit exceeded
13 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Not correct
2 Halted 0 ms 0 KB -