#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() {
/****** calcing position X ******/
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);
/****** calcing position X and Y ******/
int ns = 0, ne = 1;
f = 0;
for(int i=1; i<=13; i+=2){
if(s != e){
int m = (s+e) / 2;
if(count_row(m)) e = m;
else s = m+1;
}
else{
count_row(42);
}
if(count_col(ne)){
f = 1;
}
if(f) continue;
ns = ne+1;
ne = ne + i + 2;
}
/****** calcing position Y ******/
int posx = s;
for (int i=15; i <= 66; i++) {
if(count_col(ne)){
f = 1;
}
if(f) continue;
ns = ne+1;
ne = ne + i + 1;
// printf("[%d,%d] %d\n",ns,ne,i);
}
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 |
77 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
2 |
Partially correct |
75 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
3 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
4 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
5 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
6 |
Partially correct |
80 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
7 |
Partially correct |
74 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
8 |
Partially correct |
80 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
9 |
Partially correct |
78 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
10 |
Partially correct |
77 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
11 |
Partially correct |
78 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
12 |
Partially correct |
83 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
13 |
Partially correct |
79 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
14 |
Partially correct |
83 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
15 |
Partially correct |
83 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
16 |
Partially correct |
83 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
17 |
Partially correct |
84 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
18 |
Partially correct |
86 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
19 |
Partially correct |
86 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
20 |
Partially correct |
163 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
775 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
2 |
Partially correct |
777 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
3 |
Partially correct |
775 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
4 |
Partially correct |
780 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
5 |
Partially correct |
787 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
6 |
Partially correct |
790 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
7 |
Partially correct |
799 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
8 |
Partially correct |
799 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
9 |
Partially correct |
804 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
10 |
Partially correct |
809 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
11 |
Partially correct |
236 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
12 |
Partially correct |
815 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
13 |
Partially correct |
819 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
14 |
Partially correct |
823 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
15 |
Partially correct |
832 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
16 |
Partially correct |
835 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
17 |
Partially correct |
834 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
18 |
Partially correct |
842 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
19 |
Partially correct |
843 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
20 |
Partially correct |
849 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
21 |
Partially correct |
845 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
22 |
Partially correct |
853 ms |
1752 KB |
Output is partially correct : max_calls = 139 |
23 |
Partially correct |
859 ms |
1752 KB |
Output is partially correct : max_calls = 139 |