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.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,950 | 3 | 189,900 |
Yes | output | 1 | 94,950 | 3 | 189,901 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,951 | 3 | 189,902 |
Yes | output | 1 | 94,951 | 3 | 189,903 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,952 | 3 | 189,904 |
Yes | output | 1 | 94,952 | 3 | 189,905 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,953 | 3 | 189,906 |
Yes | output | 1 | 94,953 | 3 | 189,907 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,954 | 3 | 189,908 |
No | output | 1 | 94,954 | 3 | 189,909 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,955 | 3 | 189,910 |
No | output | 1 | 94,955 | 3 | 189,911 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,956 | 3 | 189,912 |
No | output | 1 | 94,956 | 3 | 189,913 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with minimum possible number of wires into one netw... | instruction | 0 | 94,957 | 3 | 189,914 |
No | output | 1 | 94,957 | 3 | 189,915 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of IOI, the wind always blows from sea to land. There are $N + 1$ spots numbered from $0$ to $N$. The wind from Spot $0$ to Spot $N$ in order. Mr. JOI has a house at Spot $N$. The altitude of Spot $0$ is $A_0 = 0$, and the altitude of ... | instruction | 0 | 95,219 | 3 | 190,438 |
"Correct Solution:
```
N, Q, S, T = map(int, input().split())
A = [int(input()) for i in range(N+1)]
C = 0
for i in range(N):
if A[i] < A[i+1]:
C += S * (A[i] - A[i+1])
else:
C += T * (A[i] - A[i+1])
def add(k, x):
if x >= 0:
if B[k] <= 0:
if B[k] + x <= 0:
... | output | 1 | 95,219 | 3 | 190,439 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of IOI, the wind always blows from sea to land. There are $N + 1$ spots numbered from $0$ to $N$. The wind from Spot $0$ to Spot $N$ in order. Mr. JOI has a house at Spot $N$. The altitude of Spot $0$ is $A_0 = 0$, and the altitude of ... | instruction | 0 | 95,220 | 3 | 190,440 |
"Correct Solution:
```
N, Q, S, T = map(int, input().split())
A = [int(input()) for i in range(N + 1)]
diff = [A[i + 1] - A[i] for i in range(N)]
def calc(v):
if v > 0:
return -S * v
else:
return -T * v
ret = 0
for i in range(N):
ret += calc(diff[i])
for i in range(Q):
a, b, c = m... | output | 1 | 95,220 | 3 | 190,441 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of IOI, the wind always blows from sea to land. There are $N + 1$ spots numbered from $0$ to $N$. The wind from Spot $0$ to Spot $N$ in order. Mr. JOI has a house at Spot $N$. The altitude of Spot $0$ is $A_0 = 0$, and the altitude of ... | instruction | 0 | 95,221 | 3 | 190,442 |
"Correct Solution:
```
n, q, s, t = map(int, input().split())
a_lst = [int(input()) for _ in range(n + 1)]
diff = [a_lst[i + 1] - a_lst[i] for i in range(n)]
temp = sum([-d * s if d > 0 else -d * t for d in diff])
def score(d):
if d > 0:
return -s * d
else:
return -t * d
for _ in range(q):
l, r, x = map(i... | output | 1 | 95,221 | 3 | 190,443 |
Provide a correct Python 3 solution for this coding contest problem.
In the Kingdom of IOI, the wind always blows from sea to land. There are $N + 1$ spots numbered from $0$ to $N$. The wind from Spot $0$ to Spot $N$ in order. Mr. JOI has a house at Spot $N$. The altitude of Spot $0$ is $A_0 = 0$, and the altitude of ... | instruction | 0 | 95,222 | 3 | 190,444 |
"Correct Solution:
```
n, q, s, t = map(int, input().split())
a = [int(input()) for _ in range(n + 1)]
for i in range(1, n + 1)[::-1]:
a[i] -= a[i - 1]
count = 0
for i in range(n + 1):
count -= a[i] * s if a[i] > 0 else a[i] * t
for _ in range(q):
l, r, x = map(int, input().split())
count += a[l] * s if... | output | 1 | 95,222 | 3 | 190,445 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In the Kingdom of IOI, the wind always blows from sea to land. There are $N + 1$ spots numbered from $0$ to $N$. The wind from Spot $0$ to Spot $N$ in order. Mr. JOI has a house at Spot $N$. The... | instruction | 0 | 95,223 | 3 | 190,446 |
No | output | 1 | 95,223 | 3 | 190,447 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It is the year 2969. 1000 years have passed from the moon landing. Meanwhile, the humanity colonized the Hyperspace™ and lived in harmony.
Until we realized that we were not alone.
Not too far... | instruction | 0 | 95,288 | 3 | 190,576 |
No | output | 1 | 95,288 | 3 | 190,577 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It is the year 2969. 1000 years have passed from the moon landing. Meanwhile, the humanity colonized the Hyperspace™ and lived in harmony.
Until we realized that we were not alone.
Not too far... | instruction | 0 | 95,289 | 3 | 190,578 |
No | output | 1 | 95,289 | 3 | 190,579 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fedya and Sasha are friends, that's why Sasha knows everything about Fedya.
Fedya keeps his patience in an infinitely large bowl. But, unlike the bowl, Fedya's patience isn't infinite, that is ... | instruction | 0 | 95,313 | 3 | 190,626 |
No | output | 1 | 95,313 | 3 | 190,627 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,420 | 3 | 190,840 |
Tags: brute force, dp, greedy
Correct Solution:
```
import math
######################################################
# ps template
def mi(): return map(int, input().split())
def ii(): return int(input())
def li(): return list(map(int, input().split()))
def si(): return input().split()
###############################... | output | 1 | 95,420 | 3 | 190,841 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,421 | 3 | 190,842 |
Tags: brute force, dp, greedy
Correct Solution:
```
for _ in range(int(input())):
n,k,l=map(int,input().split())
depth=list(map(int,input().split()))
fg=1;mn=-k;mx=k
for i in depth:
if i>l:fg=0;break
mx=min(l-i,k)
if mx==k:mn=-k
else:mn=max(mn+1,-mx)
if mn>mx:fg=0... | output | 1 | 95,421 | 3 | 190,843 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,422 | 3 | 190,844 |
Tags: brute force, dp, greedy
Correct Solution:
```
import sys
readline = sys.stdin.readline
def solve():
N, K, L = map(int, readline().split())
D = list(map(int, readline().split()))
if any(d > L for d in D):
print('NO')
return
k = K + D[0] - L
for i, d in enumerate(D):
... | output | 1 | 95,422 | 3 | 190,845 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,423 | 3 | 190,846 |
Tags: brute force, dp, greedy
Correct Solution:
```
#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd,log
from collections import Counter
def main():
n,k,l=map(int,input().split())
arr=list(map(int,input().spli... | output | 1 | 95,423 | 3 | 190,847 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,424 | 3 | 190,848 |
Tags: brute force, dp, greedy
Correct Solution:
```
t = int(input())
for _ in range(t):
n, k, l = map(int, input().split())
d = list(map(int, input().split()))
if max(d) > l:
print('No')
else:
p = [i for i in range(1, k)] + [k] + [i for i in range(k-1, 0, -1)]
groups = []
... | output | 1 | 95,424 | 3 | 190,849 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,425 | 3 | 190,850 |
Tags: brute force, dp, greedy
Correct Solution:
```
from bisect import *
from collections import *
from math import gcd,ceil,sqrt,floor,inf
from heapq import *
from itertools import *
from operator import add,mul,sub,xor,truediv,floordiv
from functools import *
#--------------------------------------------------------... | output | 1 | 95,425 | 3 | 190,851 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,426 | 3 | 190,852 |
Tags: brute force, dp, greedy
Correct Solution:
```
import sys
from collections import defaultdict as dd
from collections import deque
from functools import *
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations
def epr... | output | 1 | 95,426 | 3 | 190,853 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is at the beach!
The beach consists (from left to... | instruction | 0 | 95,427 | 3 | 190,854 |
Tags: brute force, dp, greedy
Correct Solution:
```
# input = open('file.txt').readline
for _ in range( int(input()) ):
n , k , l = map( int , input().strip().split(" ") )
arr = list(map( int , input().strip().split(" ") ))
goods = []
bad = False
for i , a in enumerate( arr ):
if a + k <= l:
... | output | 1 | 95,427 | 3 | 190,855 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,428 | 3 | 190,856 |
Yes | output | 1 | 95,428 | 3 | 190,857 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,429 | 3 | 190,858 |
Yes | output | 1 | 95,429 | 3 | 190,859 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,430 | 3 | 190,860 |
Yes | output | 1 | 95,430 | 3 | 190,861 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,431 | 3 | 190,862 |
Yes | output | 1 | 95,431 | 3 | 190,863 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,432 | 3 | 190,864 |
No | output | 1 | 95,432 | 3 | 190,865 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,433 | 3 | 190,866 |
No | output | 1 | 95,433 | 3 | 190,867 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,434 | 3 | 190,868 |
No | output | 1 | 95,434 | 3 | 190,869 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,435 | 3 | 190,870 |
No | output | 1 | 95,435 | 3 | 190,871 |
Evaluate the correctness of the submitted Python 2 solution to the coding contest problem. Provide a "Yes" or "No" response.
The only difference between easy and hard versions is on constraints. In this version constraints are lower. You can make hacks only if all versions of the problem are solved.
Koa the Koala is ... | instruction | 0 | 95,436 | 3 | 190,872 |
No | output | 1 | 95,436 | 3 | 190,873 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,687 | 3 | 191,374 |
Tags: math
Correct Solution:
```
# Input: d, L, v1, v2
# d = Lukes width
# L= position of second presser (first one is at 0)
# v1 = speed of first presser
# v2 = speed of second presser
# Output:
# Max time luke can curvive for
def saveLuke():
var = input().strip()
var = var.split(' ')
d = int(var[0])
... | output | 1 | 95,687 | 3 | 191,375 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,688 | 3 | 191,376 |
Tags: math
Correct Solution:
```
s = lambda: list(map(int,input().split()))
val = s()
print((val[1]-val[0])/(val[2]+val[3]))
``` | output | 1 | 95,688 | 3 | 191,377 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,689 | 3 | 191,378 |
Tags: math
Correct Solution:
```
'''input
1 9 1 2
'''
d, l, v1, v2 = map(int, input().split())
print((l-d) / (v1+v2))
``` | output | 1 | 95,689 | 3 | 191,379 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,690 | 3 | 191,380 |
Tags: math
Correct Solution:
```
x = input()
x = x.split()
d = int(x[0])
L = int(x[1])
v1 = int(x[2])
v2 = int(x[3])
ans = (L-d)/(v1+v2)
print (ans)
``` | output | 1 | 95,690 | 3 | 191,381 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,691 | 3 | 191,382 |
Tags: math
Correct Solution:
```
d, L, v1, v2 = [int(s) for s in input().split(' ')]
print((L - d) / (v1 + v2))
``` | output | 1 | 95,691 | 3 | 191,383 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,692 | 3 | 191,384 |
Tags: math
Correct Solution:
```
d, L, a1, a2 = map(int, input().split())
print ((L - d) / (a1+a2))
``` | output | 1 | 95,692 | 3 | 191,385 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,693 | 3 | 191,386 |
Tags: math
Correct Solution:
```
string = input()
numbers = list(map(int, string.split()))
a = numbers[0]
b = numbers[1]
v1 = numbers[2]
v2 = numbers[3]
print((b - a) / (v1 + v2))
``` | output | 1 | 95,693 | 3 | 191,387 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the pr... | instruction | 0 | 95,694 | 3 | 191,388 |
Tags: math
Correct Solution:
```
import sys
def main():
d, l, v1, v2 = map(int, input().split())
t = (l - d) / (v1 + v2)
print("{0:.7f}".format(t))
main()
``` | output | 1 | 95,694 | 3 | 191,389 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,695 | 3 | 191,390 |
Yes | output | 1 | 95,695 | 3 | 191,391 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,696 | 3 | 191,392 |
Yes | output | 1 | 95,696 | 3 | 191,393 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,697 | 3 | 191,394 |
Yes | output | 1 | 95,697 | 3 | 191,395 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,698 | 3 | 191,396 |
Yes | output | 1 | 95,698 | 3 | 191,397 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,699 | 3 | 191,398 |
No | output | 1 | 95,699 | 3 | 191,399 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,700 | 3 | 191,400 |
No | output | 1 | 95,700 | 3 | 191,401 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,701 | 3 | 191,402 |
No | output | 1 | 95,701 | 3 | 191,403 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume tha... | instruction | 0 | 95,702 | 3 | 191,404 |
No | output | 1 | 95,702 | 3 | 191,405 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was recycling day in Kekoland. To celebrate it Adil and Bera went to Central Perk where they can take bottles from the ground and put them into a recycling bin.
We can think Central Perk as coordinate plane. There are n bottles on the gr... | instruction | 0 | 95,706 | 3 | 191,412 |
Tags: dp, geometry, greedy, implementation
Correct Solution:
```
ax,ay,bx,by,tx,ty=map(int,input().split())
n=int(input())
l=[tuple(map(int,input().split())) for _ in range(n)]
a,b=[],[]
for i in range(n):
x,y=l[i]
lt=((tx-x)*(tx-x)+(ty-y)*(ty-y))**0.5
la=((ax-x)*(ax-x)+(ay-y)*(ay-y))**0.5
lb=((bx-x)*(bx-x)+(by... | output | 1 | 95,706 | 3 | 191,413 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.