Submission #71520

# Submission time Handle Problem Language Result Execution time Memory
71520 2018-08-25T01:24:43 Z admin 행성 탐사 (GA8_planet) C++17
100 / 100
1316 ms 1548 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);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 124 ms 888 KB max_calls = 200
2 Correct 118 ms 1128 KB max_calls = 200
3 Correct 112 ms 1128 KB max_calls = 200
4 Correct 132 ms 1272 KB max_calls = 200
5 Correct 110 ms 1272 KB max_calls = 200
6 Correct 111 ms 1272 KB max_calls = 200
7 Correct 123 ms 1372 KB max_calls = 200
8 Correct 138 ms 1548 KB max_calls = 200
9 Correct 108 ms 1548 KB max_calls = 200
10 Correct 111 ms 1548 KB max_calls = 200
11 Correct 117 ms 1548 KB max_calls = 200
12 Correct 130 ms 1548 KB max_calls = 200
13 Correct 131 ms 1548 KB max_calls = 200
14 Correct 126 ms 1548 KB max_calls = 200
15 Correct 123 ms 1548 KB max_calls = 200
16 Correct 118 ms 1548 KB max_calls = 200
17 Correct 121 ms 1548 KB max_calls = 200
18 Correct 143 ms 1548 KB max_calls = 200
19 Correct 115 ms 1548 KB max_calls = 200
20 Correct 223 ms 1548 KB max_calls = 200
# Verdict Execution time Memory Grader output
1 Correct 1096 ms 1548 KB max_calls = 200
2 Correct 1044 ms 1548 KB max_calls = 200
3 Correct 1048 ms 1548 KB max_calls = 200
4 Correct 1080 ms 1548 KB max_calls = 200
5 Correct 1182 ms 1548 KB max_calls = 200
6 Correct 1143 ms 1548 KB max_calls = 200
7 Correct 1136 ms 1548 KB max_calls = 200
8 Correct 1101 ms 1548 KB max_calls = 200
9 Correct 1118 ms 1548 KB max_calls = 200
10 Correct 1088 ms 1548 KB max_calls = 200
11 Correct 315 ms 1548 KB max_calls = 200
12 Correct 1095 ms 1548 KB max_calls = 200
13 Correct 1162 ms 1548 KB max_calls = 200
14 Correct 1191 ms 1548 KB max_calls = 200
15 Correct 1249 ms 1548 KB max_calls = 200
16 Correct 1309 ms 1548 KB max_calls = 200
17 Correct 1168 ms 1548 KB max_calls = 200
18 Correct 1172 ms 1548 KB max_calls = 200
19 Correct 1249 ms 1548 KB max_calls = 200
20 Correct 1316 ms 1548 KB max_calls = 200
21 Correct 1220 ms 1548 KB max_calls = 200
22 Correct 1291 ms 1548 KB max_calls = 200
23 Correct 1309 ms 1548 KB max_calls = 200