Task: | Sticky Situation |
Sender: | Koodi Ilolle |
Submission time: | 2017-09-26 17:00:34 +0300 |
Language: | Java |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.15 s | details |
#2 | WRONG ANSWER | 0.17 s | details |
#3 | WRONG ANSWER | 0.15 s | details |
#4 | WRONG ANSWER | 0.16 s | details |
#5 | WRONG ANSWER | 0.12 s | details |
#6 | WRONG ANSWER | 0.14 s | details |
#7 | WRONG ANSWER | 0.17 s | details |
#8 | WRONG ANSWER | 0.12 s | details |
#9 | WRONG ANSWER | 0.13 s | details |
#10 | WRONG ANSWER | 0.15 s | details |
#11 | WRONG ANSWER | 0.13 s | details |
#12 | WRONG ANSWER | 0.12 s | details |
#13 | WRONG ANSWER | 0.14 s | details |
#14 | WRONG ANSWER | 0.13 s | details |
#15 | WRONG ANSWER | 0.11 s | details |
#16 | WRONG ANSWER | 0.14 s | details |
#17 | ACCEPTED | 0.11 s | details |
#18 | WRONG ANSWER | 0.12 s | details |
#19 | WRONG ANSWER | 0.12 s | details |
#20 | WRONG ANSWER | 0.14 s | details |
#21 | WRONG ANSWER | 0.13 s | details |
#22 | WRONG ANSWER | 0.14 s | details |
#23 | WRONG ANSWER | 0.15 s | details |
#24 | WRONG ANSWER | 0.13 s | details |
#25 | WRONG ANSWER | 0.17 s | details |
#26 | ACCEPTED | 0.13 s | details |
#27 | ACCEPTED | 0.15 s | details |
#28 | ACCEPTED | 0.13 s | details |
#29 | ACCEPTED | 0.17 s | details |
#30 | ACCEPTED | 0.12 s | details |
#31 | ACCEPTED | 0.16 s | details |
#32 | ACCEPTED | 0.11 s | details |
#33 | ACCEPTED | 0.13 s | details |
#34 | ACCEPTED | 0.14 s | details |
#35 | ACCEPTED | 0.13 s | details |
#36 | ACCEPTED | 0.15 s | details |
#37 | ACCEPTED | 0.12 s | details |
#38 | WRONG ANSWER | 0.22 s | details |
#39 | ACCEPTED | 0.12 s | details |
Code
import java.util.Arrays; /* * 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. */ /** * * @author henpeura */ public class Sticky { public static void main(String[] args) { IO io = new IO(); int maara = io.nextInt(); long[] tikut = new long[maara]; for (int i = 0; i < maara; i++) { tikut[i] = io.nextLong(); } Arrays.sort(tikut); boolean valid = false; for (int i = 0; i < tikut.length - 2; i++) { long l = tikut[i]; long c = tikut[i + 1]; long r = tikut[i + 2]; if (l == c && l == r && c == r) { valid = true; break; } } if (valid) { io.println("possible"); } else { io.println("impossible"); } io.close(); } }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
44 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 2
Verdict: WRONG ANSWER
input |
---|
506 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 3
Verdict: WRONG ANSWER
input |
---|
349 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 4
Verdict: WRONG ANSWER
input |
---|
555 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 5
Verdict: WRONG ANSWER
input |
---|
210 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 6
Verdict: WRONG ANSWER
input |
---|
757 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 7
Verdict: WRONG ANSWER
input |
---|
503 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 8
Verdict: WRONG ANSWER
input |
---|
419 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 9
Verdict: WRONG ANSWER
input |
---|
19 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 10
Verdict: WRONG ANSWER
input |
---|
515 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 11
Verdict: WRONG ANSWER
input |
---|
718 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 12
Verdict: WRONG ANSWER
input |
---|
204 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 13
Verdict: WRONG ANSWER
input |
---|
330 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 14
Verdict: WRONG ANSWER
input |
---|
862 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 15
Verdict: WRONG ANSWER
input |
---|
982 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 16
Verdict: WRONG ANSWER
input |
---|
494 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 17
Verdict: ACCEPTED
input |
---|
4 413658328434492816 42131811934... |
correct output |
---|
impossible |
user output |
---|
impossible |
Test 18
Verdict: WRONG ANSWER
input |
---|
967 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 19
Verdict: WRONG ANSWER
input |
---|
838 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 20
Verdict: WRONG ANSWER
input |
---|
449 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 21
Verdict: WRONG ANSWER
input |
---|
458 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 22
Verdict: WRONG ANSWER
input |
---|
635 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 23
Verdict: WRONG ANSWER
input |
---|
911 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 24
Verdict: WRONG ANSWER
input |
---|
156 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 25
Verdict: WRONG ANSWER
input |
---|
295 413658328434492816 42131811934... |
correct output |
---|
possible |
user output |
---|
impossible |
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: WRONG ANSWER
input |
---|
20000 1 1 2 3 5 8 13 21 34 55 89 144... |
correct output |
---|
possible |
user output |
---|
impossible |
Test 39
Verdict: ACCEPTED
input |
---|
200 1 1125899906842624 1 109951162... |
correct output |
---|
possible |
user output |
---|
possible |