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 |
|---|---|---|---|---|---|
Provide a correct Python 3 solution for this coding contest problem.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
A person is trying to drop down a glass ball and check ... | instruction | 0 | 22,752 | 3 | 45,504 |
"Correct Solution:
```
while True:
try:
v = float(input())
t = v / 9.8
y = 4.9 * t * t
n = 1
while 5 * (n - 1) < y:
n += 1
print(n)
except EOFError:
break
``` | output | 1 | 22,752 | 3 | 45,505 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,753 | 3 | 45,506 |
Yes | output | 1 | 22,753 | 3 | 45,507 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,754 | 3 | 45,508 |
Yes | output | 1 | 22,754 | 3 | 45,509 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,755 | 3 | 45,510 |
Yes | output | 1 | 22,755 | 3 | 45,511 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,756 | 3 | 45,512 |
Yes | output | 1 | 22,756 | 3 | 45,513 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,757 | 3 | 45,514 |
No | output | 1 | 22,757 | 3 | 45,515 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,758 | 3 | 45,516 |
No | output | 1 | 22,758 | 3 | 45,517 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,759 | 3 | 45,518 |
No | output | 1 | 22,759 | 3 | 45,519 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Ignoring the air resistance, velocity of a freely falling object $v$ after $t$ seconds and its drop $y$ in $t$ seconds are represented by the following formulas:
$ v = 9.8 t $
$ y = 4.9 t^2 $
... | instruction | 0 | 22,760 | 3 | 45,520 |
No | output | 1 | 22,760 | 3 | 45,521 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The hero of justice, the Spider, can pull a rope out of his arm and jump from building to building. However, due to the short rope, you can only move to buildings that are less than 50 distances... | instruction | 0 | 22,769 | 3 | 45,538 |
Yes | output | 1 | 22,769 | 3 | 45,539 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The hero of justice, the Spider, can pull a rope out of his arm and jump from building to building. However, due to the short rope, you can only move to buildings that are less than 50 distances... | instruction | 0 | 22,770 | 3 | 45,540 |
No | output | 1 | 22,770 | 3 | 45,541 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The hero of justice, the Spider, can pull a rope out of his arm and jump from building to building. However, due to the short rope, you can only move to buildings that are less than 50 distances... | instruction | 0 | 22,771 | 3 | 45,542 |
No | output | 1 | 22,771 | 3 | 45,543 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The hero of justice, the Spider, can pull a rope out of his arm and jump from building to building. However, due to the short rope, you can only move to buildings that are less than 50 distances... | instruction | 0 | 22,772 | 3 | 45,544 |
No | output | 1 | 22,772 | 3 | 45,545 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The hero of justice, the Spider, can pull a rope out of his arm and jump from building to building. However, due to the short rope, you can only move to buildings that are less than 50 distances... | instruction | 0 | 22,773 | 3 | 45,546 |
No | output | 1 | 22,773 | 3 | 45,547 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,774 | 3 | 45,548 |
"Correct Solution:
```
i = list(map(int,input().split()))
a = i[0] // i[1]
b = i[0] % i[1]
print(a+b)
``` | output | 1 | 22,774 | 3 | 45,549 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,775 | 3 | 45,550 |
"Correct Solution:
```
import math
D, L = map(int,input().split())
print(math.floor(D/L + D%L))
``` | output | 1 | 22,775 | 3 | 45,551 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,776 | 3 | 45,552 |
"Correct Solution:
```
print(sum(divmod(*map(int,input().split()))))
``` | output | 1 | 22,776 | 3 | 45,553 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,777 | 3 | 45,554 |
"Correct Solution:
```
ins = [int(x) for x in input().split()]
if ins[0] < ins[1]:
print(ins[0])
else:
print(int(ins[0]/ins[1])+int(ins[0]%ins[1]))
``` | output | 1 | 22,777 | 3 | 45,555 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,778 | 3 | 45,556 |
"Correct Solution:
```
D,L=map(int,input().split())
s = b = 0
while True:
if D < s + L:
b += D - s
break
else:
s += L
b += 1
print(b)
``` | output | 1 | 22,778 | 3 | 45,557 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,779 | 3 | 45,558 |
"Correct Solution:
```
a,b=map(int,input().split())
c=a//b
d=a%b
e=c+d
print(e)
``` | output | 1 | 22,779 | 3 | 45,559 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,780 | 3 | 45,560 |
"Correct Solution:
```
import math
d,l = map(int,input().split())
n = d//l
k = d%l
print(n+k)
``` | output | 1 | 22,780 | 3 | 45,561 |
Provide a correct Python 3 solution for this coding contest problem.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump (go forward L centimeters)
* Small jump (go 1 cm forwar... | instruction | 0 | 22,781 | 3 | 45,562 |
"Correct Solution:
```
d,l=map(int,input().split())
A=d//l
B=d%l
print(A+B)
``` | output | 1 | 22,781 | 3 | 45,563 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,782 | 3 | 45,564 |
Yes | output | 1 | 22,782 | 3 | 45,565 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,783 | 3 | 45,566 |
Yes | output | 1 | 22,783 | 3 | 45,567 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,784 | 3 | 45,568 |
Yes | output | 1 | 22,784 | 3 | 45,569 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,785 | 3 | 45,570 |
Yes | output | 1 | 22,785 | 3 | 45,571 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,786 | 3 | 45,572 |
No | output | 1 | 22,786 | 3 | 45,573 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,787 | 3 | 45,574 |
No | output | 1 | 22,787 | 3 | 45,575 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A frog is about to return to the burrow. The burrow is D centimeters ahead of the frog, and the frog goes straight toward the burrow. There are only two actions that a frog can do:
* Large jump... | instruction | 0 | 22,788 | 3 | 45,576 |
No | output | 1 | 22,788 | 3 | 45,577 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,793 | 3 | 45,586 |
"Correct Solution:
```
def main(m, a, b):
ans = [0,0,0]
for x in p:
for y in p:
if x * y > m:
break
if 1 >= x / y >= a / b and x * y > ans[0]:
ans = [x * y, x, y]
print(ans[1], ans[2])
def primes(n):
"""
Input n>=6, Returns a list of ... | output | 1 | 22,793 | 3 | 45,587 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,794 | 3 | 45,588 |
"Correct Solution:
```
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Problems 1232
Problem A: Calling Extraterrestrial Intelligence Again
"""
import math
def eratosthenes(n):
"""
エラトステネスのふるい
"""
primes = [i for i in range(n+1)]
primes[1] = 0 # 1は素数ではない
for prime in primes:
if prime >... | output | 1 | 22,794 | 3 | 45,589 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,795 | 3 | 45,590 |
"Correct Solution:
```
answer = []
def prime(n):
prime_flag = [0 for i in range(n + 1)]
prime_list = []
for i in range(2, n + 1):
if prime_flag[i] == 0:
prime_list.append(i)
temp = 1
while temp * i <= n:
prime_flag[temp * i] = 1
... | output | 1 | 22,795 | 3 | 45,591 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,796 | 3 | 45,592 |
"Correct Solution:
```
import sys
sys.setrecursionlimit(10000000)
input=lambda : sys.stdin.readline().rstrip()
def eratosthenes(n):
prime_table = [False,False,True]+[False if i%2!=0 else True for i in range(n-2)]
i=3
primes=[]
while i*i<=n:
if prime_table[i]:
j=i*i
while... | output | 1 | 22,796 | 3 | 45,593 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,797 | 3 | 45,594 |
"Correct Solution:
```
def f(m,a,b,p):
for i in range(m,0,-1):
for j in range(2,-~int(i**.5)):
if p[j] and i%j==0:
q=i//j
if a*q<=b*j and j<=q and p[q]:print(j,q);return
n=100000
p=[0]*2+[1]*(n-2)
for i in range(2,-~int(n**.5)):
if p[i]:
for j in range... | output | 1 | 22,797 | 3 | 45,595 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,798 | 3 | 45,596 |
"Correct Solution:
```
MAX = 100000
isPrime = [True]*(MAX+1)
isPrime[0] = False
isPrime[1] = False
for i in range(2,int((MAX)**0.5)):
if isPrime[i]:
for j in range(i*i, MAX+1, i):
isPrime[j] = False
primes = [x for x in range(MAX+1) if isPrime[x]]
while True:
m, a, b = map(int, input().spl... | output | 1 | 22,798 | 3 | 45,597 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,799 | 3 | 45,598 |
"Correct Solution:
```
# エラトステネスの篩
def Eratosthenes(N):
ans = [True for i in range(N + 1)]
ans[0], ans[1] = False, False
for i in range(int(N ** (1 / 2)) + 1):
if ans[i]:
for j in range(2 * i, N, i):
ans[j] = False
return [i for i in range(N + 1) if ans[i]]
... | output | 1 | 22,799 | 3 | 45,599 |
Provide a correct Python 3 solution for this coding contest problem.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 bits and was meant to be translated to a rectangular pict... | instruction | 0 | 22,800 | 3 | 45,600 |
"Correct Solution:
```
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.st... | output | 1 | 22,800 | 3 | 45,601 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 b... | instruction | 0 | 22,801 | 3 | 45,602 |
Yes | output | 1 | 22,801 | 3 | 45,603 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 b... | instruction | 0 | 22,802 | 3 | 45,604 |
No | output | 1 | 22,802 | 3 | 45,605 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 b... | instruction | 0 | 22,803 | 3 | 45,606 |
No | output | 1 | 22,803 | 3 | 45,607 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 b... | instruction | 0 | 22,804 | 3 | 45,608 |
No | output | 1 | 22,804 | 3 | 45,609 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November l6, l974. The message consisted of l679 b... | instruction | 0 | 22,805 | 3 | 45,610 |
No | output | 1 | 22,805 | 3 | 45,611 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,182 | 3 | 46,364 |
Tags: constructive algorithms, implementation
Correct Solution:
```
#!/usr/bin/python3
n, k = map(int, input().split())
for i in range(1, n + 1):
k -= n - (i + 1) + 1
if k >= 0:
print("no solution")
else:
for i in range(n):
print(0, i)
``` | output | 1 | 23,182 | 3 | 46,365 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,183 | 3 | 46,366 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n,k=map(int,input().split())
x=0
for i in range(n):
for j in range(i+1,n):
x+=1
if(k>=x):
print("no solution")
else:
x=0
for i in range(n):
print(0,x)
x+=1000
``` | output | 1 | 23,183 | 3 | 46,367 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,184 | 3 | 46,368 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n, k = map(int, input().split())
if k >= n * (n-1) // 2:
print("no solution")
exit()
for i in range(n):
print(0, i)
``` | output | 1 | 23,184 | 3 | 46,369 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,185 | 3 | 46,370 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n,k = map(int ,input().split())
fac = n*(n-1) /2 ;
if (fac > k ) :
i = 0
while (i < n ) :
print(1," " ,i)
i = i+1
else :
print("no solution")
``` | output | 1 | 23,185 | 3 | 46,371 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,186 | 3 | 46,372 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n,k=map(int,input().split())
if n*(n-1)/2<=k :
print('no solution')
exit(0)
for i in range(n):
print(i,i*(n+1))
``` | output | 1 | 23,186 | 3 | 46,373 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,187 | 3 | 46,374 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n, m = map(int,input().split())
tot = n * (n-1) // 2
if m >= tot:
print("no solution")
exit()
for i in range(n):
print(0, i)
# Tue Jul 07 2020 13:50:53 GMT+0300 (Москва, стандартное время)
``` | output | 1 | 23,187 | 3 | 46,375 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,188 | 3 | 46,376 |
Tags: constructive algorithms, implementation
Correct Solution:
```
n, k = map(int, input().split())
if 2 * k < n * (n - 1): print('0', '\n0 '.join(map(str, range(n))))
else: print('no solution')
``` | output | 1 | 23,188 | 3 | 46,377 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Currently Tiny is learning Computational Geometry. When trying to solve a problem called "The Closest Pair Of Points In The Plane", he found that a code which gave a wrong time complexity got Accepted instead of Time Limit Exceeded.
The pro... | instruction | 0 | 23,189 | 3 | 46,378 |
Tags: constructive algorithms, implementation
Correct Solution:
```
# ------------------- fast io --------------------
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
class FastIO(IOBase):
newlines = 0
def __init__(self, file):
self._fd = file.fileno()
self.buffer = By... | output | 1 | 23,189 | 3 | 46,379 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.