# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
71561 |
2018-08-25T07:06:47 Z |
김세빈(#2219) |
행성 탐사 (GA8_planet) |
C++11 |
|
1039 ms |
1328 KB |
#include "planet.h"
#include <cstdio>
const int n = 2222;
const int sz = 40;
void ainta()
{
int i;
paint(0, 0);
for(i=1; 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 |
79 ms |
888 KB |
Output is partially correct: max_calls = 285 |
2 |
Partially correct |
82 ms |
1128 KB |
Output is partially correct: max_calls = 288 |
3 |
Partially correct |
95 ms |
1184 KB |
Output is partially correct: max_calls = 283 |
4 |
Partially correct |
76 ms |
1236 KB |
Output is partially correct: max_calls = 289 |
5 |
Partially correct |
80 ms |
1236 KB |
Output is partially correct: max_calls = 287 |
6 |
Partially correct |
86 ms |
1236 KB |
Output is partially correct: max_calls = 285 |
7 |
Partially correct |
83 ms |
1292 KB |
Output is partially correct: max_calls = 288 |
8 |
Partially correct |
100 ms |
1292 KB |
Output is partially correct: max_calls = 289 |
9 |
Partially correct |
105 ms |
1292 KB |
Output is partially correct: max_calls = 284 |
10 |
Partially correct |
98 ms |
1328 KB |
Output is partially correct: max_calls = 287 |
11 |
Partially correct |
75 ms |
1328 KB |
Output is partially correct: max_calls = 291 |
12 |
Partially correct |
101 ms |
1328 KB |
Output is partially correct: max_calls = 288 |
13 |
Partially correct |
87 ms |
1328 KB |
Output is partially correct: max_calls = 286 |
14 |
Partially correct |
90 ms |
1328 KB |
Output is partially correct: max_calls = 284 |
15 |
Partially correct |
80 ms |
1328 KB |
Output is partially correct: max_calls = 290 |
16 |
Partially correct |
96 ms |
1328 KB |
Output is partially correct: max_calls = 288 |
17 |
Partially correct |
87 ms |
1328 KB |
Output is partially correct: max_calls = 286 |
18 |
Partially correct |
90 ms |
1328 KB |
Output is partially correct: max_calls = 281 |
19 |
Partially correct |
91 ms |
1328 KB |
Output is partially correct: max_calls = 290 |
20 |
Partially correct |
164 ms |
1328 KB |
Output is partially correct: max_calls = 290 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
815 ms |
1328 KB |
Output is partially correct: max_calls = 289 |
2 |
Partially correct |
869 ms |
1328 KB |
Output is partially correct: max_calls = 291 |
3 |
Partially correct |
818 ms |
1328 KB |
Output is partially correct: max_calls = 292 |
4 |
Partially correct |
969 ms |
1328 KB |
Output is partially correct: max_calls = 293 |
5 |
Partially correct |
882 ms |
1328 KB |
Output is partially correct: max_calls = 294 |
6 |
Partially correct |
911 ms |
1328 KB |
Output is partially correct: max_calls = 293 |
7 |
Partially correct |
825 ms |
1328 KB |
Output is partially correct: max_calls = 296 |
8 |
Partially correct |
901 ms |
1328 KB |
Output is partially correct: max_calls = 295 |
9 |
Partially correct |
899 ms |
1328 KB |
Output is partially correct: max_calls = 294 |
10 |
Partially correct |
1039 ms |
1328 KB |
Output is partially correct: max_calls = 293 |
11 |
Partially correct |
235 ms |
1328 KB |
Output is partially correct: max_calls = 287 |
12 |
Partially correct |
976 ms |
1328 KB |
Output is partially correct: max_calls = 290 |
13 |
Partially correct |
843 ms |
1328 KB |
Output is partially correct: max_calls = 291 |
14 |
Partially correct |
772 ms |
1328 KB |
Output is partially correct: max_calls = 292 |
15 |
Partially correct |
796 ms |
1328 KB |
Output is partially correct: max_calls = 293 |
16 |
Partially correct |
792 ms |
1328 KB |
Output is partially correct: max_calls = 294 |
17 |
Partially correct |
886 ms |
1328 KB |
Output is partially correct: max_calls = 295 |
18 |
Partially correct |
893 ms |
1328 KB |
Output is partially correct: max_calls = 294 |
19 |
Partially correct |
897 ms |
1328 KB |
Output is partially correct: max_calls = 293 |
20 |
Partially correct |
829 ms |
1328 KB |
Output is partially correct: max_calls = 292 |
21 |
Partially correct |
872 ms |
1328 KB |
Output is partially correct: max_calls = 290 |
22 |
Partially correct |
826 ms |
1328 KB |
Output is partially correct: max_calls = 289 |
23 |
Partially correct |
776 ms |
1328 KB |
Output is partially correct: max_calls = 290 |