Task: | Pile |
Sender: | Pietari Kaskela |
Submission time: | 2016-10-04 18:27:25 +0300 |
Language: | C++ |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.05 s | details |
#2 | ACCEPTED | 0.07 s | details |
#3 | ACCEPTED | 0.04 s | details |
#4 | ACCEPTED | 0.03 s | details |
#5 | ACCEPTED | 0.06 s | details |
#6 | ACCEPTED | 0.03 s | details |
#7 | ACCEPTED | 0.05 s | details |
#8 | ACCEPTED | 0.04 s | details |
#9 | ACCEPTED | 0.05 s | details |
#10 | ACCEPTED | 0.04 s | details |
#11 | ACCEPTED | 0.03 s | details |
#12 | ACCEPTED | 0.04 s | details |
#13 | ACCEPTED | 0.03 s | details |
#14 | ACCEPTED | 0.05 s | details |
#15 | ACCEPTED | 0.06 s | details |
#16 | ACCEPTED | 0.05 s | details |
#17 | ACCEPTED | 0.06 s | details |
#18 | ACCEPTED | 0.04 s | details |
#19 | ACCEPTED | 0.03 s | details |
#20 | ACCEPTED | 0.04 s | details |
#21 | ACCEPTED | 0.05 s | details |
#22 | ACCEPTED | 0.06 s | details |
#23 | ACCEPTED | 0.04 s | details |
#24 | ACCEPTED | 0.05 s | details |
#25 | ACCEPTED | 0.03 s | details |
#26 | ACCEPTED | 0.05 s | details |
#27 | ACCEPTED | 0.06 s | details |
#28 | ACCEPTED | 0.04 s | details |
#29 | ACCEPTED | 0.06 s | details |
#30 | ACCEPTED | 0.04 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:26:7: warning: unused variable 'g' [-Wunused-variable] bool g[101010] = {0}; ^
Code
#include <bits/stdc++.h> #define i64 long long #define u64 unsigned long long #define i32 int #define u32 unsigned int #define pii pair<int, int> #define pll pair<long long, long long> #define ld long double #define defmod 1000000007 #define mati64(a,b) vector<vector<i64>>(a, vector<i64>(b, 0)); using namespace std; int main(){ cin.sync_with_stdio(0); cin.tie(0); int n; cin >> n; int a[101010]; for(int i = 0; i < n; ++i) cin >> a[i]; bool g[101010] = {0}; stack<int> lol; int j = 0; for(int i = 1; i <= n; ++i){ lol.push(i); while(j < n && lol.size() > 0 && a[j] == lol.top()){ lol.pop(); j++; } } if(lol.size() == 0) cout << "Not a proof" << endl; else cout << "Cheater" << endl; return 0; }
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: ACCEPTED
input |
---|
40507 1 2 3 4 ... |
correct output |
---|
Not a proof |
user output |
---|
Not a proof |
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 |