message stringlengths 2 67k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 463 109k | cluster float64 19 19 | __index_level_0__ int64 926 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing ... | instruction | 0 | 93,863 | 19 | 187,726 |
No | output | 1 | 93,863 | 19 | 187,727 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing ... | instruction | 0 | 93,864 | 19 | 187,728 |
No | output | 1 | 93,864 | 19 | 187,729 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing ... | instruction | 0 | 93,865 | 19 | 187,730 |
No | output | 1 | 93,865 | 19 | 187,731 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Kicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing ... | instruction | 0 | 93,866 | 19 | 187,732 |
No | output | 1 | 93,866 | 19 | 187,733 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It is Borya's eleventh birthday, and he has got a great present: n cards with numbers. The i-th card has the number ai written on it. Borya wants to put his cards in a row to get one greater num... | instruction | 0 | 94,094 | 19 | 188,188 |
No | output | 1 | 94,094 | 19 | 188,189 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It is Borya's eleventh birthday, and he has got a great present: n cards with numbers. The i-th card has the number ai written on it. Borya wants to put his cards in a row to get one greater num... | instruction | 0 | 94,095 | 19 | 188,190 |
No | output | 1 | 94,095 | 19 | 188,191 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It is Borya's eleventh birthday, and he has got a great present: n cards with numbers. The i-th card has the number ai written on it. Borya wants to put his cards in a row to get one greater num... | instruction | 0 | 94,096 | 19 | 188,192 |
No | output | 1 | 94,096 | 19 | 188,193 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It is Borya's eleventh birthday, and he has got a great present: n cards with numbers. The i-th card has the number ai written on it. Borya wants to put his cards in a row to get one greater num... | instruction | 0 | 94,097 | 19 | 188,194 |
No | output | 1 | 94,097 | 19 | 188,195 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,478 | 19 | 188,956 |
Tags: games, math
Correct Solution:
```
def solve():
[n, k] = (int(x) for x in input().split())
if k % 3 != 0:
if n % 3 == 0:
print('Bob')
else:
print('Alice')
else:
tc = k // 3
n = n % (1 + 3 * tc)
if n == 3 * tc:
print('Alice')
... | output | 1 | 94,478 | 19 | 188,957 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,479 | 19 | 188,958 |
Tags: games, math
Correct Solution:
```
T = int(input())
for i in range(T):
n, k = list(map(int, input().split()))
if k % 3 != 0:
if n % 3 == 0:
print("Bob")
else:
print("Alice")
else:
quotient = k + 1
remainder = n % quotient
if remainder % 3 ... | output | 1 | 94,479 | 19 | 188,959 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,480 | 19 | 188,960 |
Tags: games, math
Correct Solution:
```
def solve(n, k):
sol = [None] * (n+1)
for i in range(n+1):
if i == 0:
sol[i] = 'B'
continue
for offset in (1, 2, k):
if i - offset >= 0 and sol[i - offset] == 'B':
sol[i] = 'A'
b... | output | 1 | 94,480 | 19 | 188,961 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,481 | 19 | 188,962 |
Tags: games, math
Correct Solution:
```
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
def rl(proc=None):
if proc is not None:
return proc(sys.stdin.readline())
else:
return sys.stdin.readline().rstrip()
def srl(proc=None):
if proc is not None:
return list(map(proc, rl().sp... | output | 1 | 94,481 | 19 | 188,963 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,482 | 19 | 188,964 |
Tags: games, math
Correct Solution:
```
import sys
import math as mt
import bisect
input=sys.stdin.readline
t=int(input())
def issub(str1,str2):
m = len(str1)
n = len(str2)
j = 0
i = 0
while j<m and i<n:
if str1[j] == str2[i]:
j=j+1
i=i+1
return ... | output | 1 | 94,482 | 19 | 188,965 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,483 | 19 | 188,966 |
Tags: games, math
Correct Solution:
```
t = int(input())
for i in range(t):
n,k = map(int,input().split())
if k % 3 != 0 or k > n:
print('Bob' if n % 3 == 0 else 'Alice')
else:
print('Bob' if (n % (k + 1)) % 3 == 0 and (n % (k + 1)) != k else 'Alice')
``` | output | 1 | 94,483 | 19 | 188,967 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,484 | 19 | 188,968 |
Tags: games, math
Correct Solution:
```
'''
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
'''
# Write your code here
'''... | output | 1 | 94,484 | 19 | 188,969 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players take turns, Alice is first. Each player during ... | instruction | 0 | 94,485 | 19 | 188,970 |
Tags: games, math
Correct Solution:
```
a = int(input())
for i in range(a):
b, c = map(int,input().split())
if c % 3 == 0:
if b % (c+1) == c:
print("Alice")
elif (b % (c+1)) % 3 == 0:
print("Bob")
else:
print("Alice")
else:
if b % 3 == 0:
print("Bob")
else:
print("Alice")
``` | output | 1 | 94,485 | 19 | 188,971 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,486 | 19 | 188,972 |
Yes | output | 1 | 94,486 | 19 | 188,973 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,487 | 19 | 188,974 |
Yes | output | 1 | 94,487 | 19 | 188,975 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,488 | 19 | 188,976 |
Yes | output | 1 | 94,488 | 19 | 188,977 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,489 | 19 | 188,978 |
Yes | output | 1 | 94,489 | 19 | 188,979 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,490 | 19 | 188,980 |
No | output | 1 | 94,490 | 19 | 188,981 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,491 | 19 | 188,982 |
No | output | 1 | 94,491 | 19 | 188,983 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,492 | 19 | 188,984 |
No | output | 1 | 94,492 | 19 | 188,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0. There is a chip placed in the n-th cell (the last one).
Players ... | instruction | 0 | 94,493 | 19 | 188,986 |
No | output | 1 | 94,493 | 19 | 188,987 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their trusted financial advisor, devised a game to help ... | instruction | 0 | 94,578 | 19 | 189,156 |
Tags: math
Correct Solution:
```
import os
import sys
from io import BytesIO, IOBase
def main():
pass
# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()
self.buffer = BytesIO()
self.writable = "x" in file.mode ... | output | 1 | 94,578 | 19 | 189,157 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their trusted financial advisor, devised a game to help ... | instruction | 0 | 94,579 | 19 | 189,158 |
Tags: math
Correct Solution:
```
import os
import sys
from io import BytesIO, IOBase
# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()
self.buffer = BytesIO()
self.writable = "x" in file.mode or "r" not in file.mode
... | output | 1 | 94,579 | 19 | 189,159 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their tru... | instruction | 0 | 94,580 | 19 | 189,160 |
No | output | 1 | 94,580 | 19 | 189,161 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their tru... | instruction | 0 | 94,581 | 19 | 189,162 |
No | output | 1 | 94,581 | 19 | 189,163 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their tru... | instruction | 0 | 94,582 | 19 | 189,164 |
No | output | 1 | 94,582 | 19 | 189,165 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their tru... | instruction | 0 | 94,583 | 19 | 189,166 |
No | output | 1 | 94,583 | 19 | 189,167 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,711 | 19 | 189,422 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
n, m, k = map(int, input().split())
x, c, ic, ans, mod = min(m//(k-1), n-m), m, n-m, 0, 10**9 + 9
c = c - (k-1)*x
p, r = c//k, c%k
ans = ((((pow(2, p+1, mod) - 2 + mod)%mod) * (k%mod))%mod + (k-1)*x + r)%mod
print(ans)
``` | output | 1 | 94,711 | 19 | 189,423 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,712 | 19 | 189,424 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
z = 10**9+9
n,m,k = map(int,input().split())
i = n-m
x = (n-k+1)//k
if k*i>=n-k+1:
print((n-i)%z)
else:
l = n-k+1
f = l-(i-1)*k-1
t = f//k
f = t*k
v = 2*(pow(2,t,z)-1)*k+(n-f-i)
print(v%z)
``` | output | 1 | 94,712 | 19 | 189,425 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,713 | 19 | 189,426 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
n, corecte, k = map(int, input().split())
incorecte = n - corecte
mod = 10**9 + 9
corecte_consecutive = max(0, n - incorecte * k)
dublari = corecte_consecutive // k
corecte_ramase = corecte - corecte_consecutive
def power(b, exp):
i... | output | 1 | 94,713 | 19 | 189,427 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,714 | 19 | 189,428 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
n,m,k = map(int,input().split())
chunks = n//k
freespots = chunks*(k-1) + n%k
if m <= freespots:
print(m)
else:
doubles = m-freespots
dchunks = doubles
chunks -= dchunks
total = (pow(2,dchunks,1000000009)-1)*k*2
... | output | 1 | 94,714 | 19 | 189,429 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,715 | 19 | 189,430 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
n,m,k=map(int,input().split())
mod=10**9+9
c=m
inc=n-m
rep=n//k
if rep<=inc:
print(c)
else:
rem_c=m-(k-1)*inc
score=(k-1)*inc
rep2=rem_c//k
score+=(pow(2,rep2+1,mod)-2)*k
rem_c-=rep2*k
score+=rem_c
print(score%mod)
``` | output | 1 | 94,715 | 19 | 189,431 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,716 | 19 | 189,432 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
b = 10**9 + 9
def f(q):
x = q//1000
y = q%1000
num = 2**1000 % b
res = 1
for i in range(x):
res = (res * num) % b
res = (res * 2**y) %b
return res
def F(n,m,k):
r = n%k
if m <= n//k * (k-1) + r... | output | 1 | 94,716 | 19 | 189,433 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,717 | 19 | 189,434 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
global MOD
MOD = int(1e9+9)
def pow(m, n):
ans = 1
while(n):
if n & 1:
ans = (ans*m) % MOD
m = (m*m) % MOD
n >>= 1
return ans
def quiz(n, m, k):
numk = n//k; # Divido mi proble... | output | 1 | 94,717 | 19 | 189,435 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the player answers a question correctly, the numbe... | instruction | 0 | 94,718 | 19 | 189,436 |
Tags: binary search, greedy, math, matrices, number theory
Correct Solution:
```
global MOD
MOD = int(1e9+9)
def pow(m, n):
ans = 1
while(n):
if n & 1:
ans = (ans*m) % MOD
m = (m*m) % MOD
n >>= 1
return ans
def getAns(n, m, k):
numk = n//k; # Divido mi pro... | output | 1 | 94,718 | 19 | 189,437 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,719 | 19 | 189,438 |
Yes | output | 1 | 94,719 | 19 | 189,439 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,720 | 19 | 189,440 |
Yes | output | 1 | 94,720 | 19 | 189,441 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,721 | 19 | 189,442 |
Yes | output | 1 | 94,721 | 19 | 189,443 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,722 | 19 | 189,444 |
Yes | output | 1 | 94,722 | 19 | 189,445 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,723 | 19 | 189,446 |
No | output | 1 | 94,723 | 19 | 189,447 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,724 | 19 | 189,448 |
No | output | 1 | 94,724 | 19 | 189,449 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,725 | 19 | 189,450 |
No | output | 1 | 94,725 | 19 | 189,451 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Manao is taking part in a quiz. The quiz consists of n consecutive questions. A correct answer gives one point to the player. The game also has a counter of consecutive correct answers. When the... | instruction | 0 | 94,726 | 19 | 189,452 |
No | output | 1 | 94,726 | 19 | 189,453 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if ... | instruction | 0 | 94,882 | 19 | 189,764 |
Tags: combinatorics, constructive algorithms, greedy, math
Correct Solution:
```
n=int(input())
a,b=2,1
cnt=0
while a<=n:
cnt+=1
a,b=a+b,a
print(cnt)
``` | output | 1 | 94,882 | 19 | 189,765 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if ... | instruction | 0 | 94,883 | 19 | 189,766 |
Tags: combinatorics, constructive algorithms, greedy, math
Correct Solution:
```
n = int(input())
l = [1, 2]
for i in range(100): l.append(l[-1] + l[-2])
for i in range(100):
if l[i] > n:
print(i - 1)
break
``` | output | 1 | 94,883 | 19 | 189,767 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if ... | instruction | 0 | 94,884 | 19 | 189,768 |
Tags: combinatorics, constructive algorithms, greedy, math
Correct Solution:
```
#python 3.6
fib=[1,2]
for i in range(90):
fib.append(fib[-1]+fib[-2])
n=int(input())
for i in range(len(fib)):
if fib[i]>n:
print(i-1)
break
``` | output | 1 | 94,884 | 19 | 189,769 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if ... | instruction | 0 | 94,885 | 19 | 189,770 |
Tags: combinatorics, constructive algorithms, greedy, math
Correct Solution:
```
###### ### ####### ####### ## # ##### ### #####
# # # # # # # # # # # # # ###
# # # # # # # # # # # ... | output | 1 | 94,885 | 19 | 189,771 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.