# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
71600 |
2018-08-25T08:20:15 Z |
김세빈(#2219) |
행성 탐사 (GA8_planet) |
C++11 |
|
1231 ms |
1380 KB |
#include "planet.h"
#include <bits/stdc++.h>
using namespace std;
const int n = 2222;
const int sz = 87;
void ainta()
{
int i;
for(i=0; i<101; i++){
paint(i, i);
}
}
void sangsoo()
{
srand(time(0));
int i, k1, k2, s, e, mid, x, y;
k1 = rand() % n;
for(i=1; ; i++){
k1 = (k1 + sz) % n;
if(count_row(k1)) break;
}
k2 = rand() % n;
for(; ; i++){
k2 = (k2 + sz) % n;
if(count_col(k2)) break;
}
for(s=0, e=max(100, i-1); s<=e; ){
mid = s + e >> 1;
if(count_row((k1 - mid + n) % n)) s = mid + 1;
else e = mid - 1;
}
x = (k1 - (s - 1) + n) % n;
for(s=0, e=max(100, i-1); s<=e; ){
mid = s + e >> 1;
if(count_col((k2 - mid + n) % n)) s = mid + 1;
else e = mid - 1;
}
y = (k2 - (s - 1) + n) % n;
report(x, y);
}
Compilation message
planet.cpp: In function 'void sangsoo()':
planet.cpp:38:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
mid = s + e >> 1;
~~^~~
planet.cpp:46:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
mid = s + e >> 1;
~~^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
103 ms |
888 KB |
Output is partially correct: max_calls = 129 |
2 |
Partially correct |
118 ms |
1124 KB |
Output is partially correct: max_calls = 128 |
3 |
Partially correct |
112 ms |
1124 KB |
Output is partially correct: max_calls = 129 |
4 |
Partially correct |
113 ms |
1124 KB |
Output is partially correct: max_calls = 130 |
5 |
Partially correct |
125 ms |
1124 KB |
Output is partially correct: max_calls = 127 |
6 |
Partially correct |
117 ms |
1156 KB |
Output is partially correct: max_calls = 129 |
7 |
Partially correct |
104 ms |
1292 KB |
Output is partially correct: max_calls = 127 |
8 |
Partially correct |
132 ms |
1360 KB |
Output is partially correct: max_calls = 126 |
9 |
Partially correct |
105 ms |
1360 KB |
Output is partially correct: max_calls = 127 |
10 |
Partially correct |
108 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
11 |
Partially correct |
125 ms |
1360 KB |
Output is partially correct: max_calls = 129 |
12 |
Partially correct |
139 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
13 |
Partially correct |
125 ms |
1360 KB |
Output is partially correct: max_calls = 128 |
14 |
Partially correct |
129 ms |
1360 KB |
Output is partially correct: max_calls = 126 |
15 |
Partially correct |
117 ms |
1360 KB |
Output is partially correct: max_calls = 127 |
16 |
Partially correct |
116 ms |
1360 KB |
Output is partially correct: max_calls = 128 |
17 |
Partially correct |
124 ms |
1360 KB |
Output is partially correct: max_calls = 129 |
18 |
Partially correct |
110 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
19 |
Partially correct |
132 ms |
1360 KB |
Output is partially correct: max_calls = 128 |
20 |
Partially correct |
204 ms |
1360 KB |
Output is partially correct: max_calls = 128 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1012 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
2 |
Partially correct |
1061 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
3 |
Partially correct |
1048 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
4 |
Partially correct |
1039 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
5 |
Partially correct |
1184 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
6 |
Partially correct |
1178 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
7 |
Partially correct |
1218 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
8 |
Partially correct |
1058 ms |
1360 KB |
Output is partially correct: max_calls = 130 |
9 |
Partially correct |
1064 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
10 |
Partially correct |
1065 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
11 |
Partially correct |
293 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
12 |
Partially correct |
1087 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
13 |
Partially correct |
1209 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
14 |
Partially correct |
1171 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
15 |
Partially correct |
1038 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
16 |
Partially correct |
1073 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
17 |
Partially correct |
1134 ms |
1380 KB |
Output is partially correct: max_calls = 129 |
18 |
Partially correct |
1231 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
19 |
Partially correct |
1156 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
20 |
Partially correct |
1125 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
21 |
Partially correct |
1153 ms |
1380 KB |
Output is partially correct: max_calls = 130 |
22 |
Partially correct |
1158 ms |
1380 KB |
Output is partially correct: max_calls = 129 |
23 |
Partially correct |
1193 ms |
1380 KB |
Output is partially correct: max_calls = 130 |