# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
71558 |
2018-08-25T06:59:28 Z |
김세빈(#2219) |
행성 탐사 (GA8_planet) |
C++11 |
|
733 ms |
1276 KB |
#include "planet.h"
#include <cstdio>
const int n = 2222;
const int sz = 100;
void ainta()
{
int i;
for(i=0; i * sz < n; i++){
paint(i * sz % n, 0);
paint(0, i * sz % n);
}
}
void sangsoo()
{
int i, k, f1, f2, c1, c2, d1, d2, x, y;
f1 = f2 = 0;
count_row(0);
count_col(0);
for(i=0; ; i++){
if(f1 == 0){
k = count_row((n - i) % n);
if(k == 1) f1 = 1, c1 = (n - i) % n, d1 = i;
else if(k > 1) f1 = 2, x = (n - i) % n;
}
if(f1 == 1){
k = count_row(((c1 - (i - d1) * sz) % n + n) % n);
if(k > 1) f1 = 2, x = ((c1 - (i - d1) * sz) % n + n) % n;
}
if(f2 == 0){
k = count_col((n - i) % n);
if(k >= 1) f2 = 1, c2 = (n - i) % n, d2 = i;
else if(k > 1) f2 = 2, y = (n - i) % n;
}
if(f2 == 1){
k = count_col(((c2 - (i - d2) * sz) % n + n) % n);
if(k > 1) f2 = 2, y = ((c2 - (i - d2) * sz) % n + n) % n;
}
if(f1 > 1 && f2 > 1) break;
}
report(x, y);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
113 ms |
1016 KB |
Output is partially correct: max_calls = 276 |
2 |
Partially correct |
80 ms |
1124 KB |
Output is partially correct: max_calls = 281 |
3 |
Partially correct |
64 ms |
1124 KB |
Output is partially correct: max_calls = 282 |
4 |
Partially correct |
59 ms |
1148 KB |
Output is partially correct: max_calls = 277 |
5 |
Partially correct |
66 ms |
1148 KB |
Output is partially correct: max_calls = 283 |
6 |
Partially correct |
57 ms |
1148 KB |
Output is partially correct: max_calls = 279 |
7 |
Partially correct |
69 ms |
1192 KB |
Output is partially correct: max_calls = 280 |
8 |
Partially correct |
64 ms |
1224 KB |
Output is partially correct: max_calls = 280 |
9 |
Partially correct |
73 ms |
1224 KB |
Output is partially correct: max_calls = 275 |
10 |
Partially correct |
61 ms |
1224 KB |
Output is partially correct: max_calls = 286 |
11 |
Partially correct |
72 ms |
1224 KB |
Output is partially correct: max_calls = 281 |
12 |
Partially correct |
66 ms |
1224 KB |
Output is partially correct: max_calls = 278 |
13 |
Partially correct |
63 ms |
1224 KB |
Output is partially correct: max_calls = 282 |
14 |
Partially correct |
80 ms |
1224 KB |
Output is partially correct: max_calls = 278 |
15 |
Partially correct |
82 ms |
1224 KB |
Output is partially correct: max_calls = 284 |
16 |
Partially correct |
59 ms |
1224 KB |
Output is partially correct: max_calls = 279 |
17 |
Partially correct |
76 ms |
1224 KB |
Output is partially correct: max_calls = 274 |
18 |
Partially correct |
68 ms |
1224 KB |
Output is partially correct: max_calls = 285 |
19 |
Partially correct |
87 ms |
1224 KB |
Output is partially correct: max_calls = 280 |
20 |
Partially correct |
164 ms |
1224 KB |
Output is partially correct: max_calls = 281 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
701 ms |
1228 KB |
Output is partially correct: max_calls = 286 |
2 |
Partially correct |
666 ms |
1228 KB |
Output is partially correct: max_calls = 285 |
3 |
Partially correct |
466 ms |
1228 KB |
Output is partially correct: max_calls = 284 |
4 |
Partially correct |
524 ms |
1228 KB |
Output is partially correct: max_calls = 283 |
5 |
Partially correct |
543 ms |
1228 KB |
Output is partially correct: max_calls = 285 |
6 |
Partially correct |
544 ms |
1260 KB |
Output is partially correct: max_calls = 284 |
7 |
Partially correct |
627 ms |
1260 KB |
Output is partially correct: max_calls = 282 |
8 |
Partially correct |
617 ms |
1260 KB |
Output is partially correct: max_calls = 286 |
9 |
Partially correct |
644 ms |
1260 KB |
Output is partially correct: max_calls = 285 |
10 |
Partially correct |
567 ms |
1260 KB |
Output is partially correct: max_calls = 288 |
11 |
Partially correct |
188 ms |
1260 KB |
Output is partially correct: max_calls = 281 |
12 |
Partially correct |
660 ms |
1260 KB |
Output is partially correct: max_calls = 286 |
13 |
Partially correct |
637 ms |
1276 KB |
Output is partially correct: max_calls = 284 |
14 |
Partially correct |
646 ms |
1276 KB |
Output is partially correct: max_calls = 283 |
15 |
Partially correct |
628 ms |
1276 KB |
Output is partially correct: max_calls = 284 |
16 |
Partially correct |
733 ms |
1276 KB |
Output is partially correct: max_calls = 283 |
17 |
Partially correct |
579 ms |
1276 KB |
Output is partially correct: max_calls = 286 |
18 |
Partially correct |
619 ms |
1276 KB |
Output is partially correct: max_calls = 285 |
19 |
Partially correct |
658 ms |
1276 KB |
Output is partially correct: max_calls = 284 |
20 |
Partially correct |
651 ms |
1276 KB |
Output is partially correct: max_calls = 287 |
21 |
Partially correct |
632 ms |
1276 KB |
Output is partially correct: max_calls = 286 |
22 |
Partially correct |
596 ms |
1276 KB |
Output is partially correct: max_calls = 285 |
23 |
Partially correct |
539 ms |
1276 KB |
Output is partially correct: max_calls = 284 |