| Task: | LibBot |
| Sender: | aalto25b_008 |
| Submission time: | 2025-09-10 17:59:41 +0300 |
| Language: | Python3 (CPython3) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.02 s | details |
| #2 | WRONG ANSWER | 0.02 s | details |
| #3 | WRONG ANSWER | 0.02 s | details |
| #4 | WRONG ANSWER | 0.02 s | details |
| #5 | WRONG ANSWER | 0.02 s | details |
| #6 | WRONG ANSWER | 0.02 s | details |
| #7 | WRONG ANSWER | 0.02 s | details |
| #8 | WRONG ANSWER | 0.02 s | details |
| #9 | WRONG ANSWER | 0.02 s | details |
| #10 | WRONG ANSWER | 0.02 s | details |
| #11 | WRONG ANSWER | 0.02 s | details |
| #12 | WRONG ANSWER | 0.02 s | details |
| #13 | WRONG ANSWER | 0.02 s | details |
| #14 | WRONG ANSWER | 0.02 s | details |
| #15 | WRONG ANSWER | 0.02 s | details |
| #16 | WRONG ANSWER | 0.02 s | details |
| #17 | WRONG ANSWER | 0.02 s | details |
| #18 | WRONG ANSWER | 0.02 s | details |
| #19 | WRONG ANSWER | 0.02 s | details |
| #20 | WRONG ANSWER | 0.02 s | details |
| #21 | WRONG ANSWER | 0.02 s | details |
| #22 | WRONG ANSWER | 0.02 s | details |
| #23 | WRONG ANSWER | 0.02 s | details |
| #24 | WRONG ANSWER | 0.02 s | details |
| #25 | WRONG ANSWER | 0.02 s | details |
| #26 | WRONG ANSWER | 0.02 s | details |
| #27 | WRONG ANSWER | 0.02 s | details |
| #28 | WRONG ANSWER | 0.02 s | details |
| #29 | WRONG ANSWER | 0.02 s | details |
| #30 | WRONG ANSWER | 0.02 s | details |
| #31 | WRONG ANSWER | 0.02 s | details |
| #32 | WRONG ANSWER | 0.02 s | details |
| #33 | WRONG ANSWER | 0.02 s | details |
| #34 | WRONG ANSWER | 0.02 s | details |
| #35 | WRONG ANSWER | 0.02 s | details |
| #36 | WRONG ANSWER | 0.02 s | details |
| #37 | WRONG ANSWER | 0.02 s | details |
| #38 | WRONG ANSWER | 0.02 s | details |
| #39 | WRONG ANSWER | 0.02 s | details |
| #40 | WRONG ANSWER | 0.02 s | details |
| #41 | WRONG ANSWER | 0.02 s | details |
Code
size = int(input().split(" ")[1])
bookName = input().split(" ")[1]
def posToStr(pos):
return f"{1+(pos//size**4)}.{1+(pos//size**3) %size}.{1+(pos//size**2) %size}.{1+(pos//size**1) %size}.{1+(pos%size)}"
interFace = ""
debug = True
def ask(mid):
if debug:
global interFace
myMi = 0
myMa = size**5
if myMi <= mid and mid < myMa:
interFace = "abc"
elif myMi >= mid:
interFace = "abb"
else:
interFace = "abd"
# print("FETCH", posToStr(mid), interFace)
else:
print("FETCH", posToStr(mid))
def getInput():
if debug:
global interFace
found = interFace
else:
found = input().split(" ")[1]
return found
def minBound():
maxPos = size**5
minPos = 0
foundOne = False
while True:
mid = round((minPos+maxPos)//2)
ask(mid)
found = getInput()
# found = input(f"FETCH {posToStr(mid)} ").split(" ")[1]
if maxPos - minPos < 2:
return minPos, foundOne
if found > bookName:
maxPos = mid
elif found == bookName:
foundOne = True
maxPos = mid
elif found < bookName:
minPos = mid
def maxBound():
maxPos = size**5
minPos = 0
foundOne = False
while True:
mid = round((minPos+maxPos)//2)
ask(mid)
found = getInput()
if maxPos - minPos < 2:
return maxPos, foundOne
if found > bookName:
maxPos = mid
elif found == bookName:
foundOne = True
minPos = mid
elif found < bookName:
minPos = mid
ask(0)
abc = getInput()
ask(size**5-1)
abc1 = getInput()
ma, foundOne = maxBound()
# print("---")
mi, foundOne = minBound()
if abc == abc1:
print("GOT", ma-mi)
elif abc == bookName:
print("GOT", ma-mi)
else:
print("GOT", ma-mi-1)
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 GOT 1 |
Error:
1 1 0 0
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 3 15 irwkfl c 26 d 27 e 11 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 3 COUNT irwkfl GOT 1 |
Error:
1 1 0 0
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 4 34 gcnmkobrd bcytu 60 bheb 64 bhebp 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 COUNT gcnmkobrd GOT 1 |
Error:
1 1 0 0
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 5 52 faoluuicsn a 1 cufqs 30 d 44 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 5 COUNT faoluuicsn GOT 1 |
Error:
1 1 0 0
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 6 75 okokxlluuicsnw a 1 b 51 bxcufq 145 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 COUNT okokxlluuicsnw GOT 1 |
Error:
1 1 0 0
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 7 105 jibgewnvmqnpbxvirxmgf a 1 aqykhme 32 atusxwa 119 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT jibgewnvmqnpbxvirxmgf GOT 1 |
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 GOT 1 |
Error:
1 1 0 0
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 9 166 qonvyqgibutxey a 94 act 683 afngrwb 20 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 COUNT qonvyqgibutxey GOT 1 |
Error:
1 1 0 0
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 10 211 zuek axof 303 axofdxjyeevjxifd 397 axofvxnleg 539 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 COUNT zuek GOT 1 |
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 GOT 1 |
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 COUNT ylhjecnhgyboje GOT 1 |
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 COUNT ewcm GOT 1 |
Error:
1 1 0 0
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 7 98 jkpxbvb awb 326 comccswxez 114 cw 42 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT jkpxbvb GOT 1 |
Error:
1 1 0 0
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 6 70 eaymki alkio 119 alkioruv 72 alkioruvyivod 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 COUNT eaymki GOT 1 |
Error:
1 1 0 0
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 4 28 unje biybsjet 60 biybsjetnn 27 bx 45 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 COUNT unje GOT 1 |
Error:
1 1 0 0
Test 16
Verdict: WRONG ANSWER
| input |
|---|
| 9 159 ckfhsouqxvv a 373 aahay 152 asvvihxxokcevotlncilqbuvhmdkmh... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 COUNT ckfhsouqxvv GOT 1 |
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 GOT 1 |
Error:
1 1 0 0
Test 18
Verdict: WRONG ANSWER
| input |
|---|
| 7 106 m aezpq 42 aokpn 7 aqfkfe 86 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT m GOT 1 |
Error:
1 1 0 0
Test 19
Verdict: WRONG ANSWER
| input |
|---|
| 7 101 kvtwj appvlr 240 bguzpylrzkwon 78 bofd 2 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT kvtwj GOT 1 |
Error:
1 1 0 0
Test 20
Verdict: WRONG ANSWER
| input |
|---|
| 2 9 fu dl 6 kdg 3 kdgwl 1 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 2 COUNT fu GOT 1 |
Error:
1 1 0 0
Test 21
Verdict: WRONG ANSWER
| input |
|---|
| 3 15 uvk c 26 d 27 e 11 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 3 COUNT uvk GOT 1 |
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 COUNT jgtx GOT 1 |
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 COUNT ghmfq GOT 1 |
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 COUNT ojuphd GOT 1 |
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 COUNT kzzqfzz GOT 1 |
Error:
1 1 0 0
Test 26
Verdict: WRONG ANSWER
| input |
|---|
| 8 124 emdxvwdw afpc 66 apj 204 apjgsu 105 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 COUNT emdxvwdw GOT 1 |
Error:
1 1 0 0
Test 27
Verdict: WRONG ANSWER
| input |
|---|
| 9 166 pkhsbasuj a 94 act 683 afngrwb 20 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 COUNT pkhsbasuj GOT 1 |
Error:
1 1 0 0
Test 28
Verdict: WRONG ANSWER
| input |
|---|
| 10 211 zypqadmqoo axof 303 axofdxjyeevjxifd 397 axofvxnleg 539 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 COUNT zypqadmqoo GOT 1 |
Error:
1 1 0 0
Test 29
Verdict: WRONG ANSWER
| input |
|---|
| 10 216 jhagispreh aayuulyq 436 aayuulyqcs 205 aayuulyqcsgjqffbfix 530 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 10 COUNT jhagispreh GOT 1 |
Error:
1 1 0 0
Test 30
Verdict: WRONG ANSWER
| input |
|---|
| 9 158 zfkmqpzht a 691 acd 241 apkcczfzzxrpvlk 88 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 9 COUNT zfkmqpzht GOT 1 |
Error:
1 1 0 0
Test 31
Verdict: WRONG ANSWER
| input |
|---|
| 8 133 dogiavnu aavhwtselm 486 aavrwtsejm 170 aayuuly 62 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 8 COUNT dogiavnu GOT 1 |
Error:
1 1 0 0
Test 32
Verdict: WRONG ANSWER
| input |
|---|
| 7 98 kihqiff awb 326 comccswxez 114 cw 42 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT kihqiff GOT 1 |
Error:
1 1 0 0
Test 33
Verdict: WRONG ANSWER
| input |
|---|
| 6 70 eszubi alkio 119 alkioruv 72 alkioruvyivod 26 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 6 COUNT eszubi GOT 1 |
Error:
1 1 0 0
Test 34
Verdict: WRONG ANSWER
| input |
|---|
| 4 28 vyta biybsjet 60 biybsjetnn 27 bx 45 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 4 COUNT vyta GOT 1 |
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 COUNT ctohjykey GOT 1 |
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 COUNT igjxpndn GOT 1 |
Error:
1 1 0 0
Test 37
Verdict: WRONG ANSWER
| input |
|---|
| 7 106 lslhnht aezpq 42 aokpn 7 aqfkfe 86 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT lslhnht GOT 1 |
Error:
1 1 0 0
Test 38
Verdict: WRONG ANSWER
| input |
|---|
| 7 101 hxliesh appvlr 240 bguzpylrzkwon 78 bofd 2 ... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 7 COUNT hxliesh GOT 1 |
Error:
1 1 0 0
Test 39
Verdict: WRONG ANSWER
| input |
|---|
| 2 1 fu dl 32 |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 2 COUNT fu GOT 1 |
Error:
1 1 0 0
Test 40
Verdict: WRONG ANSWER
| input |
|---|
| 3 1 fuuicsxvc fuuicsxvc 243 |
| correct output |
|---|
| (empty) |
| user output |
|---|
| SIZE 3 COUNT fuuicsxvc GOT 1 |
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 GOT 1 |
Error:
1 1 0 0
