#include "planet.h"
#include <algorithm>
using namespace std;
const int EE = 2222;
void ainta() {
for (int i=0; i<66; i++) {
paint(i,0); // step 1.
}
for (int i=0; i<66; i++) {
paint(0,i); // step 1.
}
for (int i=0; i<7; i++) {
paint(0,0); // ignore step 2.
}
}
void sangsoo() {
int s = 0, e = 0, f = 0;
for (int i=1; i <= 66; i++) {
if(count_row(e)){
f = 1;
}
if(f) continue;
s = e+1;
e = e + i + 1;
}
e = min(e,EE-1);
int ns = 0, ne = 0;
f = 0;
for(int i=1; i<=7; i++){
if(count_col(ne)){
f = 1;
}
if(!f){
ns = ne+1;
ne = ne + i + 1;
}
if(s == e){
count_row(42);
continue;
}
int m = (s+e) / 2;
if(count_row(m)) e = m;
else s = m+1;
}
int posx = s;
for (int i=8; i <= 66; i++) {
if(count_col(ne)){
f = 1;
}
if(f) continue;
ns = ne+1;
ne = ne + i + 1;
}
ne = min(ne,EE-1);
s = ns, e = ne;
for(int i=0; i<7; i++){
if(s == e){
count_row(42);
continue;
}
int m = (s+e) / 2;
if(count_col(m)) e = m;
else s = m+1;
}
int posy = s;
report(posx,posy);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
2 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
3 |
Partially correct |
82 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
4 |
Partially correct |
81 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
5 |
Partially correct |
81 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
6 |
Partially correct |
82 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
7 |
Partially correct |
82 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
8 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
9 |
Partially correct |
82 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
10 |
Partially correct |
83 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
11 |
Partially correct |
81 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
12 |
Partially correct |
85 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
13 |
Partially correct |
85 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
14 |
Partially correct |
85 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
15 |
Partially correct |
85 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
16 |
Partially correct |
86 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
17 |
Partially correct |
86 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
18 |
Partially correct |
83 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
19 |
Partially correct |
87 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
20 |
Partially correct |
173 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
787 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
2 |
Partially correct |
795 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
3 |
Partially correct |
802 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
4 |
Partially correct |
802 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
5 |
Partially correct |
802 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
6 |
Partially correct |
805 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
7 |
Partially correct |
811 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
8 |
Partially correct |
820 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
9 |
Partially correct |
826 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
10 |
Partially correct |
836 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
11 |
Partially correct |
244 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
12 |
Partially correct |
834 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
13 |
Partially correct |
846 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
14 |
Partially correct |
841 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
15 |
Partially correct |
846 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
16 |
Partially correct |
855 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
17 |
Partially correct |
855 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
18 |
Partially correct |
856 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
19 |
Partially correct |
862 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
20 |
Partially correct |
866 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
21 |
Partially correct |
872 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
22 |
Partially correct |
870 ms |
1752 KB |
Output is partially correct : max_calls = 146 |
23 |
Partially correct |
877 ms |
1752 KB |
Output is partially correct : max_calls = 146 |