| Task: | Pile |
| Sender: | trukilla hissikuiluun |
| Submission time: | 2016-10-04 18:55:01 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.04 s | details |
| #2 | WRONG ANSWER | 0.05 s | details |
| #3 | ACCEPTED | 0.04 s | details |
| #4 | WRONG ANSWER | 0.04 s | details |
| #5 | ACCEPTED | 0.04 s | details |
| #6 | WRONG ANSWER | 0.05 s | details |
| #7 | ACCEPTED | 0.04 s | details |
| #8 | WRONG ANSWER | 0.04 s | details |
| #9 | ACCEPTED | 0.03 s | details |
| #10 | WRONG ANSWER | 0.03 s | details |
| #11 | ACCEPTED | 0.03 s | details |
| #12 | WRONG ANSWER | 0.02 s | details |
| #13 | ACCEPTED | 0.04 s | details |
| #14 | WRONG ANSWER | 0.03 s | details |
| #15 | ACCEPTED | 0.04 s | details |
| #16 | WRONG ANSWER | 0.04 s | details |
| #17 | ACCEPTED | 0.06 s | details |
| #18 | WRONG ANSWER | 0.04 s | details |
| #19 | ACCEPTED | 0.04 s | details |
| #20 | WRONG ANSWER | 0.04 s | details |
| #21 | ACCEPTED | 0.03 s | details |
| #22 | WRONG ANSWER | 0.04 s | details |
| #23 | ACCEPTED | 0.03 s | details |
| #24 | WRONG ANSWER | 0.04 s | details |
| #25 | ACCEPTED | 0.03 s | details |
| #26 | WRONG ANSWER | 0.04 s | details |
| #27 | ACCEPTED | 0.05 s | details |
| #28 | WRONG ANSWER | 0.03 s | details |
| #29 | ACCEPTED | 0.04 s | details |
| #30 | WRONG ANSWER | 0.04 s | details |
Code
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
//cout << "foo" << endl;
cin.sync_with_stdio(false);
ll n;
cin >> n;
stack<int> blox;
bool good = true;
//cout << "bar" << endl;
for (ll i = 0; i < n; i++) {
ll cur;
cin >> cur;
//cout << "reading " << cur << endl;
//if (!blox.empty()) cout << "stack top " << blox.top() << endl;
if (blox.empty() || blox.top() < cur) {
//cout << "derp" << endl;
blox.push(cur-1);
} else if (blox.top() == cur) {
//cout << "dorp" << endl;
blox.pop();
} else {
good = false;
//cout << "darp" << endl;
break;
}
//cout << "foob" << endl;
}
if (good) {
cout << "Not a proof" << endl;
} else {
cout << "Cheater" << endl;
}
}
Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| 89384 25390 71865 40225 42587 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 43243 1 2 3 4 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 3
Verdict: ACCEPTED
| input |
|---|
| 86810 44076 56049 66715 68415 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 55591 1 14 38 48 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 5
Verdict: ACCEPTED
| input |
|---|
| 86222 62931 47306 80483 18748 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 15864 1 2 3 5 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 7
Verdict: ACCEPTED
| input |
|---|
| 16149 2532 961 11156 5824 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 40507 1 2 3 4 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 9
Verdict: ACCEPTED
| input |
|---|
| 36375 15643 9301 19803 7096 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 77660 3 15 23 25 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 11
Verdict: ACCEPTED
| input |
|---|
| 56236 18697 40699 9296 14216 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 301 3 2 4 6 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 13
Verdict: ACCEPTED
| input |
|---|
| 41231 26984 13528 2868 39701 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 72284 1 2 3 4 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 15
Verdict: ACCEPTED
| input |
|---|
| 18969 3539 8598 12445 18178 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 16
Verdict: WRONG ANSWER
| input |
|---|
| 54454 6 12 14 40 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 17
Verdict: ACCEPTED
| input |
|---|
| 86784 84064 26105 59782 14615 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 18
Verdict: WRONG ANSWER
| input |
|---|
| 54031 1 4 7 6 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 19
Verdict: ACCEPTED
| input |
|---|
| 1161 825 98 511 987 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 20
Verdict: WRONG ANSWER
| input |
|---|
| 44073 1 2 3 4 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 21
Verdict: ACCEPTED
| input |
|---|
| 83617 33109 61789 74135 12472 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 22
Verdict: WRONG ANSWER
| input |
|---|
| 84621 16 26 25 27 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 23
Verdict: ACCEPTED
| input |
|---|
| 22135 2433 19568 20163 15126 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 24
Verdict: WRONG ANSWER
| input |
|---|
| 79341 1 4 6 5 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 25
Verdict: ACCEPTED
| input |
|---|
| 17175 13977 4200 33 13602 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 26
Verdict: WRONG ANSWER
| input |
|---|
| 64285 1 2 3 4 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 27
Verdict: ACCEPTED
| input |
|---|
| 68694 36114 50054 48015 41971 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 28
Verdict: WRONG ANSWER
| input |
|---|
| 3056 14 15 24 57 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
Test 29
Verdict: ACCEPTED
| input |
|---|
| 96187 84426 32403 60210 35133 ... |
| correct output |
|---|
| Cheater |
| user output |
|---|
| Cheater |
Test 30
Verdict: WRONG ANSWER
| input |
|---|
| 41500 1 2 3 6 ... |
| correct output |
|---|
| Not a proof |
| user output |
|---|
| Cheater |
