Task: | Sticky Situation |
Sender: | Qianyun Guo |
Submission time: | 2017-09-26 17:40:39 +0300 |
Language: | C++ |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.04 s | details |
#2 | ACCEPTED | 0.05 s | details |
#3 | ACCEPTED | 0.03 s | details |
#4 | ACCEPTED | 0.05 s | details |
#5 | ACCEPTED | 0.04 s | details |
#6 | ACCEPTED | 0.05 s | details |
#7 | ACCEPTED | 0.04 s | details |
#8 | ACCEPTED | 0.04 s | details |
#9 | ACCEPTED | 0.06 s | details |
#10 | ACCEPTED | 0.04 s | details |
#11 | ACCEPTED | 0.05 s | details |
#12 | ACCEPTED | 0.03 s | details |
#13 | ACCEPTED | 0.04 s | details |
#14 | ACCEPTED | 0.04 s | details |
#15 | ACCEPTED | 0.05 s | details |
#16 | ACCEPTED | 0.04 s | details |
#17 | ACCEPTED | 0.04 s | details |
#18 | ACCEPTED | 0.04 s | details |
#19 | ACCEPTED | 0.05 s | details |
#20 | ACCEPTED | 0.06 s | details |
#21 | ACCEPTED | 0.05 s | details |
#22 | ACCEPTED | 0.04 s | details |
#23 | ACCEPTED | 0.04 s | details |
#24 | ACCEPTED | 0.04 s | details |
#25 | ACCEPTED | 0.03 s | details |
#26 | ACCEPTED | 0.06 s | details |
#27 | ACCEPTED | 0.04 s | details |
#28 | ACCEPTED | 0.03 s | details |
#29 | ACCEPTED | 0.05 s | details |
#30 | ACCEPTED | 0.04 s | details |
#31 | ACCEPTED | 0.06 s | details |
#32 | ACCEPTED | 0.05 s | details |
#33 | ACCEPTED | 0.04 s | details |
#34 | ACCEPTED | 0.04 s | details |
#35 | ACCEPTED | 0.05 s | details |
#36 | ACCEPTED | 0.05 s | details |
#37 | ACCEPTED | 0.06 s | details |
#38 | ACCEPTED | 0.06 s | details |
#39 | ACCEPTED | 0.06 s | details |
Code
#include<bits/stdc++.h> using namespace std; int n; vector<long long> a; int main() { cin >> n; for (int i = 0; i < n; i++){ long long x; cin >> x; a.push_back(x); } sort(a.begin(), a.end()); for (int i = 0; i < n-2; i++){ if (a[i] + a[i+1] > a[i+2]) { cout << "possible" << endl; return 0; } } cout << "impossible" << endl; return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
44 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 2
Verdict: ACCEPTED
input |
---|
506 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 3
Verdict: ACCEPTED
input |
---|
349 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 4
Verdict: ACCEPTED
input |
---|
555 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 5
Verdict: ACCEPTED
input |
---|
210 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 6
Verdict: ACCEPTED
input |
---|
757 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 7
Verdict: ACCEPTED
input |
---|
503 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 8
Verdict: ACCEPTED
input |
---|
419 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 9
Verdict: ACCEPTED
input |
---|
19 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 10
Verdict: ACCEPTED
input |
---|
515 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 11
Verdict: ACCEPTED
input |
---|
718 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 12
Verdict: ACCEPTED
input |
---|
204 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 13
Verdict: ACCEPTED
input |
---|
330 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 14
Verdict: ACCEPTED
input |
---|
862 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 15
Verdict: ACCEPTED
input |
---|
982 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 16
Verdict: ACCEPTED
input |
---|
494 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 17
Verdict: ACCEPTED
input |
---|
4 413658328434492816 42131811934... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 18
Verdict: ACCEPTED
input |
---|
967 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 19
Verdict: ACCEPTED
input |
---|
838 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 20
Verdict: ACCEPTED
input |
---|
449 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 21
Verdict: ACCEPTED
input |
---|
458 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 22
Verdict: ACCEPTED
input |
---|
635 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 23
Verdict: ACCEPTED
input |
---|
911 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 24
Verdict: ACCEPTED
input |
---|
156 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 25
Verdict: ACCEPTED
input |
---|
295 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
possible |
Test 26
Verdict: ACCEPTED
input |
---|
88 1 1 2 3 5 8 13 21 34 55 89 144... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 27
Verdict: ACCEPTED
input |
---|
88 21 10610209857723 1836311903 7... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 28
Verdict: ACCEPTED
input |
---|
4 688138922692403404 53826514650... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 29
Verdict: ACCEPTED
input |
---|
6 1051054321739242054 6730047734... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 30
Verdict: ACCEPTED
input |
---|
8 3450451668468094 1119558431635... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 31
Verdict: ACCEPTED
input |
---|
10 43884608503565000 302405275242... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 32
Verdict: ACCEPTED
input |
---|
12 385129830092889 35573055922474... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 33
Verdict: ACCEPTED
input |
---|
14 3525644022645 589629197579404 ... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 34
Verdict: ACCEPTED
input |
---|
16 17995284407142 114231612799405... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 35
Verdict: ACCEPTED
input |
---|
18 6170861631849362 2060967377839... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 36
Verdict: ACCEPTED
input |
---|
61 1 4398046511104 8388608 687194... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 37
Verdict: ACCEPTED
input |
---|
89 1 1 2 3 5 8 13 21 34 55 89 144... |
correct output |
---|
possible |
user output |
---|
possible |
Test 38
Verdict: ACCEPTED
input |
---|
20000 1 1 2 3 5 8 13 21 34 55 89 144... |
correct output |
---|
possible |
user output |
---|
possible |
Test 39
Verdict: ACCEPTED
input |
---|
200 1 1125899906842624 1 109951162... |
correct output |
---|
possible |
user output |
---|
possible |