# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
71553 |
2018-08-25T06:44:05 Z |
김세빈(#2219) |
행성 탐사 (GA8_planet) |
C++11 |
|
1045 ms |
1380 KB |
#include "planet.h"
#include <cstdio>
const int n = 2222;
const int sz = 50;
void ainta()
{
int i;
for(i=0; i<sz; 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;
for(i=0; i<3; i++) count_row(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;
}
if(f1 == 1){
// printf("%d\n", ((c1 - (i - d1) * sz) % n + n) % n);
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;
}
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 |
75 ms |
888 KB |
Output is partially correct: max_calls = 265 |
2 |
Partially correct |
70 ms |
996 KB |
Output is partially correct: max_calls = 260 |
3 |
Partially correct |
83 ms |
1072 KB |
Output is partially correct: max_calls = 267 |
4 |
Partially correct |
94 ms |
1364 KB |
Output is partially correct: max_calls = 264 |
5 |
Partially correct |
88 ms |
1364 KB |
Output is partially correct: max_calls = 265 |
6 |
Partially correct |
91 ms |
1364 KB |
Output is partially correct: max_calls = 267 |
7 |
Partially correct |
80 ms |
1364 KB |
Output is partially correct: max_calls = 265 |
8 |
Partially correct |
103 ms |
1364 KB |
Output is partially correct: max_calls = 269 |
9 |
Partially correct |
110 ms |
1364 KB |
Output is partially correct: max_calls = 264 |
10 |
Partially correct |
71 ms |
1364 KB |
Output is partially correct: max_calls = 265 |
11 |
Partially correct |
100 ms |
1364 KB |
Output is partially correct: max_calls = 266 |
12 |
Partially correct |
91 ms |
1364 KB |
Output is partially correct: max_calls = 263 |
13 |
Partially correct |
89 ms |
1364 KB |
Output is partially correct: max_calls = 265 |
14 |
Partially correct |
94 ms |
1364 KB |
Output is partially correct: max_calls = 266 |
15 |
Partially correct |
83 ms |
1364 KB |
Output is partially correct: max_calls = 263 |
16 |
Partially correct |
74 ms |
1364 KB |
Output is partially correct: max_calls = 268 |
17 |
Partially correct |
108 ms |
1364 KB |
Output is partially correct: max_calls = 263 |
18 |
Partially correct |
105 ms |
1364 KB |
Output is partially correct: max_calls = 264 |
19 |
Partially correct |
86 ms |
1364 KB |
Output is partially correct: max_calls = 267 |
20 |
Partially correct |
197 ms |
1364 KB |
Output is partially correct: max_calls = 270 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
842 ms |
1364 KB |
Output is partially correct: max_calls = 269 |
2 |
Partially correct |
747 ms |
1364 KB |
Output is partially correct: max_calls = 268 |
3 |
Partially correct |
839 ms |
1364 KB |
Output is partially correct: max_calls = 269 |
4 |
Partially correct |
909 ms |
1364 KB |
Output is partially correct: max_calls = 268 |
5 |
Partially correct |
1045 ms |
1364 KB |
Output is partially correct: max_calls = 269 |
6 |
Partially correct |
789 ms |
1380 KB |
Output is partially correct: max_calls = 269 |
7 |
Partially correct |
688 ms |
1380 KB |
Output is partially correct: max_calls = 271 |
8 |
Partially correct |
789 ms |
1380 KB |
Output is partially correct: max_calls = 270 |
9 |
Partially correct |
830 ms |
1380 KB |
Output is partially correct: max_calls = 271 |
10 |
Partially correct |
769 ms |
1380 KB |
Output is partially correct: max_calls = 270 |
11 |
Partially correct |
240 ms |
1380 KB |
Output is partially correct: max_calls = 266 |
12 |
Partially correct |
771 ms |
1380 KB |
Output is partially correct: max_calls = 272 |
13 |
Partially correct |
771 ms |
1380 KB |
Output is partially correct: max_calls = 271 |
14 |
Partially correct |
835 ms |
1380 KB |
Output is partially correct: max_calls = 270 |
15 |
Partially correct |
928 ms |
1380 KB |
Output is partially correct: max_calls = 268 |
16 |
Partially correct |
771 ms |
1380 KB |
Output is partially correct: max_calls = 268 |
17 |
Partially correct |
927 ms |
1380 KB |
Output is partially correct: max_calls = 270 |
18 |
Partially correct |
853 ms |
1380 KB |
Output is partially correct: max_calls = 269 |
19 |
Partially correct |
889 ms |
1380 KB |
Output is partially correct: max_calls = 270 |
20 |
Partially correct |
950 ms |
1380 KB |
Output is partially correct: max_calls = 269 |
21 |
Partially correct |
845 ms |
1380 KB |
Output is partially correct: max_calls = 272 |
22 |
Partially correct |
878 ms |
1380 KB |
Output is partially correct: max_calls = 271 |
23 |
Partially correct |
929 ms |
1380 KB |
Output is partially correct: max_calls = 271 |