# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
71565 |
2018-08-25T07:11:26 Z |
노영훈(#2218) |
행성 탐사 (GA8_planet) |
C++11 |
|
716 ms |
1388 KB |
#include "planet.h"
#include <iostream>
using namespace std;
int min(int x, int y){ return x<y ? x : y; }
void ainta(){
paint(0,0);
for(int i=1; i<=100; i++) paint(2222-i,2222-i);
}
void sangsoo(){
int bck[2]={}, i=0, x=-1, y=-1;
while(bck[0]<2222 || bck[1]<2222){
if(bck[1]>=2222 || (i%2==0 && bck[0]<2222)){
int now=count_row(bck[0]);
if(now>0){
// [bck[0], bck[0]+i]
int s=bck[0], e=min(bck[0]+i, 2221);
while(s<e){
int m=(s+e+1)/2;
if(count_row(m)>0) s=m;
else e=m-1;
i++;
}
x=s;
bck[0]=2222;
}
else bck[0]+=i+1;
}
else{
int now=count_col(bck[1]);
if(now>0){
int s=bck[1], e=min(bck[1]+i, 2221);
while(s<e){
int m=(s+e+1)/2;
if(count_col(m)>0) s=m;
else e=m-1;
i++;
}
y=s;
bck[1]=2222;
}
else bck[1]+=i+1;
}
i++;
// cout<<i<<": "<<bck[0]<<' '<<bck[1]<<" ~~~ "<<x<<' '<<y<<'\n';
}
// if(x<0 || y<0){ cout<<"WTF??\n"; report(0,0); return; }
report(x,y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
58 ms |
1016 KB |
Output is partially correct: max_calls = 107 |
2 |
Partially correct |
68 ms |
1128 KB |
Output is partially correct: max_calls = 107 |
3 |
Partially correct |
67 ms |
1160 KB |
Output is partially correct: max_calls = 107 |
4 |
Partially correct |
55 ms |
1168 KB |
Output is partially correct: max_calls = 107 |
5 |
Partially correct |
67 ms |
1168 KB |
Output is partially correct: max_calls = 107 |
6 |
Partially correct |
62 ms |
1168 KB |
Output is partially correct: max_calls = 107 |
7 |
Partially correct |
58 ms |
1168 KB |
Output is partially correct: max_calls = 107 |
8 |
Partially correct |
67 ms |
1188 KB |
Output is partially correct: max_calls = 107 |
9 |
Partially correct |
74 ms |
1188 KB |
Output is partially correct: max_calls = 107 |
10 |
Partially correct |
73 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
11 |
Partially correct |
62 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
12 |
Partially correct |
71 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
13 |
Partially correct |
71 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
14 |
Partially correct |
64 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
15 |
Partially correct |
80 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
16 |
Partially correct |
65 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
17 |
Partially correct |
62 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
18 |
Partially correct |
67 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
19 |
Partially correct |
67 ms |
1212 KB |
Output is partially correct: max_calls = 107 |
20 |
Partially correct |
150 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
574 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
2 |
Partially correct |
609 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
3 |
Partially correct |
699 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
4 |
Partially correct |
573 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
5 |
Partially correct |
559 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
6 |
Partially correct |
532 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
7 |
Partially correct |
583 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
8 |
Partially correct |
596 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
9 |
Partially correct |
565 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
10 |
Partially correct |
620 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
11 |
Partially correct |
208 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
12 |
Partially correct |
622 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
13 |
Partially correct |
604 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
14 |
Partially correct |
632 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
15 |
Partially correct |
673 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
16 |
Partially correct |
694 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
17 |
Partially correct |
674 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
18 |
Partially correct |
604 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
19 |
Partially correct |
696 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
20 |
Partially correct |
716 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
21 |
Partially correct |
699 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
22 |
Partially correct |
709 ms |
1336 KB |
Output is partially correct: max_calls = 107 |
23 |
Partially correct |
709 ms |
1388 KB |
Output is partially correct: max_calls = 107 |