message stringlengths 2 39.6k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 450 109k | cluster float64 2 2 | __index_level_0__ int64 900 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Having endured all the hardships, Lara Croft finally found herself in a room with treasures. To her surprise she didn't find golden mountains there. Lara looked around and noticed on the floor a... | instruction | 0 | 87,940 | 2 | 175,880 |
No | output | 1 | 87,940 | 2 | 175,881 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,131 | 2 | 176,262 |
Tags: implementation, probabilities, trees
Correct Solution:
```
import math
def simply(a, b):
g = math.gcd(a, b)
a = a // g
b = b // g
return (a, b)
def mul(a, b, c, d):
return simply(a * c, b * d)
def add(a, b, c, d):
return simply(a * d + b * c, b * d)
def main():
n = int(input())
nxt = 0
depth = 0
n... | output | 1 | 88,131 | 2 | 176,263 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,132 | 2 | 176,264 |
Tags: implementation, probabilities, trees
Correct Solution:
```
from math import gcd
def PRINT(a, b) :
print(str(int(a)) + "/" + str(int(b)))
def solve(n) :
pre = 0
while(n > 1 and (n % 2 == 0)) :
pre = pre + 1
n = n // 2
if(n == 1) :
... | output | 1 | 88,132 | 2 | 176,265 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,133 | 2 | 176,266 |
Tags: implementation, probabilities, trees
Correct Solution:
```
import math
from fractions import Fraction
import time
MAXN = 10000
def solve(free_nodes, n):
seq = []
used = {}
used[0] = 0
pos = 0
while used.get(free_nodes) == None:
used[free_nodes] = pos
toss = 0
while free_nodes < n:
toss += 1
fr... | output | 1 | 88,133 | 2 | 176,267 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,134 | 2 | 176,268 |
Tags: implementation, probabilities, trees
Correct Solution:
```
from fractions import *
n,L=int(input()),0
while (n%2==0):n,L=n//2,L+1
if (n==1):print('%d/1'%L)
else:
s,t=1,1
for i in range(n):
t,s=t*2%n,s*2
if (t==1):
m=i+1
break
r,t,i,ans=s,s*n,L,0
while (r>1):... | output | 1 | 88,134 | 2 | 176,269 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,135 | 2 | 176,270 |
Tags: implementation, probabilities, trees
Correct Solution:
```
from fractions import *
n,L=int(input()),0
while (n%2==0):n,L=n//2,L+1
if (n==1):print('%d/1'%L)
else:
s,t=1,1
for i in range(n):
t,s=t*2%n,s*2
if (t==1):
m=i+1
break
r,t,i,ans=s,s*n,L,0
while (r>1):... | output | 1 | 88,135 | 2 | 176,271 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,136 | 2 | 176,272 |
Tags: implementation, probabilities, trees
Correct Solution:
```
from fractions import *
n,L=int(input()),0
while (n%2==0):n,L=n//2,L+1
if (n==1):print('%d/1'%L)
else:
s,t=1,1
for i in range(n):
t=t*2%n
s*=2
if (t==1):
m=i+1
break
r,t,i,ans=s,s*n,L,0
while... | output | 1 | 88,136 | 2 | 176,273 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,137 | 2 | 176,274 |
Tags: implementation, probabilities, trees
Correct Solution:
```
import math
n=int(input())
y=0
while((n%2)==0):
y+=1
n//=2
if(n==1):
print(str(y)+"/1")
else:
i=1
r=1
p=0
nu=0
de=1
f=True
while(r>1 or f):
f=False
r*=2
de*=2
nu*=2
if(r... | output | 1 | 88,137 | 2 | 176,275 |
Provide tags and a correct Python 3 solution for this coding contest problem.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the archive.
Once upon a time in a far away kingdom li... | instruction | 0 | 88,138 | 2 | 176,276 |
Tags: implementation, probabilities, trees
Correct Solution:
```
from fractions import *
n =int(input())
l = 0
while (n%2==0):
n = n//2
l = l+1
if (n==1):print('%d/1'%l)
else:
s=1
t=1
for i in range(n):
t=t*2%n
s*=2
if (t==1):
m=i+1
# print(s)
... | output | 1 | 88,138 | 2 | 176,277 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the arch... | instruction | 0 | 88,139 | 2 | 176,278 |
No | output | 1 | 88,139 | 2 | 176,279 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the arch... | instruction | 0 | 88,140 | 2 | 176,280 |
No | output | 1 | 88,140 | 2 | 176,281 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the arch... | instruction | 0 | 88,141 | 2 | 176,282 |
No | output | 1 | 88,141 | 2 | 176,283 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
This is the modification of the problem used during the official round. Unfortunately, author's solution of the original problem appeared wrong, so the problem was changed specially for the arch... | instruction | 0 | 88,142 | 2 | 176,284 |
No | output | 1 | 88,142 | 2 | 176,285 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Dark Assembly is a governing body in the Netherworld. Here sit the senators who take the most important decisions for the player. For example, to expand the range of the shop or to improve certain characteristics of the character the Dark As... | instruction | 0 | 89,282 | 2 | 178,564 |
Tags: brute force, probabilities
Correct Solution:
```
import itertools as it
def powerset(iterable):
"powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"
s = list(iterable)
return it.chain.from_iterable(it.combinations(s, r) \
for r in range(len(s)+1))
n,... | output | 1 | 89,282 | 2 | 178,565 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Dark Assembly is a governing body in the Netherworld. Here sit the senators who take the most important decisions for the player. For example, to expand the range of the shop or to improve certain characteristics of the character the Dark As... | instruction | 0 | 89,283 | 2 | 178,566 |
Tags: brute force, probabilities
Correct Solution:
```
#!/usr/bin/env python3
n, k, A = map(int, input().rstrip().split())
senators = []
mx_bribe = 0
for i in range(n):
lvl, loy = map(int, input().rstrip().split())
senators.append((lvl, loy))
mx_bribe += (100 - loy) // 10
bribe = [0] * n
def calc(votes... | output | 1 | 89,283 | 2 | 178,567 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge prize. The school is organised quite far away, so ... | instruction | 0 | 89,560 | 2 | 179,120 |
Tags: dp, math, probabilities
Correct Solution:
```
from collections import *
f = lambda: list(map(int, input().split()))
n, l, a = f()
p, s = f(), f()
m = s.count(-1)
x = {(0, min(a, m)): 1}
d = [1]
for p, s in zip(p, s):
p /= 100
if s > 0:
y = defaultdict(int)
for (k, a), q in x.items():
... | output | 1 | 89,560 | 2 | 179,121 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge prize. The school is organised quite far away, so ... | instruction | 0 | 89,561 | 2 | 179,122 |
Tags: dp, math, probabilities
Correct Solution:
```
from collections import *
f = lambda: list(map(int, input().split()))
n, l, a = f()
p, s = f(), f()
m = s.count(-1)
x = {(0, min(a, m)): 1}
r = [1]
for p, s in zip(p, s):
p /= 100
if s > 0:
y = defaultdict(int)
for (k, a), q in x.items():
... | output | 1 | 89,561 | 2 | 179,123 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge prize. The school is organised quite far away, so ... | instruction | 0 | 89,562 | 2 | 179,124 |
Tags: dp, math, probabilities
Correct Solution:
```
from collections import *
f = lambda: list(map(int, input().split()))
n, l, a = f()
p, s = f(), f()
m = s.count(-1)
x = {(0, min(a, m)): 1}
r = [1]
for p, s in zip(p, s):
p /= 100
if s > 0:
y = defaultdict(int)
for (k, a), q in x... | output | 1 | 89,562 | 2 | 179,125 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge prize. The school is organised quite far away, so ... | instruction | 0 | 89,563 | 2 | 179,126 |
Tags: dp, math, probabilities
Correct Solution:
```
n,l,k=map(int,input().split())
p=list(map(int,input().split()))
b=list(map(int,input().split()))
for j in range(n):
b[j]+=1
dp=[[[0 for i in range(201)] for j in range(201)] for v in range(201)]
dp[0][0][0]=1
for i in range(n):
for j in range(i+1):
f... | output | 1 | 89,563 | 2 | 179,127 |
Provide tags and a correct Python 3 solution for this coding contest problem.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge prize. The school is organised quite far away, so ... | instruction | 0 | 89,564 | 2 | 179,128 |
Tags: dp, math, probabilities
Correct Solution:
```
from collections import *
f = lambda: list(map(int, input().split()))
n, l, a = f()
p, s = f(), f()
m = s.count(-1)
x = defaultdict(int)
x[(0, min(a, m))] = 1
d = [1]
for p, s in zip(p, s):
p /= 100
if s > 0:
y = defaultdict(int)
for (k, a), ... | output | 1 | 89,564 | 2 | 179,129 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge pri... | instruction | 0 | 89,565 | 2 | 179,130 |
No | output | 1 | 89,565 | 2 | 179,131 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge pri... | instruction | 0 | 89,566 | 2 | 179,132 |
No | output | 1 | 89,566 | 2 | 179,133 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge pri... | instruction | 0 | 89,567 | 2 | 179,134 |
No | output | 1 | 89,567 | 2 | 179,135 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees.
One of such magic schools consists of n tours. A winner of each tour gets a huge pri... | instruction | 0 | 89,568 | 2 | 179,136 |
No | output | 1 | 89,568 | 2 | 179,137 |
Provide a correct Python 3 solution for this coding contest problem.
A popular game in a certain country, Pachimon Creature, has been remade and released in Japan. If you love games, after playing this game many times, you've come to think about how you can clear it the fastest. However, no matter how much you think a... | instruction | 0 | 90,859 | 2 | 181,718 |
"Correct Solution:
```
from heapq import heappop,heappush
# from line_profiler import LineProfiler
def main():
while(True):
W, H = map(int,input().split())
if not W: break
B = float('inf')
Bi = -1
consequNodes = []
monsterNodes = [[] for _ in range(5)]
idx = 0... | output | 1 | 90,859 | 2 | 181,719 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A popular game in a certain country, Pachimon Creature, has been remade and released in Japan. If you love games, after playing this game many times, you've come to think about how you can clear... | instruction | 0 | 90,860 | 2 | 181,720 |
No | output | 1 | 90,860 | 2 | 181,721 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A popular game in a certain country, Pachimon Creature, has been remade and released in Japan. If you love games, after playing this game many times, you've come to think about how you can clear... | instruction | 0 | 90,861 | 2 | 181,722 |
No | output | 1 | 90,861 | 2 | 181,723 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A popular game in a certain country, Pachimon Creature, has been remade and released in Japan. If you love games, after playing this game many times, you've come to think about how you can clear... | instruction | 0 | 90,862 | 2 | 181,724 |
No | output | 1 | 90,862 | 2 | 181,725 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A popular game in a certain country, Pachimon Creature, has been remade and released in Japan. If you love games, after playing this game many times, you've come to think about how you can clear... | instruction | 0 | 90,863 | 2 | 181,726 |
No | output | 1 | 90,863 | 2 | 181,727 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,943 | 2 | 183,886 |
Tags: greedy, implementation, sortings
Correct Solution:
```
for _ in range(int(input())):
A,B,n=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
l1=[0]*n
l2=[0]*n
for i in range(n):
l1[i]=-(-b[i]//A)
l2[i]=l1[i]*a[i]
if sum(l2)<=B:
... | output | 1 | 91,943 | 2 | 183,887 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,944 | 2 | 183,888 |
Tags: greedy, implementation, sortings
Correct Solution:
```
from math import ceil
t = int(input())
for _ in range(t):
hero_att_aka_A, hero_hp_aka_B, monsters_amount_aka_n = \
map(int, input().split())
monsters_attacks = list(map(int, input().split()))
monsters_hps = list(map(int, input().split())... | output | 1 | 91,944 | 2 | 183,889 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,945 | 2 | 183,890 |
Tags: greedy, implementation, sortings
Correct Solution:
```
from collections import deque
for _ in range(int(input())):
from math import ceil
A,B,n = map(int,input().split(' '))
a = [int(num) for num in input().split(' ')]
b = [int(num) for num in input().split(' ')]
arr = []
for i in range(n):... | output | 1 | 91,945 | 2 | 183,891 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,946 | 2 | 183,892 |
Tags: greedy, implementation, sortings
Correct Solution:
```
q = int(input())
for queries in range(0, q):
a, b, n = map(int, input().split())
ma = list(map(int, input().split()))
mb = list(map(int, input().split()))
mx = ma[0]
for i in range(0, n):
t = (mb[i] + a - 1) // a
b -= (t *... | output | 1 | 91,946 | 2 | 183,893 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,947 | 2 | 183,894 |
Tags: greedy, implementation, sortings
Correct Solution:
```
if __name__ == "__main__":
t = int(input())
while t:
A,H,n = list(map(int, input().split()))
a = list(map(int, input().split()))
h = list(map(int, input().split()))
# now I have all info
damage = 0
for ... | output | 1 | 91,947 | 2 | 183,895 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,948 | 2 | 183,896 |
Tags: greedy, implementation, sortings
Correct Solution:
```
import math, sys
from collections import defaultdict, Counter, deque
from bisect import bisect_left, bisect_right
INF = float('inf')
MOD = int(1e9) + 7
MAX = int(1e6) + 1
def solve():
attack, health, n = vars()
a = array()
b = array()
total = 0
mon =... | output | 1 | 91,948 | 2 | 183,897 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,949 | 2 | 183,898 |
Tags: greedy, implementation, sortings
Correct Solution:
```
# pylint: disable=unused-variable
# pylint: enable=too-many-lines
# * Just believe in yourself
# @ Author @CAP
# import numpy
import os
import sys
from io import BytesIO, IOBase
import math as M
import itertools as ITR
from collections import defaultdict as... | output | 1 | 91,949 | 2 | 183,899 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i.
The hero or a monst... | instruction | 0 | 91,950 | 2 | 183,900 |
Tags: greedy, implementation, sortings
Correct Solution:
```
import math as m
if __name__ == '__main__':
for _ in range (int(input())):
A,B,n = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
flag =1
r = 0
fl = max(a)
for i in range (n):
r = m.ceil(b[i... | output | 1 | 91,950 | 2 | 183,901 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,951 | 2 | 183,902 |
Yes | output | 1 | 91,951 | 2 | 183,903 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,952 | 2 | 183,904 |
Yes | output | 1 | 91,952 | 2 | 183,905 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,953 | 2 | 183,906 |
Yes | output | 1 | 91,953 | 2 | 183,907 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,954 | 2 | 183,908 |
Yes | output | 1 | 91,954 | 2 | 183,909 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,955 | 2 | 183,910 |
No | output | 1 | 91,955 | 2 | 183,911 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,956 | 2 | 183,912 |
No | output | 1 | 91,956 | 2 | 183,913 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,957 | 2 | 183,914 |
No | output | 1 | 91,957 | 2 | 183,915 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and ... | instruction | 0 | 91,958 | 2 | 183,916 |
No | output | 1 | 91,958 | 2 | 183,917 |
Provide a correct Python 3 solution for this coding contest problem.
English text is not available in this practice contest.
At one point, a nobleman fell in love with a brave princess in a poor country and applied for marriage. The princess has given certain conditions to the aristocrats. The condition was to bring ... | instruction | 0 | 92,569 | 2 | 185,138 |
"Correct Solution:
```
import sys
readline = sys.stdin.readline
write = sys.stdout.write
def common_tangent_lines(x1, y1, r1, x2, y2, r2):
result = []
xd = x2 - x1; yd = y2 - y1
rr0 = xd**2 + yd**2
if (r1 - r2)**2 <= rr0:
cv = r1 - r2
if rr0 == (r1 - r2)**2:
bx = r1*cv*xd/r... | output | 1 | 92,569 | 2 | 185,139 |
Provide a correct Python 3 solution for this coding contest problem.
The Quarkgo Empire Expeditionary Force is an evil organization that plans to invade the Earth. In keeping with the tradition of the invaders, they continued to send monsters at a pace of one every week, targeting the area around Tokyo in Japan. Howev... | instruction | 0 | 93,479 | 2 | 186,958 |
"Correct Solution:
```
n = int(input())
ans = 0
tmp = 1
while n > tmp:
tmp *= 3
ans+=1
print(ans)
``` | output | 1 | 93,479 | 2 | 186,959 |
Provide a correct Python 3 solution for this coding contest problem.
The Quarkgo Empire Expeditionary Force is an evil organization that plans to invade the Earth. In keeping with the tradition of the invaders, they continued to send monsters at a pace of one every week, targeting the area around Tokyo in Japan. Howev... | instruction | 0 | 93,480 | 2 | 186,960 |
"Correct Solution:
```
n=int(input())
import math
ans=math.ceil(math.log(n,3))
print(ans)
``` | output | 1 | 93,480 | 2 | 186,961 |
Provide a correct Python 3 solution for this coding contest problem.
The Quarkgo Empire Expeditionary Force is an evil organization that plans to invade the Earth. In keeping with the tradition of the invaders, they continued to send monsters at a pace of one every week, targeting the area around Tokyo in Japan. Howev... | instruction | 0 | 93,481 | 2 | 186,962 |
"Correct Solution:
```
n = int(input())
ans = 0
while n > 1:
ans += 1
n = n // 3 + int(bool(n % 3))
print(ans)
``` | output | 1 | 93,481 | 2 | 186,963 |
Provide a correct Python 3 solution for this coding contest problem.
The Quarkgo Empire Expeditionary Force is an evil organization that plans to invade the Earth. In keeping with the tradition of the invaders, they continued to send monsters at a pace of one every week, targeting the area around Tokyo in Japan. Howev... | instruction | 0 | 93,482 | 2 | 186,964 |
"Correct Solution:
```
N = int(input())
ans = 0
while N > 1:
N = (N+2) // 3
ans += 1
print (ans)
``` | output | 1 | 93,482 | 2 | 186,965 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.