Submission #71549

# Submission time Handle Problem Language Result Execution time Memory
71549 2018-08-25T05:44:42 Z 윤교준(#2220) 행성 탐사 (GA8_planet) C++11
96.8 / 100
933 ms 1408 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 < 106; i++) paint(f(-i), f(-i));
}

void sangsoo() {
	int x = -1, y = -1, ll = -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;
		ll = i+1;
	}

	{
		int i = 0, idx = 0;
		for(int t;; i++) {
			t = count_col(f(idx));
			if(t) break;
			idx += ll+i+1;
		}
		int s = idx, e = idx+ll+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 77 ms 984 KB Output is partially correct: max_calls = 106
2 Partially correct 78 ms 1056 KB Output is partially correct: max_calls = 106
3 Partially correct 84 ms 1232 KB Output is partially correct: max_calls = 106
4 Partially correct 80 ms 1408 KB Output is partially correct: max_calls = 106
5 Partially correct 93 ms 1408 KB Output is partially correct: max_calls = 106
6 Partially correct 79 ms 1408 KB Output is partially correct: max_calls = 106
7 Partially correct 77 ms 1408 KB Output is partially correct: max_calls = 106
8 Partially correct 93 ms 1408 KB Output is partially correct: max_calls = 106
9 Partially correct 88 ms 1408 KB Output is partially correct: max_calls = 106
10 Partially correct 86 ms 1408 KB Output is partially correct: max_calls = 106
11 Partially correct 97 ms 1408 KB Output is partially correct: max_calls = 106
12 Partially correct 80 ms 1408 KB Output is partially correct: max_calls = 106
13 Partially correct 97 ms 1408 KB Output is partially correct: max_calls = 106
14 Partially correct 83 ms 1408 KB Output is partially correct: max_calls = 106
15 Partially correct 94 ms 1408 KB Output is partially correct: max_calls = 106
16 Partially correct 89 ms 1408 KB Output is partially correct: max_calls = 106
17 Partially correct 86 ms 1408 KB Output is partially correct: max_calls = 106
18 Partially correct 76 ms 1408 KB Output is partially correct: max_calls = 106
19 Partially correct 94 ms 1408 KB Output is partially correct: max_calls = 106
20 Partially correct 168 ms 1408 KB Output is partially correct: max_calls = 106
# Verdict Execution time Memory Grader output
1 Partially correct 749 ms 1408 KB Output is partially correct: max_calls = 106
2 Partially correct 837 ms 1408 KB Output is partially correct: max_calls = 106
3 Partially correct 760 ms 1408 KB Output is partially correct: max_calls = 106
4 Partially correct 748 ms 1408 KB Output is partially correct: max_calls = 106
5 Partially correct 728 ms 1408 KB Output is partially correct: max_calls = 106
6 Partially correct 795 ms 1408 KB Output is partially correct: max_calls = 106
7 Partially correct 778 ms 1408 KB Output is partially correct: max_calls = 106
8 Partially correct 760 ms 1408 KB Output is partially correct: max_calls = 106
9 Partially correct 775 ms 1408 KB Output is partially correct: max_calls = 106
10 Partially correct 757 ms 1408 KB Output is partially correct: max_calls = 106
11 Partially correct 225 ms 1408 KB Output is partially correct: max_calls = 106
12 Partially correct 811 ms 1408 KB Output is partially correct: max_calls = 106
13 Partially correct 762 ms 1408 KB Output is partially correct: max_calls = 106
14 Partially correct 770 ms 1408 KB Output is partially correct: max_calls = 106
15 Partially correct 788 ms 1408 KB Output is partially correct: max_calls = 106
16 Partially correct 866 ms 1408 KB Output is partially correct: max_calls = 106
17 Partially correct 809 ms 1408 KB Output is partially correct: max_calls = 106
18 Partially correct 933 ms 1408 KB Output is partially correct: max_calls = 106
19 Partially correct 861 ms 1408 KB Output is partially correct: max_calls = 106
20 Partially correct 860 ms 1408 KB Output is partially correct: max_calls = 106
21 Partially correct 846 ms 1408 KB Output is partially correct: max_calls = 106
22 Partially correct 893 ms 1408 KB Output is partially correct: max_calls = 106
23 Partially correct 862 ms 1408 KB Output is partially correct: max_calls = 106