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.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,981 | 23 | 89,962 |
Tags: geometry
Correct Solution:
```
from decimal import *
from math import sin , pi , sqrt
def getRadian( x ):
return x*Decimal(pi)/180
def area( a , b , c ):
p = (a+b+c)/2
return Decimal( sqrt( p*(p-a)*(p-b)*(p-c) ) )
if __name__ == "__main__":
getcontext().prec = 100
n , r = map( Decimal , i... | output | 1 | 44,981 | 23 | 89,963 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,982 | 23 | 89,964 |
Tags: geometry
Correct Solution:
```
from math import pi, sin, tan
def zvezda(n, r):
alpha = (2 * pi) / n
s1 = r * r * sin(alpha * 0.5) * sin(alpha * 0.5) / tan(0.5 * (alpha + 0.5 * alpha))
s2 = 0.5 * (alpha - sin(alpha)) * r * r
s3 = pi * r * r
return format(s3 - n * (s2 + s1), '.10f')
N, R = [... | output | 1 | 44,982 | 23 | 89,965 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,983 | 23 | 89,966 |
Tags: geometry
Correct Solution:
```
import math
n, R = [int(x) for x in input().split()]
phi = math.pi/(2*n)
A = math.sin(2*phi) * (math.cos(2*phi) - math.sin(2*phi) * math.tan(math.pi/2 - 3*phi))
print(n*R*R*A)
``` | output | 1 | 44,983 | 23 | 89,967 |
Provide tags and a correct Python 3 solution for this coding contest problem.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Writ... | instruction | 0 | 44,984 | 23 | 89,968 |
Tags: geometry
Correct Solution:
```
from math import *
pi = 3.141592653589793238462643383279502884197
n, r = map(int, input().split())
a = tan(pi/(2*n))
b = tan(pi/n)
a = 1/a + 1/b
print(r*r/a*n)
``` | output | 1 | 44,984 | 23 | 89,969 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,985 | 23 | 89,970 |
Yes | output | 1 | 44,985 | 23 | 89,971 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,986 | 23 | 89,972 |
Yes | output | 1 | 44,986 | 23 | 89,973 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,987 | 23 | 89,974 |
Yes | output | 1 | 44,987 | 23 | 89,975 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,988 | 23 | 89,976 |
Yes | output | 1 | 44,988 | 23 | 89,977 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,989 | 23 | 89,978 |
No | output | 1 | 44,989 | 23 | 89,979 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,990 | 23 | 89,980 |
No | output | 1 | 44,990 | 23 | 89,981 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,991 | 23 | 89,982 |
No | output | 1 | 44,991 | 23 | 89,983 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost... | instruction | 0 | 44,992 | 23 | 89,984 |
No | output | 1 | 44,992 | 23 | 89,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n points with integer coordinates on the plane. Points are given in a way such that there is no triangle, formed by any three of these n points, which area exceeds S.
Alyona tried... | instruction | 0 | 45,009 | 23 | 90,018 |
No | output | 1 | 45,009 | 23 | 90,019 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You are given n points with integer coordinates on the plane. Points are given in a way such that there is no triangle, formed by any three of these n points, which area exceeds S.
Alyona tried... | instruction | 0 | 45,010 | 23 | 90,020 |
No | output | 1 | 45,010 | 23 | 90,021 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,031 | 23 | 90,062 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
l=[list(map(int,input().split())) for _ in range(3)]
print(3)
for i in range(3):
a=l[(i+0)%3]
b=l[(i+1)%3]
c=l[(i+2)%3]
ab=[b[0]-a[0],b[1]-a[1]]
ac=[c[0]-a[0],c[1]-a[1]]
print(a[0]+ab[0]+ac[0],a[1]+ab[1]+ac[1])
``` | output | 1 | 45,031 | 23 | 90,063 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,032 | 23 | 90,064 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
ax,ay=map(int,input().split())
bx,by=map(int,input().split())
cx,cy=map(int,input().split())
print(3)
print(bx+ax-cx,end=" ")
print(by+ay-cy)
print(ax+cx-bx,end=" ")
print(ay+cy-by)
print(bx+cx-ax,end=" ")
print(by+cy-ay)
``` | output | 1 | 45,032 | 23 | 90,065 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,033 | 23 | 90,066 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
x1,y1=map(int,input( ).split(" "))
x2,y2=map(int,input( ).split(" "))
x3,y3=map(int,input( ).split(" "))
print(3)
print(str(x1+x2-x3)+" "+str(y1+y2-y3))
print(str(x1+x3-x2)+" "+str(y1+y3-y2))
print(str(x2+x3-x1)+" "+str(y2+y3-y1))
``` | output | 1 | 45,033 | 23 | 90,067 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,034 | 23 | 90,068 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
#!/usr/bin/env python3
def ri():
return map(int, input().split())
x1, y1 = ri()
x2, y2 = ri()
x3, y3 = ri()
print(3)
print(x2-x1 + x3, y2-y1 + y3)
print(x3-x2 + x1, y3-y2 + y1)
print(x1-x3 + x2, y1-y3 + y2)
``` | output | 1 | 45,034 | 23 | 90,069 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,035 | 23 | 90,070 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
I = lambda: map(int, input().split())
x1, y1 = I()
x2, y2 = I()
x3, y3 = I()
A, B, C = complex(x1, y1), complex(x2, y2), complex(x3, y3)
print(3)
print(int((B + C - A).real), int((B + C - A).imag))
print(int((A + B - C).real), int((A + B - C).im... | output | 1 | 45,035 | 23 | 90,071 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,036 | 23 | 90,072 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
# http://codeforces.com/problemset/problem/749/B
class Cord(object):
def __init__(self, x, y):
self.x = x
self.y = y
def print(self):
print('{0} {1}'.format(self.x, self.y))
def __str__(self):
re... | output | 1 | 45,036 | 23 | 90,073 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,037 | 23 | 90,074 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
import math
EPSILON = 10 ** -3
class Vector:
def __init__(self, d=2, coords=[0, 0]):
self.d = d
self.coords = coords[:]
@staticmethod
def fromEnds(p1, p2):
n = len(p1)
assert n == len(p2)
v... | output | 1 | 45,037 | 23 | 90,075 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogra... | instruction | 0 | 45,038 | 23 | 90,076 |
Tags: brute force, constructive algorithms, geometry
Correct Solution:
```
ax,ay=map(int,input().split())
bx,by=map(int,input().split())
cx,cy=map(int,input().split())
d1x=bx+cx-ax
d1y=by+cy-ay
d2x=cx+ax-bx
d2y=cy+ay-by
d3x=ax+bx-cx
d3y=ay+by-cy
print("3")
print(d1x,d1y)
print(d2x,d2y)
print(d3x,d3y)
``` | output | 1 | 45,038 | 23 | 90,077 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,039 | 23 | 90,078 |
Yes | output | 1 | 45,039 | 23 | 90,079 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,040 | 23 | 90,080 |
Yes | output | 1 | 45,040 | 23 | 90,081 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,041 | 23 | 90,082 |
Yes | output | 1 | 45,041 | 23 | 90,083 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,042 | 23 | 90,084 |
Yes | output | 1 | 45,042 | 23 | 90,085 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,043 | 23 | 90,086 |
No | output | 1 | 45,043 | 23 | 90,087 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,044 | 23 | 90,088 |
No | output | 1 | 45,044 | 23 | 90,089 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,045 | 23 | 90,090 |
No | output | 1 | 45,045 | 23 | 90,091 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of s... | instruction | 0 | 45,046 | 23 | 90,092 |
No | output | 1 | 45,046 | 23 | 90,093 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a splendid view unfolds on the night of Lunar Ne... | instruction | 0 | 45,135 | 23 | 90,270 |
Tags: geometry, graphs
Correct Solution:
```
from decimal import *
getcontext().prec = 40
eps = Decimal('1e-10')
class Circle:
def __init__(self, x, y, r):
self.x = x
self.y = y
self.r = r
def contains(self, c):
dd = (self.x - c.x)**2 + (self.y - c.y)**2 # dd = d*d
return dd < (self.r - c.r)**2 and sel... | output | 1 | 45,135 | 23 | 90,271 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a splendid view unfolds on the night of Lunar Ne... | instruction | 0 | 45,136 | 23 | 90,272 |
Tags: geometry, graphs
Correct Solution:
```
from math import sqrt
pt = lambda *a, **k: print(*a, **k, flush=True)
rd = lambda: map(int, input().split())
n = int(input())
def f(x1, y1, r1, x2, y2, r2):
a = (r1 + r2) ** 2
b = (r1 - r2) ** 2
d = (x1 - x2) ** 2 + (y1 - y2) ** 2
if d > a:
return 1
... | output | 1 | 45,136 | 23 | 90,273 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a splendid view unfolds on the night of Lunar Ne... | instruction | 0 | 45,137 | 23 | 90,274 |
Tags: geometry, graphs
Correct Solution:
```
from math import sqrt
pt = lambda *a, **k: print(*a, **k, flush=True)
rd = lambda: map(int, input().split())
n = int(input())
def f(x1, y1, r1, x2, y2, r2):
a = (r1 + r2) ** 2
b = (r1 - r2) ** 2
d = (x1 - x2) ** 2 + (y1 - y2) ** 2
if d > a:
return 1
... | output | 1 | 45,137 | 23 | 90,275 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a... | instruction | 0 | 45,138 | 23 | 90,276 |
No | output | 1 | 45,138 | 23 | 90,277 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a... | instruction | 0 | 45,139 | 23 | 90,278 |
No | output | 1 | 45,139 | 23 | 90,279 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.
Little Tommy is watching a firework show. As circular shapes spread across the sky, a... | instruction | 0 | 45,140 | 23 | 90,280 |
No | output | 1 | 45,140 | 23 | 90,281 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,282 | 23 | 90,564 |
"Correct Solution:
```
for _ in[0]*int(input()):
a,b,c,d,e,f=map(float,input().split())
s,t,u=a*a+b*b,c*c+d*d,e*e+f*f
x=(s*(d-f)+t*(f-b)+u*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d))
y=(s*(c-e)+t*(e-a)+u*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c))
print('%.3f %.3f %.3f'%(x,y,((x-a)**2+(y-b)**2)**.5))
``` | output | 1 | 45,282 | 23 | 90,565 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,283 | 23 | 90,566 |
"Correct Solution:
```
p = int(input())
for i in range(p):
x1, y1, x2, y2, x3, y3 = map(float, input().split(" "))
xa, ya, xb, yb = x2-x1, y2-y1, x3-x1, y3-y1
a = complex(xa, ya)
b = complex(xb, yb)
z0 = abs(a) ** 2 * b - abs(b) **2 * a
z0 /= a.conjugate() * b - a * b.conjugate()
z = z0 + c... | output | 1 | 45,283 | 23 | 90,567 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,284 | 23 | 90,568 |
"Correct Solution:
```
#!/usr/bin/env python
from math import *
def g(x):
y = (int((1000 * abs(x)) * 2 + 1) // 2) / 1000
if x < 0:
y *= -1
return y
def func(x):
x1, y1, x2, y2, x3, y3 = x
a = x1 - x2
b = y1 - y2
c = (x1 * x1 + y1 * y1 - x2 * x2 - y2 * y2) / 2
d = x1 - x3
e = y1 - y3
f = (x1 * x1 + y1 * y1... | output | 1 | 45,284 | 23 | 90,569 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,285 | 23 | 90,570 |
"Correct Solution:
```
import math
class Circle:
def __init__(self,x,y,r):
self.x = x
self.y = y
self.r = r
def getCircle(x1, y1, x2, y2, x3, y3):
d = 2 * (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))
px = ((x1**2 + y1**2) * (y2 - y3) + (x2**2 + y2**2) * (y3 - y1) + (x3**2 + y... | output | 1 | 45,285 | 23 | 90,571 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,286 | 23 | 90,572 |
"Correct Solution:
```
for _ in range(int(input())):
a,d,b,e,c,f=map(float,input().split())
z=2*(b*f-c*e+c*d-a*f+a*e-b*d)
x=((e-f)*(a**2+d**2)+(f-d)*(b**2+e**2)+(d-e)*(c**2+f**2))/z
y=((c-b)*(a**2+d**2)+(a-c)*(b**2+e**2)+(b-a)*(c**2+f**2))/z
print('{0:.3f} {1:.3f} {2:.3f}'.format(x,y,((a-x)**2+(d-y)... | output | 1 | 45,286 | 23 | 90,573 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,287 | 23 | 90,574 |
"Correct Solution:
```
import math
N = int(input())
for i in range(N):
x1,y1,x2,y2,x3,y3 = map(float,input().split())
x =((y1-y3)*(y1*y1 -y2*y2 +x1*x1 -x2*x2) -(y1-y2)*(y1*y1 -y3*y3 +x1*x1 -x3*x3)) / (2*((y1-y3)*(x1-x2)-(y1-y2)*(x1-x3)))
y =((x1-x3)*(x1*x1 -x2*x2 +y1*y1 -y2*y2) -(x1-x2)*(x1*x1 -x3*x3 +y1*y1 -y3*y3... | output | 1 | 45,287 | 23 | 90,575 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,288 | 23 | 90,576 |
"Correct Solution:
```
# -*- coding: utf-8 -*-
import sys
def length(a, b):
return ((a[0] - b[0])**2 + (a[1] - b[1])**2)**0.5
def solve_sim_equ(a, b, c, d, e, f):
'''
From Problem 0004.
This function solves following equation.
ax + by = c
dx + ey = f
'''
if a==0 and d==0:
if b... | output | 1 | 45,288 | 23 | 90,577 |
Provide a correct Python 3 solution for this coding contest problem.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ on the plane surface.
Constraints
* $-100 \... | instruction | 0 | 45,289 | 23 | 90,578 |
"Correct Solution:
```
from math import sqrt
n = int(input())
for i in range(n):
l = input()
x1,y1,x2,y2,x3,y3=map(float,l.split(' '))
a_2 = (x1 - x2)**2 + (y1 - y2)**2
b_2 = (x2 - x3)**2 + (y2 - y3)**2
c_2 = (x3 - x1)**2 + (y3 - y1)**2
cos_a_2 = (b_2 + c_2 - a_2)**2/(4* b_2 * c_2)
sin_a_2 ... | output | 1 | 45,289 | 23 | 90,579 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(... | instruction | 0 | 45,290 | 23 | 90,580 |
Yes | output | 1 | 45,290 | 23 | 90,581 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(... | instruction | 0 | 45,291 | 23 | 90,582 |
Yes | output | 1 | 45,291 | 23 | 90,583 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(... | instruction | 0 | 45,292 | 23 | 90,584 |
Yes | output | 1 | 45,292 | 23 | 90,585 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(... | instruction | 0 | 45,293 | 23 | 90,586 |
Yes | output | 1 | 45,293 | 23 | 90,587 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(... | instruction | 0 | 45,294 | 23 | 90,588 |
No | output | 1 | 45,294 | 23 | 90,589 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_1)$, $(x_2, y_2)$ and $(... | instruction | 0 | 45,295 | 23 | 90,590 |
No | output | 1 | 45,295 | 23 | 90,591 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.