Task: | Järjestys |
Sender: | ollpu |
Submission time: | 2016-07-28 15:13:43 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.05 s | details |
#2 | ACCEPTED | 0.06 s | details |
#3 | ACCEPTED | 0.05 s | details |
#4 | WRONG ANSWER | 0.05 s | details |
#5 | WRONG ANSWER | 0.05 s | details |
#6 | ACCEPTED | 0.07 s | details |
#7 | ACCEPTED | 0.06 s | details |
#8 | WRONG ANSWER | 0.05 s | details |
#9 | WRONG ANSWER | 0.06 s | details |
#10 | WRONG ANSWER | 0.06 s | details |
Code
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, last = 0, ans = 0; cin >> n; for (int i = 0; i < n; ++i) { int v; cin >> v; if (v < last) ans++; last = v; } cout << ans; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
20 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
correct output |
---|
0 |
user output |
---|
0 |
Test 2
Verdict: ACCEPTED
input |
---|
20 20 19 18 17 16 15 14 13 12 11 ... |
correct output |
---|
19 |
user output |
---|
19 |
Test 3
Verdict: ACCEPTED
input |
---|
20 12 2 14 4 5 6 7 8 9 10 11 1 13... |
correct output |
---|
4 |
user output |
---|
4 |
Test 4
Verdict: WRONG ANSWER
input |
---|
20 17 19 9 20 16 15 14 13 12 11 1... |
correct output |
---|
17 |
user output |
---|
16 |
Test 5
Verdict: WRONG ANSWER
input |
---|
20 14 17 6 2 1 18 3 10 15 5 7 8 4... |
correct output |
---|
11 |
user output |
---|
9 |
Test 6
Verdict: ACCEPTED
input |
---|
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
correct output |
---|
0 |
user output |
---|
0 |
Test 7
Verdict: ACCEPTED
input |
---|
100000 100000 99999 99998 99997 99996... |
correct output |
---|
99999 |
user output |
---|
99999 |
Test 8
Verdict: WRONG ANSWER
input |
---|
100000 1 31396 3 4 5 6 7 8 9 10 11 12... |
correct output |
---|
18136 |
user output |
---|
16503 |
Test 9
Verdict: WRONG ANSWER
input |
---|
100000 100000 99999 99998 99997 99996... |
correct output |
---|
99739 |
user output |
---|
83581 |
Test 10
Verdict: WRONG ANSWER
input |
---|
100000 64356 85816 57765 61431 4519 7... |
correct output |
---|
99377 |
user output |
---|
49965 |