#include "planet.h"
const int EE = 2222;
void ainta() {
for (int i=0; i<50; i++) {
paint(i,0); // step 1.
}
for (int i=0; i<50; i++) {
paint(0,i); // step 1.
}
for (int i=0; i<6 + 45 - 50; i++) {
paint(0,0); // ignore step 2.
}
for (int i=0; i<6 + 45; i++) {
paint(0,0); // ignore step 2.
}
}
void sangsoo() {
for(int i=0; i<50; i++){
count_row(42); // ignore step 1.
}
int posx = 0;
for (int i=0; i<45; i++) {
if(count_row(i * 50 % EE)) posx = 50 * i % EE; // step 2.
}
int s = 0, e = 49;
for(int i=0; i<6; i++){
if(s == e){
count_row(42);
continue;
}
int m = (s+e+1) / 2;
int new_pos = (posx + EE - m) % EE;
if(count_row(new_pos)) s = m;
else e = m-1;
}
posx = (posx + EE - s) % EE;
int posy = 0;
for (int i=0; i<45; i++) {
if(count_col(50 * i % EE)) posy = 50 * i % EE; // step 2.
}
s = 0, e = 49;
for(int i=0; i<6; i++){
if(s == e){
count_row(42);
continue;
}
int m = (s+e+1) / 2;
int new_pos = (posy + EE - m) % EE;
if(count_col(new_pos)) s = m;
else e = m-1;
}
posy = (posy + EE - s) % EE;
report(posx,posy);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
82 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
2 |
Partially correct |
86 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
3 |
Partially correct |
86 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
4 |
Partially correct |
82 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
5 |
Partially correct |
87 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
6 |
Partially correct |
88 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
7 |
Partially correct |
88 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
8 |
Partially correct |
84 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
9 |
Partially correct |
89 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
10 |
Partially correct |
90 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
11 |
Partially correct |
90 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
12 |
Partially correct |
90 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
13 |
Partially correct |
92 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
14 |
Partially correct |
90 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
15 |
Partially correct |
91 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
16 |
Partially correct |
92 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
17 |
Partially correct |
92 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
18 |
Partially correct |
93 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
19 |
Partially correct |
93 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
20 |
Partially correct |
175 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
847 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
2 |
Partially correct |
852 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
3 |
Partially correct |
857 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
4 |
Partially correct |
859 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
5 |
Partially correct |
859 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
6 |
Partially correct |
868 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
7 |
Partially correct |
874 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
8 |
Partially correct |
874 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
9 |
Partially correct |
882 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
10 |
Partially correct |
883 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
11 |
Partially correct |
256 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
12 |
Partially correct |
895 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
13 |
Partially correct |
897 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
14 |
Partially correct |
902 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
15 |
Partially correct |
903 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
16 |
Partially correct |
908 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
17 |
Partially correct |
912 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
18 |
Partially correct |
912 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
19 |
Partially correct |
927 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
20 |
Partially correct |
926 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
21 |
Partially correct |
925 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
22 |
Partially correct |
932 ms |
1752 KB |
Output is partially correct : max_calls = 152 |
23 |
Partially correct |
945 ms |
1752 KB |
Output is partially correct : max_calls = 152 |