| Task: | LibBot |
| Sender: | aalto25b_002 |
| Submission time: | 2025-09-10 17:30:00 +0300 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | RUNTIME ERROR |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.02 s | details |
| #2 | WRONG ANSWER | 0.01 s | details |
| #3 | RUNTIME ERROR | 0.02 s | details |
| #4 | RUNTIME ERROR | 0.01 s | details |
| #5 | RUNTIME ERROR | 0.02 s | details |
| #6 | WRONG ANSWER | 0.01 s | details |
| #7 | RUNTIME ERROR | 0.02 s | details |
| #8 | WRONG ANSWER | 0.01 s | details |
| #9 | RUNTIME ERROR | 0.02 s | details |
| #10 | WRONG ANSWER | 0.01 s | details |
| #11 | WRONG ANSWER | 0.01 s | details |
| #12 | WRONG ANSWER | 0.01 s | details |
| #13 | RUNTIME ERROR | 0.02 s | details |
| #14 | RUNTIME ERROR | 0.02 s | details |
| #15 | WRONG ANSWER | 0.01 s | details |
| #16 | RUNTIME ERROR | 0.01 s | details |
| #17 | RUNTIME ERROR | 0.02 s | details |
| #18 | WRONG ANSWER | 0.01 s | details |
| #19 | RUNTIME ERROR | 0.02 s | details |
| #20 | RUNTIME ERROR | 0.02 s | details |
| #21 | WRONG ANSWER | 0.02 s | details |
| #22 | WRONG ANSWER | 0.01 s | details |
| #23 | WRONG ANSWER | 0.01 s | details |
| #24 | WRONG ANSWER | 0.01 s | details |
| #25 | WRONG ANSWER | 0.01 s | details |
| #26 | RUNTIME ERROR | 0.02 s | details |
| #27 | WRONG ANSWER | 0.01 s | details |
| #28 | RUNTIME ERROR | 0.02 s | details |
| #29 | WRONG ANSWER | 0.01 s | details |
| #30 | RUNTIME ERROR | 0.01 s | details |
| #31 | RUNTIME ERROR | 0.02 s | details |
| #32 | WRONG ANSWER | 0.01 s | details |
| #33 | RUNTIME ERROR | 0.02 s | details |
| #34 | WRONG ANSWER | 0.01 s | details |
| #35 | WRONG ANSWER | 0.01 s | details |
| #36 | WRONG ANSWER | 0.01 s | details |
| #37 | RUNTIME ERROR | 0.02 s | details |
| #38 | RUNTIME ERROR | 0.02 s | details |
| #39 | RUNTIME ERROR | 0.02 s | details |
| #40 | WRONG ANSWER | 0.01 s | details |
| #41 | WRONG ANSWER | 0.01 s | details |
Compiler report
input/code.cpp: In function 'int binarySearch(std::vector<int>&, int)':
input/code.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
19 | }
| ^
input/code.cpp: In function 'int main()':
input/code.cpp:30:9: warning: unused variable 'boo' [-Wunused-variable]
30 | int boo = 0;
| ^~~
input/code.cpp:93:9: warning: 'end' may be used uninitialized in this function [-Wmaybe-uninitialized]
93 | int diff = end - start;
| ^~~~
input/code.cpp:93:9: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]Code
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
void print(int num){
string numS = to_string(num);
string newNumS = "";
cout << "FETCH ";
for(size_t i = 0; i < numS.length(); i++){
cout << numS[i];
cout << ".";
}
cout << endl;
}
int binarySearch(vector<int> &arr, int x) {
}
int main() {
int n;
cin >> n;
string a,b, name;
int size;
int start, end;
int boo = 0;
cin >> a >> size;
cin >> b >> name;
int low = 0;
int high = 100000;
while (low <= high) {
int mid = low + (high - low) / 2;
// Check if x is present at mid
print(mid);
string x,y;
cin >> y >> x;
if(x == name){
start = mid;
break;
}
// If x greater, ignore left half
if (x < name)
low = mid + 1;
// If x is smaller, ignore right half
else
high = mid - 1;
}
print(start + 1);
string x,y;
cin >> y >> x;
if(x == name){
low = start;
high = 100000;
}
else {
print(start -1);
cin >> y >> x;
if(x == name) high = start -1;
low = 0;
}
while (low <= high) {
int mid = low + (high - low) / 2;
// Check if x is present at mid
print(mid);
string x,y;
cin >> y >> x;
if(x == name){
end = mid;
break;
}
// If x greater, ignore left half
if (x < name)
low = mid + 1;
// If x is smaller, ignore right half
else
high = mid - 1;
}
int diff = end - start;
cout << diff << endl;
}
Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| 2 9 kdg dl 6 kdg 3 kdgwl 1 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 2 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 3 15 irwkfl c 26 d 27 e 11 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 3 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| 4 34 gcnmkobrd bcytu 60 bheb 64 bhebp 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| 5 52 faoluuicsn a 1 cufqs 30 d 44 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 5 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| 6 75 okokxlluuicsnw a 1 b 51 bxcufq 145 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 7 105 jibgewnvmqnpbxvirxmgf a 1 aqykhme 32 atusxwa 119 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 7
Verdict: RUNTIME ERROR
| input |
|---|
| 8 124 djnofmgdbfj afpc 66 apj 204 apjgsu 105 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 9 166 qonvyqgibutxey a 94 act 683 afngrwb 20 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 9
Verdict: RUNTIME ERROR
| input |
|---|
| 10 211 zuek axof 303 axofdxjyeevjxifd 397 axofvxnleg 539 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 10 216 hskapswvzfrbijqwgotkothu aayuulyq 436 aayuulyqcs 205 aayuulyqcsgjqffbfix 530 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 9 158 ylhjecnhgyboje a 691 acd 241 apkcczfzzxrpvlk 88 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 8 133 ewcm aavhwtselm 486 aavrwtsejm 170 aayuuly 62 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 13
Verdict: RUNTIME ERROR
| input |
|---|
| 7 98 jkpxbvb awb 326 comccswxez 114 cw 42 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 14
Verdict: RUNTIME ERROR
| input |
|---|
| 6 70 eaymki alkio 119 alkioruv 72 alkioruvyivod 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 4 28 unje biybsjet 60 biybsjetnn 27 bx 45 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 16
Verdict: RUNTIME ERROR
| input |
|---|
| 9 159 ckfhsouqxvv a 373 aahay 152 asvvihxxokcevotlncilqbuvhmdkmh... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 17
Verdict: RUNTIME ERROR
| input |
|---|
| 8 117 h aaha 262 anmuhfjbetlfzdbns 107 awhfbhdbjbuexgbwl 226 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 18
Verdict: WRONG ANSWER
| input |
|---|
| 7 106 m aezpq 42 aokpn 7 aqfkfe 86 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 19
Verdict: RUNTIME ERROR
| input |
|---|
| 7 101 kvtwj appvlr 240 bguzpylrzkwon 78 bofd 2 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 20
Verdict: RUNTIME ERROR
| input |
|---|
| 2 9 fu dl 6 kdg 3 kdgwl 1 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 2 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 21
Verdict: WRONG ANSWER
| input |
|---|
| 3 15 uvk c 26 d 27 e 11 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 3 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 22
Verdict: WRONG ANSWER
| input |
|---|
| 4 34 jgtx bcytu 60 bheb 64 bhebp 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 23
Verdict: WRONG ANSWER
| input |
|---|
| 5 52 ghmfq a 1 cufqs 30 d 44 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 5 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 24
Verdict: WRONG ANSWER
| input |
|---|
| 6 75 ojuphd a 1 b 51 bxcufq 145 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 25
Verdict: WRONG ANSWER
| input |
|---|
| 7 105 kzzqfzz a 1 aqykhme 32 atusxwa 119 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 26
Verdict: RUNTIME ERROR
| input |
|---|
| 8 124 emdxvwdw afpc 66 apj 204 apjgsu 105 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 27
Verdict: WRONG ANSWER
| input |
|---|
| 9 166 pkhsbasuj a 94 act 683 afngrwb 20 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 28
Verdict: RUNTIME ERROR
| input |
|---|
| 10 211 zypqadmqoo axof 303 axofdxjyeevjxifd 397 axofvxnleg 539 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 29
Verdict: WRONG ANSWER
| input |
|---|
| 10 216 jhagispreh aayuulyq 436 aayuulyqcs 205 aayuulyqcsgjqffbfix 530 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 30
Verdict: RUNTIME ERROR
| input |
|---|
| 9 158 zfkmqpzht a 691 acd 241 apkcczfzzxrpvlk 88 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 31
Verdict: RUNTIME ERROR
| input |
|---|
| 8 133 dogiavnu aavhwtselm 486 aavrwtsejm 170 aayuuly 62 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 32
Verdict: WRONG ANSWER
| input |
|---|
| 7 98 kihqiff awb 326 comccswxez 114 cw 42 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 33
Verdict: RUNTIME ERROR
| input |
|---|
| 6 70 eszubi alkio 119 alkioruv 72 alkioruvyivod 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 34
Verdict: WRONG ANSWER
| input |
|---|
| 4 28 vyta biybsjet 60 biybsjetnn 27 bx 45 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 35
Verdict: WRONG ANSWER
| input |
|---|
| 9 159 ctohjykey a 373 aahay 152 asvvihxxokcevotlncilqbuvhmdkmh... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 36
Verdict: WRONG ANSWER
| input |
|---|
| 8 117 igjxpndn aaha 262 anmuhfjbetlfzdbns 107 awhfbhdbjbuexgbwl 226 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 37
Verdict: RUNTIME ERROR
| input |
|---|
| 7 106 lslhnht aezpq 42 aokpn 7 aqfkfe 86 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 38
Verdict: RUNTIME ERROR
| input |
|---|
| 7 101 hxliesh appvlr 240 bguzpylrzkwon 78 bofd 2 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 39
Verdict: RUNTIME ERROR
| input |
|---|
| 2 1 fu dl 32 |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 2 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Test 40
Verdict: WRONG ANSWER
| input |
|---|
| 3 1 fuuicsxvc fuuicsxvc 243 |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 3 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
Test 41
Verdict: WRONG ANSWER
| input |
|---|
| 4 1 bcytu bcytu 1024 |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 FETCH 5.0.0.0.0. FETCH 5.0.0.0.1. FETCH 7.5.0.0.0. 25000 |
Error:
1 1 0 0
