Submission #1109368

# Submission time Handle Problem Language Result Execution time Memory
1109368 2024-11-06T15:06:07 Z TitanicXDzz Gap (APIO16_gap) C++17
0 / 100
46 ms 2868 KB
#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
long long findGap(int T, int N)
{
    if(T==1){
       long long mn,mx,s,t;
       s=0;
       t=1e18;
       mn=1;
       mx=2;
       long long maxi=0;
       MinMax(s,t,&mn,&mx);
       long long x=mn,y=mx;
       long long i=0;
       while(mn!=mx){
         if(i==1){
         maxi=max(maxi,mn-x);
         maxi=max(maxi,mx-y);
         x=mn;
         y=mx;
         }
         else
            i=1;
         MinMax(mn+1,mx-1,&mn,&mx);
       }
       if(mn==-1){
        maxi=max(maxi,y-x);
       }
       else{
        maxi=max(maxi,mx-x);
        maxi=max(maxi,y-mx);
       }
	return maxi;
    }
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:36:1: warning: control reaches end of non-void function [-Wreturn-type]
   36 | }
      | ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Incorrect 1 ms 2384 KB Output isn't correct
3 Correct 1 ms 2384 KB Output is correct
4 Incorrect 1 ms 2384 KB Output isn't correct
5 Correct 1 ms 2384 KB Output is correct
6 Incorrect 1 ms 2384 KB Output isn't correct
7 Incorrect 1 ms 2464 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 2 ms 2384 KB Output isn't correct
12 Incorrect 2 ms 2384 KB Output isn't correct
13 Incorrect 2 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 9 ms 2384 KB Output isn't correct
17 Incorrect 8 ms 2700 KB Output isn't correct
18 Incorrect 7 ms 2384 KB Output isn't correct
19 Incorrect 8 ms 2384 KB Output isn't correct
20 Runtime error 7 ms 2384 KB Execution failed because the return code was nonzero
21 Incorrect 36 ms 2640 KB Output isn't correct
22 Incorrect 30 ms 2744 KB Output isn't correct
23 Incorrect 30 ms 2744 KB Output isn't correct
24 Incorrect 46 ms 2636 KB Output isn't correct
25 Incorrect 29 ms 1104 KB Output isn't correct
26 Incorrect 31 ms 1104 KB Output isn't correct
27 Incorrect 30 ms 1236 KB Output isn't correct
28 Incorrect 30 ms 1104 KB Output isn't correct
29 Incorrect 38 ms 1096 KB Output isn't correct
30 Runtime error 24 ms 1116 KB Execution failed because the return code was nonzero
31 Runtime error 1 ms 336 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 504 KB Execution failed because the return code was nonzero
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Partially correct 1 ms 2384 KB Partially correct
3 Incorrect 1 ms 2384 KB Output isn't correct
4 Partially correct 1 ms 2384 KB Partially correct
5 Partially correct 1 ms 2384 KB Partially correct
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 Incorrect 2 ms 2384 KB Output isn't correct
12 Incorrect 2 ms 2384 KB Output isn't correct
13 Incorrect 2 ms 2384 KB Output isn't correct
14 Incorrect 1 ms 2384 KB Output isn't correct
15 Partially correct 2 ms 2384 KB Partially correct
16 Incorrect 8 ms 2560 KB Output isn't correct
17 Incorrect 8 ms 2544 KB Output isn't correct
18 Incorrect 8 ms 2384 KB Output isn't correct
19 Incorrect 11 ms 2384 KB Output isn't correct
20 Runtime error 7 ms 2384 KB Execution failed because the return code was nonzero
21 Incorrect 31 ms 2864 KB Expected int32, but "2500100001" found
22 Incorrect 28 ms 2832 KB Expected int32, but "2500100001" found
23 Incorrect 34 ms 2856 KB Expected int32, but "2500100001" found
24 Incorrect 37 ms 2840 KB Expected int32, but "2500100001" found
25 Incorrect 32 ms 2856 KB Expected int32, but "2500100001" found
26 Incorrect 37 ms 2732 KB Expected int32, but "2500100001" found
27 Incorrect 33 ms 2780 KB Expected int32, but "2500100001" found
28 Incorrect 33 ms 2616 KB Expected int32, but "2500100001" found
29 Incorrect 29 ms 2748 KB Expected int32, but "2500100001" found
30 Runtime error 26 ms 2868 KB Execution failed because the return code was nonzero
31 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero
32 Runtime error 1 ms 2384 KB Execution failed because the return code was nonzero