# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
71595 |
2018-08-25T08:09:15 Z |
김세빈(#2219) |
행성 탐사 (GA8_planet) |
C++11 |
|
1517 ms |
1428 KB |
#include "planet.h"
#include <bits/stdc++.h>
using namespace std;
const int n = 2222;
const int sz = 40;
void ainta()
{
int i;
for(i=0; i<101; i++){
paint(i, i);
}
}
void sangsoo()
{
srand(time(0));
int i, k, s, e, mid, x, y;
for(i=1; ; i++){
k = rand() % n;
if(count_row(k)) break;
}
for(s=0, e=max(100, i-1); s<=e; ){
mid = s + e >> 1;
if(count_row((k - mid + n) % n)) s = mid + 1;
else e = mid - 1;
}
x = (k - (s - 1) + n) % n;
for(; ; i++){
k = rand() % n;
if(count_col(k)) break;
}
for(s=0, e=max(100, i-1); s<=e; ){
mid = s + e >> 1;
if(count_col((k - mid + n) % n)) s = mid + 1;
else e = mid - 1;
}
y = (k - (s - 1) + n) % n;
report(x, y);
}
Compilation message
planet.cpp: In function 'void sangsoo()':
planet.cpp:31:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
mid = s + e >> 1;
~~^~~
planet.cpp:44:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
mid = s + e >> 1;
~~^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
194 ms |
980 KB |
Output is partially correct: max_calls = 275 |
2 |
Partially correct |
155 ms |
1000 KB |
Output is partially correct: max_calls = 275 |
3 |
Partially correct |
149 ms |
1096 KB |
Output is partially correct: max_calls = 338 |
4 |
Partially correct |
128 ms |
1096 KB |
Output is partially correct: max_calls = 337 |
5 |
Partially correct |
122 ms |
1136 KB |
Output is partially correct: max_calls = 338 |
6 |
Partially correct |
156 ms |
1136 KB |
Output is partially correct: max_calls = 316 |
7 |
Partially correct |
132 ms |
1184 KB |
Output is partially correct: max_calls = 316 |
8 |
Partially correct |
134 ms |
1208 KB |
Output is partially correct: max_calls = 317 |
9 |
Partially correct |
118 ms |
1208 KB |
Output is partially correct: max_calls = 316 |
10 |
Partially correct |
148 ms |
1208 KB |
Output is partially correct: max_calls = 317 |
11 |
Partially correct |
141 ms |
1232 KB |
Output is partially correct: max_calls = 276 |
12 |
Partially correct |
143 ms |
1368 KB |
Output is partially correct: max_calls = 275 |
13 |
Partially correct |
140 ms |
1368 KB |
Output is partially correct: max_calls = 276 |
14 |
Partially correct |
152 ms |
1368 KB |
Output is partially correct: max_calls = 276 |
15 |
Partially correct |
145 ms |
1368 KB |
Output is partially correct: max_calls = 304 |
16 |
Partially correct |
130 ms |
1368 KB |
Output is partially correct: max_calls = 284 |
17 |
Partially correct |
141 ms |
1368 KB |
Output is partially correct: max_calls = 284 |
18 |
Partially correct |
181 ms |
1368 KB |
Output is partially correct: max_calls = 284 |
19 |
Partially correct |
131 ms |
1368 KB |
Output is partially correct: max_calls = 284 |
20 |
Partially correct |
230 ms |
1368 KB |
Output is partially correct: max_calls = 230 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1285 ms |
1368 KB |
Output is partially correct: max_calls = 308 |
2 |
Partially correct |
1187 ms |
1368 KB |
Output is partially correct: max_calls = 327 |
3 |
Partially correct |
1263 ms |
1368 KB |
Output is partially correct: max_calls = 338 |
4 |
Partially correct |
1264 ms |
1368 KB |
Output is partially correct: max_calls = 338 |
5 |
Partially correct |
1316 ms |
1368 KB |
Output is partially correct: max_calls = 311 |
6 |
Partially correct |
1151 ms |
1368 KB |
Output is partially correct: max_calls = 301 |
7 |
Partially correct |
1230 ms |
1368 KB |
Output is partially correct: max_calls = 271 |
8 |
Partially correct |
1135 ms |
1368 KB |
Output is partially correct: max_calls = 295 |
9 |
Partially correct |
1175 ms |
1368 KB |
Output is partially correct: max_calls = 330 |
10 |
Partially correct |
1259 ms |
1376 KB |
Output is partially correct: max_calls = 364 |
11 |
Partially correct |
361 ms |
1376 KB |
Output is partially correct: max_calls = 276 |
12 |
Partially correct |
1282 ms |
1376 KB |
Output is partially correct: max_calls = 326 |
13 |
Partially correct |
1365 ms |
1388 KB |
Output is partially correct: max_calls = 333 |
14 |
Partially correct |
1266 ms |
1400 KB |
Output is partially correct: max_calls = 334 |
15 |
Partially correct |
1331 ms |
1400 KB |
Output is partially correct: max_calls = 335 |
16 |
Partially correct |
1375 ms |
1400 KB |
Output is partially correct: max_calls = 329 |
17 |
Partially correct |
1249 ms |
1404 KB |
Output is partially correct: max_calls = 363 |
18 |
Partially correct |
1490 ms |
1408 KB |
Output is partially correct: max_calls = 364 |
19 |
Partially correct |
1299 ms |
1420 KB |
Output is partially correct: max_calls = 341 |
20 |
Partially correct |
1351 ms |
1428 KB |
Output is partially correct: max_calls = 365 |
21 |
Partially correct |
1283 ms |
1428 KB |
Output is partially correct: max_calls = 454 |
22 |
Partially correct |
1517 ms |
1428 KB |
Output is partially correct: max_calls = 454 |
23 |
Partially correct |
1399 ms |
1428 KB |
Output is partially correct: max_calls = 354 |