답안 #7271

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
7271 2014-07-28T18:50:59 Z gs13068 행성 탐사 (GA8_planet) C++
100 / 100
704 ms 1756 KB
#include "planet.h"
#include <algorithm>
  
void ainta()
{
  int i,j,k;
  paint(0,0);
  for(i=1;i<63;i++)paint(2222-i,2222-i);
  i=63;
  for(j=0;j<8;j++)for(k=0;k<j;k++)paint((2222-j)%2222,2222-(i++));
  paint(2,2221);
  paint(2,2220);
  paint(3,2220);
  paint(2,2219);
  paint(3,2219);
  paint(4,2219);
  paint(2,2218);
  paint(3,2218);
  paint(4,2218);
  paint(5,2218);
}
  
void sangsoo()
{
  int x,y,z=0;
  int i,j,k,t=0;
  for(x=0;;x+=std::min(z,63))
  {
    if(x+std::min(z,62)>=2221)
    {
      i=x+std::min(z,62);
      break;
    }
    z++;
    if(count_row(x))
    {
      i=x+std::min(z-1,62);
        break;
    }
  }
  if(i>2221)i=2221;
  while(i-x>8)
  {
    k=(x+i+1)/2;
    z++;
    if(count_row(k))x=k;
    else i=k-1;
  }
  for(y=0;;y+=std::min(z,91))
  {
    if(z==90)
    {
      z++;
      x+=count_row((x+1)%2222);
    }
    if(y+std::min(z,90)>=2221)
    {
      j=y+std::min(z,90);
      break;
    }
    z++;
    if(count_col(y))
    {
      j=y+std::min(z-1,90);
      break;
    }
  }
  if(j>2221)j=2221;
  while(j-y>5)
  {
    k=(y+j+1)/2;
    z++;
    if(count_col(k))y=k;
    else j=k-1;
  }
  while(z<99)
  {
    z++;
    count_col(0);
  }
  if(z==99)x+=count_row((x+1)%2222);
  y+=count_col((y+1)%2222);
  report(x,y);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 60 ms 1756 KB Output is correct - max_calls = 101
2 Correct 56 ms 1756 KB Output is correct - max_calls = 101
3 Correct 60 ms 1756 KB Output is correct - max_calls = 101
4 Correct 60 ms 1756 KB Output is correct - max_calls = 101
5 Correct 60 ms 1756 KB Output is correct - max_calls = 101
6 Correct 60 ms 1756 KB Output is correct - max_calls = 101
7 Correct 60 ms 1756 KB Output is correct - max_calls = 101
8 Correct 64 ms 1756 KB Output is correct - max_calls = 101
9 Correct 56 ms 1756 KB Output is correct - max_calls = 101
10 Correct 64 ms 1756 KB Output is correct - max_calls = 101
11 Correct 64 ms 1756 KB Output is correct - max_calls = 101
12 Correct 64 ms 1756 KB Output is correct - max_calls = 101
13 Correct 68 ms 1756 KB Output is correct - max_calls = 101
14 Correct 64 ms 1756 KB Output is correct - max_calls = 101
15 Correct 64 ms 1756 KB Output is correct - max_calls = 101
16 Correct 68 ms 1756 KB Output is correct - max_calls = 101
17 Correct 68 ms 1756 KB Output is correct - max_calls = 101
18 Correct 68 ms 1756 KB Output is correct - max_calls = 101
19 Correct 72 ms 1756 KB Output is correct - max_calls = 101
20 Correct 148 ms 1756 KB Output is correct - max_calls = 101
# 결과 실행 시간 메모리 Grader output
1 Correct 608 ms 1756 KB Output is correct - max_calls = 101
2 Correct 636 ms 1756 KB Output is correct - max_calls = 101
3 Correct 620 ms 1756 KB Output is correct - max_calls = 101
4 Correct 624 ms 1756 KB Output is correct - max_calls = 101
5 Correct 636 ms 1756 KB Output is correct - max_calls = 101
6 Correct 652 ms 1756 KB Output is correct - max_calls = 101
7 Correct 632 ms 1756 KB Output is correct - max_calls = 101
8 Correct 644 ms 1756 KB Output is correct - max_calls = 101
9 Correct 640 ms 1756 KB Output is correct - max_calls = 101
10 Correct 632 ms 1756 KB Output is correct - max_calls = 101
11 Correct 196 ms 1756 KB Output is correct - max_calls = 101
12 Correct 652 ms 1756 KB Output is correct - max_calls = 101
13 Correct 660 ms 1756 KB Output is correct - max_calls = 101
14 Correct 656 ms 1756 KB Output is correct - max_calls = 101
15 Correct 660 ms 1756 KB Output is correct - max_calls = 101
16 Correct 664 ms 1756 KB Output is correct - max_calls = 101
17 Correct 668 ms 1756 KB Output is correct - max_calls = 101
18 Correct 696 ms 1756 KB Output is correct - max_calls = 101
19 Correct 680 ms 1756 KB Output is correct - max_calls = 101
20 Correct 684 ms 1756 KB Output is correct - max_calls = 101
21 Correct 688 ms 1756 KB Output is correct - max_calls = 101
22 Correct 692 ms 1756 KB Output is correct - max_calls = 101
23 Correct 704 ms 1756 KB Output is correct - max_calls = 101