답안 #95676

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
95676 2019-02-02T07:33:34 Z errorgorn Gap (APIO16_gap) C++14
0 / 100
64 ms 2316 KB
#include "gap.h"
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;

long long findGap(int T, int N){
    vector<long long> v;
long long small,big;
MinMax(0,1000000000000000000,&small,&big);
long long gap=(big-small)/((long long) N-1);
long long si=small,se=small+(gap++);
long long mn,mx;
while (si<=big){
    MinMax(si,se,&mn,&mx);
    v.push_back(mn);
    if (mx!=mn) v.push_back(mx);
    si+=gap,se+=gap;
}
long long maximal=0;
for (int it=1;it<v.size();it++){
    maximal=max(maximal,v[it]-v[it-1]);
}
return maximal;
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:21:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 for (int it=1;it<v.size();it++){
               ~~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 356 KB Output isn't correct
2 Incorrect 3 ms 256 KB Output isn't correct
3 Incorrect 2 ms 292 KB Output isn't correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Incorrect 2 ms 348 KB Output isn't correct
6 Incorrect 2 ms 256 KB Output isn't correct
7 Incorrect 2 ms 348 KB Output isn't correct
8 Incorrect 2 ms 256 KB Output isn't correct
9 Incorrect 2 ms 376 KB Output isn't correct
10 Incorrect 2 ms 256 KB Output isn't correct
11 Incorrect 2 ms 380 KB Output isn't correct
12 Incorrect 3 ms 360 KB Output isn't correct
13 Incorrect 2 ms 376 KB Output isn't correct
14 Incorrect 2 ms 376 KB Output isn't correct
15 Incorrect 3 ms 368 KB Output isn't correct
16 Incorrect 17 ms 860 KB Output isn't correct
17 Incorrect 16 ms 888 KB Output isn't correct
18 Incorrect 17 ms 940 KB Output isn't correct
19 Incorrect 16 ms 888 KB Output isn't correct
20 Incorrect 9 ms 888 KB Output isn't correct
21 Incorrect 61 ms 2284 KB Output isn't correct
22 Incorrect 61 ms 2288 KB Output isn't correct
23 Incorrect 60 ms 2288 KB Output isn't correct
24 Incorrect 61 ms 2288 KB Output isn't correct
25 Incorrect 56 ms 2260 KB Output isn't correct
26 Incorrect 62 ms 2300 KB Output isn't correct
27 Incorrect 61 ms 2292 KB Output isn't correct
28 Incorrect 63 ms 2308 KB Output isn't correct
29 Incorrect 61 ms 2316 KB Output isn't correct
30 Incorrect 32 ms 2288 KB Output isn't correct
31 Incorrect 2 ms 256 KB Output isn't correct
32 Incorrect 2 ms 256 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 2 ms 420 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 1 ms 376 KB Output isn't correct
5 Correct 1 ms 256 KB Output is correct
6 Incorrect 2 ms 296 KB Output isn't correct
7 Incorrect 1 ms 256 KB Output isn't correct
8 Incorrect 2 ms 372 KB Output isn't correct
9 Incorrect 2 ms 256 KB Output isn't correct
10 Incorrect 2 ms 256 KB Output isn't correct
11 Incorrect 3 ms 380 KB Output isn't correct
12 Incorrect 3 ms 376 KB Output isn't correct
13 Incorrect 2 ms 420 KB Output isn't correct
14 Incorrect 2 ms 376 KB Output isn't correct
15 Correct 2 ms 376 KB Output is correct
16 Incorrect 16 ms 1004 KB Output isn't correct
17 Incorrect 16 ms 888 KB Output isn't correct
18 Incorrect 16 ms 888 KB Output isn't correct
19 Incorrect 16 ms 888 KB Output isn't correct
20 Incorrect 9 ms 944 KB Output isn't correct
21 Incorrect 63 ms 2292 KB Output isn't correct
22 Incorrect 60 ms 2260 KB Output isn't correct
23 Incorrect 59 ms 2288 KB Output isn't correct
24 Incorrect 60 ms 2264 KB Output isn't correct
25 Correct 56 ms 2288 KB Output is correct
26 Incorrect 60 ms 2288 KB Output isn't correct
27 Incorrect 64 ms 2312 KB Output isn't correct
28 Incorrect 64 ms 2288 KB Output isn't correct
29 Incorrect 61 ms 2224 KB Output isn't correct
30 Incorrect 32 ms 2204 KB Output isn't correct
31 Incorrect 2 ms 256 KB Output isn't correct
32 Incorrect 2 ms 256 KB Output isn't correct