Submission #7561

# Submission time Handle Problem Language Result Execution time Memory
7561 2014-08-11T07:46:24 Z gs13068 행성 탐사 (GA8_planet) C++
96.8 / 100
932 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<98;i++)my_paint(-i,-i);
}

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

  for(x=0;x<2222;x+=calls)if(my_row(x))break;
  for(l=0,r=calls-1;l<r;my_row(x+mid)?l=mid:r=mid-1)mid=(l+r+1)/2;
  x+=l;
  for(y=0;y<2222;y+=calls)if(my_col(y))break;
  for(l=0,r=calls-1;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 84 ms 1756 KB Output is partially correct : max_calls = 106
2 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
3 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
4 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
5 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
6 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
7 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
8 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
9 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
10 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
11 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
12 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
13 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 106
14 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
15 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
16 Partially correct 92 ms 1756 KB Output is partially correct : max_calls = 106
17 Partially correct 84 ms 1756 KB Output is partially correct : max_calls = 106
18 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
19 Partially correct 88 ms 1756 KB Output is partially correct : max_calls = 106
20 Partially correct 176 ms 1756 KB Output is partially correct : max_calls = 106
# Verdict Execution time Memory Grader output
1 Partially correct 836 ms 1756 KB Output is partially correct : max_calls = 106
2 Partially correct 836 ms 1756 KB Output is partially correct : max_calls = 106
3 Partially correct 844 ms 1756 KB Output is partially correct : max_calls = 106
4 Partially correct 844 ms 1756 KB Output is partially correct : max_calls = 106
5 Partially correct 852 ms 1756 KB Output is partially correct : max_calls = 106
6 Partially correct 860 ms 1756 KB Output is partially correct : max_calls = 106
7 Partially correct 860 ms 1756 KB Output is partially correct : max_calls = 106
8 Partially correct 860 ms 1756 KB Output is partially correct : max_calls = 106
9 Partially correct 872 ms 1756 KB Output is partially correct : max_calls = 106
10 Partially correct 872 ms 1756 KB Output is partially correct : max_calls = 106
11 Partially correct 256 ms 1756 KB Output is partially correct : max_calls = 106
12 Partially correct 888 ms 1756 KB Output is partially correct : max_calls = 106
13 Partially correct 876 ms 1756 KB Output is partially correct : max_calls = 106
14 Partially correct 888 ms 1756 KB Output is partially correct : max_calls = 106
15 Partially correct 892 ms 1756 KB Output is partially correct : max_calls = 106
16 Partially correct 896 ms 1756 KB Output is partially correct : max_calls = 106
17 Partially correct 900 ms 1756 KB Output is partially correct : max_calls = 106
18 Partially correct 904 ms 1756 KB Output is partially correct : max_calls = 106
19 Partially correct 920 ms 1756 KB Output is partially correct : max_calls = 106
20 Partially correct 912 ms 1756 KB Output is partially correct : max_calls = 106
21 Partially correct 920 ms 1756 KB Output is partially correct : max_calls = 106
22 Partially correct 932 ms 1756 KB Output is partially correct : max_calls = 106
23 Partially correct 932 ms 1756 KB Output is partially correct : max_calls = 106