Submission #71551

# Submission time Handle Problem Language Result Execution time Memory
71551 2018-08-25T06:36:28 Z 김세빈(#2219) 행성 탐사 (GA8_planet) C++11
52.9 / 100
1025 ms 1468 KB
#include "planet.h"

const int n = 2222;
const int sz = 50;

void ainta()
{
	int i;
	
	for(i=0; i<sz; i++){
		paint(i * sz % n, 0);
		paint(0, i * sz % n);
	}
}

void sangsoo()
{
	int i, k, f1, f2, c1, c2, d1, d2, x, y;
	
	f1 = f2 = 0;
	
	for(i=0; ; i++){
		if(f1 == 0){
			k = count_row((n - i) % n);
			if(k >= 1) f1 = 1, c1 = (n - i) % n, d1 = i;
		}
		if(f1 == 1){
			k = count_row(((c1 - (i - d1) * sz) % n + n) % n);
			if(k > 1) f1 = 2, x = ((c1 - (i - d1) * sz) % n + n) % n;
		}
		
		
		if(f2 == 0){
			k = count_col((n - i) % n);
			if(k >= 1) f2 = 1, c2 = (n - i) % n, d2 = i;
		}
		if(f2 == 1){
			k = count_col(((c2 - (i - d2) * sz) % n + n) % n);
			if(k > 1) f2 = 2, y = ((c2 - (i - d2) * sz) % n + n) % n;
		}
		
		if(f1 > 1 && f2 > 1) break;
	}
	
	report(x, y);
}
# Verdict Execution time Memory Grader output
1 Partially correct 85 ms 888 KB Output is partially correct: max_calls = 1229
2 Partially correct 118 ms 1032 KB Output is partially correct: max_calls = 1243
3 Partially correct 78 ms 1032 KB Output is partially correct: max_calls = 1229
4 Partially correct 119 ms 1092 KB Output is partially correct: max_calls = 1229
5 Partially correct 109 ms 1164 KB Output is partially correct: max_calls = 1222
6 Partially correct 77 ms 1168 KB Output is partially correct: max_calls = 1208
7 Partially correct 96 ms 1168 KB Output is partially correct: max_calls = 1215
8 Partially correct 73 ms 1168 KB Output is partially correct: max_calls = 1235
9 Partially correct 87 ms 1208 KB Output is partially correct: max_calls = 1242
10 Partially correct 84 ms 1208 KB Output is partially correct: max_calls = 1235
11 Partially correct 92 ms 1208 KB Output is partially correct: max_calls = 1221
12 Partially correct 87 ms 1468 KB Output is partially correct: max_calls = 1228
13 Partially correct 89 ms 1468 KB Output is partially correct: max_calls = 1221
14 Partially correct 102 ms 1468 KB Output is partially correct: max_calls = 1207
15 Partially correct 131 ms 1468 KB Output is partially correct: max_calls = 1221
16 Partially correct 88 ms 1468 KB Output is partially correct: max_calls = 1234
17 Partially correct 83 ms 1468 KB Output is partially correct: max_calls = 1241
18 Partially correct 93 ms 1468 KB Output is partially correct: max_calls = 1234
19 Partially correct 78 ms 1468 KB Output is partially correct: max_calls = 1220
20 Partially correct 187 ms 1468 KB Output is partially correct: max_calls = 1236
# Verdict Execution time Memory Grader output
1 Partially correct 780 ms 1468 KB Output is partially correct: max_calls = 1243
2 Partially correct 765 ms 1468 KB Output is partially correct: max_calls = 1241
3 Partially correct 790 ms 1468 KB Output is partially correct: max_calls = 1240
4 Partially correct 990 ms 1468 KB Output is partially correct: max_calls = 1239
5 Partially correct 781 ms 1468 KB Output is partially correct: max_calls = 1245
6 Partially correct 750 ms 1468 KB Output is partially correct: max_calls = 1243
7 Partially correct 765 ms 1468 KB Output is partially correct: max_calls = 1242
8 Partially correct 772 ms 1468 KB Output is partially correct: max_calls = 1247
9 Partially correct 822 ms 1468 KB Output is partially correct: max_calls = 1246
10 Partially correct 778 ms 1468 KB Output is partially correct: max_calls = 1245
11 Partially correct 242 ms 1468 KB Output is partially correct: max_calls = 1224
12 Partially correct 892 ms 1468 KB Output is partially correct: max_calls = 1249
13 Partially correct 929 ms 1468 KB Output is partially correct: max_calls = 1248
14 Partially correct 814 ms 1468 KB Output is partially correct: max_calls = 1247
15 Partially correct 807 ms 1468 KB Output is partially correct: max_calls = 1246
16 Partially correct 860 ms 1468 KB Output is partially correct: max_calls = 1245
17 Partially correct 805 ms 1468 KB Output is partially correct: max_calls = 1243
18 Partially correct 765 ms 1468 KB Output is partially correct: max_calls = 1242
19 Partially correct 1006 ms 1468 KB Output is partially correct: max_calls = 1241
20 Partially correct 979 ms 1468 KB Output is partially correct: max_calls = 1240
21 Partially correct 921 ms 1468 KB Output is partially correct: max_calls = 1238
22 Partially correct 796 ms 1468 KB Output is partially correct: max_calls = 1237
23 Partially correct 1025 ms 1468 KB Output is partially correct: max_calls = 1237