Submission #7540

# Submission time Handle Problem Language Result Execution time Memory
7540 2014-08-10T14:05:44 Z kipa00 행성 탐사 (GA8_planet) C++
51.5 / 100
2544 ms 1756 KB
#include "planet.h"
 
//야! 내가 멍청이다!
 
int cr(int a) {
  return count_row((a + 4444) % 2222);
}
 
int cc(int a) {
  return count_col((a + 4444) % 2222);
}
 
//열심히 색칠하시는 분
void ainta() {
  int i;
  paint(0, 0);
  for (i=2; i<=1112; i+=11) {
    paint(i, 0);
    paint(0, i);
  }
}
 
//열심히 종횡조사하시는 분
void sangsoo() {
  int i, x = -1, y = -1, ok = 0;
  for (i=0; ok < 3; i+=7) {
    if (x >= 0) {
      if (ok & 2) cr(x);
      else {
        int temp = cr(x);
        if (temp <= 1) {
          x += 1;
        } else {
          ok |= 2;
        }
      }
    } else {
      int r = cr(-i);
      if (r > 1) {
        x = -i + 4444;
        ok |= 2;
      } else if (r == 1) {
        x = (-i * 18 / 7 - 2) + 4444;
      }
    }
    if (y >= 0) {
      if (ok & 1) cc(y);
      else {
        int temp = cc(y);
        if (temp <= 1) {
          y += 1;
        } else {
          ok |= 1;
        }
      }
    } else {
      int c = cc(-i);
      if (c > 1) {
        y = -i + 4444;
        ok |= 1;
      } else if (c == 1) {
        y = (-i * 18 / 7 - 2) + 4444;
      }
    }
  }
  report(x % 2222, y % 2222);
}
# Verdict Execution time Memory Grader output
1 Partially correct 240 ms 1756 KB Output is partially correct : max_calls = 2260
2 Partially correct 248 ms 1756 KB Output is partially correct : max_calls = 2260
3 Partially correct 244 ms 1756 KB Output is partially correct : max_calls = 2260
4 Partially correct 244 ms 1756 KB Output is partially correct : max_calls = 2260
5 Partially correct 248 ms 1756 KB Output is partially correct : max_calls = 2260
6 Partially correct 248 ms 1756 KB Output is partially correct : max_calls = 2260
7 Partially correct 248 ms 1756 KB Output is partially correct : max_calls = 2260
8 Partially correct 268 ms 1756 KB Output is partially correct : max_calls = 2260
9 Partially correct 264 ms 1756 KB Output is partially correct : max_calls = 2260
10 Partially correct 244 ms 1756 KB Output is partially correct : max_calls = 2260
11 Partially correct 248 ms 1756 KB Output is partially correct : max_calls = 2260
12 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
13 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
14 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
15 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
16 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
17 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
18 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
19 Partially correct 252 ms 1756 KB Output is partially correct : max_calls = 2260
20 Partially correct 336 ms 1756 KB Output is partially correct : max_calls = 2260
# Verdict Execution time Memory Grader output
1 Partially correct 2452 ms 1756 KB Output is partially correct : max_calls = 2260
2 Partially correct 2476 ms 1756 KB Output is partially correct : max_calls = 2260
3 Partially correct 2464 ms 1756 KB Output is partially correct : max_calls = 2260
4 Partially correct 2472 ms 1756 KB Output is partially correct : max_calls = 2260
5 Partially correct 2488 ms 1756 KB Output is partially correct : max_calls = 2260
6 Partially correct 2496 ms 1756 KB Output is partially correct : max_calls = 2260
7 Partially correct 2476 ms 1756 KB Output is partially correct : max_calls = 2260
8 Partially correct 2488 ms 1756 KB Output is partially correct : max_calls = 2260
9 Partially correct 2500 ms 1756 KB Output is partially correct : max_calls = 2260
10 Partially correct 2520 ms 1756 KB Output is partially correct : max_calls = 2260
11 Partially correct 664 ms 1756 KB Output is partially correct : max_calls = 2260
12 Partially correct 2508 ms 1756 KB Output is partially correct : max_calls = 2260
13 Partially correct 2500 ms 1756 KB Output is partially correct : max_calls = 2260
14 Partially correct 2516 ms 1756 KB Output is partially correct : max_calls = 2260
15 Partially correct 2512 ms 1756 KB Output is partially correct : max_calls = 2260
16 Partially correct 2536 ms 1756 KB Output is partially correct : max_calls = 2260
17 Partially correct 2524 ms 1756 KB Output is partially correct : max_calls = 2260
18 Partially correct 2528 ms 1756 KB Output is partially correct : max_calls = 2260
19 Partially correct 2520 ms 1756 KB Output is partially correct : max_calls = 2260
20 Partially correct 2544 ms 1756 KB Output is partially correct : max_calls = 2260
21 Partially correct 2540 ms 1756 KB Output is partially correct : max_calls = 2260
22 Partially correct 2540 ms 1756 KB Output is partially correct : max_calls = 2260
23 Partially correct 2540 ms 1756 KB Output is partially correct : max_calls = 2260