message stringlengths 2 45.8k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 254 108k | cluster float64 3 3 | __index_level_0__ int64 508 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
At first, there was a legend related to the name of the problem, but now it's just a formal statement.
You are given n points a_1, a_2, ..., a_n on the OX axis. Now you are asked to find such a... | instruction | 0 | 80,901 | 3 | 161,802 |
No | output | 1 | 80,901 | 3 | 161,803 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or west and sliding until he lands in another s... | instruction | 0 | 81,074 | 3 | 162,148 |
Yes | output | 1 | 81,074 | 3 | 162,149 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or west and sliding until he lands in another s... | instruction | 0 | 81,077 | 3 | 162,154 |
No | output | 1 | 81,077 | 3 | 162,155 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Bajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or west and sliding until he lands in another s... | instruction | 0 | 81,078 | 3 | 162,156 |
No | output | 1 | 81,078 | 3 | 162,157 |
Provide tags and a correct Python 3 solution for this coding contest problem.
After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were so neat that one could map it on a system of coordinates so that the j-th tree in the i-th ... | instruction | 0 | 81,124 | 3 | 162,248 |
Tags: brute force, dfs and similar, shortest paths
Correct Solution:
```
'''
___ ____
____ _____ _____/ (_)_ ______ ____ _____/ / /_ __ ______ ___ __
/ __ `/ __ `/ __ / / / / / __ \/ __ `/ __ / __ \/ / / / __ `/ / / /
/ /_/ / /_/ / /_/ / / /_/ / /_/ /... | output | 1 | 81,124 | 3 | 162,249 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were so neat that one could map it on a system of... | instruction | 0 | 81,125 | 3 | 162,250 |
No | output | 1 | 81,125 | 3 | 162,251 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were so neat that one could map it on a system of... | instruction | 0 | 81,126 | 3 | 162,252 |
No | output | 1 | 81,126 | 3 | 162,253 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were so neat that one could map it on a system of... | instruction | 0 | 81,127 | 3 | 162,254 |
No | output | 1 | 81,127 | 3 | 162,255 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
After a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and the rows were so neat that one could map it on a system of... | instruction | 0 | 81,128 | 3 | 162,256 |
No | output | 1 | 81,128 | 3 | 162,257 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
On a plane are n points (xi, yi) with integer coordinates between 0 and 106. The distance between the two points with numbers a and b is said to be the following value: <image> (the distance cal... | instruction | 0 | 81,224 | 3 | 162,448 |
No | output | 1 | 81,224 | 3 | 162,449 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
On a plane are n points (xi, yi) with integer coordinates between 0 and 106. The distance between the two points with numbers a and b is said to be the following value: <image> (the distance cal... | instruction | 0 | 81,225 | 3 | 162,450 |
No | output | 1 | 81,225 | 3 | 162,451 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
On a plane are n points (xi, yi) with integer coordinates between 0 and 106. The distance between the two points with numbers a and b is said to be the following value: <image> (the distance cal... | instruction | 0 | 81,226 | 3 | 162,452 |
No | output | 1 | 81,226 | 3 | 162,453 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
On a plane are n points (xi, yi) with integer coordinates between 0 and 106. The distance between the two points with numbers a and b is said to be the following value: <image> (the distance cal... | instruction | 0 | 81,227 | 3 | 162,454 |
No | output | 1 | 81,227 | 3 | 162,455 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,705 | 3 | 163,410 |
Tags: binary search, math
Correct Solution:
```
import math
def issuff(n,m,a,b,f):
for i in range(n):
if f>0:
burn=(f+m)/a[i]
f=round(f-burn,6)
burn=(f+m)/b[(i+1)%n]
f=round(f-burn,6)
if f<0:
return False
return True
def ... | output | 1 | 81,705 | 3 | 163,411 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,706 | 3 | 163,412 |
Tags: binary search, math
Correct Solution:
```
n=int(input())#number of planets.
m=int(input())#weight of the payload
lift=list(map(int,input().split()))
# the number of tons, which can be lifted off by one ton of fuel.
land=list(map(int,input().split()))
#the number of tons, which can be landed by one ton of fuel.
#... | output | 1 | 81,706 | 3 | 163,413 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,707 | 3 | 163,414 |
Tags: binary search, math
Correct Solution:
```
n = int(input())
rm = m = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
if min(a+b) is 1:
print(-1)
else:
for i in range(n-1,-1,-1):
m += m / (a[(i + 1) % n] - 1)
m += m / (b[i] - 1)
print(round(m - rm,7))
... | output | 1 | 81,707 | 3 | 163,415 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,708 | 3 | 163,416 |
Tags: binary search, math
Correct Solution:
```
i=input
i()
m=int(i())
v=m
try:
for a in map(int, (i()+' '+i()).split()):v*=a/(a-1)
except:v=m-1
print(v-m)
# Made By Mostafa_Khaled
``` | output | 1 | 81,708 | 3 | 163,417 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,709 | 3 | 163,418 |
Tags: binary search, math
Correct Solution:
```
#!/usr/bin/python3
N = int(input())
M = int(input())
a = [int(x) for x in input().split(' ')]
b = [int(x) for x in input().split(' ')]
for i in range(len(a)):
if a[i] == 1 or b[i] == 1:
print(-1)
exit()
def galima(fuel):
fuel -= (M + fuel)/a[0]
for i in range(1,... | output | 1 | 81,709 | 3 | 163,419 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,710 | 3 | 163,420 |
Tags: binary search, math
Correct Solution:
```
input()
m=int(input())
v=m
try:
for a in map(int, input().split() + input().split()):
v*=a/(a-1)
print(v-m)
except ZeroDivisionError:
print(-1)
``` | output | 1 | 81,710 | 3 | 163,421 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,711 | 3 | 163,422 |
Tags: binary search, math
Correct Solution:
```
import math
def issuff(n,m,a,b,f):
for i in range(n):
if f>0:
burn=(f+m)/a[i]
f=round(f-burn,6)
burn=(f+m)/b[(i+1)%n]
f=round(f-burn,6)
if f<0:
return False
return True
def ... | output | 1 | 81,711 | 3 | 163,423 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Earth, n is Mars. Natasha will make exactly n fligh... | instruction | 0 | 81,712 | 3 | 163,424 |
Tags: binary search, math
Correct Solution:
```
'''a[i]*f1 = m+(ans)
b[i+1]*l2 = m+(ans-f1)
a[i+1]*f2 = m+(ans-f1-l2)
b[i+2]*l3 = m+(ans-f1-l2-f2)
a[i+2]*f3 = m+(ans-f1-l2-f2-l3)
b[i+1]*l2' = m+(ans-f1-l2-f2-l3-f3)
a[i+1]*f2' = m+(ans-f1-l2-f2-l3-f3-l2')
b[i]*l1' = m+(ans-f1-l2-f2-l3-f3-l2'-f2')
f1+l2+f2+l3+f3+l2'+f2'... | output | 1 | 81,712 | 3 | 163,425 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,713 | 3 | 163,426 |
Yes | output | 1 | 81,713 | 3 | 163,427 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,714 | 3 | 163,428 |
Yes | output | 1 | 81,714 | 3 | 163,429 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,715 | 3 | 163,430 |
Yes | output | 1 | 81,715 | 3 | 163,431 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,716 | 3 | 163,432 |
Yes | output | 1 | 81,716 | 3 | 163,433 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,717 | 3 | 163,434 |
No | output | 1 | 81,717 | 3 | 163,435 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,718 | 3 | 163,436 |
No | output | 1 | 81,718 | 3 | 163,437 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,719 | 3 | 163,438 |
No | output | 1 | 81,719 | 3 | 163,439 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Natasha is going to fly on a rocket to Mars and return to Earth. Also, on the way to Mars, she will land on n - 2 intermediate planets. Formally: we number all the planets from 1 to n. 1 is Eart... | instruction | 0 | 81,720 | 3 | 163,440 |
No | output | 1 | 81,720 | 3 | 163,441 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,822 | 3 | 163,644 |
Tags: greedy
Correct Solution:
```
n,m=map(int,input().split())
a = [list(map(int,input().split())) for _ in range(m)]
def calc(idx):
diff = sorted([(x[-1] - x[idx], i) for i, x in enumerate(a)])
tot = sum([x[0] for x in diff])
ans = []
while tot > 0:
tot -= diff[-1][0]
ans.append(diff[-... | output | 1 | 81,822 | 3 | 163,645 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,823 | 3 | 163,646 |
Tags: greedy
Correct Solution:
```
def getMaxBoothForCandidateToWin(candidate,opposition,m):
diff=[] # [difference, station]
for i in range(m):
diff.append([candidate[i]-opposition[i],i])
diff.sort(key=lambda x:x[0],reverse=True)
prefixSum=0
maxBooth=0
pollingStations=[]
for x,statio... | output | 1 | 81,823 | 3 | 163,647 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,824 | 3 | 163,648 |
Tags: greedy
Correct Solution:
```
import math
IP = lambda: list(map(int, input().split()))
INF = 1e9
n, m = IP()
lst = [[] for i in range(n)]
for i in range(m):
d = IP()
for j in range(n):
lst[j].append(d[j])
# print(*lst, sep = '\n')
s = [sum(i) for i in lst]
ret = [[] for i in range(n-1)]
if s[-1] <... | output | 1 | 81,824 | 3 | 163,649 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,825 | 3 | 163,650 |
Tags: greedy
Correct Solution:
```
#------------------------------warmup----------------------------
import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()... | output | 1 | 81,825 | 3 | 163,651 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,826 | 3 | 163,652 |
Tags: greedy
Correct Solution:
```
a = [int(s) for s in input().split()]
b = []
for numbers in range(a[1]): b.append([int(s) for s in input().split()])
c = [0 for i in range(len(b[0]))]
for i in range(len(b)):
for j in range(len(b[0])): c[j] += b[i][j]
if c.index(max(c)) != len(c) - 1: print(0)
else:
e = []
... | output | 1 | 81,826 | 3 | 163,653 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,827 | 3 | 163,654 |
Tags: greedy
Correct Solution:
```
def solve(n, m, a):
answer = [(i + 1) for i in range(m)]
for i in range(n - 1):
pret = solve_two(m, a[i], a[n - 1])
if len(answer) > len(pret):
answer = pret
return answer
def solve_two(m, a1, a0):
dif = []
difsum = 0
for i in ra... | output | 1 | 81,827 | 3 | 163,655 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,828 | 3 | 163,656 |
Tags: greedy
Correct Solution:
```
import copy
from operator import itemgetter
n, m = map(int, input().split())
a = []
for i in range(m):
a.append([i] + [int(x) for x in input().split()])
b = [0 for x in range(n)]
for i in range(m):
for j in range(1, n + 1):
b[j - 1] += a[i][j]
#print(*a, sep='\n')
#pri... | output | 1 | 81,828 | 3 | 163,657 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there is one opposition candidate in one of the cons... | instruction | 0 | 81,829 | 3 | 163,658 |
Tags: greedy
Correct Solution:
```
# Legends Always Come Up with Solution
# Author: Manvir Singh
import os
import sys
from io import BytesIO, IOBase
def main():
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(m)]
c=list(map(lambda x:x[-1],a))
z=sum(c)
mi=[0]*(n+1)
... | output | 1 | 81,829 | 3 | 163,659 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,830 | 3 | 163,660 |
Yes | output | 1 | 81,830 | 3 | 163,661 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,831 | 3 | 163,662 |
Yes | output | 1 | 81,831 | 3 | 163,663 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,832 | 3 | 163,664 |
Yes | output | 1 | 81,832 | 3 | 163,665 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,833 | 3 | 163,666 |
Yes | output | 1 | 81,833 | 3 | 163,667 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,834 | 3 | 163,668 |
No | output | 1 | 81,834 | 3 | 163,669 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,835 | 3 | 163,670 |
No | output | 1 | 81,835 | 3 | 163,671 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,836 | 3 | 163,672 |
No | output | 1 | 81,836 | 3 | 163,673 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Byteburg Senate elections are coming. Usually "United Byteland", the ruling Byteland party, takes all the seats in the Senate to ensure stability and sustainable development. But this year there... | instruction | 0 | 81,837 | 3 | 163,674 |
No | output | 1 | 81,837 | 3 | 163,675 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A team of furry rescue rangers was sitting idle in their hollow tree when suddenly they received a signal of distress. In a few moments they were ready, and the dirigible of the rescue chipmunks hit the road.
We assume that the action takes... | instruction | 0 | 82,146 | 3 | 164,292 |
Tags: binary search, geometry, math
Correct Solution:
```
# import sys
# sys.stdin = open('cf591d.in')
x1, y1, x2, y2 = map(int, input().split())
vmax, t = map(int, input().split())
vx, vy = map(int, input().split())
wx, wy = map(int, input().split())
c1x = x1 + vx * t
c1y = y1 + vy * t
r1 = t * vmax
if (c1x - x2)**... | output | 1 | 82,146 | 3 | 164,293 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A team of furry rescue rangers was sitting idle in their hollow tree when suddenly they received a signal of distress. In a few moments they were ready, and the dirigible of the rescue chipmunks hit the road.
We assume that the action takes... | instruction | 0 | 82,147 | 3 | 164,294 |
Tags: binary search, geometry, math
Correct Solution:
```
f = lambda: list(map(int, input().split()))
abs = lambda q: q[0] * q[0] + q[1] * q[1]
dot = lambda: v[0] * d[0] + v[1] * d[1]
get = lambda a, b, c: (b - (b * b - a * c) ** 0.5) / a
p = f()
d = [p[k + 2] - p[k] for k in [0, 1]]
v, t = f()
s = v * v
... | output | 1 | 82,147 | 3 | 164,295 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A team of furry rescue rangers was sitting idle in their hollow tree when suddenly they received a signal of distress. In a few moments they were ready, and the dirigible of the rescue chipmunks hit the road.
We assume that the action takes... | instruction | 0 | 82,148 | 3 | 164,296 |
Tags: binary search, geometry, math
Correct Solution:
```
import sys
import math
read = lambda: list(map(int, sys.stdin.readline().split()))
x1, y1, x2, y2 = read()
vmax, t1 = read()
vx, vy = read()
wx, wy = read()
# Translate and scale
x2, y2 = (x2-x1)/vmax, (y2-y1)/vmax
vx, vy, wx, wy = vx/vmax, vy/vmax, wx/vmax, w... | output | 1 | 82,148 | 3 | 164,297 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A team of furry rescue rangers was sitting idle in their hollow tree when suddenly they received a signal of distress. In a few moments they were ready, and the dirigible of the rescue chipmunks hit the road.
We assume that the action takes... | instruction | 0 | 82,149 | 3 | 164,298 |
Tags: binary search, geometry, math
Correct Solution:
```
from math import sqrt
import re
class point2:
def __init__(self, x, y):
self.x = x
self.y = y
def length(self):
return sqrt(self.x * self.x + self.y * self.y)
def xmult(a, b):
return a.x * b.y - a.y * b.x
def dmult(a, b):... | output | 1 | 82,149 | 3 | 164,299 |
Provide tags and a correct Python 3 solution for this coding contest problem.
A team of furry rescue rangers was sitting idle in their hollow tree when suddenly they received a signal of distress. In a few moments they were ready, and the dirigible of the rescue chipmunks hit the road.
We assume that the action takes... | instruction | 0 | 82,150 | 3 | 164,300 |
Tags: binary search, geometry, math
Correct Solution:
```
x1, y1, x2, y2 = map(float, input().split())
vMax, t = map(float, input().split())
vx, vy = map(float, input().split())
wx, wy = map(float, input().split())
def is_pos2(t1, t2):
x1_n = x1+ vx*t1
y1_n = y1+ vy*t1
x2_n = x2- wx*t2
y2_n = y2- wy*t2
return (... | output | 1 | 82,150 | 3 | 164,301 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.