s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s002692553
p00008
u392970366
1596670285
Python
Python3
py
Accepted
50
5596
254
while True: try: n = int(input()) except: break ans = 0 for a in range(10): for b in range(10): for c in range(10): d = n - (a + b + c) ans += 0 <= d <= 9 print(ans)
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,102
s436919250
p00008
u309196579
1596606764
Python
Python3
py
Accepted
50
5592
254
while True: try: n = int(input()) except: break ans = 0 for a in range(10): for b in range(10): for c in range(10): d = n - (a + b + c) ans += 0 <= d <= 9 print(ans)
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,103
s462512391
p00008
u187074069
1595929176
Python
Python3
py
Accepted
20
5592
320
while True: try: n = int(input()) if n > 18: n = 36 - n ans = (n+1)*(n+2)*(n+3)/6 if n >= 10: n = n - 10 ans = ans - 2*(n+1)*(n+2)*(n+3)/3 if n < 0: ans = 0 print(int(ans)) except EOFError: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,104
s591757975
p00008
u260980560
1588728631
Python
Python3
py
Accepted
40
5592
343
for line in open(0).readlines(): N = int(line) lim = min(9, N) ans = 0 if 0 <= N <= 36: for a in range(0, lim+1): for b in range(0, lim+1): for c in range(0, lim+1): d = N - a - b - c if 0 <= d <= lim: an...
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,105
s798823325
p00008
u230927103
1586444927
Python
Python3
py
Accepted
50
5596
333
while True: try: count = 0 n = int(input()) for a in range(10): for b in range(10): for c in range(10): d = n - a - b - c if (d >= 0 and d <= 9): count += 1 print(count) except EOFError: ...
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,106
s570402281
p00008
u933957884
1572692191
Python
Python3
py
Accepted
80
5612
186
import sys; print("\n".join(str(sum(1 for n in [int(in_n)] for a in range(10) for b in range(a, a+10) for c in range(b, b+10) for d in range(c, c+10) if d == n)) for in_n in sys.stdin))
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,107
s895452239
p00008
u586792237
1564929728
Python
Python3
py
Accepted
30
5596
239
a = [0 for i in range(51)] for i in range(10): for j in range(10): for k in range(10): for l in range(10): a[i + j + k + l] += 1 while True: try: n = int(input()) print(a[n]) except EOFError: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,108
s507590470
p00008
u821561321
1564923201
Python
Python3
py
Accepted
30
5600
193
e=[0]*51 for a in range(10): for b in range(10): for c in range(10): for d in range(10): e[sum([a,b,c,d])]+=1 while 1: try: print(e[int(input())]) except: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,109
s972251868
p00008
u607723579
1564814490
Python
Python3
py
Accepted
30
5604
306
ans = [0 for i in range(51)] for i in range(10): for j in range(10): for k in range(10): for l in range(10): ans[i+j+k+l] += 1 #for i in range(50+1): # print(i, ans[i]) while True: try: print(ans[int(input())]) except EOFError: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,110
s412345148
p00008
u614095715
1560533257
Python
Python3
py
Accepted
30
5644
193
import itertools import sys com = [0] * 51 r10 = range(10) for a,b,c,d in itertools.product(r10,r10,r10,r10): com[a+b+c+d] += 1 for line in sys.stdin.readlines(): print(com[int(line)])
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,111
s089923946
p00008
u506537276
1560143603
Python
Python3
py
Accepted
30
5596
244
a = [0 for i in range(51)] for i in range(10): for j in range(10): for k in range(10): for l in range(10): a[i + j + k + l] += 1 while True: try: n = int(input()) print(a[n]) except EOFError: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,112
s409324128
p00008
u406093358
1555463373
Python
Python
py
Accepted
100
4648
286
import sys for line in sys.stdin: n = int(line) cnt = 0 for i in range(0, 10): for j in range(0, 10): for k in range(0, 10): for p in range(0, 10): if i+j+k+p == n: cnt += 1 break if i+j+k == n: break if i+j == n: break if i == n: break print cnt
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,113
s748709492
p00008
u195186080
1550733079
Python
Python3
py
Accepted
50
5600
421
def calc(n, x): # n個の数(0~9)の和でxが作れるかどうかを判別する if n == 1: if x <= 9: return 1 else: return 0 else: num = 0 for i in range(10): if x-i < 0: continue num += calc(n-1, x-i) return num while True: try: ...
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,114
s716785144
p00008
u350155409
1547293441
Python
Python3
py
Accepted
20
5600
204
import sys n = [0]*51 for i in range(10): for j in range(10): for k in range(10): for l in range(10): n[i+j+k+l] += 1 for i in sys.stdin: print(n[int(i)])
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,115
s024283853
p00008
u080014366
1547036763
Python
Python3
py
Accepted
90
5596
318
def count(a):#関数「count」を定義 count = 0 if a<=36: for i in range(10):#()内は0から一つ前までの数 for j in range(10): for k in range(10): for l in range(10): if i+j+k+l==a: count +=1 print(count) while True: try: a=int(input()) count(a) except EOFError: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,116
s068219139
p00008
u717526540
1541637392
Python
Python3
py
Accepted
50
5588
278
while(1): try: n = int(input()) except: break cnt = 0 for a in range(10): for b in range(10): for c in range(10): d = n - a - b - c if 0 <= d < 10: cnt += 1 print(cnt)
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,117
s738138248
p00008
u853158149
1521965057
Python
Python3
py
Accepted
30
5604
244
num = [0 for i in range(51)] for a in range(10): for b in range(10): for c in range(10): for d in range(10): num[a+b+c+d] += 1 while 1: try: print(num[int(input())]) except: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,118
s273576601
p00008
u197615660
1374476960
Python
Python
py
Accepted
20
4212
212
while True: try: n = int(raw_input()) judge = 0 for i in range(10): for j in range(10): for k in range(10): if -1 < n - i - j - k < 10: judge += 1 print judge except EOFError: break
p00008
<H1>Sum of 4 Integers</H1> <p> Write a program which reads an integer <var>n</var> and identifies the number of combinations of <var>a, b, c</var> and <var>d</var> (0 &le; <var>a, b, c, d</var> &le; 9) which meet the following equality:<br> <br> <var>a + b + c + d = n</var><br> <br> For example, for <var>n</var> = ...
35 1
4 4
5,119
s862542423
p00009
u957021183
1504684684
Python
Python3
py
Accepted
80
14372
757
# Aizu Problem 0009: Prime Number # import sys, math, os, bisect # read input: PYDEV = os.environ.get('PYDEV') if PYDEV=="True": sys.stdin = open("sample-input.txt", "rt") def primes2(n): """ Input n>=6, Returns a list of primes, 2 <= p < n """ n, correction = n-n%6+6, 2-(n%6>1) sieve = [True] * (n//...
p00009
<H1>Prime Number</H1> <p> Write a program which reads an integer <var>n</var> and prints the number of prime numbers which are less than or equal to <var>n</var>. A prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. For example, the first four prime numbers are: 2, ...
10 3 11
4 2 5
5,120
s707025188
p00010
u995990363
1530848494
Python
Python3
py
Accepted
20
5696
1,196
import math class P(object): def __init__(self, x, y): self.x = x self.y = y def width(self, p): return math.sqrt((self.x - p.x)**2 + (self.y - p.y)**2) def __repr__(self): return '{0:.3f} {1:.3f}'.format(self.x, self.y) def calc_cos(a,b,c): return (b**2 + c**2 - a**2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,121
s888023198
p00010
u244742296
1409825937
Python
Python3
py
Accepted
30
6984
1,688
# -*- coding: utf-8 -*- import cmath class Point(object): def __init__(self, x, y): self.point = complex(x, y) def __str__(self): return "x = {0}, y = {1}".format(self.point.real, self.point.imag) class Triangle(Point): def __init__(self, a, b, c): self.a = a self.b = b ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,122
s693920046
p00010
u579833671
1410771915
Python
Python
py
Accepted
20
4428
556
import math n = input() for i in range(n): p = map(float, raw_input().split()) x1, y1, x2, y2, x3, y3 = p[0], p[1], p[2], p[3], p[4], p[5] px = ((y1- y3) * (y1**2 - y2**2 + x1**2 - x2**2) - (y1 - y2) * (y1**2 - y3**2 + x1**2 - x3**2)) / (2 * (y1 - y3) * (x1 - x2) - 2 * (y1 - y2) * (x1 - x3)) py = (...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,123
s031239253
p00010
u506132575
1416114717
Python
Python
py
Accepted
20
4376
777
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys def calc_det(lis): return lis[0]*lis[3]-lis[1]*lis[2] def sq(x): return x*x for s in sys.stdin: d = map(float, s.split() ) if len(d) == 1: continue x1,y1,x2,y2,x3,y3 = d[0],d[1],d[2],d[3],d[4],d[5] d11 = 2*(x3-x2) d12 = 2*(y3-y2) d21 = 2*(...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,124
s889427989
p00010
u567380442
1424262005
Python
Python3
py
Accepted
30
6776
743
import sys f = sys.stdin def take2(iterable): while True: yield next(iterable), next(iterable) #外積 def cross(v1, v2): return v1.real * v2.imag - v1.imag * v2.real # 線分13と線分24の交点を求める def get_intersection(p1,p2,p3,p4): a1 = p4 - p2 b1 = p2 - p3 b2 = p1 - p2 s1 = cross(a1, b2) / 2 s2 =...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,125
s351931260
p00010
u540744789
1426158084
Python
Python
py
Accepted
10
4496
731
import math for i in range(input()): x1,y1,x2,y2,x3,y3=map(float,raw_input().split(" ")) if y2==y1 or y3==y1: if y2==y1: a2=-(x3-x1)/(y3-y1) b2=((y3+y1)-a2*(x1+x3))/2.0 a,b,c,d,e,f=1.0,0.0,(x1+x2)/2.0,-a2,1.0,b2 else: a1=-(x2-x1)/(y2-y1) ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,126
s580932409
p00010
u879226672
1431621030
Python
Python
py
Accepted
20
4412
457
# coding: utf-8 import math for i in range(int(raw_input())): x1, y1, x2, y2, x3, y3 = map(float,raw_input().split()) px = ((y1-y3)*(y1**2 -y2**2 +x1**2 -x2**2) -(y1-y2)*(y1**2 -y3**2 +x1**2 -x3**2)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3)) py = ((x1-x3)*(x1**2 -x2**2 +y1**2 -y2**2) -(x1-x2)*(x1**2 -x3**2 +y...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,127
s989196126
p00010
u067299340
1432816763
Python
Python
py
Accepted
20
4376
471
def calc(l): A1=2*(l[1][0]-l[0][0]) B1=2*(l[1][1]-l[0][1]) C1=l[0][0]**2-l[1][0]**2+l[0][1]**2-l[1][1]**2 A2=2*(l[2][0]-l[0][0]) B2=2*(l[2][1]-l[0][1]) C2=l[0][0]**2-l[2][0]**2+l[0][1]**2-l[2][1]**2 X=(B1*C2-B2*C1)/(A1*B2-A2*B1) Y=(C1*A2-C2*A1)/(A1*B2-A2*B1) R=((X-l[0][0])**2+(Y-l[0][1])**2)**0.5 return tuple...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,128
s090858081
p00010
u067299340
1432817040
Python
Python
py
Accepted
10
4336
354
def calc(a,b,c,d,e,f): A1=2*(c-a) B1=2*(d-b) C1=a**2-c**2+b**2-d**2 A2=2*(e-a) B2=2*(f-b) C2=a*a-e*e+b*b-f*f X=(B1*C2-B2*C1)/(A1*B2-A2*B1) Y=(C1*A2-C2*A1)/(A1*B2-A2*B1) R=((X-a)**2+(Y-b)**2)**0.5 return tuple(map(round, [X,Y,R], [3]*3)) l=[map(float,raw_input().split()) for i in range(input())] for ll in l: ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,129
s386023601
p00010
u067299340
1432817248
Python
Python
py
Accepted
20
4336
317
def calc(a,b,c,d,e,f): A=2*(c-a) B=2*(d-b) C=a*a-c*c+b*b-d*d D=2*(e-a) E=2*(f-b) F=a*a-e*e+b*b-f*f N=(A*E-D*B) X=(B*F-E*C)/N Y=(C*D-F*A)/N R=((X-a)**2+(Y-b)**2)**0.5 return tuple(map(round,[X,Y,R],[3]*3)) l=[map(float,raw_input().split())for i in range(input())] for k in l:print"%.3f %.3f %.3f"%(calc(*k))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,130
s122823497
p00010
u067299340
1432817322
Python
Python
py
Accepted
10
4332
312
def calc(a,b,c,d,e,f): A=2*(c-a) B=2*(d-b) C=a*a-c*c+b*b-d*d D=2*(e-a) E=2*(f-b) F=a*a-e*e+b*b-f*f N=(A*E-D*B) X=(B*F-E*C)/N Y=(C*D-F*A)/N return tuple(map(round,[X,Y,((X-a)**2+(Y-b)**2)**0.5],[3]*3)) l=[map(float,raw_input().split())for i in range(input())] for k in l:print"%.3f %.3f %.3f"%(calc(*k))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,131
s543355455
p00010
u067299340
1432817587
Python
Python
py
Accepted
10
4332
302
def g(a,b,c,d,e,f): A=2*(c-a) B=2*(d-b) C=a*a-c*c+b*b-d*d D=2*(e-a) E=2*(f-b) F=a*a-e*e+b*b-f*f N=(A*E-D*B) X=(B*F-E*C)/N Y=(C*D-F*A)/N return tuple(map(round,[X,Y,((X-a)**2+(Y-b)**2)**0.5],[3]*3)) for k in [map(float,raw_input().split())for i in range(input())]:print"%.3f %.3f %.3f"%(g(*k))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,132
s152540471
p00010
u379956761
1434726722
Python
Python3
py
Accepted
30
6824
531
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys import math n = int(input()) for data in sys.stdin: x1, y1, x2, y2, x3, y3 = map(float, data.split()) a1 = x2 - x1 b1 = y2 - y1 a2 = x3 - x1 b2 = y3 - y1 px = (b2 * (a1 * a1 + b1 * b1) - b1 * (a2 * a2 + b2 * b2)) / (2 * (a1 * b2 - a2 * b1...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,133
s773101625
p00010
u722431421
1439559123
Python
Python
py
Accepted
10
4360
685
# coding: utf-8 #Problem Name: Circumscrived Circle of a Triangle #ID: tabris #Mail: t123037@kaiyodai.ac.jp def __det(matrix): return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0] def __sqdist(p1,p2): return ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)**.5 n = int(raw_input()) for i in range(n): ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,134
s040160979
p00010
u722431421
1439560398
Python
Python
py
Accepted
10
4360
685
# coding: utf-8 #Problem Name: Circumscrived Circle of a Triangle #ID: tabris #Mail: t123037@kaiyodai.ac.jp def __det(matrix): return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0] def __sqdist(p1,p2): return ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)**.5 n = int(raw_input()) for i in range(n): ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,135
s182973471
p00010
u140201022
1443010856
Python
Python
py
Accepted
10
6568
457
n=int(raw_input()) for i in range(n): x1,y1,x2,y2,x3,y3=map(float,raw_input().split()) a=((x1-x2)**2+(y1-y2)**2)**0.5 b=((x1-x3)**2+(y1-y3)**2)**0.5 c=((x2-x3)**2+(y2-y3)**2)**0.5 s=(a+b+c)/2 ss=(s*(s-a)*(s-b)*(s-c))**0.5 sina=2*ss/b/c r=a/sina/2 a*=a b*=b c*=c px=(a*(b+c...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,136
s416647942
p00010
u802625365
1447077872
Python
Python
py
Accepted
10
6480
731
import math for i in range(input()): x1,y1,x2,y2,x3,y3=map(float,raw_input().split(" ")) if y2==y1 or y3==y1: if y2==y1: a2=-(x3-x1)/(y3-y1) b2=((y3+y1)-a2*(x1+x3))/2.0 a,b,c,d,e,f=1.0,0.0,(x1+x2)/2.0,-a2,1.0,b2 else: a1=-(x2-x1)/(y2-y1) ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,137
s095321992
p00010
u777299405
1447135791
Python
Python3
py
Accepted
20
7680
513
import math n = int(input()) for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) a1 = x1 ** 2 - x2 ** 2 + y1 ** 2 - y2 ** 2 a2 = y1 ** 2 - y3 ** 2 + x1 ** 2 - x3 ** 2 px = ((y1 - y3) * a1 - (y1 - y2) * a2) / \ (2 * (y1 - y3) * (x1 - x2) - 2 * (y1 - y2) * (x1 - x3)) py = ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,138
s373464496
p00010
u529386725
1453716676
Python
Python3
py
Accepted
30
7568
553
N = int(input()) #num of test case for i in range(N): #one test case x1, y1, x2, y2, x3, y3 = map(float, input().split()) #vertices a = complex(x1, y1) b = complex(x2, y2) c = complex(x3, y3) #make c = 0 by parallel transformation a -= c b -= c z0 = abs(a)**2 * b - abs(b)**2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,139
s725716370
p00010
u512342660
1455035612
Python
Python
py
Accepted
10
6436
715
#! -*- coding:utf-8 -*- import math n = input() for x in xrange(n): x1,y1,x2,y2,x3,y3 = map(float,raw_input().split()) a1 = 2.0*(x2-x1) b1 = 2.0*(y2-y1) x12 = x1**2 y12 = y1**2 c1 = x12-x2**2+y12-y2**2 a2 = 2.0*(x3-x1) b2 = 2.0*(y3-y1) c2 = x12-x3**2+y12-y3**2 denom=(a1*b2-a2*b1)...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,140
s991435630
p00010
u867824281
1456973282
Python
Python
py
Accepted
10
6488
731
import math for i in range(input()): x1,y1,x2,y2,x3,y3=map(float,raw_input().split(" ")) if y2==y1 or y3==y1: if y2==y1: a2=-(x3-x1)/(y3-y1) b2=((y3+y1)-a2*(x1+x3))/2.0 a,b,c,d,e,f=1.0,0.0,(x1+x2)/2.0,-a2,1.0,b2 else: a1=-(x2-x1)/(y2-y1) ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,141
s506594358
p00010
u766477342
1457531280
Python
Python3
py
Accepted
30
7668
518
for i in range(int(input())): x1, y1, x2, y2, x3, y3 = list(map(float,input().split())) a = x2 - x1 b = y2 - y1 c = (x1**2 - x2**2) + (y1**2 - y2**2) d = x3 - x1 e = y3 - y1 f = (x1**2 - x3**2) + (y1**2 - y3**2) l = (e*c - b*f) / (a*e - b*d) m = (c*d - f*a) / (b*d - a*e) n = -...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,142
s751255268
p00010
u650459696
1458379386
Python
Python3
py
Accepted
30
7732
580
def circum(x1,y1,x2,y2,x3,y3): a1 = 2 * (x2 - x1) b1 = 2 * (y2 - y1) c1 = x1 ** 2 - x2 ** 2 + y1 ** 2 - y2 ** 2 a2 = 2 * (x3 - x1) b2 = 2 * (y3 - y1) c2 = x1 ** 2 - x3 ** 2 + y1 ** 2 - y3 ** 2 X = (b1 * c2 - b2 * c1)/(a1 * b2 - a2 * b1) Y = (c1 * a2 - c2 * a1)/(a1 * b2 - a2 * b1) R =...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,143
s938879104
p00010
u148101999
1459229246
Python
Python
py
Accepted
20
6504
612
import sys def calc_det(lis): return lis[0]*lis[3]-lis[1]*lis[2] def sq(x): return x*x for s in sys.stdin: d = map(float, s.split() ) if len(d) == 1: continue x1,y1,x2,y2,x3,y3 = d[0],d[1],d[2],d[3],d[4],d[5] d11 = 2*(x3-x2) d12 = 2*(y3-y2) d21 = 2*(x2-x1) d22 = 2*(y2-y1) x11 = sq(x3)-sq(x...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,144
s520573129
p00010
u915343634
1459349618
Python
Python3
py
Accepted
30
7672
534
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys import math n = int(input()) for data in sys.stdin: x1, y1, x2, y2, x3, y3 = map(float, data.split()) a1 = x2 - x1 b1 = y2 - y1 a2 = x3 - x1 b2 = y3 - y1 px = (b2 * (a1 * a1 + b1 * b1) - b1 * (a2 * a2 + b2 * b2)) / (2 * (a1 * b2 - a2 *...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,145
s605000142
p00010
u130979865
1459902454
Python
Python
py
Accepted
10
6524
908
# -*- coding: utf-8 -*- import math class Point_Class(): def __init__(self, x, y): self.x = x self.y = y def calcCenter(p1, p2, p3): p = ((p1.y-p2.y)*(p3.x*p3.x+p1.y*p2.y)+(p2.y-p3.y)*(p1.x*p1.x+p2.y*p3.y)+(p3.y-p1.y)*(p2.x*p2.x+p3.y*p1.y)) / ((-2)*(p1.y*(p2.x-p3.x)+p2.y*(p3.x-p1.x)+p3.y*(p1....
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,146
s023453487
p00010
u966364923
1460037425
Python
Python3
py
Accepted
30
7940
1,684
def perpendicular_bisector(p, q): x = (q[0] - p[0]) y = (q[1] - p[1]) return (2 * x, 2 * y, p[0]**2-q[0]**2+p[1]**2-q[1]**2) def gauss_jordan_elimination(Array): # N???M??????Array N = len(Array) if N == 0: return (True, Array) else: M = len(Array[0]) A = [] for i ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,147
s595740441
p00010
u572790226
1460122876
Python
Python3
py
Accepted
30
7820
1,232
from math import sqrt def circle(x1, y1, x2, y2, x3, y3): if x1 == 0: dx = 1 x1 = x1 + dx x2 = x2 + dx x3 = x3 + dx else: dx = 0 if y2 == 0: dy = 1 y1 = y1 + dy y2 = y2 + dy y3 = y3 + dy else: dy = 0 A = [[x1, y1, 1, 1,...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,148
s273583003
p00010
u146816547
1469285358
Python
Python
py
Accepted
10
6536
490
import math n = int(raw_input()) for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, raw_input().split()) px = ((y2 - y3)*(x1*x1 + y1*y1) + (y3 - y1)*(x2*x2 + y2*y2) + (y1 - y2)*(x3*x3 + y3*y3))/(2*(x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2))) py = ((x2 - x3)*(x1*x1 + y1*y1) + (x3 - x1)*(x2*x2 + y2*y2) + (...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,149
s974707088
p00010
u896025703
1469537864
Python
Python3
py
Accepted
20
7768
512
import math def solve(a,b,c,d,e,f): x = - (d*(f**2+e**2-b**2-a**2) + b*(-f**2-e**2) + b**2*f + a**2*f + d**2*(b-f) + c**2*(b-f)) / (c*(2*f-2*b) - 2*a*f + 2*b*e + d*(2*a-2*e)) y = (c*(f**2+e**2-b**2-a**2) + a*(-f**2-e**2) + b**2*e + a**2*e + d**2*(a-e) + c**2*(a-e)) / (c*(2*f-2*b) - 2*a*f + 2*b*e + d*(2*a - 2*e)) r ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,150
s701215159
p00010
u648595404
1469702541
Python
Python3
py
Accepted
20
7824
483
import math n = int(input()) for i in range(n): x1,y1,x2,y2,x3,y3 = map(float,input().split()) a1,b1,c1 = 2*(x2-x1),2*(y2-y1), (x1**2 - x2 **2 + y1 ** 2 - y2 ** 2) a2,b2,c2 = 2*(x3-x1), 2*(y3-y1), (x1**2 - x3 **2 + y1 ** 2 - y3 ** 2) p1 = (b1*c2 - b2*c1)/(a1*b2 - a2*b1) p2 = (c1*a2 - c2*a1)/(a1*b2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,151
s034249254
p00010
u582608581
1470393346
Python
Python3
py
Accepted
30
7660
508
import math def Cramer(c): den = c[0]*c[4] - c[1]*c[3] return [(c[2]*c[4] - c[1]*c[5]) / den, (c[0]*c[5] - c[2]*c[3]) / den] n = eval(input()) for i in range(n): c = [eval(item) for item in input().split()] sol = Cramer([2*(c[0] - c[2]),\ 2*(c[1] - c[3]),\ c[0]**2 + c[1]**2 - c[2]**2 - c[3]**2,\ ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,152
s794785392
p00010
u358919705
1471820775
Python
Python3
py
Accepted
30
7596
487
for _ in range(int(input())): x1, y1, x2, y2, x3, y3 = map(float, input().split()) d = 2 * (x2 * y3 - x3 * y2 + x3 * y1 - x1 * y3 + x1 * y2 - x2 * y1) px = ((y2 - y3) * (x1 ** 2 + y1 ** 2) + (y3 - y1) * (x2 ** 2 + y2 ** 2) + (y1 - y2) * (x3 ** 2 + y3 ** 2)) / d py = -1 * ((x2 - x3) * (x1 ** 2 + y1 ** 2)...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,153
s333881423
p00010
u358919705
1471821390
Python
Python3
py
Accepted
20
7664
289
for _ in[0]*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)**2)**0.5))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,154
s466402039
p00010
u659302741
1477740619
Python
Python3
py
Accepted
30
7776
970
import math def simultaneous_equasion(a, b, c, d, e, f): "??£???????¨????" det = a * d - b * c a11 = d / det a12 = - b / det a21 = - c / det a22 = a / det return a11 * e + a12 * f, a21 * e + a22 * f n = int(input()) for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,155
s667130325
p00010
u149199817
1478146853
Python
Python3
py
Accepted
30
7764
1,424
# -*- 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==0 and e==0: ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,156
s398805927
p00010
u252368621
1479000288
Python
Python3
py
Accepted
40
7816
693
import math n=int(input()) for i in range(n): deta=[float(i) for i in input().split()] h1=math.sqrt((deta[2]-deta[0])**2+(deta[3]-deta[1])**2) h2=math.sqrt((deta[4]-deta[2])**2+(deta[5]-deta[3])**2) h3=math.sqrt((deta[0]-deta[4])**2+(deta[1]-deta[5])**2) sub=(h1+h2+h3)/2 s=math.sqrt(sub*(sub-h1...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,157
s737007763
p00010
u922871577
1479280435
Python
Python
py
Accepted
10
6520
509
import math n = input() for i in xrange(n): x1, y1, x2, y2, x3, y3 = map(float, raw_input().split()) p = ((y1-y3)*(y1**2 - y2**2 + x1**2 - x2**2) - \ (y1-y2)*(y1**2 - y3**2 + x1**2 - x3**2)) / \ (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3)) q = ((x1-x3)*(x1**2 - x2**2 + y1**2 - y2**2) - \ ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,158
s933546471
p00010
u123687446
1480672642
Python
Python3
py
Accepted
20
7624
470
from math import sqrt n = int(input()) for i in range(n): x1,y1,x2,y2,x3,y3 = list(map(float, input().split())) c = 2*((x2 - x1)*(y3 - y1) - (y2 - y1)*(x3 - x1)) ox = ((y3 - y1)*(x2**2 - x1**2 + y2**2 - y1**2) + (y1 - y2)*(x3**2 - x1**2 + y3**2 - y1**2))/c oy = ((x1 - x3)*(x2**2 - x1**2 + y2**2 - y1**2)...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,159
s187920197
p00010
u301729341
1481011872
Python
Python3
py
Accepted
30
7756
599
import math n = int(input()) for i in range(n): x1,y1,x2,y2,x3,y3 = map(float,input().split()) a = 2*(x2 - x1) b = 2*(y2 - y1) c = x2**2 + y2**2 - x1**2 -y1**2 d = 2*(x3 - x1) e = 2*(y3 - y1) f = x3**2 + y3**2 - x1**2 -y1**2 x = (c*e - f*b)/(a*e - b*d) y = (c*d - f*a)/(b*d - e*a) ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,160
s135004720
p00010
u811733736
1481252091
Python
Python3
py
Accepted
20
7940
1,598
from math import cos, sin, sqrt, radians, degrees, acos, fabs if __name__ == '__main__': epsilon = 1e-9 # ??????????????\??? num = int(input()) for i in range(num): x1, y1, x2, y2, x3, y3 = [float(x) for x in input().split(' ')] # ??????????????§????§???¢???cos???????±???????arccos??§...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,161
s464705283
p00010
u811733736
1481269169
Python
Python3
py
Accepted
30
7784
1,553
from math import sqrt, fabs def calcu_cirucumcenter(x1, y1, x2, y2, x3, y3): """ ??????O?????§?¨????(x, y)??¨????????¨ (x-x1)**2 + (y-y1)**2 = (x-x2)**2 + (y-y2)**2 x**2 -2*x1*x + x1**2 + y**2 -2*y1*y + y1**2 = ... -2*x2*x, x2**2, -2*y2*y, y2**2 ?????¨????????¨ (-2*x1 + 2*x2)x + (-2y1 + 2*y2)y + (x1**...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,162
s878433463
p00010
u919202930
1481303850
Python
Python3
py
Accepted
20
7716
694
n = int(input()) datasets = [0]*n #datasets[k] == [x1k,y1k,x2k,y2k,x3k,y3k] for i in range(0,n): datasets[i] = list(map(float,input().split())) for data in datasets: x1p2=(data[0]+data[2]) x1m2=(data[0]-data[2]) x1p3=(data[0]+data[4]) x1m3=(data[0]-data[4]) y1p2=(data[1]+data[3]) y1m2=(data[1]-data[3]) ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,163
s671909772
p00010
u957840591
1482465190
Python
Python3
py
Accepted
30
7704
1,871
class vertex(object): def __init__(self,a): self.x=a[0] self.y=a[1] class circle(object): def __init__(self,p,r): self.px=p.x self.py=p.y self.r=r class triangle(object): def __init__(self,a,b,c): self.a=a self.b=b self.c=c import math ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,164
s272144446
p00010
u078042885
1483859447
Python
Python3
py
Accepted
20
7592
313
import math for _ in range(int(input())): x1,y1,x2,y2,x3,y3=map(float,input().split()) a,b,c=2*(x2-x1),2*(y2-y1),x1**2-x2**2+y1**2-y2**2 aa,bb,cc=2*(x3-x1),2*(y3-y1),x1**2-x3**2+y1**2-y3**2 x,y=(b*cc-bb*c)/(a*bb-aa*b),(c*aa-cc*a)/(a*bb-aa*b) print('%.3f %.3f %.3f'%(x,y,math.hypot(x1-x,y1-y)))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,165
s722817816
p00010
u711765449
1483867438
Python
Python3
py
Accepted
20
7808
1,065
# -*- coding:utf-8 -*- import sys import math def solve(x1,y1,x2,y2,x3,y3): z1 = -1 * (x1**2 + y1**2) z2 = -1 * (x2**2 + y2**2) z3 = -1 * (x3**2 + y3**2) a11,a12,a13 = x1,y1,1 a21,a22,a23 = x2,y2,1 a31,a32,a33 = x3,y3,1 det = a11*a22*a33 + a21*a32*a13 + a31*a12*a23 - a11*a32*a23 - a31*a22...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,166
s948664191
p00010
u252414452
1486039485
Python
Python
py
Accepted
10
6500
534
import sys import math def to_f(e): return float(e) n = int(raw_input().rstrip()) for i in range(n): line = raw_input().rstrip() x1, y1, x2, y2, x3, y3 = map(to_f, line.split(" ")) a1 = 2*(x2-x1) a2 = 2*(x3-x1) b1 = 2*(y2-y1) b2 = 2*(y3-y1) c1 = x1**2-x2**2+y1**2-y2**2 c2 = x1**2-x3**2+y1**2-y3**2 ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,167
s792206888
p00010
u901080241
1488955612
Python
Python3
py
Accepted
30
7708
554
for i in range(int(input())): x1, y1, x2, y2, x3, y3 = map(float, input().split()) c = (x1-x2)**2 + (y1-y2)**2 a = (x2-x3)**2 + (y2-y3)**2 b = (x3-x1)**2 + (y3-y1)**2 # 16s^2 s = 2*(a*b + b*c + c*a) - (a*a + b*b + c*c) px = (a*(b+c-a)*x1 + b*(c+a-b)*x2 + c*(a+b-c)*x3) / s py = (a*(b+c-a...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,168
s263333739
p00010
u459418423
1489557614
Python
Python3
py
Accepted
20
7772
683
#!/usr/bin/env python # -*- coding:utf-8 -*- import sys n = int(sys.stdin.readline()) for i in range(n): x1,y1,x2,y2,x3,y3 = list(map(float, sys.stdin.readline().split())) a = ((x3-x2)**2 + (y3-y2)**2)**0.5 b = ((x1-x3)**2 + (y1-y3)**2)**0.5 c = ((x2-x1)**2 + (y2-y1)**2)**0.5 r = a*b*c / ((a+b+c) *...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,169
s666559415
p00010
u011621222
1490023766
Python
Python
py
Accepted
10
6408
334
from math import sqrt n=input() for i in range(n): x1,y1,x2,y2,x3,y3=map(float,raw_input().split()) A1=2*(x2-x1) B1=2*(y2-y1) C1=x2**2+y2**2-x1**2-y1**2 A2=2*(x3-x2) B2=2*(y3-y2) C2=x3**2+y3**2-x2**2-y2**2 x=(C1*B2-C2*B1)/(A1*B2-A2*B1) y=(A1*C2-A2*C1)/(A1*B2-A2*B1) R=sqrt((x1-x)**2+(y1-y)**2) print"%.3f %.3f...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,170
s995075927
p00010
u797673668
1490621162
Python
Python3
py
Accepted
60
10188
661
import fractions def calc(x1, y1, x2, y2): return 2 * (x2 - x1), 2 * (y2 - y1), x2 ** 2 + y2 ** 2 - x1 ** 2 - y1 ** 2 n = int(input()) for _ in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) cx1, cy1, z1 = calc(x1, y1, x2, y2) cx2, cy2, z2 = calc(x1, y1, x3, y3) gcd = fractions.g...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,171
s154764030
p00010
u797673668
1490621316
Python
Python3
py
Accepted
60
10160
601
import fractions def calc(x1, y1, x2, y2): return 2 * (x2 - x1), 2 * (y2 - y1), x2 ** 2 + y2 ** 2 - x1 ** 2 - y1 ** 2 n = int(input()) for _ in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) cx1, cy1, z1 = calc(x1, y1, x2, y2) cx2, cy2, z2 = calc(x1, y1, x3, y3) gcd = fractions.g...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,172
s262056243
p00010
u797673668
1490621524
Python
Python3
py
Accepted
20
7760
512
def calc(x1, y1, x2, y2): return 2 * (x2 - x1), 2 * (y2 - y1), x2 ** 2 + y2 ** 2 - x1 ** 2 - y1 ** 2 n = int(input()) for _ in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) cx1, cy1, z1 = calc(x1, y1, x2, y2) cx2, cy2, z2 = calc(x1, y1, x3, y3) dcy, dz = cx2 * cy1 - cx1 * cy2, cx2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,173
s366237897
p00010
u546285759
1492401742
Python
Python3
py
Accepted
30
7496
579
n = int(input()) for _ in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) a = pow(pow(x3-x2, 2) + pow(y3-y2, 2), 0.5) b = pow(pow(x1-x3, 2) + pow(y1-y3, 2), 0.5) c = pow(pow(x2-x1, 2) + pow(y2-y1, 2), 0.5) cosA = (b**2+c**2-a**2) / (2*b*c) sinA = 1-cosA**2 r = a / pow(sinA, 0....
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,174
s664393921
p00010
u462831976
1492655576
Python
Python3
py
Accepted
30
7772
553
# -*- coding: utf-8 -*- import sys import os import math N = int(input()) for i in range(N): x1, y1, x2, y2, x3, y3 = map(float, input().split()) c = 2 * ((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)) x = ((y3 - y1) * (x2 ** 2 - x1 ** 2 + y2 ** 2 - y1 ** 2) + (y1 - y2) * (x3 ** 2 - x1 ** 2 + y3 ** 2 - ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,175
s374212381
p00010
u187606290
1493474295
Python
Python3
py
Accepted
20
7720
568
import math n = int(input()) for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) # Get variables a = 2 * (x2 - x1) b = 2 * (y2 - y1) c = math.pow(x2, 2) + math.pow(y2, 2) - math.pow(x1, 2) - math.pow(y1, 2) d = 2 * (x3 - x1) e = 2 * (y3 - y1) f = math.pow(x3, 2) + math.pow(y3, 2) - math.pow...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,176
s052458025
p00010
u519227872
1494010374
Python
Python3
py
Accepted
20
7632
764
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 = 1 - cos_a_2 r = r...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,177
s903524426
p00010
u519227872
1494011136
Python
Python3
py
Accepted
30
7672
772
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 = 1 - cos_a_2 r = r...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,178
s608076616
p00010
u618637847
1494896173
Python
Python3
py
Accepted
20
7708
485
import math n = int(input()) for i in range(n): x1,y1,x2,y2,x3,y3 = map(float,input().split()) a1,b1,c1 = 2*(x2-x1),2*(y2-y1), (x1**2 - x2 **2 + y1 ** 2 - y2 ** 2) a2,b2,c2 = 2*(x3-x1), 2*(y3-y1), (x1**2 - x3 **2 + y1 ** 2 - y3 ** 2) p1 = (b1*c2 - b2*c1)/(a1*b2 - a2*b1) p2 = (c1*a2 - c2*a1)/(a1*...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,179
s778033033
p00010
u618637847
1494896351
Python
Python3
py
Accepted
20
7624
539
# coding: utf-8 # Here your code ! import math num = int(input()) for i in range(num): x1,y1,x2,y2,x3,y3 = map(float,input().split()) a1 = 2*(x2-x1) b1 = 2*(y2-y1) c1 = (x1*x1 - x2*x2 + y1*y1 - y2*y2) a2 = 2*(x3-x1) b2 = 2*(y3-y1) c2 = (x1*x1 - x3*x3 + y1*y1 - y3*y3) p1 = (b1*c2 - b2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,180
s129007203
p00010
u922489088
1496133651
Python
Python3
py
Accepted
20
7608
512
import sys import math n = int(sys.stdin.readline().rstrip()) for i in range(n): x1,y1,x2,y2,x3,y3 = map(float, sys.stdin.readline().rstrip().split(' ')) p = ((y1-y3)*(y1**2-y2**2+x1**2-x2**2)-(y1-y2)*(y1**2-y3**2+x1**2-x3**2)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3)) q = ((x1-x3)*(x1**2-x2**2+y1**2-y2**2)-(...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,181
s167038521
p00010
u905313459
1496315524
Python
Python3
py
Accepted
20
7500
434
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 + complex(x1, y1) zx =...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,182
s768014470
p00010
u354053070
1501910798
Python
Python3
py
Accepted
30
8004
842
from math import acos from math import sin def ang(ax, ay, ox, oy, bx, by): oax, oay = ax - ox, ay - oy obx, oby = bx - ox, by - oy r1, r2 = oax ** 2 + oay ** 2, obx ** 2 + oby ** 2 return acos((oax * obx + oay * oby) / (r1 * r2) ** 0.5) def circumcircle(x1, y1, x2, y2, x3, y3): s2A = sin(2 * ang(...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,183
s434711363
p00010
u957021183
1504763177
Python
Python3
py
Accepted
20
7844
996
# Aizu Problem 0010: Circumscribed Circle of a Triangle # import sys, math, os # read input: PYDEV = os.environ.get('PYDEV') if PYDEV=="True": sys.stdin = open("sample-input.txt", "rt") def circumscribed_circle(x1, y1, x2, y2, x3, y3): d = 2 * (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) px = ( (x1...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,184
s051562628
p00010
u299798926
1505355567
Python
Python3
py
Accepted
30
7772
433
import math a=int(input()) for i in range(a): x1,y1,x2,y2,x3,y3=[float(j) for j in input().split()] A=x1**2+y1**2-x2**2-y2**2 B=x2**2+y2**2-x3**2-y3**2 x12=x1-x2 x23=x2-x3 y12=y1-y2 y23=y2-y3 x=(y23*A-y12*B)/(2*(x12*y23-x23*y12)) if (y12==0): y=(B-2*x23*x)/(2*y23) else: ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,185
s075153499
p00010
u395334793
1505644037
Python
Python3
py
Accepted
20
7624
308
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)**2)**0.5))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,186
s779675306
p00010
u933096856
1505853684
Python
Python3
py
Accepted
40
7724
436
def pp(x): if x==0: x=0 return "{0:.3f}".format(round(x,3)) n=int(input()) for i in range(n): x1,y1,x2,y2,x3,y3=map(float, input().split()) a=2*(x2-x1) b=2*(y2-y1) c=( x2**2 + y2**2 ) - ( x1**2 + y1**2 ) d=2*(x3-x1) e=2*(y3-y1) f=( x3**2 + y3**2 ) - ( x1**2 + y1**2 ) x...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,187
s751225048
p00010
u072398496
1507685881
Python
Python
py
Accepted
20
6684
522
def line(grad, x, y): return [grad, y - grad * x] def intersection(a, b, c, d): return [-(b-d)/(a-c), -(b-d)/(a-c)*a+b] n = input() for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, raw_input().split()) a, b = line(-1 / ((y1 - y2) / (x1 - x2 + 0.000000001) + 0.000000001), (x1 + x2) / 2, (y1 + y2) / 2) c, ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,188
s784075347
p00010
u548155360
1512395192
Python
Python3
py
Accepted
20
5716
3,058
# coding=utf-8 import math if __name__ == '__main__': n = int(input()) for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) points_list = [[x1, y1], [x2, y2], [x3, y3]] points_list.sort() if points_list[0][0] == points_list[1][0]: py = (points_li...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,189
s872566194
p00010
u203261375
1513003324
Python
Python3
py
Accepted
30
5664
460
n = int(input()) for _ in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) px = ((y1-y3) * (y1**2-y2**2+x1**2-x2**2) - (y1-y2) * (y1**2-y3**2+x1**2-x3**2)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3)) py = ((x1-x3) * (x1**2-x2**2+y1**2-y2**2) - (x1-x2) * (x1**2-x3**2+y1**2-y3**2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,190
s420506779
p00010
u024715419
1514430596
Python
Python3
py
Accepted
20
5684
484
import math n = int(input()) for i in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) s = 0.5*((x1-x3)*(y2-y3) - (x2-x3)*(y1-y3)) a = (x2-x3)**2 + (y2-y3)**2 b = (x1-x3)**2 + (y1-y3)**2 c = (x2-x1)**2 + (y2-y1)**2 rx = (a*(b+c-a)*x1 + b*(c+a-b)*x2 + c*(a+b-c)*x3)/(16*s**2) ...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,191
s966441617
p00010
u764789069
1514696958
Python
Python
py
Accepted
10
4792
827
n = int(raw_input()) i = 0 while (i < n): x1,y1,x2,y2,x3,y3=map(float,raw_input().split()) m1,m2=(x1+x2) / 2, (y1+y2) / 2 n1,n2=(x1+x3) / 2, (y1+y3) / 2 if y1==y2: a = 1 b = 0 c = m1 elif x1==x2: a = 0 b = 1 c = m2 else: a = (x2-x1) / (y2-...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,192
s891334405
p00010
u273843182
1514981609
Python
Python3
py
Accepted
20
5672
432
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)) / (2*((x1-x3)*(y1-y2...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,193
s516115277
p00010
u546285759
1516346062
Python
Python3
py
Accepted
20
5684
598
n = int(input()) for _ in range(n): x1, y1, x2, y2, x3, y3 = map(float, input().split()) a = pow((x3-x2) ** 2 + (y3-y2) ** 2, 0.5) b = pow((x3-x1) ** 2 + (y3-y1) ** 2, 0.5) c = pow((x1-x2) ** 2 + (y1-y2) ** 2, 0.5) cosA = (b**2 + c**2 - a**2) / (2*b*c) sinA = pow(1 - cosA**2, 0.5) R = a / si...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,194
s275837697
p00010
u043254318
1516383312
Python
Python3
py
Accepted
20
5688
445
import math N = int(input()) for l in range(N): x1,y1,x2,y2,x3,y3 = [float(i) for i in input().split()] # ax + by = e # cx + dy = f a,b,c = x1-x2, y1-y2, (x1-x2)*(x1+x2)/2 + (y1-y2)*(y1+y2)/2 d,e,f = x1-x3, y1-y3, (x1-x3)*(x1+x3)/2 + (y1-y3)*(y1+y3)/2 X = (c*e-f*b)/(a*e-b*d) Y = (f*a-c*...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,195
s311357839
p00010
u150984829
1516782203
Python
Python3
py
Accepted
20
5684
285
for _ in[0]*int(input()): a,b,c,d,e,f=map(float,input().split()) x=((a*a+b*b)*(d-f)+(c*c+d*d)*(f-b)+(e*e+f*f)*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d)) y=((a*a+b*b)*(c-e)+(c*c+d*d)*(e-a)+(e*e+f*f)*(a-c))/2/(b*(c-e)+d*(e-a)+f*(a-c)) print(f"{x:.3f} {y:.3f} {((x-a)**2+(y-b)**2)**.5:.3f}")
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,196
s265666860
p00010
u150984829
1516782465
Python
Python3
py
Accepted
20
5672
283
for _ in[0]*int(input()): a,b,c,d,e,f=map(float,input().split()) x=((a*a+b*b)*(d-f)+(c*c+d*d)*(f-b)+(e*e+f*f)*(b-d))/2/(a*(d-f)+c*(f-b)+e*(b-d)) y=((a*a+b*b)*(c-e)+(c*c+d*d)*(e-a)+(e*e+f*f)*(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))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,197
s766615770
p00010
u150984829
1516782566
Python
Python3
py
Accepted
20
5668
266
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))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,198
s920772895
p00010
u150984829
1516783308
Python
Python3
py
Accepted
20
5672
274
import math 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,math.hypot(x-a,y-b)))
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,199
s820563602
p00010
u069727578
1520044280
Python
Python
py
Accepted
10
4768
368
from math import sqrt n=input() for i in range(n): x1,y1,x2,y2,x3,y3=map(float,raw_input().split()) A1=2*(x2-x1) B1=2*(y2-y1) C1=x2**2+y2**2-x1**2-y1**2 A2=2*(x3-x2) B2=2*(y3-y2) C2=x3**2+y3**2-x2**2-y2**2 x=(C1*B2-C2*B1)/(A1*B2-A2*B1) y=(A1*C2-A2*C1)/(A1*B2-A2*B1) R=sqrt((x1-x)*...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,200
s029881406
p00010
u166871988
1523704484
Python
Python3
py
Accepted
20
5688
425
import math n=int(input()) for i in range(n): x1,y1,x2,y2,x3,y3=[float(i) for i in input().split()] A=math.hypot(x2-x3,y2-y3)**2 B=math.hypot(x1-x3,y1-y3)**2 C=math.hypot(x1-x2,y1-y2)**2 t1=A*(B+C-A) t2=B*(A+C-B) t3=C*(A+B-C) px=(t1*x1+t2*x2+t3*x3)/(t1+t2+t3) py=(t1*y1+t2*y2+t3*y3)/(...
p00010
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }}); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <H1>Circumscribed Circle of A Triangle.</H1> <p...
1 0.0 0.0 2.0 0.0 2.0 2.0
1.000 1.000 1.414
5,201