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.
There is unrest in the Galactic Senate. Several thousand solar systems have declared their intentions to leave the Republic. Master Heidi needs to select the Jedi Knights who will go on peacekee... | instruction | 0 | 92,367 | 3 | 184,734 |
No | output | 1 | 92,367 | 3 | 184,735 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is unrest in the Galactic Senate. Several thousand solar systems have declared their intentions to leave the Republic. Master Heidi needs to select the Jedi Knights who will go on peacekee... | instruction | 0 | 92,368 | 3 | 184,736 |
No | output | 1 | 92,368 | 3 | 184,737 |
Provide a correct Python 3 solution for this coding contest problem.
Taro is not good at hide-and-seek. As soon as you hide, you will find it, and it will be difficult to find the hidden child. My father, who couldn't see it, made an ultra-high performance location search system. You can use it to know exactly where y... | instruction | 0 | 92,529 | 3 | 185,058 |
"Correct Solution:
```
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0129
"""
import sys
from sys import stdin
from math import sqrt, atan2, acos, sin, cos, hypot
input = stdin.readline
class Point(object):
epsilon = 1e-10
def __init__(self, x=0.0, y=0.0):
if ... | output | 1 | 92,529 | 3 | 185,059 |
Provide a correct Python 3 solution for this coding contest problem.
Taro is not good at hide-and-seek. As soon as you hide, you will find it, and it will be difficult to find the hidden child. My father, who couldn't see it, made an ultra-high performance location search system. You can use it to know exactly where y... | instruction | 0 | 92,530 | 3 | 185,060 |
"Correct Solution:
```
from math import sqrt
def intersection(cx, cy, r, P1, P2):
x1, y1 = P1; x2, y2 = P2
xd = x2 - x1; yd = y2 - y1
X = x1 - cx; Y = y1 - cy
a = xd**2 + yd**2
b = xd * X + yd * Y
c = X**2 + Y**2 - r**2
f0 = c; f1 = a+2*b+c
if (f0 >= 0 and f1 <= 0) or (f0 <= 0 and f1 >... | output | 1 | 92,530 | 3 | 185,061 |
Provide a correct Python 3 solution for this coding contest problem.
Taro is not good at hide-and-seek. As soon as you hide, you will find it, and it will be difficult to find the hidden child. My father, who couldn't see it, made an ultra-high performance location search system. You can use it to know exactly where y... | instruction | 0 | 92,531 | 3 | 185,062 |
"Correct Solution:
```
class Wall():
def __init__(self, x, y, r):
self.x = x
self.y = y
self.r = r
def sign(self, x, y):
if (x-self.x)*(x-self.x) + (y-self.y)*(y-self.y) - self.r*self.r > 0:
return 1
else:
return -1
def isVisible(x1, y1, x2, y2,... | output | 1 | 92,531 | 3 | 185,063 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,742 | 3 | 185,484 |
Tags: implementation
Correct Solution:
```
matrix=[[],[],[],[]]
for i in range(1,4):
x=list(input())
x.insert(0,'')
matrix[i]=x
if(matrix[1][1] == matrix[3][3] and matrix[1][3] == matrix[3][1] and matrix[1][2] == matrix[3][2] and matrix[2][1] == matrix[2][3]):
print("YES")
else:
print("NO")
``` | output | 1 | 92,742 | 3 | 185,485 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,743 | 3 | 185,486 |
Tags: implementation
Correct Solution:
```
l=[]
for jk in range(0,3):
line=input()
l.append(line)
chl1=l[2][::-1]
chl2=l[1][::-1]
chl3=l[0][::-1]
if chl1==l[0] and chl2==l[1] and chl3==l[2]:
print("YES")
else:
print("NO")
``` | output | 1 | 92,743 | 3 | 185,487 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,744 | 3 | 185,488 |
Tags: implementation
Correct Solution:
```
mat = []
for i in range(3): mat.append(list(input()))
mat1 = [x[::-1] for x in mat]
if mat1[::-1] == mat:print('YES')
else: print('NO')
``` | output | 1 | 92,744 | 3 | 185,489 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,745 | 3 | 185,490 |
Tags: implementation
Correct Solution:
```
i = input
s = i() + i() + i()
print("Yes" if s==s[::-1] else "No")
``` | output | 1 | 92,745 | 3 | 185,491 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,746 | 3 | 185,492 |
Tags: implementation
Correct Solution:
```
m = []
d = {(0, 0): (2, 2), (0, 1): (2, 1), (0, 2): (2, 0), (2, 2): (0, 0), (2, 1): (0, 1), (2, 0): (0, 2), (1, 0): (1, 2),
(1, 2): (1, 0), (1, 1): (1, 1)}
for k in range(3):
m.append(input())
temp_dict = {}
for i in range(3):
for j in range(3):
if m[i][j]... | output | 1 | 92,746 | 3 | 185,493 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,747 | 3 | 185,494 |
Tags: implementation
Correct Solution:
```
password = [input() for i in range(3)]
sym = True
if password[0] != password[2][::-1]:
sym = False
if password[1][0] != password[1][2]:
sym = False
if sym:
print('YES')
else:
print('NO')
``` | output | 1 | 92,747 | 3 | 185,495 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,748 | 3 | 185,496 |
Tags: implementation
Correct Solution:
```
a=int(3)
b=[]
for i in range(int(a)):
b.append(list(input()))
if b[0][0]==b[2][2] and b[0][1]==b[2][1] and b[0][2]==b[2][0] and b[1][0]==b[1][2]:
print("YES")
else:
print("NO")
``` | output | 1 | 92,748 | 3 | 185,497 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agen... | instruction | 0 | 92,749 | 3 | 185,498 |
Tags: implementation
Correct Solution:
```
s=""
for i in range(3):
s+=input()
print(["NO","YES"][s==s[::-1]])
``` | output | 1 | 92,749 | 3 | 185,499 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,750 | 3 | 185,500 |
Yes | output | 1 | 92,750 | 3 | 185,501 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,751 | 3 | 185,502 |
Yes | output | 1 | 92,751 | 3 | 185,503 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,752 | 3 | 185,504 |
Yes | output | 1 | 92,752 | 3 | 185,505 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,753 | 3 | 185,506 |
Yes | output | 1 | 92,753 | 3 | 185,507 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,754 | 3 | 185,508 |
No | output | 1 | 92,754 | 3 | 185,509 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,755 | 3 | 185,510 |
No | output | 1 | 92,755 | 3 | 185,511 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,756 | 3 | 185,512 |
No | output | 1 | 92,756 | 3 | 185,513 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For thi... | instruction | 0 | 92,757 | 3 | 185,514 |
No | output | 1 | 92,757 | 3 | 185,515 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,913 | 3 | 185,826 |
Tags: implementation, math
Correct Solution:
```
k,b,n,t =map(int,input().split())
q=k
q+=b
kil=0
while True :
if q<=t :
q*=k
q+=b
kil+=1
else :
break
kil=min(kil,n)
print(n-kil)
``` | output | 1 | 92,913 | 3 | 185,827 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,914 | 3 | 185,828 |
Tags: implementation, math
Correct Solution:
```
from math import *
k,b,n,t = map(int,input().split())
if k !=1 :
result = log10(( t*(k-1)+b)/(k-1+b)) / log10(k)
r = ceil(n-result)
print(max(r,0))
else :
c=((k**n)*1+ (b*n))
cnt=0;d=t
while (True):
if (d >= c): break;
d = d * k +... | output | 1 | 92,914 | 3 | 185,829 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,915 | 3 | 185,830 |
Tags: implementation, math
Correct Solution:
```
from math import log
k, b, n, t = map(int, input().split())
if k == 1: print(max((n * b + b - t) // b, 0))
else: print(max(0, n - int(log((k * t - t + b) / (k - 1 + b)) / log(k))))
``` | output | 1 | 92,915 | 3 | 185,831 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,916 | 3 | 185,832 |
Tags: implementation, math
Correct Solution:
```
from math import log, ceil
k,b,n,t = map(int, input().split())
if k == 1:
print(max(0, ceil((1+b*n-t)/b)))
else:
print(max(0, ceil(n-log((t-t*k-b)/(1-k-b),k))))
``` | output | 1 | 92,916 | 3 | 185,833 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,917 | 3 | 185,834 |
Tags: implementation, math
Correct Solution:
```
from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
from math import log, ceil
def main():
k, b, n, t = [ int(x) for x in input().split() ]
x = 0
prev, curr = 1, k + b
while not (prev <= t < curr):
... | output | 1 | 92,917 | 3 | 185,835 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,918 | 3 | 185,836 |
Tags: implementation, math
Correct Solution:
```
def mikroby(k, b, n, t):
z = 1
while z <= t:
z = k * z + b
n -= 1
return max(n + 1, 0)
K, B, N, T = [int(i) for i in input().split()]
print(mikroby(K, B, N, T))
``` | output | 1 | 92,918 | 3 | 185,837 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,919 | 3 | 185,838 |
Tags: implementation, math
Correct Solution:
```
s = input().split(' ')
k = int(s[0])
b = int(s[1])
n = int(s[2])
t = int(s[3])
ct = 1
while ( ct <= t ):
ct = ct * k + b
n = n - 1
print(max(0 , n + 1))
``` | output | 1 | 92,919 | 3 | 185,839 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high.
At th... | instruction | 0 | 92,920 | 3 | 185,840 |
Tags: implementation, math
Correct Solution:
```
#testing minimario's code in pypy
import math
k, b, n, t = map(int, input().split(' '))
if k == 1:
cur = n*b+1
print(max(math.ceil((-t + n*b + 1)/b), 0))
else:
god = (b+k-1)/(b+t*k-t)
m = 0
while not (k**(m-n) >= god):
m += 1
print(m)
``` | output | 1 | 92,920 | 3 | 185,841 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,921 | 3 | 185,842 |
Yes | output | 1 | 92,921 | 3 | 185,843 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,922 | 3 | 185,844 |
Yes | output | 1 | 92,922 | 3 | 185,845 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,923 | 3 | 185,846 |
Yes | output | 1 | 92,923 | 3 | 185,847 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,924 | 3 | 185,848 |
Yes | output | 1 | 92,924 | 3 | 185,849 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,925 | 3 | 185,850 |
No | output | 1 | 92,925 | 3 | 185,851 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,926 | 3 | 185,852 |
No | output | 1 | 92,926 | 3 | 185,853 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,927 | 3 | 185,854 |
No | output | 1 | 92,927 | 3 | 185,855 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job ... | instruction | 0 | 92,928 | 3 | 185,856 |
No | output | 1 | 92,928 | 3 | 185,857 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ALT is a planet in a galaxy called "Encore". Humans rule this planet but for some reason there's no dog in their planet, so the people there are sad and depressed. Rick and Morty are universal p... | instruction | 0 | 93,173 | 3 | 186,346 |
No | output | 1 | 93,173 | 3 | 186,347 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ALT is a planet in a galaxy called "Encore". Humans rule this planet but for some reason there's no dog in their planet, so the people there are sad and depressed. Rick and Morty are universal p... | instruction | 0 | 93,174 | 3 | 186,348 |
No | output | 1 | 93,174 | 3 | 186,349 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ALT is a planet in a galaxy called "Encore". Humans rule this planet but for some reason there's no dog in their planet, so the people there are sad and depressed. Rick and Morty are universal p... | instruction | 0 | 93,175 | 3 | 186,350 |
No | output | 1 | 93,175 | 3 | 186,351 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
ALT is a planet in a galaxy called "Encore". Humans rule this planet but for some reason there's no dog in their planet, so the people there are sad and depressed. Rick and Morty are universal p... | instruction | 0 | 93,176 | 3 | 186,352 |
No | output | 1 | 93,176 | 3 | 186,353 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
<image>
However, some cats w... | instruction | 0 | 93,225 | 3 | 186,450 |
Yes | output | 1 | 93,225 | 3 | 186,451 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
<image>
However, some cats w... | instruction | 0 | 93,226 | 3 | 186,452 |
Yes | output | 1 | 93,226 | 3 | 186,453 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
<image>
However, some cats w... | instruction | 0 | 93,227 | 3 | 186,454 |
Yes | output | 1 | 93,227 | 3 | 186,455 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
<image>
However, some cats w... | instruction | 0 | 93,228 | 3 | 186,456 |
No | output | 1 | 93,228 | 3 | 186,457 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
<image>
However, some cats w... | instruction | 0 | 93,229 | 3 | 186,458 |
No | output | 1 | 93,229 | 3 | 186,459 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.
<image>
However, some cats w... | instruction | 0 | 93,230 | 3 | 186,460 |
No | output | 1 | 93,230 | 3 | 186,461 |
Provide a correct Python 3 solution for this coding contest problem.
Dolphin resides in two-dimensional Cartesian plane, with the positive x-axis pointing right and the positive y-axis pointing up.
Currently, he is located at the point (sx,sy). In each second, he can move up, down, left or right by a distance of 1.
He... | instruction | 0 | 93,375 | 3 | 186,750 |
"Correct Solution:
```
sx, sy, tx, ty = map(int, input().split(' '))
h = ty - sy
w = tx - sx
p = 'U'*h+'R'*w
r = 'D'*h+'L'*w
print(p+r+'LU'+p+'RDRD'+r+'LU')
``` | output | 1 | 93,375 | 3 | 186,751 |
Provide a correct Python 3 solution for this coding contest problem.
Dolphin resides in two-dimensional Cartesian plane, with the positive x-axis pointing right and the positive y-axis pointing up.
Currently, he is located at the point (sx,sy). In each second, he can move up, down, left or right by a distance of 1.
He... | instruction | 0 | 93,376 | 3 | 186,752 |
"Correct Solution:
```
sx, sy, tx, ty = map(int, input().split())
x = tx-sx
y = ty-sy
print("R"*(x) + "U"*(y) + "L"*(x) + "D"*(y+1) + "R"*(x+1) + "U"*(y+1) + "LU" + "L"*(x+1) + "D"*(y+1) + "R")
``` | output | 1 | 93,376 | 3 | 186,753 |
Provide a correct Python 3 solution for this coding contest problem.
Dolphin resides in two-dimensional Cartesian plane, with the positive x-axis pointing right and the positive y-axis pointing up.
Currently, he is located at the point (sx,sy). In each second, he can move up, down, left or right by a distance of 1.
He... | instruction | 0 | 93,377 | 3 | 186,754 |
"Correct Solution:
```
sx, sy, tx, ty = (int(i) for i in input().split())
w = tx-sx
h = ty-sy
res = "U"*h+"R"*w+"D"*h+"L"*(w+1)+"U"*(h+1)+"R"*(w+1)+"DR"+"D"*(h+1)+"L"*(w+1)+"U"
print(res)
``` | output | 1 | 93,377 | 3 | 186,755 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.