Submission details
Task:Pile
Sender:PILIPOJAT!!
Submission time:2016-10-04 18:03:52 +0300
Language:Java
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.21 sdetails
#2ACCEPTED0.16 sdetails
#3ACCEPTED0.22 sdetails
#4ACCEPTED0.18 sdetails
#5ACCEPTED0.16 sdetails
#6ACCEPTED0.17 sdetails
#7ACCEPTED0.14 sdetails
#80.21 sdetails
#9ACCEPTED0.15 sdetails
#10ACCEPTED0.18 sdetails
#11ACCEPTED0.17 sdetails
#12ACCEPTED0.12 sdetails
#13ACCEPTED0.18 sdetails
#14ACCEPTED0.19 sdetails
#15ACCEPTED0.15 sdetails
#16ACCEPTED0.16 sdetails
#17ACCEPTED0.18 sdetails
#18ACCEPTED0.22 sdetails
#19ACCEPTED0.10 sdetails
#20ACCEPTED0.17 sdetails
#21ACCEPTED0.20 sdetails
#22ACCEPTED0.17 sdetails
#23ACCEPTED0.15 sdetails
#24ACCEPTED0.21 sdetails
#25ACCEPTED0.14 sdetails
#26ACCEPTED0.15 sdetails
#27ACCEPTED0.20 sdetails
#28ACCEPTED0.11 sdetails
#29ACCEPTED0.17 sdetails
#30ACCEPTED0.19 sdetails

Code

/*
 * 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.
 */

//package cses5teht;

import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;

/**
 *
 * @author eamiller
 */
public class Cses5teht {
    
    public static void main(String[] args) {
        IO io = new IO();
        int n = io.nextInt();
        int[] taul = new int[n];
        
        for(int i=0; i<taul.length; i++) {
            taul[i] = io.nextInt();
        }
        
        //hc koodi
        /*int pienin;
        for(int i=0; i<taul.length; i=asd(i)) {
            pienin = taul[i+1];
            for(int j = i+2; j<taul.length; j++) {
                if(taul[i]>taul[j] && pienin < taul[j]) {
                    System.out.println("Cheater");
                    return;
                } else if(taul[i]<taul[j]) {
                    i=j;
                    j++;
                    pienin = taul[i+1];
                } else if(taul[i]<pienin) pienin = taul[i];
            }
        }
        System.out.println("Not a proof");*/
        
        //vähä enemmän hc koodi
        int pienin;
        int i=0;
        pienin = taul[i+1];
        for(int j = i+2; j<taul.length; j++) {
            if(taul[i]>taul[j] && pienin < taul[j]) {
                System.out.println("Cheater");
                return;
            } else if(taul[i]<taul[j]) {
                i=j;
                j++;
                pienin = taul[i+1];
            } else if(taul[i]<pienin) {
                pienin = taul[i];
            }
        }
        System.out.println("Not a proof");
    }
    
    /*public static int asd(int i) {
        int x=i+1;
        while(x<taul.length && taul[i] > taul[x]) x++;
        return x;
    }*/
    
    
    
    
    
    public static class IO extends PrintWriter {
	private InputStreamReader r;
	private static final int BUFSIZE = 1 << 15;
	private char[] buf;
	private int bufc;
	private int bufi;
	private StringBuilder sb;
	
	public IO() {
		super(new BufferedOutputStream(System.out));
		r = new InputStreamReader(System.in);
		
		buf = new char[BUFSIZE];
		bufc = 0;
		bufi = 0;
		sb = new StringBuilder();
	}
	
	private void fillBuf() throws IOException {
		bufi = 0;
		bufc = 0;
		while(bufc == 0) {
			bufc = r.read(buf, 0, BUFSIZE);
			if(bufc == -1) {
				bufc = 0;
				return;
			}
		}
	}
	
	private boolean pumpBuf() throws IOException {
		if(bufi == bufc) {
			fillBuf();
		}
		return bufc != 0;
	}
	
	private boolean isDelimiter(char c) {
		return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f';
	}
	
	private void eatDelimiters() throws IOException {
		while(true) {
			if(bufi == bufc) {
				fillBuf();
				if(bufc == 0) throw new RuntimeException("IO: Out of input.");
			}
			
			if(!isDelimiter(buf[bufi])) break;
			++bufi;
		}
	}
	
	public String next() {
		try {
			sb.setLength(0);
			
			eatDelimiters();
			int start = bufi;
			
			while(true) {
				if(bufi == bufc) {
					sb.append(buf, start, bufi - start);
					fillBuf();
					start = 0;
					if(bufc == 0) break;
				}
				
				if(isDelimiter(buf[bufi])) break;
				++bufi;
			}
			
			sb.append(buf, start, bufi - start);
			
			return sb.toString();
		} catch(IOException e) {
			throw new RuntimeException("IO.next: Caught IOException.");
		}
	}
	
	public int nextInt() {
		try {
			int ret = 0;
			
			eatDelimiters();
			
			boolean positive = true;
			if(buf[bufi] == '-') {
				++bufi;
				if(!pumpBuf()) throw new RuntimeException("IO.nextInt: Invalid int.");
				positive = false;
			}
			
			boolean first = true;
			while(true) {
				if(!pumpBuf()) break;
				if(isDelimiter(buf[bufi])) {
					if(first) throw new RuntimeException("IO.nextInt: Invalid int.");
					break;
				}
				first = false;
				
				if(buf[bufi] >= '0' && buf[bufi] <= '9') {
					if(ret < -214748364) throw new RuntimeException("IO.nextInt: Invalid int.");
					ret *= 10;
					ret -= (int)(buf[bufi] - '0');
					if(ret > 0) throw new RuntimeException("IO.nextInt: Invalid int.");
				} else {
					throw new RuntimeException("IO.nextInt: Invalid int.");
				}
				
				++bufi;
			}
			
			if(positive) {
				if(ret == -2147483648) throw new RuntimeException("IO.nextInt: Invalid int.");
				ret = -ret;
			}
			
			return ret;
		} catch(IOException e) {
			throw new RuntimeException("IO.nextInt: Caught IOException.");
		}
	}
	
	public long nextLong() {
		try {
			long ret = 0;
			
			eatDelimiters();
			
			boolean positive = true;
			if(buf[bufi] == '-') {
				++bufi;
				if(!pumpBuf()) throw new RuntimeException("IO.nextLong: Invalid long.");
				positive = false;
			}
			
			boolean first = true;
			while(true) {
				if(!pumpBuf()) break;
				if(isDelimiter(buf[bufi])) {
					if(first) throw new RuntimeException("IO.nextLong: Invalid long.");
					break;
				}
				first = false;
				
				if(buf[bufi] >= '0' && buf[bufi] <= '9') {
					if(ret < -922337203685477580L) throw new RuntimeException("IO.nextLong: Invalid long.");
					ret *= 10;
					ret -= (long)(buf[bufi] - '0');
					if(ret > 0) throw new RuntimeException("IO.nextLong: Invalid long.");
				} else {
					throw new RuntimeException("IO.nextLong: Invalid long.");
				}
				
				++bufi;
			}
			
			if(positive) {
				if(ret == -9223372036854775808L) throw new RuntimeException("IO.nextLong: Invalid long.");
				ret = -ret;
			}
			
			return ret;
		} catch(IOException e) {
			throw new RuntimeException("IO.nextLong: Caught IOException.");
		}
	}
	
	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

    

}


Test details

Test 1

Verdict: ACCEPTED

input
89384
25390
71865
40225
42587
...

correct output
Cheater

user output
Cheater

Test 2

Verdict: ACCEPTED

input
43243
1
2
3
4
...

correct output
Not a proof

user output
Not a proof

Test 3

Verdict: ACCEPTED

input
86810
44076
56049
66715
68415
...

correct output
Cheater

user output
Cheater

Test 4

Verdict: ACCEPTED

input
55591
1
14
38
48
...

correct output
Not a proof

user output
Not a proof

Test 5

Verdict: ACCEPTED

input
86222
62931
47306
80483
18748
...

correct output
Cheater

user output
Cheater

Test 6

Verdict: ACCEPTED

input
15864
1
2
3
5
...

correct output
Not a proof

user output
Not a proof

Test 7

Verdict: ACCEPTED

input
16149
2532
961
11156
5824
...

correct output
Cheater

user output
Cheater

Test 8

Verdict:

input
40507
1
2
3
4
...

correct output
Not a proof

user output
(empty)

Error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 40507
	at Cses5teht.main(Cses5teht.java:58)

Test 9

Verdict: ACCEPTED

input
36375
15643
9301
19803
7096
...

correct output
Cheater

user output
Cheater

Test 10

Verdict: ACCEPTED

input
77660
3
15
23
25
...

correct output
Not a proof

user output
Not a proof

Test 11

Verdict: ACCEPTED

input
56236
18697
40699
9296
14216
...

correct output
Cheater

user output
Cheater

Test 12

Verdict: ACCEPTED

input
301
3
2
4
6
...

correct output
Not a proof

user output
Not a proof

Test 13

Verdict: ACCEPTED

input
41231
26984
13528
2868
39701
...

correct output
Cheater

user output
Cheater

Test 14

Verdict: ACCEPTED

input
72284
1
2
3
4
...

correct output
Not a proof

user output
Not a proof

Test 15

Verdict: ACCEPTED

input
18969
3539
8598
12445
18178
...

correct output
Cheater

user output
Cheater

Test 16

Verdict: ACCEPTED

input
54454
6
12
14
40
...

correct output
Not a proof

user output
Not a proof

Test 17

Verdict: ACCEPTED

input
86784
84064
26105
59782
14615
...

correct output
Cheater

user output
Cheater

Test 18

Verdict: ACCEPTED

input
54031
1
4
7
6
...

correct output
Not a proof

user output
Not a proof

Test 19

Verdict: ACCEPTED

input
1161
825
98
511
987
...

correct output
Cheater

user output
Cheater

Test 20

Verdict: ACCEPTED

input
44073
1
2
3
4
...

correct output
Not a proof

user output
Not a proof

Test 21

Verdict: ACCEPTED

input
83617
33109
61789
74135
12472
...

correct output
Cheater

user output
Cheater

Test 22

Verdict: ACCEPTED

input
84621
16
26
25
27
...

correct output
Not a proof

user output
Not a proof

Test 23

Verdict: ACCEPTED

input
22135
2433
19568
20163
15126
...

correct output
Cheater

user output
Cheater

Test 24

Verdict: ACCEPTED

input
79341
1
4
6
5
...

correct output
Not a proof

user output
Not a proof

Test 25

Verdict: ACCEPTED

input
17175
13977
4200
33
13602
...

correct output
Cheater

user output
Cheater

Test 26

Verdict: ACCEPTED

input
64285
1
2
3
4
...

correct output
Not a proof

user output
Not a proof

Test 27

Verdict: ACCEPTED

input
68694
36114
50054
48015
41971
...

correct output
Cheater

user output
Cheater

Test 28

Verdict: ACCEPTED

input
3056
14
15
24
57
...

correct output
Not a proof

user output
Not a proof

Test 29

Verdict: ACCEPTED

input
96187
84426
32403
60210
35133
...

correct output
Cheater

user output
Cheater

Test 30

Verdict: ACCEPTED

input
41500
1
2
3
6
...

correct output
Not a proof

user output
Not a proof