Submission #7556

# Submission time Handle Problem Language Result Execution time Memory
7556 2014-08-11T07:22:00 Z gs13068 행성 탐사 (GA8_planet) C++
79.2 / 100
992 ms 1756 KB
#include "planet.h"

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;
  for(i=0;i<50;i++)my_paint(-i,0);
  for(i=0;i<50;i++)my_paint(0,-i);
}

void sangsoo()
{
  calls = 0;
  int x,y;
  int l,r,mid;

  while(calls<50)wait();

  for(x=0;x<2222;x+=50)if(my_row(x))break;
  for(l=0,r=49;l<r;my_row(x+mid)?l=mid:r=mid-1)mid=(l+r+1)/2;
  x+=l;

  while(calls<100)wait();

  for(y=0;y<2222;y+=50)if(my_col(y))break;
  for(l=0,r=49;l<r;my_col(y+mid)?l=mid:r=mid-1)mid=(l+r+1)/2;
  y+=l;

  my_report(x,y);
}
# Verdict Execution time Memory Grader output
1 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 152
2 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 151
3 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 151
4 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 151
5 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 152
6 Partially correct 100 ms 1756 KB Output is partially correct : max_calls = 152
7 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 152
8 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 152
9 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 152
10 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 151
11 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 151
12 Partially correct 96 ms 1756 KB Output is partially correct : max_calls = 151
13 Partially correct 96 ms 1756 KB Output is partially correct : max_calls = 152
14 Partially correct 96 ms 1756 KB Output is partially correct : max_calls = 152
15 Partially correct 96 ms 1756 KB Output is partially correct : max_calls = 152
16 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 152
17 Partially correct 96 ms 1756 KB Output is partially correct : max_calls = 152
18 Partially correct 100 ms 1756 KB Output is partially correct : max_calls = 151
19 Partially correct 100 ms 1756 KB Output is partially correct : max_calls = 152
20 Partially correct 176 ms 1756 KB Output is partially correct : max_calls = 152
# Verdict Execution time Memory Grader output
1 Partially correct 896 ms 1756 KB Output is partially correct : max_calls = 152
2 Partially correct 904 ms 1756 KB Output is partially correct : max_calls = 152
3 Partially correct 900 ms 1756 KB Output is partially correct : max_calls = 152
4 Partially correct 908 ms 1756 KB Output is partially correct : max_calls = 152
5 Partially correct 916 ms 1756 KB Output is partially correct : max_calls = 152
6 Partially correct 916 ms 1756 KB Output is partially correct : max_calls = 152
7 Partially correct 932 ms 1756 KB Output is partially correct : max_calls = 152
8 Partially correct 924 ms 1756 KB Output is partially correct : max_calls = 152
9 Partially correct 924 ms 1756 KB Output is partially correct : max_calls = 152
10 Partially correct 932 ms 1756 KB Output is partially correct : max_calls = 152
11 Partially correct 268 ms 1756 KB Output is partially correct : max_calls = 152
12 Partially correct 944 ms 1756 KB Output is partially correct : max_calls = 152
13 Partially correct 948 ms 1756 KB Output is partially correct : max_calls = 152
14 Partially correct 948 ms 1756 KB Output is partially correct : max_calls = 152
15 Partially correct 948 ms 1756 KB Output is partially correct : max_calls = 152
16 Partially correct 948 ms 1756 KB Output is partially correct : max_calls = 152
17 Partially correct 960 ms 1756 KB Output is partially correct : max_calls = 152
18 Partially correct 972 ms 1756 KB Output is partially correct : max_calls = 152
19 Partially correct 980 ms 1756 KB Output is partially correct : max_calls = 152
20 Partially correct 976 ms 1756 KB Output is partially correct : max_calls = 152
21 Partially correct 976 ms 1756 KB Output is partially correct : max_calls = 152
22 Partially correct 984 ms 1756 KB Output is partially correct : max_calls = 152
23 Partially correct 992 ms 1756 KB Output is partially correct : max_calls = 152