message stringlengths 2 44.5k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 276 109k | cluster float64 23 23 | __index_level_0__ int64 552 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,163 | 23 | 112,326 |
Tags: geometry, implementation
Correct Solution:
```
import math
eps = 1e-3
def dis(p1, p2):
return math.sqrt((p1[0]-p2[0])*(p1[0]-p2[0]) + (p1[1]-p2[1])*(p1[1]-p2[1]))
def getArea(p1, p2, p3):
A = p1[0]-p2[0]
B = p1[1]-p2[1]
x = (p3[0]*A*A + p3[1]*A*B + p1[0]*B*B - p1[1]*A*B) / (A*A+B*B)
y = (p1[... | output | 1 | 56,163 | 23 | 112,327 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,164 | 23 | 112,328 |
Tags: geometry, implementation
Correct Solution:
```
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, ... | output | 1 | 56,164 | 23 | 112,329 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,165 | 23 | 112,330 |
Tags: geometry, implementation
Correct Solution:
```
nor = list(map(int, input().split()))
diag = list(map(int, input().split()))
sx = min(diag[i] for i in range(0, 8, 2))
mx = max(diag[i] for i in range(0, 8, 2))
sy = min(diag[i] for i in range(1, 8, 2))
my = max(diag[i] for i in range(1, 8, 2))
nsx = min(nor[i] for... | output | 1 | 56,165 | 23 | 112,331 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,166 | 23 | 112,332 |
Tags: geometry, implementation
Correct Solution:
```
def dist(A,B):
return abs(A[0]-B[0]) + abs(A[1]-B[1])
A = [int(x) for x in input().split()]
XA = (A[::2])
YA = A[1::2]
Xmin,Xmax = min(XA),max(XA)
Ymin,Ymax = min(YA),max(YA)
B = [int(x) for x in input().split()]
XB = sum(B[::2])//4
YB = sum(B[1::2])//4
ca... | output | 1 | 56,166 | 23 | 112,333 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,167 | 23 | 112,334 |
Tags: geometry, implementation
Correct Solution:
```
one = list(map(int, input().split()))
two = list(map(int, input().split()))
one_ = sorted([(one[i], one[i + 1]) for i in range(0, 8, 2)], key=lambda x: (x[1], x[0]))
two_ = sorted([(two[i], two[i + 1]) for i in range(0, 8, 2)], key=lambda x: (x[1], x[0]))
ones = [o... | output | 1 | 56,167 | 23 | 112,335 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,168 | 23 | 112,336 |
Tags: geometry, implementation
Correct Solution:
```
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = min(a[0::2])
d = max(a[0::2])
e = min(a[1::2])
f = max(a[1::2])
g = sum(b[0::2])//4
h = sum(b[1::2])//4
r = abs(b[0]-g)+abs(b[1]-h)
for i in range(c, d+1):
for j in range(e, f+1):
... | output | 1 | 56,168 | 23 | 112,337 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,169 | 23 | 112,338 |
Tags: geometry, implementation
Correct Solution:
```
from sys import exit
from operator import itemgetter
def read():
x1, y1, x2, y2, x3, y3, x4, y4 = map(int, input().split())
return [(x1, y1), (x2, y2), (x3, y3), (x4, y4)]
a = read()
b = read()
def calc(ls):
s = 0
for i in range(len(ls)):
a... | output | 1 | 56,169 | 23 | 112,339 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior of the square is considered to be part of the s... | instruction | 0 | 56,170 | 23 | 112,340 |
Tags: geometry, implementation
Correct Solution:
```
def onseg(p,q,r):
return min(p[0], r[0]) <= q[0] <= max(p[0], r[0]) and \
min(p[1], r[1]) <= q[1] <= max(p[1], r[1])
def orientation(p,q,r):
val = (q[1] - p[1]) * (r[0] - q[0]) - \
(q[0] - p[0]) * (r[1] - q[1])
if (val == 0): retur... | output | 1 | 56,170 | 23 | 112,341 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,171 | 23 | 112,342 |
Yes | output | 1 | 56,171 | 23 | 112,343 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,172 | 23 | 112,344 |
Yes | output | 1 | 56,172 | 23 | 112,345 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,173 | 23 | 112,346 |
Yes | output | 1 | 56,173 | 23 | 112,347 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,174 | 23 | 112,348 |
Yes | output | 1 | 56,174 | 23 | 112,349 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,175 | 23 | 112,350 |
No | output | 1 | 56,175 | 23 | 112,351 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,176 | 23 | 112,352 |
No | output | 1 | 56,176 | 23 | 112,353 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,177 | 23 | 112,354 |
No | output | 1 | 56,177 | 23 | 112,355 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.
The interior ... | instruction | 0 | 56,178 | 23 | 112,356 |
No | output | 1 | 56,178 | 23 | 112,357 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,328 | 23 | 112,656 |
"Correct Solution:
```
while True:
try:
xa1, ya1, xa2, ya2, xb1, yb1, xb2, yb2 = map(float, input().split())
except:
break
if max(xa2, xb2) - min(xa1, xb1) <= xa2 - xa1 + xb2 - xb1 and\
max(ya2, yb2) - min(ya1, yb1) <= ya2 - ya1 + yb2 - yb1:
print('YES')
else:
prin... | output | 1 | 56,328 | 23 | 112,657 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,329 | 23 | 112,658 |
"Correct Solution:
```
import sys
f = sys.stdin
# a1が左下、a2が右上とされている事がポイント
for line in f:
xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2 = map(float, line.split())
print('NO' if xb2 < xa1 or xa2 < xb1 or yb2 < ya1 or ya2 < yb1 else 'YES')
``` | output | 1 | 56,329 | 23 | 112,659 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,330 | 23 | 112,660 |
"Correct Solution:
```
def solve(xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2):
if xb2<xa1 or xb1>xa2 or yb2<ya1 or yb1>ya2:
print("NO")
else:
print("YES")
while True:
try:
xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2=map(float,input().split())
solve(xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2)
except EOFError:
break
``` | output | 1 | 56,330 | 23 | 112,661 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,331 | 23 | 112,662 |
"Correct Solution:
```
while(1):
try:
xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2 = [float(i) for i in input().split()]
if xa2 < xb1 or xb2 < xa1 or ya2 < yb1 or yb2 < ya1:
print("NO")
else:
print("YES")
except EOFError:
break
``` | output | 1 | 56,331 | 23 | 112,663 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,332 | 23 | 112,664 |
"Correct Solution:
```
while True:
try:
ls=list(map(float,input().split()))
xok=(ls[0]<=ls[4] and ls[4]<=ls[2])or (ls[0]<=ls[6] and ls[6]<=ls[2])or(ls[4]<=ls[0] and ls[2]<=ls[6])
yok=(ls[1]<=ls[5] and ls[5]<=ls[3])or (ls[1]<=ls[7] and ls[7]<=ls[3])or(ls[5]<=ls[1] and ls[3]<=ls[7])
if... | output | 1 | 56,332 | 23 | 112,665 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,333 | 23 | 112,666 |
"Correct Solution:
```
while True:
try:
xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2=map(float,input().split())
except EOFError:
break
if xb2<xa1 or xb1>xa2 or yb2<ya1 or yb1>ya2:
print("NO")
else:
print("YES")
``` | output | 1 | 56,333 | 23 | 112,667 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,334 | 23 | 112,668 |
"Correct Solution:
```
import sys
for x in sys.stdin:
a,b,c,d,e,f,g,h=map(float,x.split())
print(['YES','NO'][c<e or g<a or d<f or h<b])
``` | output | 1 | 56,334 | 23 | 112,669 |
Provide a correct Python 3 solution for this coding contest problem.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1, yb1) and upper right coordinates (xb2, yb2) of rectang... | instruction | 0 | 56,335 | 23 | 112,670 |
"Correct Solution:
```
while True:
try:
xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2 = map(float,input().split())
except:
break
if (min(xa1,xa2) <= max(xb1,xb2) and max(xa1,xa2) >= min(xb1,xb2)) and (min(ya1,ya2) <= max(yb1,yb2) and max(ya1,ya2) >= min(yb1,yb2)):
print("YES")
else:
print("NO")
``` | output | 1 | 56,335 | 23 | 112,671 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,336 | 23 | 112,672 |
Yes | output | 1 | 56,336 | 23 | 112,673 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,337 | 23 | 112,674 |
Yes | output | 1 | 56,337 | 23 | 112,675 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,338 | 23 | 112,676 |
Yes | output | 1 | 56,338 | 23 | 112,677 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,339 | 23 | 112,678 |
Yes | output | 1 | 56,339 | 23 | 112,679 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,340 | 23 | 112,680 |
No | output | 1 | 56,340 | 23 | 112,681 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,341 | 23 | 112,682 |
No | output | 1 | 56,341 | 23 | 112,683 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,342 | 23 | 112,684 |
No | output | 1 | 56,342 | 23 | 112,685 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are two rectangles whose bases are parallel to the x-axis. Read the lower left coordinates (xa1, ya1) and upper right coordinates (xa2, ya2) of rectangle A, the lower left coordinates (xb1... | instruction | 0 | 56,343 | 23 | 112,686 |
No | output | 1 | 56,343 | 23 | 112,687 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of th... | instruction | 0 | 56,613 | 23 | 113,226 |
Tags: binary search, geometry, shortest paths, sortings
Correct Solution:
```
import math as m
def count(zoz, x, y):
poc = 0
for i in zoz:
poc += abs(x-i[0])
poc += abs(y-i[1])
return poc
res = []
for _ in range(int(input())):
n = int(input())
xes = []
yes = []
for i in range... | output | 1 | 56,613 | 23 | 113,227 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,617 | 23 | 113,234 |
Yes | output | 1 | 56,617 | 23 | 113,235 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,618 | 23 | 113,236 |
Yes | output | 1 | 56,618 | 23 | 113,237 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,619 | 23 | 113,238 |
Yes | output | 1 | 56,619 | 23 | 113,239 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,620 | 23 | 113,240 |
No | output | 1 | 56,620 | 23 | 113,241 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,621 | 23 | 113,242 |
No | output | 1 | 56,621 | 23 | 113,243 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,622 | 23 | 113,244 |
No | output | 1 | 56,622 | 23 | 113,245 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You and your friends live in n houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city ... | instruction | 0 | 56,623 | 23 | 113,246 |
No | output | 1 | 56,623 | 23 | 113,247 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,754 | 23 | 113,508 |
Tags: geometry, math
Correct Solution:
```
from decimal import *
from math import sqrt,tan,pi
if __name__ == "__main__":
getcontext().prec = 50
l3,l4,l5 = map( Decimal , input().split() )
#print(l3,l4,l5)
S3 = Decimal(sqrt(3))*l3*l3/4
H3 = Decimal(sqrt(6))*l3/3
area3 = S3*H3/3
S4 = l4*l... | output | 1 | 56,754 | 23 | 113,509 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,755 | 23 | 113,510 |
Tags: geometry, math
Correct Solution:
```
from math import sqrt, cos, sin, pi
a, b, c = map(int, input().split())
abh = sqrt(a**2 - a**2 / 4)
aba = a * abh / 2
ah = sqrt(a**2 - (2 * abh / 3)**2)
aa = aba * ah / 3
bba = b * b
bh = sqrt(b**2 - (b / sqrt(2))**2)
ba = bba * bh / 3
x1, y1 = 0, 1
x2, y2 = cos(18 / 360 * ... | output | 1 | 56,755 | 23 | 113,511 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,756 | 23 | 113,512 |
Tags: geometry, math
Correct Solution:
```
from functools import reduce
from math import factorial
l1, l2, l3 = [int(x) for x in input().split()]
A = (2**0.5)/12
B = ((15 + 5*5**0.5)/288)**0.5
print((l1**3 + 2*l2**3)*A + B*l3**3)
``` | output | 1 | 56,756 | 23 | 113,513 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,757 | 23 | 113,514 |
Tags: geometry, math
Correct Solution:
```
from math import sqrt, sin, pi, tan
def altura(l, R):
return sqrt(l**2 - R**2)
def volumen(A, h):
return A * h / 3
l3, l4, l5 = list(map(int, input().split()))
A3 = l3**2 * sqrt(3) / 4
R3 = l3 / sqrt(3)
h3 = altura(l3, R3)
V3 = volumen(A3, h3)
A4 = l4**2
R4 = l4 / ... | output | 1 | 56,757 | 23 | 113,515 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,758 | 23 | 113,516 |
Tags: geometry, math
Correct Solution:
```
from math import sqrt
x, y, z = map(int, input().split())
s = sqrt(2) / 12 * x ** 3
p = sqrt(2) / 6 * y ** 3
d = 5 ** .5 * (5 + 2 * 5 ** .5) ** .5 / 4 * z ** 2
q = 1 / 3 * d * sqrt(z ** 2 * (3 - 5 ** .5) / (5 - 5 ** .5))
print(s + p + q)
``` | output | 1 | 56,758 | 23 | 113,517 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,759 | 23 | 113,518 |
Tags: geometry, math
Correct Solution:
```
import math
l1, l2, l3 = map(int, input().split())
m1 = l1 * l1 - l1 * l1 / 4
h1 = math.sqrt(m1 - m1 / 9)
v1 = l1 * math.sqrt(m1) * h1 / 6
m2 = l2 * l2 - l2 * l2 / 4
h2 = math.sqrt(m2 - l2 * l2 / 4)
v2 = l2 * l2 * h2 / 3
m3 = l3 * l3 - l3 * l3 / 4
x = l3 * math.tan(54 * math... | output | 1 | 56,759 | 23 | 113,519 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,760 | 23 | 113,520 |
Tags: geometry, math
Correct Solution:
```
import math as m
def volume(n,x):
q = m.pi*((n-2)/n)
x = x/(2*m.cos(q/2))
return(((1/3)*(n/2)*(m.sin(q))*(((4*((m.cos(q/2))**2)) - 1)**(0.5)))*(x**3))
a ,b ,c = [int(x) for x in input().split()]
print(volume(3,a) + volume(4,b) + volume(5,c))
``` | output | 1 | 56,760 | 23 | 113,521 |
Provide tags and a correct Python 3 solution for this coding contest problem.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will... | instruction | 0 | 56,761 | 23 | 113,522 |
Tags: geometry, math
Correct Solution:
```
import math
a, b, c = map(lambda x: int(x), input().split(' '))
summ = 0
summ += (a ** 2 - ((a * a - a * a / 4) ** 0.5 * 2 / 3) ** 2) ** 0.5 * (a * a - a * a / 4) ** 0.5 * a / 2
summ += b * b * (((b * b - b * b / 4) - b * b / 4) ** 0.5)
a = c
b = a / (2 * math.sin(math.pi... | output | 1 | 56,761 | 23 | 113,523 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The disti... | instruction | 0 | 56,762 | 23 | 113,524 |
Yes | output | 1 | 56,762 | 23 | 113,525 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The disti... | instruction | 0 | 56,763 | 23 | 113,526 |
Yes | output | 1 | 56,763 | 23 | 113,527 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.