# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
7567 |
2014-08-11T08:48:44 Z |
gs13068 |
행성 탐사 (GA8_planet) |
C++ |
|
992 ms |
1756 KB |
#include "planet.h"
#include <algorithm>
using namespace std;
int calls;
void my_paint(int r,int c)
{
paint((r%2222+2222)%2222,(c%2222+2222)%2222);
}
int my_row(int r)
{
calls++;
return count_row((r%2222+2222)%2222);
}
int my_col(int c)
{
calls++;
return count_col((c%2222+2222)%2222);
}
void wait()
{
calls++;
count_row(0);
}
void my_report(int r,int c)
{
report((r%2222+2222)%2222,(c%2222+2222)%2222);
}
void ainta()
{
int i,j,k;
for(i=0;i<63;i++)my_paint(-i,-i);
for(j=0;j<8;j++)for(k=0;k<j;k++)
{
my_paint(-j,-i);
i++;
}
for(j=0;j<5;j++)for(k=0;k<j;k++)my_paint(k+2,-j);
}
void sangsoo()
{
calls = 0;
int x,y;
int l,r,mid;
for(x=0;x+min(calls,63)<2222;x+=min(calls,63))if(my_row(x))break;
for(l=0,r=min(calls,63)-1;r-l>8;my_row(x+mid)?l=mid:r=mid-1)
mid=(l+r+1)/2;
x+=l;
for(y=0;y+min(calls,91)<2222;y+=min(calls,91))if(my_col(y))break;
for(l=0,r=min(calls,91)-1;r-l>5;my_col(y+mid)?l=mid:r=mid-1)
mid=(l+r+1)/2;
y+=l;
while(calls<99)wait();
x+=my_row(x+1);
y+=my_col(y+1);
my_report(x,y);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
88 ms |
1756 KB |
Output is correct - max_calls = 101 |
2 |
Correct |
88 ms |
1756 KB |
Output is correct - max_calls = 101 |
3 |
Correct |
88 ms |
1756 KB |
Output is correct - max_calls = 101 |
4 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
5 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
6 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
7 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
8 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
9 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
10 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
11 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
12 |
Correct |
88 ms |
1756 KB |
Output is correct - max_calls = 101 |
13 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
14 |
Correct |
96 ms |
1756 KB |
Output is correct - max_calls = 101 |
15 |
Correct |
92 ms |
1756 KB |
Output is correct - max_calls = 101 |
16 |
Correct |
96 ms |
1756 KB |
Output is correct - max_calls = 101 |
17 |
Correct |
96 ms |
1756 KB |
Output is correct - max_calls = 101 |
18 |
Correct |
100 ms |
1756 KB |
Output is correct - max_calls = 101 |
19 |
Correct |
96 ms |
1756 KB |
Output is correct - max_calls = 101 |
20 |
Correct |
180 ms |
1756 KB |
Output is correct - max_calls = 101 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
892 ms |
1756 KB |
Output is correct - max_calls = 101 |
2 |
Correct |
888 ms |
1756 KB |
Output is correct - max_calls = 101 |
3 |
Correct |
900 ms |
1756 KB |
Output is correct - max_calls = 101 |
4 |
Correct |
912 ms |
1756 KB |
Output is correct - max_calls = 101 |
5 |
Correct |
908 ms |
1756 KB |
Output is correct - max_calls = 101 |
6 |
Correct |
912 ms |
1756 KB |
Output is correct - max_calls = 101 |
7 |
Correct |
916 ms |
1756 KB |
Output is correct - max_calls = 101 |
8 |
Correct |
920 ms |
1756 KB |
Output is correct - max_calls = 101 |
9 |
Correct |
924 ms |
1756 KB |
Output is correct - max_calls = 101 |
10 |
Correct |
928 ms |
1756 KB |
Output is correct - max_calls = 101 |
11 |
Correct |
268 ms |
1756 KB |
Output is correct - max_calls = 101 |
12 |
Correct |
940 ms |
1756 KB |
Output is correct - max_calls = 101 |
13 |
Correct |
944 ms |
1756 KB |
Output is correct - max_calls = 101 |
14 |
Correct |
952 ms |
1756 KB |
Output is correct - max_calls = 101 |
15 |
Correct |
952 ms |
1756 KB |
Output is correct - max_calls = 101 |
16 |
Correct |
960 ms |
1756 KB |
Output is correct - max_calls = 101 |
17 |
Correct |
956 ms |
1756 KB |
Output is correct - max_calls = 101 |
18 |
Correct |
960 ms |
1756 KB |
Output is correct - max_calls = 101 |
19 |
Correct |
964 ms |
1756 KB |
Output is correct - max_calls = 101 |
20 |
Correct |
976 ms |
1756 KB |
Output is correct - max_calls = 101 |
21 |
Correct |
980 ms |
1756 KB |
Output is correct - max_calls = 101 |
22 |
Correct |
976 ms |
1756 KB |
Output is correct - max_calls = 101 |
23 |
Correct |
992 ms |
1756 KB |
Output is correct - max_calls = 101 |