# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
54312 | 2018-07-03T06:47:48 Z | 창조론자(#2048) | Aliens (IOI07_aliens) | C++11 | 1000 ms | 476 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]; bool qr(long long x, long long y) { printf("examine %lld %lld\n", x, y); fflush(stdout); scanf("%s", X); if (X[0] == 't'&&X[1] == 'r'&&X[2] == 'u'&&X[3] == 'e')return 1; return 0; } long long ansx, ansy; void sol(long long x, long long y) { printf("solution %lld %lld\n", x, y); fflush(stdout); } int main() { long long i, j, bef, n, 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 + 1) / 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 | Execution timed out | 1063 ms | 248 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 436 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 436 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1044 ms | 436 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 476 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 476 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 476 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 476 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 476 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 476 KB | Incorrect |
2 | Halted | 0 ms | 0 KB | - |