Submission details
Task:Pile
Sender:Feeniksi
Submission time:2016-10-04 17:44:36 +0300
Language:Java
Status:READY
Result:
Test results
testverdicttime
#10.57 sdetails
#20.19 sdetails
#30.53 sdetails
#40.45 sdetails
#50.54 sdetails
#60.26 sdetails
#70.28 sdetails
#80.21 sdetails
#90.41 sdetails
#100.54 sdetails
#110.41 sdetails
#120.14 sdetails
#130.42 sdetails
#140.21 sdetails
#150.28 sdetails
#160.42 sdetails
#170.59 sdetails
#180.29 sdetails
#190.16 sdetails
#200.20 sdetails
#210.52 sdetails
#220.56 sdetails
#230.31 sdetails
#240.35 sdetails
#250.34 sdetails
#260.19 sdetails
#270.47 sdetails
#280.18 sdetails
#290.60 sdetails
#300.30 sdetails

Code

import java.util.ArrayList;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author viljampa
 */
public class kilpa52 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
                // TODO code application logic here
        IO io = new IO();
        ArrayList<Integer> lista = new ArrayList();
        boolean onko = true;
        
        int montako = io.nextInt();
        for (int i = 0; i < montako; i++) {
            lista.add(io.nextInt());
        }
//        int montako = 9;
//        lista.add(2);
//        lista.add(1);
//        lista.add(1);
//        lista.add(2);
//        lista.add(7);
//        lista.add(8);
//        lista.add(9);
//        lista.add(6);
//        lista.add(5);
//        lista.add(4);
//        lista.add(3);

//        lista.add(3);
//        lista.add(2);
//        lista.add(1);
//        lista.add(4);
//        lista.add(5);
//        lista.add(6);
//        lista.add(8);
//        lista.add(9);
//        lista.add(7);
        
        
        int paal = lista.get(0);
        int apu = lista.get(0);
        
        for (int i = 1; i < montako; i++) {
            int seur = lista.get(i);
            if (paal - 1 == seur) {
                paal = seur;
                apu = seur;
            } else if (apu + 1 == seur) {
                apu = seur;
            } else if (paal < seur) {
                paal = seur;
                apu = seur;
            } else {
                onko = false;
                System.out.println(seur);
            }
        }
        
        if (onko) {
            io.println("Not a proof");
        } else {
            io.print("Cheater");
        }
        
        io.println();
//	String a = io.next(); // Lukee seuraavan välein erotellun merkkijonon.
//	int b = io.nextInt(); // Lukee seuraavan välein erotellun int-kokonaisluvun.
//	long c = io.nextLong(); // Lukee seuraavan välein erotellun long-kokonaisluvun.
//	double d = io.nextDouble(); // Lukee seuraavan välein erotellun double-liukuluvun.

        // Toimii kuten System.out.println.
//	io.println("Annoit syötteenä " + a + " " + b + " " + c + " " + d);
        io.close();
    }
    
}

Test details

Test 1

Verdict:

input
89384
25390
71865
40225
42587
...

correct output
Cheater

user output
40225
42587
70268
44878
4809
...

Test 2

Verdict:

input
43243
1
2
3
4
...

correct output
Not a proof

user output
625
1520
2050
3451
3657
...

Test 3

Verdict:

input
86810
44076
56049
66715
68415
...

correct output
Cheater

user output
15089
53125
35851
59048
52089
...

Test 4

Verdict:

input
55591
1
14
38
48
...

correct output
Not a proof

user output
3293
18994
22433
24682
30886
...

Test 5

Verdict:

input
86222
62931
47306
80483
18748
...

correct output
Cheater

user output
47306
18748
11323
18836
2347
...

Test 6

Verdict:

input
15864
1
2
3
5
...

correct output
Not a proof

user output
10
25
24
22
21
...

Test 7

Verdict:

input
16149
2532
961
11156
5824
...

correct output
Cheater

user output
961
5824
7510
1085
6158
...

Test 8

Verdict:

input
40507
1
2
3
4
...

correct output
Not a proof

user output
147
345
344
2997
3006
...

Test 9

Verdict:

input
36375
15643
9301
19803
7096
...

correct output
Cheater

user output
9301
7096
12544
10446
19608
...

Test 10

Verdict:

input
77660
3
15
23
25
...

correct output
Not a proof

user output
548
2439
18698
18805
19383
...

Test 11

Verdict:

input
56236
18697
40699
9296
14216
...

correct output
Cheater

user output
9296
14216
19311
12567
34118
...

Test 12

Verdict:

input
301
3
2
4
6
...

correct output
Not a proof

user output
1
14
12
11
22
...

Test 13

Verdict:

input
41231
26984
13528
2868
39701
...

correct output
Cheater

user output
13528
2868
37481
24148
15155
...

Test 14

Verdict:

input
72284
1
2
3
4
...

correct output
Not a proof

user output
75
641
906
1699
3209
...

Test 15

Verdict:

input
18969
3539
8598
12445
18178
...

correct output
Cheater

user output
13808
6487
8350
11819
17488
...

Test 16

Verdict:

input
54454
6
12
14
40
...

correct output
Not a proof

user output
7235
11068
14071
18338
30323
...

Test 17

Verdict:

input
86784
84064
26105
59782
14615
...

correct output
Cheater

user output
26105
59782
14615
1548
35332
...

Test 18

Verdict:

input
54031
1
4
7
6
...

correct output
Not a proof

user output
3
2
15
14
12
...

Test 19

Verdict:

input
1161
825
98
511
987
...

correct output
Cheater

user output
98
511
875
725
261
...

Test 20

Verdict:

input
44073
1
2
3
4
...

correct output
Not a proof

user output
16
148
147
432
1157
...

Test 21

Verdict:

input
83617
33109
61789
74135
12472
...

correct output
Cheater

user output
12472
20104
44203
59338
33432
...

Test 22

Verdict:

input
84621
16
26
25
27
...

correct output
Not a proof

user output
15134
16343
31829
35918
36721
...

Test 23

Verdict:

input
22135
2433
19568
20163
15126
...

correct output
Cheater

user output
15126
6921
329
10928
12707
...

Test 24

Verdict:

input
79341
1
4
6
5
...

correct output
Not a proof

user output
3
2
14
20
18
...

Test 25

Verdict:

input
17175
13977
4200
33
13602
...

correct output
Cheater

user output
4200
33
13602
3463
10610
...

Test 26

Verdict:

input
64285
1
2
3
4
...

correct output
Not a proof

user output
527
526
1000
1416
1769
...

Test 27

Verdict:

input
68694
36114
50054
48015
41971
...

correct output
Cheater

user output
48015
41971
60134
17528
6785
...

Test 28

Verdict:

input
3056
14
15
24
57
...

correct output
Not a proof

user output
2080
3036
3035
3034
3033
...

Test 29

Verdict:

input
96187
84426
32403
60210
35133
...

correct output
Cheater

user output
32403
60210
35133
3665
35855
...

Test 30

Verdict:

input
41500
1
2
3
6
...

correct output
Not a proof

user output
22
33
43
42
41
...