Task: | LibBot |
Sender: | aalto2024b_003 |
Submission time: | 2024-09-11 16:46:00 +0300 |
Language: | C++ (C++20) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | details |
#2 | RUNTIME ERROR | 0.02 s | details |
#3 | RUNTIME ERROR | 0.02 s | details |
#4 | WRONG ANSWER | 0.02 s | details |
#5 | RUNTIME ERROR | 0.02 s | details |
#6 | WRONG ANSWER | 0.01 s | details |
#7 | WRONG ANSWER | 0.01 s | details |
#8 | RUNTIME ERROR | 0.02 s | details |
#9 | WRONG ANSWER | 0.01 s | details |
#10 | WRONG ANSWER | 0.01 s | details |
#11 | RUNTIME ERROR | 0.02 s | details |
#12 | RUNTIME ERROR | 0.01 s | details |
#13 | WRONG ANSWER | 0.02 s | details |
#14 | RUNTIME ERROR | 0.01 s | details |
#15 | RUNTIME ERROR | 0.01 s | details |
#16 | WRONG ANSWER | 0.01 s | details |
#17 | WRONG ANSWER | 0.01 s | details |
#18 | RUNTIME ERROR | 0.01 s | details |
#19 | WRONG ANSWER | 0.01 s | details |
#20 | RUNTIME ERROR | 0.01 s | details |
#21 | ACCEPTED | 0.01 s | details |
#22 | ACCEPTED | 0.01 s | details |
#23 | RUNTIME ERROR | 0.02 s | details |
#24 | RUNTIME ERROR | 0.02 s | details |
#25 | RUNTIME ERROR | 0.01 s | details |
#26 | RUNTIME ERROR | 0.02 s | details |
#27 | RUNTIME ERROR | 0.02 s | details |
#28 | ACCEPTED | 0.01 s | details |
#29 | RUNTIME ERROR | 0.02 s | details |
#30 | ACCEPTED | 0.01 s | details |
#31 | RUNTIME ERROR | 0.02 s | details |
#32 | RUNTIME ERROR | 0.01 s | details |
#33 | RUNTIME ERROR | 0.02 s | details |
#34 | RUNTIME ERROR | 0.01 s | details |
#35 | ACCEPTED | 0.01 s | details |
#36 | ACCEPTED | 0.01 s | details |
#37 | ACCEPTED | 0.01 s | details |
#38 | RUNTIME ERROR | 0.01 s | details |
#39 | RUNTIME ERROR | 0.02 s | details |
#40 | WRONG ANSWER | 0.01 s | details |
#41 | WRONG ANSWER | 0.01 s | details |
Code
#include <bits/stdc++.h> using namespace std; #define int long long string to_string(string s) { return '"' + s + '"'; } string to_string(const char* s) { return to_string((string) s); } string to_string(bool b) { return (b ? "true" : "false"); } template <typename A, typename B> string to_string(pair<A, B> p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; } template <typename A> string to_string(A v) { bool first = true; string res = "{"; for (const auto &x : v) { if (!first) { res += ", "; } first = false; res += to_string(x); } res += "}"; return res; } void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif const int N = 2e5 + 5; signed main() { cin.tie(0)->sync_with_stdio(0); string tmp; cin >> tmp; int n; cin >> n; cin >> tmp; string need; cin >> need; int mx = n * n * n * n * n; auto fetch = [&](int val) { cout << "FETCH "; cout << ((val / (n * n * n * n)) % n + 1) << "."; cout << ((val / (n * n * n)) % n + 1) << "."; cout << ((val / (n * n)) % n + 1) << "."; cout << ((val / (n)) % n + 1) << "."; cout << (val % (n) + 1) << endl; }; // cout << mx - 1 << '\n'; // fetch(mx - 1); auto check1 = [&](int mid) { fetch(mid); string got; cin >> got; return got >= need; }; int lo = 0, hi = mx - 1; int ans = -1; while (lo <= hi) { int mid = lo + (hi - lo) / 2; if (check1(mid)) { ans = mid; hi = mid - 1; } else { lo = mid + 1; } } // there is nothing >= need if (ans == -1) { cout << "GOT " << 0 << endl; return 0; } // string need doesn't exists fetch(ans); string cac; cin >> cac; if (cac != need) { cout << "GOT " << 0 << endl; return 0; } auto check2 = [&](int mid) { fetch(mid); string got; cin >> got; return got == need; }; lo = ans, hi = mx - 1; int ans2 = ans; while (lo <= hi) { int mid = lo + (hi - lo) / 2; if (check2(mid)) { ans2 = mid; lo = mid + 1; } else { hi = mid - 1; } } cout << "GOT " << ans2 - ans + 1 << endl; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
2 9 kdg dl 6 kdg 3 kdgwl 1 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 2 COUNT kdg FETCH 1.2.2.2.2 FOUND kdgyi FETCH 2.1.2.2.2 ... Truncated |
Error:
1 1 0 0
Test 2
Verdict: RUNTIME ERROR
input |
---|
3 15 irwkfl c 26 d 27 e 11 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 3 COUNT irwkfl FETCH 2.2.2.2.2 FOUND fuuics FETCH 3.1.3.1.3 ... Truncated |
Test 3
Verdict: RUNTIME ERROR
input |
---|
4 34 gcnmkobrd bcytu 60 bheb 64 bhebp 26 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 4 COUNT gcnmkobrd FETCH 2.4.4.4.4 FOUND h FETCH 3.4.4.4.4 ... Truncated |
Test 4
Verdict: WRONG ANSWER
input |
---|
5 52 faoluuicsn a 1 cufqs 30 d 44 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 5 COUNT faoluuicsn FETCH 3.3.3.3.3 FOUND o FETCH 4.4.4.4.4 ... Truncated |
Error:
1 1 0 0
Test 5
Verdict: RUNTIME ERROR
input |
---|
6 75 okokxlluuicsnw a 1 b 51 bxcufq 145 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 6 COUNT okokxlluuicsnw FETCH 3.6.6.6.6 FOUND okhkxlluurcsnwcvbheipdry... Truncated |
Test 6
Verdict: WRONG ANSWER
input |
---|
7 105 jibgewnvmqnpbxvirxmgf a 1 aqykhme 32 atusxwa 119 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT jibgewnvmqnpbxvirxmgf FETCH 4.4.4.4.4 FOUND n FETCH 6.2.6.2.6 ... Truncated |
Error:
1 1 0 0
Test 7
Verdict: WRONG ANSWER
input |
---|
8 124 djnofmgdbfj afpc 66 apj 204 apjgsu 105 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 8 COUNT djnofmgdbfj FETCH 4.8.8.8.8 FOUND mdaecaalyy FETCH 6.8.8.8.8 ... Truncated |
Error:
1 1 0 0
Test 8
Verdict: RUNTIME ERROR
input |
---|
9 166 qonvyqgibutxey a 94 act 683 afngrwb 20 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 9 COUNT qonvyqgibutxey FETCH 5.5.5.5.5 FOUND ox FETCH 7.7.7.7.7 ... Truncated |
Test 9
Verdict: WRONG ANSWER
input |
---|
10 211 zuek axof 303 axofdxjyeevjxifd 397 axofvxnleg 539 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 10 COUNT zuek FETCH 5.10.10.10.10 FOUND moh FETCH 8.5.10.10.10 ... Truncated |
Error:
1 1 0 0
Test 10
Verdict: WRONG ANSWER
input |
---|
10 216 hskapswvzfrbijqwgotkothu aayuulyq 436 aayuulyqcs 205 aayuulyqcsgjqffbfix 530 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 10 COUNT hskapswvzfrbijqwgotkothu FETCH 5.10.10.10.10 FOUND jogii FETCH 8.5.10.10.10 ... Truncated |
Error:
1 1 0 0
Test 11
Verdict: RUNTIME ERROR
input |
---|
9 158 ylhjecnhgyboje a 691 acd 241 apkcczfzzxrpvlk 88 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 9 COUNT ylhjecnhgyboje FETCH 5.5.5.5.5 FOUND kxtjsyjajvusmj FETCH 7.7.7.7.7 ... Truncated |
Test 12
Verdict: RUNTIME ERROR
input |
---|
8 133 ewcm aavhwtselm 486 aavrwtsejm 170 aayuuly 62 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 8 COUNT ewcm FETCH 4.8.8.8.8 FOUND kjogxxxfyzbvtqxnmiok FETCH 6.8.8.8.8 ... Truncated |
Test 13
Verdict: WRONG ANSWER
input |
---|
7 98 jkpxbvb awb 326 comccswxez 114 cw 42 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT jkpxbvb FETCH 4.4.4.4.4 FOUND lqsc FETCH 6.2.6.2.6 ... Truncated |
Error:
1 1 0 0
Test 14
Verdict: RUNTIME ERROR
input |
---|
6 70 eaymki alkio 119 alkioruv 72 alkioruvyivod 26 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 6 COUNT eaymki FETCH 3.6.6.6.6 FOUND lzftwy FETCH 5.3.6.6.6 ... Truncated |
Test 15
Verdict: RUNTIME ERROR
input |
---|
4 28 unje biybsjet 60 biybsjetnn 27 bx 45 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 4 COUNT unje FETCH 2.4.4.4.4 FOUND npghbml FETCH 3.4.4.4.4 ... Truncated |
Test 16
Verdict: WRONG ANSWER
input |
---|
9 159 ckfhsouqxvv a 373 aahay 152 asvvihxxokcevotlncilqbuvhmdkmh... |
correct output |
---|
(empty) |
user output |
---|
SIZE 9 COUNT ckfhsouqxvv FETCH 5.5.5.5.5 FOUND lk FETCH 7.7.7.7.7 ... Truncated |
Error:
1 1 0 0
Test 17
Verdict: WRONG ANSWER
input |
---|
8 117 h aaha 262 anmuhfjbetlfzdbns 107 awhfbhdbjbuexgbwl 226 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 8 COUNT h FETCH 4.8.8.8.8 FOUND ns FETCH 6.8.8.8.8 ... Truncated |
Error:
1 1 0 0
Test 18
Verdict: RUNTIME ERROR
input |
---|
7 106 m aezpq 42 aokpn 7 aqfkfe 86 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT m FETCH 4.4.4.4.4 FOUND mljjsrvri FETCH 6.2.6.2.6 ... Truncated |
Test 19
Verdict: WRONG ANSWER
input |
---|
7 101 kvtwj appvlr 240 bguzpylrzkwon 78 bofd 2 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT kvtwj FETCH 4.4.4.4.4 FOUND oekjahqd FETCH 6.2.6.2.6 ... Truncated |
Error:
1 1 0 0
Test 20
Verdict: RUNTIME ERROR
input |
---|
2 9 fu dl 6 kdg 3 kdgwl 1 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 2 COUNT fu FETCH 1.2.2.2.2 FOUND kdgyi FETCH 2.1.2.2.2 ... Truncated |
Test 21
Verdict: ACCEPTED
input |
---|
3 15 uvk c 26 d 27 e 11 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 3 COUNT uvk FETCH 2.2.2.2.2 FOUND fuuics FETCH 3.1.3.1.3 ... Truncated |
Error:
1 1 1 0
Test 22
Verdict: ACCEPTED
input |
---|
4 34 jgtx bcytu 60 bheb 64 bhebp 26 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 4 COUNT jgtx FETCH 2.4.4.4.4 FOUND h FETCH 3.4.4.4.4 ... Truncated |
Error:
1 1 1 0
Test 23
Verdict: RUNTIME ERROR
input |
---|
5 52 ghmfq a 1 cufqs 30 d 44 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 5 COUNT ghmfq FETCH 3.3.3.3.3 FOUND o FETCH 4.4.4.4.4 ... Truncated |
Test 24
Verdict: RUNTIME ERROR
input |
---|
6 75 ojuphd a 1 b 51 bxcufq 145 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 6 COUNT ojuphd FETCH 3.6.6.6.6 FOUND okhkxlluurcsnwcvbheipdry... Truncated |
Test 25
Verdict: RUNTIME ERROR
input |
---|
7 105 kzzqfzz a 1 aqykhme 32 atusxwa 119 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT kzzqfzz FETCH 4.4.4.4.4 FOUND n FETCH 6.2.6.2.6 ... Truncated |
Test 26
Verdict: RUNTIME ERROR
input |
---|
8 124 emdxvwdw afpc 66 apj 204 apjgsu 105 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 8 COUNT emdxvwdw FETCH 4.8.8.8.8 FOUND mdaecaalyy FETCH 6.8.8.8.8 ... Truncated |
Test 27
Verdict: RUNTIME ERROR
input |
---|
9 166 pkhsbasuj a 94 act 683 afngrwb 20 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 9 COUNT pkhsbasuj FETCH 5.5.5.5.5 FOUND ox FETCH 7.7.7.7.7 ... Truncated |
Test 28
Verdict: ACCEPTED
input |
---|
10 211 zypqadmqoo axof 303 axofdxjyeevjxifd 397 axofvxnleg 539 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 10 COUNT zypqadmqoo FETCH 5.10.10.10.10 FOUND moh FETCH 8.5.10.10.10 ... Truncated |
Error:
1 1 1 0
Test 29
Verdict: RUNTIME ERROR
input |
---|
10 216 jhagispreh aayuulyq 436 aayuulyqcs 205 aayuulyqcsgjqffbfix 530 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 10 COUNT jhagispreh FETCH 5.10.10.10.10 FOUND jogii FETCH 8.5.10.10.10 ... Truncated |
Test 30
Verdict: ACCEPTED
input |
---|
9 158 zfkmqpzht a 691 acd 241 apkcczfzzxrpvlk 88 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 9 COUNT zfkmqpzht FETCH 5.5.5.5.5 FOUND kxtjsyjajvusmj FETCH 7.7.7.7.7 ... Truncated |
Error:
1 1 1 0
Test 31
Verdict: RUNTIME ERROR
input |
---|
8 133 dogiavnu aavhwtselm 486 aavrwtsejm 170 aayuuly 62 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 8 COUNT dogiavnu FETCH 4.8.8.8.8 FOUND kjogxxxfyzbvtqxnmiok FETCH 6.8.8.8.8 ... Truncated |
Test 32
Verdict: RUNTIME ERROR
input |
---|
7 98 kihqiff awb 326 comccswxez 114 cw 42 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT kihqiff FETCH 4.4.4.4.4 FOUND lqsc FETCH 6.2.6.2.6 ... Truncated |
Test 33
Verdict: RUNTIME ERROR
input |
---|
6 70 eszubi alkio 119 alkioruv 72 alkioruvyivod 26 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 6 COUNT eszubi FETCH 3.6.6.6.6 FOUND lzftwy FETCH 5.3.6.6.6 ... Truncated |
Test 34
Verdict: RUNTIME ERROR
input |
---|
4 28 vyta biybsjet 60 biybsjetnn 27 bx 45 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 4 COUNT vyta FETCH 2.4.4.4.4 FOUND npghbml FETCH 3.4.4.4.4 ... Truncated |
Test 35
Verdict: ACCEPTED
input |
---|
9 159 ctohjykey a 373 aahay 152 asvvihxxokcevotlncilqbuvhmdkmh... |
correct output |
---|
(empty) |
user output |
---|
SIZE 9 COUNT ctohjykey FETCH 5.5.5.5.5 FOUND lk FETCH 7.7.7.7.7 ... Truncated |
Error:
1 1 1 0
Test 36
Verdict: ACCEPTED
input |
---|
8 117 igjxpndn aaha 262 anmuhfjbetlfzdbns 107 awhfbhdbjbuexgbwl 226 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 8 COUNT igjxpndn FETCH 4.8.8.8.8 FOUND ns FETCH 6.8.8.8.8 ... Truncated |
Error:
1 1 1 0
Test 37
Verdict: ACCEPTED
input |
---|
7 106 lslhnht aezpq 42 aokpn 7 aqfkfe 86 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT lslhnht FETCH 4.4.4.4.4 FOUND mljjsrvri FETCH 6.2.6.2.6 ... Truncated |
Error:
1 1 1 0
Test 38
Verdict: RUNTIME ERROR
input |
---|
7 101 hxliesh appvlr 240 bguzpylrzkwon 78 bofd 2 ... |
correct output |
---|
(empty) |
user output |
---|
SIZE 7 COUNT hxliesh FETCH 4.4.4.4.4 FOUND oekjahqd FETCH 6.2.6.2.6 ... Truncated |
Test 39
Verdict: RUNTIME ERROR
input |
---|
2 1 fu dl 32 |
correct output |
---|
(empty) |
user output |
---|
SIZE 2 COUNT fu FETCH 1.2.2.2.2 FOUND dl FETCH 2.1.2.2.2 ... Truncated |
Test 40
Verdict: WRONG ANSWER
input |
---|
3 1 fuuicsxvc fuuicsxvc 243 |
correct output |
---|
(empty) |
user output |
---|
SIZE 3 COUNT fuuicsxvc FETCH 2.2.2.2.2 FOUND fuuicsxvc FETCH 3.1.3.1.3 ... Truncated |
Error:
1 1 0 0
Test 41
Verdict: WRONG ANSWER
input |
---|
4 1 bcytu bcytu 1024 |
correct output |
---|
(empty) |
user output |
---|
SIZE 4 COUNT bcytu FETCH 2.4.4.4.4 FOUND bcytu FETCH 3.4.4.4.4 ... Truncated |
Error:
1 1 0 0