Submission #71545

# Submission time Handle Problem Language Result Execution time Memory
71545 2018-08-25T05:39:11 Z 윤교준(#2220) 행성 탐사 (GA8_planet) C++11
96.2 / 100
752 ms 1372 KB
#include "planet.h"
#include <bits/stdc++.h>
using namespace std;

inline int f(int i) {
	if(i < 0) return 2222+i;
	if(2222 <= i) return i-2222;
	return i;
}

void ainta() {
	for(int i = 0; i < 74; i++) paint(f(-i), f(-i));
	for(int i = 0; i < 27; i++) paint(f(-i-74), f(-i-74));
}

void sangsoo() {
	int x = -1, y = -1;

	{
		int i = 0;
		for(int t;; i++) {
			t = count_row(f(i*(i+1)/2));
			if(t) break;
		}
		int s = i*(i+1)/2, e = s+i;
		for(int m; s < e;) {
			m = (s+e+1) >> 1; i++;
			if(count_row(f(m))) s = m;
			else e = m-1;
		}
		x = s;
		for(; i+2 <= 74; i++) count_row(0);
	}

	{
		int i = 0, idx = 0;
		for(int t;; i++) {
			t = count_col(f(idx));
			if(t) break;
			idx += 75+i;
		}
		int s = idx, e = idx+74+i;
		for(int m; s < e;) {
			m = (s+e+1) >> 1;
			if(count_col(f(m))) s = m;
			else e = m-1;
		}
		y = s;
	}

	report(x, y);
}
# Verdict Execution time Memory Grader output
1 Partially correct 57 ms 1016 KB Output is partially correct: max_calls = 107
2 Partially correct 58 ms 1124 KB Output is partially correct: max_calls = 107
3 Partially correct 68 ms 1124 KB Output is partially correct: max_calls = 107
4 Partially correct 59 ms 1124 KB Output is partially correct: max_calls = 107
5 Partially correct 66 ms 1208 KB Output is partially correct: max_calls = 107
6 Partially correct 65 ms 1208 KB Output is partially correct: max_calls = 107
7 Partially correct 70 ms 1208 KB Output is partially correct: max_calls = 107
8 Partially correct 63 ms 1212 KB Output is partially correct: max_calls = 107
9 Partially correct 67 ms 1212 KB Output is partially correct: max_calls = 107
10 Partially correct 68 ms 1212 KB Output is partially correct: max_calls = 107
11 Partially correct 93 ms 1212 KB Output is partially correct: max_calls = 107
12 Partially correct 80 ms 1212 KB Output is partially correct: max_calls = 107
13 Partially correct 66 ms 1212 KB Output is partially correct: max_calls = 107
14 Partially correct 76 ms 1212 KB Output is partially correct: max_calls = 107
15 Partially correct 73 ms 1212 KB Output is partially correct: max_calls = 107
16 Partially correct 68 ms 1236 KB Output is partially correct: max_calls = 107
17 Partially correct 82 ms 1240 KB Output is partially correct: max_calls = 107
18 Partially correct 62 ms 1256 KB Output is partially correct: max_calls = 107
19 Partially correct 76 ms 1256 KB Output is partially correct: max_calls = 107
20 Partially correct 180 ms 1256 KB Output is partially correct: max_calls = 107
# Verdict Execution time Memory Grader output
1 Partially correct 619 ms 1256 KB Output is partially correct: max_calls = 107
2 Partially correct 671 ms 1256 KB Output is partially correct: max_calls = 107
3 Partially correct 708 ms 1256 KB Output is partially correct: max_calls = 107
4 Partially correct 640 ms 1256 KB Output is partially correct: max_calls = 107
5 Partially correct 667 ms 1256 KB Output is partially correct: max_calls = 107
6 Partially correct 752 ms 1256 KB Output is partially correct: max_calls = 107
7 Partially correct 680 ms 1256 KB Output is partially correct: max_calls = 107
8 Partially correct 596 ms 1256 KB Output is partially correct: max_calls = 107
9 Partially correct 724 ms 1256 KB Output is partially correct: max_calls = 107
10 Partially correct 703 ms 1256 KB Output is partially correct: max_calls = 107
11 Partially correct 196 ms 1256 KB Output is partially correct: max_calls = 107
12 Partially correct 668 ms 1256 KB Output is partially correct: max_calls = 107
13 Partially correct 656 ms 1260 KB Output is partially correct: max_calls = 107
14 Partially correct 731 ms 1260 KB Output is partially correct: max_calls = 107
15 Partially correct 593 ms 1260 KB Output is partially correct: max_calls = 107
16 Partially correct 623 ms 1260 KB Output is partially correct: max_calls = 107
17 Partially correct 629 ms 1260 KB Output is partially correct: max_calls = 107
18 Partially correct 613 ms 1264 KB Output is partially correct: max_calls = 107
19 Partially correct 633 ms 1264 KB Output is partially correct: max_calls = 107
20 Partially correct 649 ms 1264 KB Output is partially correct: max_calls = 107
21 Partially correct 693 ms 1372 KB Output is partially correct: max_calls = 107
22 Partially correct 654 ms 1372 KB Output is partially correct: max_calls = 107
23 Partially correct 684 ms 1372 KB Output is partially correct: max_calls = 107