Task: | Shortest palindrome |
Sender: | aalto2024h_005 |
Submission time: | 2024-10-23 16:37:29 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | details |
#2 | WRONG ANSWER | 0.00 s | details |
#3 | WRONG ANSWER | 0.00 s | details |
#4 | WRONG ANSWER | 0.00 s | details |
#5 | WRONG ANSWER | 0.00 s | details |
#6 | WRONG ANSWER | 0.00 s | details |
#7 | WRONG ANSWER | 0.00 s | details |
#8 | WRONG ANSWER | 0.00 s | details |
#9 | WRONG ANSWER | 0.00 s | details |
#10 | WRONG ANSWER | 0.00 s | details |
#11 | WRONG ANSWER | 0.00 s | details |
#12 | WRONG ANSWER | 0.00 s | details |
#13 | WRONG ANSWER | 0.00 s | details |
#14 | WRONG ANSWER | 0.00 s | details |
#15 | WRONG ANSWER | 0.00 s | details |
#16 | WRONG ANSWER | 0.00 s | details |
#17 | WRONG ANSWER | 0.00 s | details |
#18 | WRONG ANSWER | 0.00 s | details |
#19 | WRONG ANSWER | 0.00 s | details |
#20 | WRONG ANSWER | 0.01 s | details |
#21 | WRONG ANSWER | 0.00 s | details |
#22 | WRONG ANSWER | 0.00 s | details |
#23 | WRONG ANSWER | 0.00 s | details |
#24 | WRONG ANSWER | 0.00 s | details |
#25 | WRONG ANSWER | 0.00 s | details |
#26 | WRONG ANSWER | 0.00 s | details |
#27 | WRONG ANSWER | 0.00 s | details |
#28 | WRONG ANSWER | 0.00 s | details |
#29 | WRONG ANSWER | 0.00 s | details |
#30 | WRONG ANSWER | 0.00 s | details |
#31 | WRONG ANSWER | 0.00 s | details |
#32 | WRONG ANSWER | 0.00 s | details |
#33 | WRONG ANSWER | 0.00 s | details |
#34 | WRONG ANSWER | 0.00 s | details |
#35 | WRONG ANSWER | 0.00 s | details |
#36 | WRONG ANSWER | 0.00 s | details |
#37 | WRONG ANSWER | 0.00 s | details |
#38 | WRONG ANSWER | 0.00 s | details |
#39 | WRONG ANSWER | 0.00 s | details |
#40 | WRONG ANSWER | 0.00 s | details |
#41 | WRONG ANSWER | 0.00 s | details |
#42 | WRONG ANSWER | 0.00 s | details |
#43 | WRONG ANSWER | 0.00 s | details |
#44 | WRONG ANSWER | 0.00 s | details |
#45 | WRONG ANSWER | 0.00 s | details |
#46 | WRONG ANSWER | 0.00 s | details |
#47 | WRONG ANSWER | 0.00 s | details |
#48 | WRONG ANSWER | 0.00 s | details |
#49 | WRONG ANSWER | 0.00 s | details |
#50 | WRONG ANSWER | 0.00 s | details |
#51 | WRONG ANSWER | 0.00 s | details |
#52 | WRONG ANSWER | 0.00 s | details |
#53 | WRONG ANSWER | 0.00 s | details |
#54 | WRONG ANSWER | 0.00 s | details |
#55 | WRONG ANSWER | 0.00 s | details |
#56 | WRONG ANSWER | 0.00 s | details |
#57 | WRONG ANSWER | 0.00 s | details |
#58 | WRONG ANSWER | 0.00 s | details |
#59 | WRONG ANSWER | 0.00 s | details |
#60 | WRONG ANSWER | 0.00 s | details |
#61 | WRONG ANSWER | 0.00 s | details |
#62 | WRONG ANSWER | 0.00 s | details |
#63 | WRONG ANSWER | 0.00 s | details |
#64 | WRONG ANSWER | 0.00 s | details |
#65 | WRONG ANSWER | 0.00 s | details |
#66 | WRONG ANSWER | 0.00 s | details |
#67 | WRONG ANSWER | 0.00 s | details |
#68 | WRONG ANSWER | 0.00 s | details |
Code
#include <bits/stdc++.h> using namespace std; int main() { int n; long long x; cin >> n >> x; vector<pair<long long, int>> arr; for (int i = 1; i <= n; i++) { long long a; cin >> a; pair<int, int> p; p.first = a; p.second = i; arr.push_back(p); } sort(begin(arr), end(arr)); for (int i = 0; i < n; i++) { int l, r; l = 0; r = n - 1; while (l != r) { int target; target = x - arr.at(i).first; if (l != i && r != i && arr.at(l).first + arr.at(r).first == target) { cout << arr.at(i).second << " " << arr.at(l).second << " " << arr.at(r).second << endl; return 0; } if (arr.at(l).first + arr.at(r).first < target) { l++; } else { r--; } } } cout << "IMPOSSIBLE" << endl; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
sl |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 2
Verdict: WRONG ANSWER
input |
---|
uz |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 3
Verdict: WRONG ANSWER
input |
---|
vum |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 4
Verdict: WRONG ANSWER
input |
---|
ltw |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 5
Verdict: WRONG ANSWER
input |
---|
srhm |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 6
Verdict: WRONG ANSWER
input |
---|
agwj |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 7
Verdict: WRONG ANSWER
input |
---|
vcgm |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 8
Verdict: WRONG ANSWER
input |
---|
cwld |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 9
Verdict: WRONG ANSWER
input |
---|
psvpw |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 10
Verdict: WRONG ANSWER
input |
---|
zsyad |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 11
Verdict: WRONG ANSWER
input |
---|
eayoy |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 12
Verdict: WRONG ANSWER
input |
---|
bsvhd |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 13
Verdict: WRONG ANSWER
input |
---|
xezws |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 14
Verdict: WRONG ANSWER
input |
---|
bwvfj |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 15
Verdict: WRONG ANSWER
input |
---|
yfvbj |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 16
Verdict: WRONG ANSWER
input |
---|
fuilz |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 17
Verdict: WRONG ANSWER
input |
---|
agwjn |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 18
Verdict: WRONG ANSWER
input |
---|
jnmma |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 19
Verdict: WRONG ANSWER
input |
---|
psvpwowlqj |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 20
Verdict: WRONG ANSWER
input |
---|
zsyadhzdgc |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 21
Verdict: WRONG ANSWER
input |
---|
eayoylmkie |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 22
Verdict: WRONG ANSWER
input |
---|
bsvhdnoxlx |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 23
Verdict: WRONG ANSWER
input |
---|
xezwspfdzf |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 24
Verdict: WRONG ANSWER
input |
---|
bwvfjxzmcp |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 25
Verdict: WRONG ANSWER
input |
---|
yfvbjczpcn |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 26
Verdict: WRONG ANSWER
input |
---|
fuilzslzio |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 27
Verdict: WRONG ANSWER
input |
---|
agwjnvgkap |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 28
Verdict: WRONG ANSWER
input |
---|
jnmmadidaf |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 29
Verdict: WRONG ANSWER
input |
---|
psvpwowlqjlhxbzhjmuvnmokyvbicq... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 30
Verdict: WRONG ANSWER
input |
---|
zsyadhzdgckekirkyowkirnflwfanr... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 31
Verdict: WRONG ANSWER
input |
---|
eayoylmkiefsqdhmgqvnrdmnpesugw... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 32
Verdict: WRONG ANSWER
input |
---|
bsvhdnoxlxadbfgbclsadlqfhjrmpx... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 33
Verdict: WRONG ANSWER
input |
---|
xezwspfdzfasgxlquafowjzpekpvap... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 34
Verdict: WRONG ANSWER
input |
---|
bwvfjxzmcpktjnmhzevcqtvlgetwch... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 35
Verdict: WRONG ANSWER
input |
---|
yfvbjczpcnpknimqvltkngpeqszxvm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 36
Verdict: WRONG ANSWER
input |
---|
fuilzslziogncbkgamnrwuijkbrhrx... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 37
Verdict: WRONG ANSWER
input |
---|
agwjnvgkapltknwmyodstksvqaljhm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 38
Verdict: WRONG ANSWER
input |
---|
jnmmadidafwkdgdckimeiwjytbzsso... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 39
Verdict: WRONG ANSWER
input |
---|
psvpwowlqjlhxbzhjmuvnmokyvbicq... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 40
Verdict: WRONG ANSWER
input |
---|
zsyadhzdgckekirkyowkirnflwfanr... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 41
Verdict: WRONG ANSWER
input |
---|
eayoylmkiefsqdhmgqvnrdmnpesugw... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 42
Verdict: WRONG ANSWER
input |
---|
bsvhdnoxlxadbfgbclsadlqfhjrmpx... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 43
Verdict: WRONG ANSWER
input |
---|
xezwspfdzfasgxlquafowjzpekpvap... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 44
Verdict: WRONG ANSWER
input |
---|
bwvfjxzmcpktjnmhzevcqtvlgetwch... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 45
Verdict: WRONG ANSWER
input |
---|
yfvbjczpcnpknimqvltkngpeqszxvm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 46
Verdict: WRONG ANSWER
input |
---|
fuilzslziogncbkgamnrwuijkbrhrx... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 47
Verdict: WRONG ANSWER
input |
---|
agwjnvgkapltknwmyodstksvqaljhm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 48
Verdict: WRONG ANSWER
input |
---|
jnmmadidafwkdgdckimeiwjytbzsso... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 49
Verdict: WRONG ANSWER
input |
---|
psvpwowlqjlhxbzhjmuvnmokyvbicq... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 50
Verdict: WRONG ANSWER
input |
---|
zsyadhzdgckekirkyowkirnflwfanr... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 51
Verdict: WRONG ANSWER
input |
---|
eayoylmkiefsqdhmgqvnrdmnpesugw... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 52
Verdict: WRONG ANSWER
input |
---|
bsvhdnoxlxadbfgbclsadlqfhjrmpx... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 53
Verdict: WRONG ANSWER
input |
---|
xezwspfdzfasgxlquafowjzpekpvap... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 54
Verdict: WRONG ANSWER
input |
---|
bwvfjxzmcpktjnmhzevcqtvlgetwch... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 55
Verdict: WRONG ANSWER
input |
---|
yfvbjczpcnpknimqvltkngpeqszxvm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 56
Verdict: WRONG ANSWER
input |
---|
fuilzslziogncbkgamnrwuijkbrhrx... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 57
Verdict: WRONG ANSWER
input |
---|
agwjnvgkapltknwmyodstksvqaljhm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 58
Verdict: WRONG ANSWER
input |
---|
jnmmadidafwkdgdckimeiwjytbzsso... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 59
Verdict: WRONG ANSWER
input |
---|
psvpwowlqjlhxbzhjmuvnmokyvbicq... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 60
Verdict: WRONG ANSWER
input |
---|
zsyadhzdgckekirkyowkirnflwfanr... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 61
Verdict: WRONG ANSWER
input |
---|
eayoylmkiefsqdhmgqvnrdmnpesugw... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 62
Verdict: WRONG ANSWER
input |
---|
bsvhdnoxlxadbfgbclsadlqfhjrmpx... |
correct output |
---|
3 |
user output |
---|
IMPOSSIBLE |
Test 63
Verdict: WRONG ANSWER
input |
---|
xezwspfdzfasgxlquafowjzpekpvap... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 64
Verdict: WRONG ANSWER
input |
---|
bwvfjxzmcpktjnmhzevcqtvlgetwch... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 65
Verdict: WRONG ANSWER
input |
---|
yfvbjczpcnpknimqvltkngpeqszxvm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 66
Verdict: WRONG ANSWER
input |
---|
fuilzslziogncbkgamnrwuijkbrhrx... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |
Test 67
Verdict: WRONG ANSWER
input |
---|
agwjnvgkapltknwmyodstksvqaljhm... |
correct output |
---|
-1 |
user output |
---|
IMPOSSIBLE |
Test 68
Verdict: WRONG ANSWER
input |
---|
jnmmadidafwkdgdckimeiwjytbzsso... |
correct output |
---|
2 |
user output |
---|
IMPOSSIBLE |