답안 #71521

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
71521 2018-08-25T01:29:45 Z admin 행성 탐사 (GA8_planet) C++17
71 / 100
1267 ms 1396 KB
#include "planet.h"
 
#define N 2222
 
void ainta() {
    int i;
    for(i = 0; i < 200; i++) paint(i, i);
}
 
void sangsoo() {
    int r, c, g, k, t = 0, cnt = 0;
 
    for(c = 0, g = 1; ; c = (c + ++g) % N, ++t, ++cnt) {
        if(count_col(c) != 0) break;
    }
 
    for(k = 6; k >= 0; k--, ++t, ++cnt) {
        c = (c - (1<<k) + N) % N;
        if(!count_col(c)) c = (c + (1<<k) + N) % N;
    }
 
    for(r = 0, g = 1; ; r = (r + t + ++g) % N, ++cnt) {
        if(count_row(r) != 0) break;
    }
 
    for(k = 6; k >= 0; k--, ++cnt) {
        r = (r - (1<<k) + N) % N;
        if(!count_row(r)) r = (r + (1<<k) + N) % N;
    }
 
    report(r, c);
}

Compilation message

grader.c: In function 'void count_increment(const char*)':
grader.c:74:103: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=]
   printf("Incorrect\ncount_%s()를 %d회보다 많이 호출했습니다.\n", limit_count_calls,  func);
                                                                                                       ^
grader.c:74:103: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char*' [-Wformat=]
grader.c: In function 'int main()':
grader.c:146:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d", &seed, &range);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Partially correct 103 ms 888 KB Output is partially correct: max_calls = 200
2 Partially correct 123 ms 1044 KB Output is partially correct: max_calls = 200
3 Partially correct 111 ms 1200 KB Output is partially correct: max_calls = 200
4 Partially correct 118 ms 1200 KB Output is partially correct: max_calls = 200
5 Partially correct 121 ms 1304 KB Output is partially correct: max_calls = 200
6 Partially correct 124 ms 1304 KB Output is partially correct: max_calls = 200
7 Partially correct 112 ms 1304 KB Output is partially correct: max_calls = 200
8 Partially correct 113 ms 1304 KB Output is partially correct: max_calls = 200
9 Partially correct 123 ms 1304 KB Output is partially correct: max_calls = 200
10 Partially correct 122 ms 1304 KB Output is partially correct: max_calls = 200
11 Partially correct 104 ms 1304 KB Output is partially correct: max_calls = 200
12 Partially correct 134 ms 1360 KB Output is partially correct: max_calls = 200
13 Partially correct 126 ms 1360 KB Output is partially correct: max_calls = 200
14 Partially correct 119 ms 1360 KB Output is partially correct: max_calls = 200
15 Partially correct 124 ms 1360 KB Output is partially correct: max_calls = 200
16 Partially correct 124 ms 1360 KB Output is partially correct: max_calls = 200
17 Partially correct 115 ms 1360 KB Output is partially correct: max_calls = 200
18 Partially correct 122 ms 1360 KB Output is partially correct: max_calls = 200
19 Partially correct 108 ms 1360 KB Output is partially correct: max_calls = 200
20 Partially correct 210 ms 1360 KB Output is partially correct: max_calls = 200
# 결과 실행 시간 메모리 Grader output
1 Partially correct 1087 ms 1360 KB Output is partially correct: max_calls = 200
2 Partially correct 1050 ms 1360 KB Output is partially correct: max_calls = 200
3 Partially correct 1052 ms 1360 KB Output is partially correct: max_calls = 200
4 Partially correct 1103 ms 1360 KB Output is partially correct: max_calls = 200
5 Partially correct 1000 ms 1396 KB Output is partially correct: max_calls = 200
6 Partially correct 1038 ms 1396 KB Output is partially correct: max_calls = 200
7 Partially correct 1096 ms 1396 KB Output is partially correct: max_calls = 200
8 Partially correct 1036 ms 1396 KB Output is partially correct: max_calls = 200
9 Partially correct 1018 ms 1396 KB Output is partially correct: max_calls = 200
10 Partially correct 1072 ms 1396 KB Output is partially correct: max_calls = 200
11 Partially correct 360 ms 1396 KB Output is partially correct: max_calls = 200
12 Partially correct 1240 ms 1396 KB Output is partially correct: max_calls = 200
13 Partially correct 1122 ms 1396 KB Output is partially correct: max_calls = 200
14 Partially correct 1204 ms 1396 KB Output is partially correct: max_calls = 200
15 Partially correct 1267 ms 1396 KB Output is partially correct: max_calls = 200
16 Partially correct 1231 ms 1396 KB Output is partially correct: max_calls = 200
17 Partially correct 1183 ms 1396 KB Output is partially correct: max_calls = 200
18 Partially correct 1201 ms 1396 KB Output is partially correct: max_calls = 200
19 Partially correct 1217 ms 1396 KB Output is partially correct: max_calls = 200
20 Partially correct 1250 ms 1396 KB Output is partially correct: max_calls = 200
21 Partially correct 1210 ms 1396 KB Output is partially correct: max_calls = 200
22 Partially correct 1223 ms 1396 KB Output is partially correct: max_calls = 200
23 Partially correct 1163 ms 1396 KB Output is partially correct: max_calls = 200