Submission #1110457

# Submission time Handle Problem Language Result Execution time Memory
1110457 2024-11-09T13:48:20 Z TitanicXDzz Gap (APIO16_gap) C++17
0 / 100
30 ms 2744 KB
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
long long findGap(int T, int n)
{
       long long s=-1;
       long long t=1e18+1;
       long long x=-1;
       long long y=-1;
       long long maxi=LLONG_MIN;
       while(s<t){
           MinMax(s+1,t-1,&s,&t);
           if(x!=-1&&s!=-1){
            maxi=max(maxi,s-x);
            maxi=max(maxi,y-t);
           }
           x=s;
           y=t;
       }
       if(n%2==0){
        maxi=max(maxi,y-x);
       }
       else{
        MinMax(s+1,t-1,&s,&t);
        maxi=max(maxi,s-x);
        maxi=max(maxi,y-s);
       }
       return maxi;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
3 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
4 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
5 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
6 Incorrect 1 ms 2384 KB Output isn't correct
7 Incorrect 1 ms 2384 KB Output isn't correct
8 Incorrect 1 ms 2384 KB Output isn't correct
9 Incorrect 1 ms 2384 KB Output isn't correct
10 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
11 Incorrect 1 ms 2384 KB Output isn't correct
12 Incorrect 1 ms 2384 KB Output isn't correct
13 Incorrect 1 ms 2384 KB Output isn't correct
14 Incorrect 1 ms 2384 KB Output isn't correct
15 Incorrect 1 ms 2384 KB Output isn't correct
16 Incorrect 7 ms 2384 KB Output isn't correct
17 Incorrect 7 ms 2384 KB Output isn't correct
18 Incorrect 8 ms 2384 KB Output isn't correct
19 Incorrect 8 ms 2384 KB Output isn't correct
20 Runtime error 6 ms 2384 KB Execution failed because the return code was nonzero
21 Incorrect 29 ms 2640 KB Output isn't correct
22 Incorrect 27 ms 2744 KB Output isn't correct
23 Incorrect 30 ms 2640 KB Output isn't correct
24 Incorrect 29 ms 2640 KB Output isn't correct
25 Incorrect 30 ms 2640 KB Output isn't correct
26 Incorrect 29 ms 2640 KB Output isn't correct
27 Incorrect 27 ms 2640 KB Output isn't correct
28 Incorrect 28 ms 2640 KB Output isn't correct
29 Incorrect 27 ms 2640 KB Output isn't correct
30 Runtime error 21 ms 2640 KB Execution failed because the return code was nonzero
31 Incorrect 1 ms 2384 KB Output isn't correct
32 Correct 1 ms 2384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2384 KB Output isn't correct
2 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
3 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
4 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
5 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
6 Partially correct 1 ms 2384 KB Partially correct
7 Partially correct 1 ms 2384 KB Partially correct
8 Partially correct 1 ms 2384 KB Partially correct
9 Partially correct 1 ms 2384 KB Partially correct
10 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
11 Partially correct 1 ms 2384 KB Partially correct
12 Partially correct 1 ms 2384 KB Partially correct
13 Partially correct 1 ms 2384 KB Partially correct
14 Partially correct 1 ms 2384 KB Partially correct
15 Partially correct 1 ms 2384 KB Partially correct
16 Partially correct 7 ms 2384 KB Partially correct
17 Partially correct 7 ms 2384 KB Partially correct
18 Partially correct 7 ms 2396 KB Partially correct
19 Partially correct 8 ms 2384 KB Partially correct
20 Runtime error 6 ms 2384 KB Execution failed because the return code was nonzero
21 Incorrect 28 ms 2640 KB Expected int32, but "2500100001" found
22 Incorrect 27 ms 2640 KB Expected int32, but "2500100001" found
23 Incorrect 29 ms 2640 KB Expected int32, but "2500100001" found
24 Incorrect 28 ms 2640 KB Expected int32, but "2500100001" found
25 Incorrect 24 ms 2640 KB Expected int32, but "2500100001" found
26 Incorrect 28 ms 2640 KB Expected int32, but "2500100001" found
27 Incorrect 27 ms 2640 KB Expected int32, but "2500100001" found
28 Incorrect 27 ms 2640 KB Expected int32, but "2500100001" found
29 Incorrect 27 ms 2640 KB Expected int32, but "2500100001" found
30 Runtime error 23 ms 2640 KB Execution failed because the return code was nonzero
31 Incorrect 1 ms 2384 KB Output isn't correct
32 Partially correct 1 ms 2384 KB Partially correct