CSES - APIO 2016 - Results
Submission details
Task:Gap
Sender:ArktinenKarpalo
Submission time:2019-04-14 02:57:14 +0300
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
Test results
testverdicttimescoregroup
#10.01 s01details
#20.01 s01details
#30.02 s01details
#40.01 s01details
#50.02 s01details
#60.02 s01details
#70.01 s01details
#80.02 s01details
#90.01 s01details
#100.02 s01details
#110.02 s01details
#120.01 s01details
#130.02 s01details
#140.02 s01details
#150.03 s01details
#160.06 s01details
#170.05 s01details
#180.06 s01details
#190.05 s01details
#200.03 s01details
#210.12 s01details
#220.11 s01details
#230.12 s01details
#240.11 s01details
#250.09 s01details
#260.12 s01details
#270.12 s01details
#280.12 s01details
#290.11 s01details
#300.07 s01details
#310.02 s01details
#320.02 s01details
#330.02 s02details
#340.02 s02details
#350.02 s02details
#360.02 s02details
#370.02 s02details
#380.01 s02details
#390.02 s02details
#400.02 s02details
#410.02 s02details
#420.01 s02details
#430.02 s02details
#440.03 s02details
#450.02 s02details
#460.02 s02details
#470.02 s02details
#480.05 s02details
#490.04 s02details
#500.04 s02details
#510.05 s02details
#520.03 s02details
#530.12 s02details
#540.11 s02details
#550.12 s02details
#560.11 s02details
#570.09 s02details
#580.11 s02details
#590.12 s02details
#600.10 s02details
#610.11 s02details
#620.06 s02details
#630.01 s02details
#640.02 s02details

Code

#include <bits/stdc++.h>
#include "gap.h"
#define ll long long
#define ull unsigned long long
#define ld long double
#define M 1000000007
#define P complex<long long>
#define X real()
#define Y imag()

using namespace std;

ll findGap(int T, int N) {
	if(T == 1) {
		ll ans = 0;
		ll s=0, t=1e18, mn, mx;
		MinMax(s, t, &mn, &mx);
		while(true) {
			t = mx-1;
			ll ed = mx;
			if(t<=s)
				break;
			MinMax(s, t, &mn, &mx);
			if(mx == -1)
				break;
			ans = max(ans, ed-mx);
		}
		return ans;
	} else {
		return -1;
	}
}

Test details

Test 1

Group: 1

Verdict:

input
1 2
29659227736649406 728704890713...

correct output
(empty)

user output
0

Test 2

Group: 1

Verdict:

input
1 15
4910834401530995 8236651085889...

correct output
(empty)

user output
0

Test 3

Group: 1

Verdict:

input
1 15
26822012613602297 830163366163...

correct output
(empty)

user output
0

Test 4

Group: 1

Verdict:

input
1 15
9924552505919890 2065094604777...

correct output
(empty)

user output
0

Test 5

Group: 1

Verdict:

input
1 15
5829742 7847985 9866228 118844...

correct output
(empty)

user output
0

Test 6

Group: 1

Verdict:

input
1 100
3343298378001251 1748440243612...

correct output
(empty)

user output
0

Test 7

Group: 1

Verdict:

input
1 100
6615965004180765 1318520746045...

correct output
(empty)

user output
0

Test 8

Group: 1

Verdict:

input
1 100
709357564623321 77128246965710...

correct output
(empty)

user output
0

Test 9

Group: 1

Verdict:

input
1 100
14237546663715875 268988673144...

correct output
(empty)

user output
0

Test 10

Group: 1

Verdict:

input
1 100
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 11

Group: 1

Verdict:

input
1 1500
393226341882178 13216496468619...

correct output
(empty)

user output
0

Test 12

Group: 1

Verdict:

input
1 1500
276387254568267 34829856602130...

correct output
(empty)

user output
0

Test 13

Group: 1

Verdict:

input
1 1500
394502620394491 47759565208720...

correct output
(empty)

user output
0

Test 14

Group: 1

Verdict:

input
1 1500
232644703989174 91492562377220...

correct output
(empty)

user output
0

Test 15

Group: 1

Verdict:

input
1 1500
5829742 7847985 9866228 118844...

correct output
(empty)

user output
0

Test 16

Group: 1

Verdict:

input
1 25000
9133780858698 37909498824529 4...

correct output
(empty)

user output
0

Test 17

Group: 1

Verdict:

input
1 25000
95371433023390 183850194127179...

correct output
(empty)

user output
0

Test 18

Group: 1

Verdict:

input
1 25000
7504645895952 60172453317399 8...

correct output
(empty)

user output
0

Test 19

Group: 1

Verdict:

input
1 25000
39499604978204 102114332324801...

correct output
(empty)

user output
0

Test 20

Group: 1

Verdict:

input
1 25000
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 21

Group: 1

Verdict:

input
1 100000
4488179349610 16973330836139 4...

correct output
(empty)

user output
0

Test 22

Group: 1

Verdict:

input
1 100000
13149709307416 18293717155215 ...

correct output
(empty)

user output
0

Test 23

Group: 1

Verdict:

input
1 100000
5111699493996 19396274992433 2...

correct output
(empty)

user output
0

Test 24

Group: 1

Verdict:

input
1 100000
12448126808805 14955287440308 ...

correct output
(empty)

user output
0

Test 25

Group: 1

Verdict:

input
1 100000
5829742 7847985 9866228 118844...

correct output
(empty)

user output
0

Test 26

Group: 1

Verdict:

input
1 100000
15609355723226 28246203120916 ...

correct output
(empty)

user output
0

Test 27

Group: 1

Verdict:

input
1 100000
10126035265316 18812438778817 ...

correct output
(empty)

user output
0

Test 28

Group: 1

Verdict:

input
1 100000
5196984998043 10787031331530 5...

correct output
(empty)

user output
0

Test 29

Group: 1

Verdict:

input
1 100000
19821024745776 35883956869682 ...

correct output
(empty)

user output
0

Test 30

Group: 1

Verdict:

input
1 100000
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 31

Group: 1

Verdict:

input
1 118
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 32

Group: 1

Verdict:

input
1 118
1 500000000000000001 750000000...

correct output
(empty)

user output
0

Test 33

Group: 2

Verdict:

input
2 2
78103569500113815 605712887753...

correct output
(empty)

user output
0

Test 34

Group: 2

Verdict:

input
2 15
61436558421029682 834292060079...

correct output
(empty)

user output
0

Test 35

Group: 2

Verdict:

input
2 15
59675445208809451 142100938168...

correct output
(empty)

user output
0

Test 36

Group: 2

Verdict:

input
2 15
57755783461204076 725499461376...

correct output
(empty)

user output
0

Test 37

Group: 2

Verdict:

input
2 15
5829742 7847985 9866228 118844...

correct output
(empty)

user output
0

Test 38

Group: 2

Verdict:

input
2 100
4935323238097746 2853421336222...

correct output
(empty)

user output
0

Test 39

Group: 2

Verdict:

input
2 100
329840134021571 35247166734885...

correct output
(empty)

user output
0

Test 40

Group: 2

Verdict:

input
2 100
20951091854749146 393866653367...

correct output
(empty)

user output
0

Test 41

Group: 2

Verdict:

input
2 100
8683327277022804 1152589874346...

correct output
(empty)

user output
0

Test 42

Group: 2

Verdict:

input
2 100
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 43

Group: 2

Verdict:

input
2 1500
1618213394018307 1726930763754...

correct output
(empty)

user output
0

Test 44

Group: 2

Verdict:

input
2 1500
423747667147233 15612870327743...

correct output
(empty)

user output
0

Test 45

Group: 2

Verdict:

input
2 1500
64452176748519 137423800315192...

correct output
(empty)

user output
0

Test 46

Group: 2

Verdict:

input
2 1500
324495733956306 33247199518693...

correct output
(empty)

user output
0

Test 47

Group: 2

Verdict:

input
2 1500
5829742 7847985 9866228 118844...

correct output
(empty)

user output
0

Test 48

Group: 2

Verdict:

input
2 25000
112605853915943 12530590767415...

correct output
(empty)

user output
0

Test 49

Group: 2

Verdict:

input
2 25000
53697824651228 59941694110355 ...

correct output
(empty)

user output
0

Test 50

Group: 2

Verdict:

input
2 25000
236383646331590 30973864010249...

correct output
(empty)

user output
0

Test 51

Group: 2

Verdict:

input
2 25000
52783945537122 62819045853889 ...

correct output
(empty)

user output
0

Test 52

Group: 2

Verdict:

input
2 25000
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 53

Group: 2

Verdict:

input
2 100000
3977422187752 9172657585884 24...

correct output
(empty)

user output
0

Test 54

Group: 2

Verdict:

input
2 100000
13262637344137 25327517069541 ...

correct output
(empty)

user output
0

Test 55

Group: 2

Verdict:

input
2 100000
18832120122902 29507339632281 ...

correct output
(empty)

user output
0

Test 56

Group: 2

Verdict:

input
2 100000
6181561812375 6378266039481 17...

correct output
(empty)

user output
0

Test 57

Group: 2

Verdict:

input
2 100000
5829742 7847985 9866228 118844...

correct output
(empty)

user output
0

Test 58

Group: 2

Verdict:

input
2 100000
535929232534 21492335528903 25...

correct output
(empty)

user output
0

Test 59

Group: 2

Verdict:

input
2 100000
9057012105366 20678972320055 2...

correct output
(empty)

user output
0

Test 60

Group: 2

Verdict:

input
2 100000
7697039304820 22564329077790 2...

correct output
(empty)

user output
0

Test 61

Group: 2

Verdict:

input
2 100000
39366590558911 39585546629301 ...

correct output
(empty)

user output
0

Test 62

Group: 2

Verdict:

input
2 100000
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 63

Group: 2

Verdict:

input
2 118
1 2 3 4 5 6 7 8 9 10 11 12 13 ...

correct output
(empty)

user output
0

Test 64

Group: 2

Verdict:

input
2 118
1 500000000000000001 750000000...

correct output
(empty)

user output
0