Submission #7272

# Submission time Handle Problem Language Result Execution time Memory
7272 2014-07-28T19:19:58 Z gs13068 행성 탐사 (GA8_planet) C++
98.7 / 100
684 ms 1756 KB
#include "planet.h"
#include <algorithm>
   
void ainta()
{
  int i,j,k;
  paint(0,0);
  for(i=1;i<57;i++)paint(2222-i,2222-i);
  for(j=0;j<7;j++)for(k=0;k<j;k++)paint(2222-j,2222-(i++));
  for(j=0;j<7;j++)for(k=0;k<j;k++)paint(k+2,2222-j);
}
   
void sangsoo()
{
  int x,y,z=0;
  int i,j,k,t=0;
  for(x=0;;x+=std::min(z,57))
  {
    if(x+std::min(z,56)>=2221)
    {
      i=x+std::min(z,56);
      break;
    }
    z++;
    if(count_row(x))
    {
      i=x+std::min(z-1,56);
        break;
    }
  }
  if(i>2221)i=2221;
  while(i-x>7)
  {
    k=(x+i+1)/2;
    z++;
    if(count_row(k))x=k;
    else i=k-1;
  }
  for(y=0;;y+=std::min(z,78))
  {
    if(z==77)
    {
      z++;
      x+=count_row((x+1)%2222);
    }
    if(y+std::min(z,77)>=2221)
    {
      j=y+std::min(z,77);
      break;
    }
    z++;
    if(count_col(y))
    {
      j=y+std::min(z-1,77);
      break;
    }
  }
  if(j>2221)j=2221;
  while(j-y>7)
  {
    k=(y+j+1)/2;
    z++;
    if(count_col(k))y=k;
    else j=k-1;
  }
  while(z<98)
  {
    z++;
    count_col(0);
  }
  if(z==98)x+=count_row((x+1)%2222);
  y+=count_col((y+1)%2222);
  report(x,y);
}
# Verdict Execution time Memory Grader output
1 Partially correct 60 ms 1756 KB Output is partially correct : max_calls = 103
2 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
3 Partially correct 56 ms 1756 KB Output is partially correct : max_calls = 103
4 Partially correct 60 ms 1756 KB Output is partially correct : max_calls = 103
5 Partially correct 56 ms 1756 KB Output is partially correct : max_calls = 103
6 Partially correct 60 ms 1756 KB Output is partially correct : max_calls = 103
7 Partially correct 60 ms 1756 KB Output is partially correct : max_calls = 103
8 Partially correct 60 ms 1756 KB Output is partially correct : max_calls = 103
9 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
10 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
11 Partially correct 60 ms 1756 KB Output is partially correct : max_calls = 103
12 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
13 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
14 Partially correct 72 ms 1756 KB Output is partially correct : max_calls = 103
15 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
16 Partially correct 72 ms 1756 KB Output is partially correct : max_calls = 103
17 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
18 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
19 Partially correct 64 ms 1756 KB Output is partially correct : max_calls = 103
20 Partially correct 152 ms 1756 KB Output is partially correct : max_calls = 103
# Verdict Execution time Memory Grader output
1 Partially correct 596 ms 1756 KB Output is partially correct : max_calls = 103
2 Partially correct 596 ms 1756 KB Output is partially correct : max_calls = 103
3 Partially correct 600 ms 1756 KB Output is partially correct : max_calls = 103
4 Partially correct 604 ms 1756 KB Output is partially correct : max_calls = 103
5 Partially correct 612 ms 1756 KB Output is partially correct : max_calls = 103
6 Partially correct 608 ms 1756 KB Output is partially correct : max_calls = 103
7 Partially correct 612 ms 1756 KB Output is partially correct : max_calls = 103
8 Partially correct 624 ms 1756 KB Output is partially correct : max_calls = 103
9 Partially correct 628 ms 1756 KB Output is partially correct : max_calls = 103
10 Partially correct 644 ms 1756 KB Output is partially correct : max_calls = 103
11 Partially correct 196 ms 1756 KB Output is partially correct : max_calls = 103
12 Partially correct 660 ms 1756 KB Output is partially correct : max_calls = 103
13 Partially correct 648 ms 1756 KB Output is partially correct : max_calls = 103
14 Partially correct 656 ms 1756 KB Output is partially correct : max_calls = 103
15 Partially correct 672 ms 1756 KB Output is partially correct : max_calls = 103
16 Partially correct 660 ms 1756 KB Output is partially correct : max_calls = 103
17 Partially correct 660 ms 1756 KB Output is partially correct : max_calls = 103
18 Partially correct 660 ms 1756 KB Output is partially correct : max_calls = 103
19 Partially correct 672 ms 1756 KB Output is partially correct : max_calls = 103
20 Partially correct 676 ms 1756 KB Output is partially correct : max_calls = 103
21 Partially correct 676 ms 1756 KB Output is partially correct : max_calls = 103
22 Partially correct 676 ms 1756 KB Output is partially correct : max_calls = 103
23 Partially correct 684 ms 1756 KB Output is partially correct : max_calls = 103