답안 #95619

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
95619 2019-02-02T06:40:36 Z jeff Gap (APIO16_gap) C++14
0 / 100
66 ms 1272 KB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;

long long findGap(int T, int N) {
    long long l, r, y, z, ls = -1, rs = 0, a, b, i;
    MinMax(0, 1000000000000000000, &y, &z);
    for (i = 0; b < z; ++i) {
        a = y + ((z - y) / N + 1) * i;
        b = y + ((z - y) / N + 1) * (i + 1);
        if (a >= b) continue;
        MinMax(a, b, &l, &r);
        if (l < 0 && r < 0) continue;
        if (ls > -1) rs = max(rs, l - ls);
        ls = r;
    }
	return rs;
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:8:19: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
     for (i = 0; b < z; ++i) {
                 ~~^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 392 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 2 ms 376 KB Output isn't correct
5 Incorrect 2 ms 376 KB Output isn't correct
6 Incorrect 2 ms 376 KB Output isn't correct
7 Incorrect 2 ms 376 KB Output isn't correct
8 Incorrect 2 ms 504 KB Output isn't correct
9 Incorrect 2 ms 376 KB Output isn't correct
10 Incorrect 2 ms 376 KB Output isn't correct
11 Incorrect 3 ms 376 KB Output isn't correct
12 Incorrect 2 ms 376 KB Output isn't correct
13 Incorrect 3 ms 376 KB Output isn't correct
14 Incorrect 3 ms 376 KB Output isn't correct
15 Incorrect 2 ms 376 KB Output isn't correct
16 Incorrect 17 ms 504 KB Output isn't correct
17 Incorrect 17 ms 504 KB Output isn't correct
18 Incorrect 17 ms 504 KB Output isn't correct
19 Incorrect 18 ms 504 KB Output isn't correct
20 Incorrect 5 ms 504 KB Output isn't correct
21 Incorrect 65 ms 1116 KB Output isn't correct
22 Incorrect 65 ms 1236 KB Output isn't correct
23 Incorrect 64 ms 1200 KB Output isn't correct
24 Incorrect 66 ms 1116 KB Output isn't correct
25 Incorrect 61 ms 1144 KB Output isn't correct
26 Incorrect 65 ms 1144 KB Output isn't correct
27 Incorrect 65 ms 1148 KB Output isn't correct
28 Incorrect 64 ms 1144 KB Output isn't correct
29 Incorrect 64 ms 1144 KB Output isn't correct
30 Incorrect 13 ms 1144 KB Output isn't correct
31 Incorrect 2 ms 376 KB Output isn't correct
32 Incorrect 2 ms 376 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 2 ms 376 KB Partially correct
2 Partially correct 2 ms 376 KB Partially correct
3 Partially correct 2 ms 376 KB Partially correct
4 Partially correct 2 ms 376 KB Partially correct
5 Partially correct 2 ms 376 KB Partially correct
6 Partially correct 2 ms 380 KB Partially correct
7 Partially correct 2 ms 380 KB Partially correct
8 Partially correct 2 ms 376 KB Partially correct
9 Partially correct 2 ms 376 KB Partially correct
10 Incorrect 3 ms 376 KB Output isn't correct
11 Partially correct 3 ms 376 KB Partially correct
12 Partially correct 2 ms 376 KB Partially correct
13 Partially correct 3 ms 376 KB Partially correct
14 Partially correct 3 ms 376 KB Partially correct
15 Partially correct 2 ms 376 KB Partially correct
16 Partially correct 16 ms 508 KB Partially correct
17 Partially correct 17 ms 504 KB Partially correct
18 Partially correct 16 ms 504 KB Partially correct
19 Partially correct 17 ms 632 KB Partially correct
20 Incorrect 4 ms 504 KB Output isn't correct
21 Partially correct 64 ms 1144 KB Partially correct
22 Partially correct 64 ms 1272 KB Partially correct
23 Partially correct 64 ms 1144 KB Partially correct
24 Partially correct 64 ms 1148 KB Partially correct
25 Partially correct 61 ms 1144 KB Partially correct
26 Partially correct 65 ms 1116 KB Partially correct
27 Partially correct 65 ms 1144 KB Partially correct
28 Partially correct 64 ms 1272 KB Partially correct
29 Partially correct 65 ms 1144 KB Partially correct
30 Incorrect 12 ms 1144 KB Output isn't correct
31 Partially correct 2 ms 376 KB Partially correct
32 Partially correct 2 ms 376 KB Partially correct