# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
54302 | 2018-07-03T06:29:29 Z | 창조론자(#2048) | Aliens (IOI07_aliens) | C++11 | 1000 ms | 524 KB |
#include<stdio.h> #include<string.h> long long min(long long a, long long b) { if (a < b)return a; return b; } char X[10]; long long n; bool qr(long long x, long long y) { if (x > n || y > n)while (1); printf("examine %lld %lld\n", x, y); fflush(stdout); scanf("%s", X); if (strcmp(X, "true") == 0)return 1; return 0; } void sol(long long x, long long y) { if (x > n || y > n)while (1); printf("solution %lld %lld\n", x, y); fflush(stdout); } int main() { long long i,j, bef,sx,sy; scanf("%lld%lld%lld",&n, &sx, &sy); long long mx = min(n - sx + 1, n - sy + 1) / 5, cnt = 0; bef = sx + mx * 5 - 1; while (!qr(sx + 5 * mx - 1, sy)) { bef = sx + mx * 5 - 1; mx = (mx * 4) / 5; } long long s = sx + mx * 5 - 1, e = bef, res; while (s <= e) { long long m = (s + e) / 2; if (qr(m, sy)) res = m, s = m + 1; else e = m - 1; } long long m = (res + 1 - sx) / 5; sol((2 * sx + 5 * m - 1) / 2, (2 * sy + 5 * m - 1) / 2); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 440 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 440 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1084 ms | 440 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 456 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 456 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 524 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 524 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 524 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 524 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |