submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s099468321
p00010
C
#include<complex.h> #include<stdio.h> #define F(a,b,c) acos((b*b+c*c-a*a)/2/b/c) int main(){typedef double D;int n;D d,e,f,g,h,i;for(scanf("%d",&n);n--;){scanf("%lf%lf%lf%lf%lf%lf",&d,&g,&e,&h,&f,&i);std::complex<D> a(d,g),b(e,h),c(f,i);D A=abs(b-c),B=abs(c-a),C=abs(a-b),L=F(A,B,C),s=sin(2*L),t=sin(2*F(B,C,A)),u=sin(2*...
main.c: In function 'main': main.c:4:120: error: 'std' undeclared (first use in this function) 4 | int main(){typedef double D;int n;D d,e,f,g,h,i;for(scanf("%d",&n);n--;){scanf("%lf%lf%lf%lf%lf%lf",&d,&g,&e,&h,&f,&i);std::complex<D> a(d,g),b(e,h),c(f,i);D A=abs(b-c),B=abs(c-a),C=abs(a-b),L=F(A,B,C),s=sin(2*L),t=si...
s656839758
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s743254380
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s330786803
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s921532878
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s982675172
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s230145208
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s947834138
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s815343612
p00010
C
#include <stdio.h> #include <math.h> int main() { int setcount; float x1, y1, x2, y2, x3, y3; float nx1, ny1, nx2, ny2; float nr1, nr2; float xp, yp, r; int tx, ty, tr, rem; int i; scanf("%d", &setcount); for(i=0; i<setcount; i++){ scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3); nx...
main.c: In function 'main': main.c:19:12: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2; | ^~~~~~ | | | float main.c:19:29: error: invalid operands to binary ^ (have 'float' and 'float') 19 | nr1=...
s024889626
p00010
C
#include <stdio.h> #include <math.h> int main(void) { double x1, x2, x3; double y1, y2, y3; double a, b, c, a1, b1, c1, a2, b2, c2; int n, i; double x, y; double hankei; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3); // ‚±‚Á‚©‚ç’†SÀ•W‚ÌŒvŽ...
main.c: In function 'main': main.c:35:100: error: expected ';' before 'printf' 35 | hankei = (a * b * c) / sqrt((a + b + c) * (-a + b + c) * (a - b + c) * (a + b - c)) | ^ | ...
s122801253
p00010
C
#include <stdio.h> #include <math.h> int main(void) { double x1, x2, x3; double y1, y2, y3; double a, b, c, a1, b1, c1, a2, b2, c2; int n, i; double x, y; double hankei; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3); // ‚±‚Á‚©‚ç’†SÀ•W‚ÌŒvŽ...
main.c: In function 'main': main.c:35:100: error: expected ';' before 'printf' 35 | hankei = (a * b * c) / sqrt((a + b + c) * (-a + b + c) * (a - b + c) * (a + b - c)) | ^ | ...
s998905410
p00010
C
#include <stdio.h> #include <math.h> int main(int argc,char* argv[]){ double x1,y1,x2,y2,x3,y3; double x,y,r; double r12,r23,r31,angle1,angle2,angle3; int num,count; scanf("%d",&num); for(count = 0; num > count;count++){ scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); r12 = sqr...
main.c: In function 'main': main.c:26:9: error: 'r32' undeclared (first use in this function); did you mean 'r31'? 26 | r = r32/ sin(angle1) / 2.0; | ^~~ | r31 main.c:26:9: note: each undeclared identifier is reported only once for each function it appears in
s248677988
p00010
C
#include<stdio.h> #include<math.h> int main(void){ int n; double x[3]={0},y[3]={0},r,a,b,c,d[2]={0},e[2]={0},f[2]={0},l,m; scanf("%d",&n); for(int i=0;i<n;i++){ a=b=c=r=l=m=0; for(int i=0;i<2;i++){ d[i]=e[i]=f[i]=0; } for(int i=0;i<3;i++){ x[i]=y[i]=0; } scanf("%lf %lf %lf %lf %lf %lf",...
/usr/bin/ld: /tmp/cc9mCeA8.o: in function `main': main.c:(.text+0x203): undefined reference to `sqrt' /usr/bin/ld: main.c:(.text+0x267): undefined reference to `sqrt' /usr/bin/ld: main.c:(.text+0x2cb): undefined reference to `sqrt' /usr/bin/ld: main.c:(.text+0x346): undefined reference to `sqrt' /usr/bin/ld: main.c:(.t...
s883520795
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(2*((x...
main.c: In function 'main': main.c:9:197: error: stray '#' in program 9 | x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(2*((x[1]-x[0])*(y[2]-y[1])-(x[2]-x[1])*(y[1]-y[0])));&#8232; y[0]=((-(y[0]*y[0]-y[1]*y[...
s963521801
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(2*((x...
main.c: In function 'main': main.c:9:197: error: stray '#' in program 9 | x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(2*((x[1]-x[0])*(y[2]-y[1])-(x[2]-x[1])*(y[1]-y[0])));&#8232; y[0]=((-(y[0]*y[0]-y[1]*y[...
s591947048
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]...
main.c: In function 'main': main.c:9:197: error: stray '#' in program 9 | x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(2*((x[1]-x[0])*(y[2]-y[1])-(x[2]-x[1])*(y[1]-y[0])));&#8232; y[0]=((-(y[0]*y[0]-y[1]*y[...
s779971007
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(...
main.c: In function 'main': main.c:9:197: error: stray '#' in program 9 | x[0]=((-(x[0]*x[0]-x[1]*x[1])-(y[0]*y[0]-y[1]*y[1]))*(y[2]-y[1])-(-(x[1]*x[1]-x[2]*x[2])-(y[1]*y[1]-y[2]*y[2]))*(y[1]-y[0]))/(2*((x[1]-x[0])*(y[2]-y[1])-(x[2]-x[1])*(y[1]-y[0])));&#8232; y[0]=((-(y[0]*y[0]-y[1]*y[...
s924883653
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); x[0]=(((x[1]*x[1]-x[0]*x[0])+(y[1]*y[1]-y[0]*y[0]))*(y[2]-y[1])-((x[2]*x[2]-x[1]*x[1])+(y[2]*y[2]-y[1]*y[1]))*(y[1]-y[0]))/(2*((x[1...
main.c: In function 'main': main.c:9:195: error: stray '#' in program 9 | x[0]=(((x[1]*x[1]-x[0]*x[0])+(y[1]*y[1]-y[0]*y[0]))*(y[2]-y[1])-((x[2]*x[2]-x[1]*x[1])+(y[2]*y[2]-y[1]*y[1]))*(y[1]-y[0]))/(2*((x[1]-x[0])*(y[2]-y[1])-(x[2]-x[1])*(y[1]-y[0])));&#8232; y[0]=(((y[1]*y[1]-y[0]*y[0...
s432546413
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf %lf %lf %lf %lf %lf ", &x[0], &y[0], &x[1], &y[1], &x[2], &y[2]); x[0] = ( ( - ( x[0] * x[0] - x[1] * x[1] ) - ( y [0] * y[0] - y[1] * y[1] ) ) * ( y[2] - y[1] ) - ( - ( x[1] *x[1] - x[...
main.c: In function 'main': main.c:9:290: error: stray '#' in program 9 | x[0] = ( ( - ( x[0] * x[0] - x[1] * x[1] ) - ( y [0] * y[0] - y[1] * y[1] ) ) * ( y[2] - y[1] ) - ( - ( x[1] *x[1] - x[2] * x[2] ) - ( y[1] * y[1] - y[2] * y[2] ) ) * ( y[1] - y[0] ) ) / ( 2.0 * ( ( x[1] - x[0] ) * ( y[2] - y[...
s577617183
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x[3],y[3],r; scanf("%d",&n); for (i=0;i<n;i++) { scanf("%lf%lf%lf%lf%lf%lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); x[0]=(((x[1]*x[1]-x[0]*x[0])+(y[1]*y[1]-y[0]*y[0]))*(y[2]-y[1])-((x[2]*x[2]-x[1]*x[1])+(y[2]*y[2]-y[1]*y[1]))*(y[1]-y[0]))/(2.0*((x[1]-x[0])*...
main.c: In function 'main': main.c:9:181: error: stray '#' in program 9 | x[0]=(((x[1]*x[1]-x[0]*x[0])+(y[1]*y[1]-y[0]*y[0]))*(y[2]-y[1])-((x[2]*x[2]-x[1]*x[1])+(y[2]*y[2]-y[1]*y[1]))*(y[1]-y[0]))/(2.0*((x[1]-x[0])*(y[2]-y[1])-(x[2]-x[1])*(y[1]-y[0])));&#8232; | ...
s911974802
p00010
C
#include <stdio.h> #include <math.h> int main(){ int i,n; double x1,,x2,x3,y1,y2,y3,r; scanf("%d",&n); for (i=0; i<n; i++) { scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3); x1=(((x2*x2-x1*x1)+(y2*y2-y1*y1))*(y3-y2)-((x3*x3-x2*x2)+(y3*y3-y2*y2))*(y2-y1))/(2.0*((x2-x1)*(y3-y2)-(x3-x2)*(y2-y1))); y1=(((y2...
main.c: In function 'main': main.c:5:19: error: expected identifier or '(' before ',' token 5 | double x1,,x2,x3,y1,y2,y3,r; | ^ main.c:8:53: error: 'x2' undeclared (first use in this function); did you mean 'x1'? 8 | scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3...
s728927720
p00010
C
#include <cmath> #include <cstdio> #include <iostream> using namespace std; struct point { double x, y; }A, B, C; struct circle { double r; point cen; }cir; void solve(point A, point B, point C) { double tmp1 = A.x * A.x - B.x * B.x + A.y * A.y - B.y * B.y; double tmp2 = A.x * A.x - C.x * C.x + A.y * A.y - C.y...
main.c:1:10: fatal error: cmath: No such file or directory 1 | #include <cmath> | ^~~~~~~ compilation terminated.
s631325446
p00010
C
#include<stdio.h>#include<math.h> int main(void){ double x, y, r; double x1, x2, x3, y1, y2, y3; double ecm[3][2]; double a, b, A; //enlarged coefficient matrix:拡大係数行列 int i; int n; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%lf %lf %lf...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include<math.h> int main(void){ double x, y, r; double x1, x2, x3, y1, y2, y3; double ecm[3][2]; double a, b, A; //enlarged coefficient matrix:拡大係数行列 int i; int n; scanf("%d", &n); ...
s312673359
p00010
C
#include<stdio.h> #include<math.h> int main(void) { double x,y,r; double x1,x2,x3,y1,y2,y3; double ecm[3][2]; double a,b,A; //enlarged coefficient matrix:拡大係数行列 int i; int n; scanf("%d",&n); for(i = 0; i < n; i++) { scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); ecm[0][0] = x1 - x2; ecm[0]...
main.c: In function 'main': main.c:9:15: error: stray '\343' in program 9 | double a,b,A;<U+3000>//enlarged coefficient matrix:<U+62E1><U+5927><U+4FC2><U+6570><U+884C><U+5217> | ^~~~~~~~
s777225509
p00010
C
#include<stdio.h>#include<math.h> int main(void){ double x,y,r; double x1,x2,x3,y1,y2,y3; double ecm[3][2]; double a,b,A; int i; int n; scanf("%d",&n); for(i = 0; i < n; i++) { scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); ecm[0][0] = x1 - x2; ecm[0][1] = y1 - y2; ecm[0][2] = (x2*x2 + y2*y2) - (x1*x1...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include<math.h> int main(void){ double x,y,r; double x1,x2,x3,y1,y2,y3; double ecm[3][2]; double a,b,A; int i; int n; scanf("%d",&n); for(i = 0; i < n; i++) { scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); ecm[0][0...
s000443981
p00010
C
#include<stdio.h>#include<math.h> int main(void){ double x,y,r; double x1,x2,x3,y1,y2,y3; double ecm[3][2]; double a,b,A; int i; int n; scanf("%d",&n); for(i = 0; i < n; i++) { scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); ecm[0][0] = x1 - x2; ecm[0][1] = y1 - y2; ecm[0][2] = (x2*x2 + y2*y2) - (x1*x1...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include<math.h> int main(void){ double x,y,r; double x1,x2,x3,y1,y2,y3; double ecm[3][2]; double a,b,A; int i; int n; scanf("%d",&n); for(i = 0; i < n; i++) { scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); ecm[0][0...
s771838656
p00010
C
include<stdio.h> #include<math.h> int main(){ int n,i,j; double x[4],y[4],r,a1,a2,b1,b2,c1,c2; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<3;j++)scanf("%lf%lf",&x[j],&y[j]); a1=2*(x[1]-x[0]);b1=2*(y[1]-y[0]);c1=x[0]*x[0]-x[1]*x[1]+y[0]*y[0]-y[1]*y[1]; a2=2*(x[2]-x[0]);b2=2*(y[2]-y[0]);c2=x[0]*x[0]...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c: In function 'main': main.c:8:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | scanf("%d",&n); | ^~~~~ main.c:3:1: note: include '<s...
s518919607
p00010
C
#include <stdio.h> int main(void){ int Num, i; double X1, Y1, X2, Y2, X3, Y3; doubel Xp, Yp, R; scanf("%d",&Num); for(i = 0; i < Num; i++){ scanf("%lf %lf %lf %lf %lf %lf", &X1, &Y1, &X2, &Y2, &X3, &Y3); R = 2*(X1*(Y2-Y3) + X2*(Y3-Y1) + X3*(Y1-Y2)); Xp = ((X1*X1 + Y1*Y1)*(Y2-Y3) + (X2*X2 + Y2*Y2)*(Y3-Y1...
main.c: In function 'main': main.c:7:9: error: unknown type name 'doubel'; did you mean 'double'? 7 | doubel Xp, Yp, R; | ^~~~~~ | double
s181845308
p00010
C
double x[3],y[3],a,b,c,A,B,C,X,Y,r; main(n,i,j,k){ i=0,j=1,k=2; for(scanf("%d",&n);n--;printf("%.3f %.3f %.3f\n",x,y,r)){ scanf("%lf%lf%lf%lf%lf%lf",x,y,x+1,y+1,x+2,y+2); a=2*x[j]-2*x[i],b=2*y[j]-2*y[i],c=x[i]*x[i]-x[j]*x[j]+y[i]*y[i]-y[j]*y[j]; A=2*x[k]-2*x[i],B=2*y[k]-2*y[i],C=x[i]*x[i]-x[k]*x[k]+y[i]*y[i]-y[...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(n,i,j,k){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:2:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:2:1: error: type of 'j' defaults to 'int' [-Wimplic...
s016825919
p00010
C
#include<stdio.h> #include<math.h> main(){ int n; scanf("%d",&n); double x[10000000000000000000],y[1000000000000000000000]; int i; for(i=0;i<n;i++){ scanf("%lf%lf%lf%lf%lf%lf",&x[i],&y[i],&x[i+1],&y[i+1],&x[i+2],&y[i+2]); double xp,yp; double a,b,c,d; a=x[i]-x[i+1],b=y[i+1]-y[i];c=x[i]-x[i+2],d=y[i+2]-y[i]...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:6:18: warning: integer constant is so large that it is unsigned 6 | double x[10000000000000000000],y[1000000000000000000000]; | ^~~~~~~~~~~~~~~~~~~~ main.c...
s489931534
p00010
C
#include <stdio.h> #include <math.h> int main(void) { int n; scanf("%d", &n); for (int i = 0; i < n; ++i) { double x1, y1, x2, y2, x3, y3; double z1, z2, z3; double xp, yp, r; scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3); z1 = x1 * x1 + y1 * y1; ...
/usr/bin/ld: /tmp/ccS267EM.o: in function `main': main.c:(.text+0x289): undefined reference to `sqrt' collect2: error: ld returned 1 exit status
s471569811
p00010
C
#include <stdio.h> #include <math.h> int main(void) { int n; double x1,x2,x3,y1,y2,y3,xa,ya,r; double a12,a13,b12,b13; scanf("%d",&n); while(n) { scanf("%ld %ld %ld %ld %ld %ld",&x1,&y1,&x2, &y2,&x3,&y3); a12 = (x1-x2)/(y2-y1)); a13 = (x1-x3)/(y3-y1)); b12 = (y1+y2-a12*...
main.c: In function 'main': main.c:13:27: error: expected ';' before ')' token 13 | a12 = (x1-x2)/(y2-y1)); | ^ | ; main.c:13:27: error: expected statement before ')' token main.c:14:27: error: expected ';' before ')' token 14 | a13 = (x1-x...
s052028809
p00010
C
#include <stdio.h> #include <math.h> int main(void) { int n; double x1,x2,x3,y1,y2,y3,xa,ya,r; double a12,a13,b12,b13; scanf("%d",&n); while(n) { scanf("%ld %ld %ld %ld %ld %ld",&x1,&y1,&x2, &y2,&x3,&y3); a12 = (x1-x2)/(y2-y1)); a13 = (x1-x3)/(y3-y1)); b12 = (y1+y2-a12*...
main.c: In function 'main': main.c:13:27: error: expected ';' before ')' token 13 | a12 = (x1-x2)/(y2-y1)); | ^ | ; main.c:13:27: error: expected statement before ')' token main.c:14:27: error: expected ';' before ')' token 14 | a13 = (x1-x...
s095042943
p00010
C
#include<stdio.h> #include<math.h> int main(void){ double n,i,x[3],y[3],a[2],b[2],px,py,r; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%lf%lf%lf%lf%lf%lf",%x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); a[0]=(x[0]-x[1])/(y[1]-y[0]); b[0]=((y[0]+y[1])-(a[0]*(x[0]+x[1])))/2; a[1]=(x[0]-x[...
main.c: In function 'main': main.c:7:36: error: expected expression before '%' token 7 | scanf("%lf%lf%lf%lf%lf%lf",%x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); | ^ main.c:14:54: error: expected ';' before 'r' 14 | r=((x[0]-px)*(x[0]-px))+((y[0]-py)*(y[0]-py)) ...
s608787538
p00010
C
#include <stdio.h> #include <math.h> int main(void){ double x1,x2,x3,y1,y2,y3; double a1,b1,c1,a2,b2,b3; double a_x,a_y,r,waru; int kaisu,i; scanf("%d",&kaisu); for(i=0;i < kaisu;i++){ scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3); a1 = (2*(x2-x1)); b1 = (2*(y2-y1)); c1 = (x1*x1 - x2*x...
main.c: In function 'main': main.c:20:17: error: 'c2' undeclared (first use in this function); did you mean 'b2'? 20 | c2 = (x1*x1 - x3*x3 + y1*y1 - y3*y3); | ^~ | b2 main.c:20:17: note: each undeclared identifier is reported only once for each function it ...
s824337724
p00010
C
#include<iostream> #include<iomanip> #include<math.h> using namespace std; bool get_snb( double , double , double , double , double& , double& ); double get_distance( double , double , double , double ); int main(void) { double x1, x2, x3; double y1, y2, y3; double a[3] , b[3]; double px, py; double r; int ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s211319642
p00010
C
include <stdio.h> #include <stdlib.h> #include <math.h> #define PI 3.14159265358979323 int calc1(float a,float b,float c,float d,float e,float f,float *x,float *y); //void quick(int *,long long,long long); //int comp(char *a,char *b); int main(){ float x1,y1,x2,y2,x3,y3,r1,r2; scanf("%f",&x1); while(scanf("%f ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inc...
s066927315
p00010
C
#define PI 3.14159265358979323 int calc1(float a,float b,float c,float d,float e,float f,float *x,float *y); //void quick(int *,long long,long long); //int comp(char *a,char *b); int main(){ float x1,y1,x2,y2,x3,y3,r1,r2; scanf("%f",&x1); while(scanf("%f %f %f %f %f %f",&x1,&y1,&x2,&y2,&x3,&y3)!=EOF){ calc1(...
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 11 | scanf("%f",&x1); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #define PI 3.14159265358979323 ma...
s034080019
p00010
C
//ヘッダファイル #include<stdio.h> #include<math.h> //マクロ定義 #define DIM2 2 #define X 0 #define Y 1 //プロトタイプ宣言 double func_calAB(double num1, double num2); double func_calC(double num1, double num2, double num3, double num4); double func_calX(double a1, double a2, double b1, double b2, double c1, double c2); double func_calY(...
main.c:15:1: error: return type defaults to 'int' [-Wimplicit-int] 15 | main() | ^~~~ main.c: In function 'main': main.c:42:28: error: expected expression before '{' token 42 | p1[DIM2] = {0, 0}, p2[DIM2] = {0, 0}, p3[DIM2] = {0, 0}; | ^ main.c:44:40: error: ...
s932406771
p00010
C
#include<stdio.h> #include<math.h> int main(void){ double x[3],y[3],z[3],l,m,n,a,b,c,d,e,f; int i,n; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); z[0]=-(x[0]*x[0]+y[0]*y[0]); z[1]=-(x[1]*x[1]+y[1]*y[1]); z[2]=-(x[2]*x[2]+y[2]*y[2]); a=x[0]-x[1]; b=y[0]-y[1]; ...
main.c: In function 'main': main.c:5:15: error: conflicting types for 'n'; have 'int' 5 | int i,n; | ^ main.c:4:35: note: previous declaration of 'n' with type 'double' 4 | double x[3],y[3],z[3],l,m,n,a,b,c,d,e,f; | ^ main.c:34:12: erro...
s420589351
p00010
C
#include<stdio.h> #include<math.h> int main(void){ double x[3],y[3],z[3],l,m,n,a,b,c,d,e,f; int i,h; scanf("%d",&h); for(i=0; i<n; i++){ scanf("%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); z[0]=-(x[0]*x[0]+y[0]*y[0]); z[1]=-(x[1]*x[1]+y[1]*y[1]); z[2]=-(x[2]*x[2]+y[2]*y[2]); a=x[0]-x[1]; b=y[0]-y[1]; ...
main.c: In function 'main': main.c:34:12: error: 'bouble' undeclared (first use in this function); did you mean 'double'? 34 | a=(bouble)d/1000; | ^~~~~~ | double main.c:34:12: note: each undeclared identifier is reported only once for each function it appears in main.c:34:1...
s459898106
p00010
C
#include<stdio.h> #include<math.h> int main(void){ double x[3],y[3],z[3],l,m,n,a,b,c,d,e,f; int i,h; scanf("%d",&h); for(i=0; i<n; i++){ scanf("%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2]); z[0]=-(x[0]*x[0]+y[0]*y[0]); z[1]=-(x[1]*x[1]+y[1]*y[1]); z[2]=-(x[2]*x[2]+y[2]*y[2]); a=x[0]-x[1]; b=y[0]-y[1]; ...
main.c: In function 'main': main.c:40:9: error: expected declaration or statement at end of input 40 | return 0; | ^~~~~~
s435157148
p00010
C++
#include<iostream> #include<iomanip> #include<cmath> using namespace std; int main () { int num; double x1,y1,x2,y2,x3,y3; cin >> num; for( int i = 0; i < num; i++ ) { double px = 0, py = 0, r = 0; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; px = ((x1*x1-x3*x3+y1*y1-y3*y3)*(...
a.cc: In function 'int main()': a.cc:19:22: error: expression cannot be used as a function 19 | py = ((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)-2*(x1-x2)*(y1-y3)); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
s973640799
p00010
C++
#include<stdio.h> #include<math.h> double x1, y1, x2, y2, x3, y3; double px, py; int main() { int n; scanf("%d",&n); while(n--) { scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3); double A1 =(x2*x2+y2*y2-x1*x1-y1*y1)*(y3-y1); double B1 =(x3*x3+y3*y3-x1*x1-y1*y1)*(y2-y1); ...
a.cc:3:12: error: 'double y1' redeclared as different kind of entity 3 | double x1, y1, x2, y2, x3, y3; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, ...
s747645947
p00010
C++
#include<stdio.h> #include<math.h> double x1, y1, x2, y2, x3, y3; double px, py; int main() { int n; scanf("%d",&n); while(n--) { scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3); double A1 =(x2*x2+y2*y2-x1*x1-y1*y1)*(y3-y1); double B1 =(x3*x3+y3*y3-x1*x1-y1*y1)*(y2-y1); ...
a.cc:3:12: error: 'double y1' redeclared as different kind of entity 3 | double x1, y1, x2, y2, x3, y3; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, ...
s221964269
p00010
C++
#include<iostream> #include<cmath> using namespace std; int main(void){ int n; cin >> n; double x1,x2,x3,y1,y2,y3; for(int i = 0 ; i < n ; i ++){ cin>>x1>>y1>>x2>>y2>>x3>>y3; double a = x2 * x2 - x1 * x1 + y2 * y2 - y1 * y1; double b = x3 * x3 - x1 * x1 + y3 * y3 - y1 * y1); double x = (2 * (y3 - y1) *...
a.cc: In function 'int main()': a.cc:13:65: error: expected ',' or ';' before ')' token 13 | double b = x3 * x3 - x1 * x1 + y3 * y3 - y1 * y1); | ^ a.cc:15:71: error: 'c' was not declared in this scope 15 | doubl...
s048781996
p00010
C++
#include <iostream> #include <cstdio> using namespace std; double heronsMethod(double a, double b, double c){ double s = (a + b + c) / 2; return sqrt(s * (s - a) * (s - b) * (s - c)); } int main() { int n; cin >> n; for (int i = 0; i < n; i++){ double x1, x2, x3, y1, y2, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3...
a.cc: In function 'double heronsMethod(double, double, double)': a.cc:7:16: error: 'sqrt' was not declared in this scope 7 | return sqrt(s * (s - a) * (s - b) * (s - c)); | ^~~~ a.cc: In function 'int main()': a.cc:17:28: error: 'sqrt' was not declared in this scope 17 | ...
s120788680
p00010
C++
#include<cstdio> #include<algorithm> #include<vector> #include<string> #include<iostream> #include<queue> #include<map> #include<set> #include<complex> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) #define X real() #define Y imag() typedef complex<double> P; class C...
a.cc:26:19: error: ISO C++ forbids declaration of 'sq' with no type [-fpermissive] 26 | template<class T> sq(T x){return x*x;} | ^~
s333916480
p00010
C++
#include<iostrea> #include<cmath> #include<cstdio> using namespace std; int main(){ double x[3], y[3], mx, my, lx, ly, dm, dl, cx, cy, r; for(int i=0; i<3; i++){ cin >> x[i] >> y[i]; } mx = (x1 + x2) / 2; my = (y1 + y2) / 2; dm = (y1 - y2) / (x1 - y2); lx = (x2 + x3) / 2; ly = (y2 + y3) / 2;...
a.cc:1:9: fatal error: iostrea: No such file or directory 1 | #include<iostrea> | ^~~~~~~~~ compilation terminated.
s921727009
p00010
C++
#include<iostream> #include<cmath> #include<cstdio> using namespace std; int main(){ double x[3], y[3], mx, my, lx, ly, dm, dl, cx, cy, r; for(int i=0; i<3; i++){ cin >> x[i] >> y[i]; } mx = (x1 + x2) / 2; my = (y1 + y2) / 2; dm = (y1 - y2) / (x1 - y2); lx = (x2 + x3) / 2; ly = (y2 + y3) / 2...
a.cc: In function 'int main()': a.cc:14:9: error: 'x1' was not declared in this scope; did you mean 'x'? 14 | mx = (x1 + x2) / 2; | ^~ | x a.cc:14:14: error: 'x2' was not declared in this scope; did you mean 'x'? 14 | mx = (x1 + x2) / 2; | ^~ | ...
s682416456
p00010
C++
#include<iostream> #include<cmath> #include<cstdio> using namespace std; int main(){ double x[3], y[3], mx, my, lx, ly, dm, dl, cx, cy, r; for(int i=0; i<3; i++){ cin >> x[i] >> y[i]; } mx = (x1 + x2) / 2; my = (y1 + y2) / 2; dm = (y1 - y2) / (x1 - y2); lx = (x2 + x3) / 2; ly = (y2 + y3) / 2...
a.cc: In function 'int main()': a.cc:14:9: error: 'x1' was not declared in this scope; did you mean 'x'? 14 | mx = (x1 + x2) / 2; | ^~ | x a.cc:14:14: error: 'x2' was not declared in this scope; did you mean 'x'? 14 | mx = (x1 + x2) / 2; | ^~ | ...
s219187790
p00010
C++
#include<iostream> #include<stdio.h> #include<math.h> using namespace std; int main(){ int num; cin>>num; for(int i=0;i<n;i++){ double a,b,c,d,e,f; double x1,y1,x2,y2,x3,y3; cin>>x1>>y1>>x2>>y2>>x3>>y3; a=x1-x2; b=y1-y2; c=x2-x3; d=y2-y3; e=(x2*x2+y2*y2)-(x1*x1+y1*y1); f=(x3*x3+y3*y3)-(x2*x2+y2*...
a.cc: In function 'int main()': a.cc:9:23: error: 'n' was not declared in this scope 9 | for(int i=0;i<n;i++){ | ^
s155022260
p00010
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<climits> #include<queue> #include<map> #include<set> #include<vector> #include<list> #include<stack> #include<cstring> #include<string> #include<cmath> using namespace std; struct Coor{ double x,y; }; struct Ans2{ double l,m; }; struct Ans3{ double ...
a.cc: In function 'Ans3 solve3(double*, double*, double*)': a.cc:51:31: error: cannot bind non-const lvalue reference of type 'Ans2&' to an rvalue of type 'Ans2' 51 | Ans3 ans = Ans3(solve2(_l,_m,_n)); | ~~~~~~^~~~~~~~~~ a.cc:26:20: note: initializing argument 1 of 'Ans3::Ans3...
s486863932
p00010
C++
#include<stdio.h> #include<math.h> int main(void) { double x1,x2,x3,y1,y2,y3,x,y ,r ,a ; while(scanf("%lf%lf%lf%lf%lf%lf",&x1,&x2,&x3,&y1,&y2,&y3)!=EOF){ a=(x1*x1+x2*x2-x3*x3)/2*x1*x2; r=x3/(2*sin(double a));
a.cc: In function 'int main()': a.cc:10:13: error: expected primary-expression before 'double' 10 | r=x3/(2*sin(double a)); | ^~~~~~ a.cc:10:24: error: expected '}' at end of input 10 | r=x3/(2*sin(double a)); | ^ a.cc:8:64: note: to match this '{' 8 | while(scan...
s426710606
p00010
C++
import java.util.Scanner; import java.math.BigDecimal; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i=0;i<n;i++){ double x1,y1,x2,y2,x3,y3; x1=sc.nextDouble(); y1=sc.nextDouble(); x2=sc.nextDouble(); y2=sc.nextDouble(); x3=sc.nextDouble(); y3=sc.nex...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.math.BigDecimal; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodul...
s879891734
p00010
C++
int main(){ double x1 , y1 , x2 , y2 , x3 , y3; double a1 , b1 , c1 , a2 , b2 , c2; double a , b , c; double px , py , r; double tmp; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; 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; px=(b1*c2-b2*c1)/(a1...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; | ^~~ a.cc:16:11: error: 'sqrt' was not declared in this scope 16 | a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); | ^~~~ a.cc:30:9: error: 'c...
s672421640
p00010
C++
#include <iomanip> #include <cmath> using namespace std; int main(){ int n; double x1 , y1 , x2 , y2 , x3 , y3; double a1 , b1 , c1 , a2 , b2 , c2; double a , b , c; double px , py , r; double tmp; cin >> n; while(1){ if(n==0) break; n--; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; a1=2*(x2-x1); b1=2*(y...
a.cc: In function 'int main()': a.cc:12:9: error: 'cin' was not declared in this scope 12 | cin >> n; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <cmath> +++ |+#include <iostream> 3 | using n...
s829887130
p00010
C++
//#define _USE_MATH_DEFINES //#include <cmath> #include <iostream> #include <stdio.h> //#include <stdlib.h> //#include <iomanip> //#include <vector> //#include <string> //#include <algorithm> //#include <functional> //#include <time.h> //#include <sstream> //#include <queue> using namespace std; int main(){ int n;...
a.cc: In function 'int main()': a.cc:38:21: error: 'sqrt' was not declared in this scope 38 | r = sqrt((x - ax)*(x - ax) + (y - ay)*(y - ay)); | ^~~~
s518129468
p00010
C++
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { long n,i; double x1,y1,x2,y2,x3,y3,Px,Py,r,a1,b1,c1,a2,b2,c2; cin>>n; for(i=0;i<n;i++){ cin>>x1>>y1>>x2>>y2>>x3>>y3; a1=(x2-x1)*2; b1=(y2-y1)*2; c1=x1*x1-x2*x2+y1*y1-y2*y2; a2=(x3-x1)*2; b2=(y3-y1)*2; c2=x1*x1-x3*x3+y1*y1-y3*y3; Px=(b...
a.cc: In function 'int main()': a.cc:20:12: error: 'x' was not declared in this scope 20 | r=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); | ^ a.cc:20:26: error: 'y' was not declared in this scope 20 | r=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); | ^
s423187789
p00010
C++
#include<iostream> #include<stdio.h> #include<cmath> using namespace std; int main() { long n,i; double x1,y1,x2,y2,x3,y3,Px,Py,r,a1,b1,c1,a2,b2,c2; cin>>n; for(i=0;i<n;i++){ cin>>x1>>y1>>x2>>y2>>x3>>y3; a1=(x2-x1)*2; b1=(y2-y1)*2; c1=x1*x1-x2*x2+y1*y1-y2*y2; a2=(x3-x1)*2; b2=(y3-y1)*2; c2=x1*x1-x3*x3+y1*y1-y3*y3; Px=(...
a.cc: In function 'int main()': a.cc:20:12: error: 'x' was not declared in this scope 20 | r=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); | ^ a.cc:20:26: error: 'y' was not declared in this scope 20 | r=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); | ^
s304382692
p00010
C++
#include<iostream> #include<stdio.h> #include<math.h> using namespace std; int main() { long n,i; double x1,y1,x2,y2,x3,y3,Px,Py,r,a1,b1,c1,a2,b2,c2; cin>>n; for(i=0;i<n;i++){ cin>>x1>>y1>>x2>>y2>>x3>>y3; a1=(x2-x1)*2; b1=(y2-y1)*2; c1=x1*x1-x2*x2+y1*y1-y2*y2; a2=(x3-x1)*2; b2=(y3-y1)*2; c2=x1*x1-x3*x3+y1*y1-y3*y3; Px=...
a.cc: In function 'int main()': a.cc:20:12: error: 'x' was not declared in this scope 20 | r=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); | ^ a.cc:20:26: error: 'y' was not declared in this scope 20 | r=sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)); | ^
s784763897
p00010
C++
#include <stdio.h> #include <math.h> #define SQ(x) ((x) * (x)) int main(void) { int s; int i; double x1, x2, x3; double y1, y2, y3; double a, b, c, d, e, f; double l, m, n; scanf("%d", &s); for (i = 0; i < s; i++){ scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);...
a.cc: In function 'int main()': a.cc:34:16: error: expected '}' at end of input 34 | return (0); | ^ a.cc:7:1: note: to match this '{' 7 | { | ^
s691563647
p00010
C++
#include <iostream> #include <iomanip> #include <math.h> using namespace std; int main(){ int cnt; cin >> cnt; double x1, y1, x2, y2, x3, y3; double a1, a2, b1, b2, c1, c2; double a, b, c; double A; double xp, yp, r; while(cnt > 0 && cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) { /...
a.cc: In function 'int main()': a.cc:32:13: error: expected ';' at end of input 32 | return 0 | ^ | ; a.cc:32:13: error: expected '}' at end of input a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s452634915
p00010
C++
#include <iostream> #include <iomanip> #include <math.h> using namespace std; int main(){ int cnt; cin >> cnt; double x1, y1, x2, y2, x3, y3; double a1, a2, b1, b2, c1, c2; double a, b, c; double A; double xp, yp, r; while(cnt > 0 && cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) { ...
a.cc: In function 'int main()': a.cc:38:14: error: expected '}' at end of input 38 | return 0; | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s134272551
p00010
C++
#include "stdafx.h" #include <iostream> #include <iomanip> #include <math.h> using namespace std; int main(){ int cnt; cin >> cnt; double x1, y1, x2, y2, x3, y3; double a1, a2, b1, b2, c1, c2; double a, b, c; double A; double xp, yp, r; while (cnt > 0 && cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) { // ?????\?...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s817742407
p00010
C++
#include <iostream> #include <cstdio> using namespace std; double marume( double x ){ long long t = x * 1000 + 0.5; return t/1000.0; } int main(){ int n; double tx, ty, x1, y1, x2, y2; cin >> n; while(n--){ cin >> tx >> ty >> x1 >> y1 >> x2 >> y2; x1 -= tx; y1 -= ty; x2 -= tx; y2 -= ty; double dist...
a.cc: In function 'int main()': a.cc:30:28: error: 'hypot' was not declared in this scope 30 | double r = hypot(x, y); | ^~~~~
s287422253
p00010
C++
#include<iostream> #include<string> #include <iomanip> using namespace std; int main() { int n; cin >> n; float x1, y1, x2, y2, x3, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; float px, py, r; float A1, B1, C1, A2, B2, C2; A1 = 2 * (x2 - y2); B1 = 2*(y2 - y1); C1 = x1*x1 - x2*x2 + y1*y1 - y2*y2; A2 = 2 * (x...
a.cc: In function 'int main()': a.cc:23:13: error: 'sqrt' was not declared in this scope 23 | r = sqrt((x1-px)*(x1-px)+(y1-py)*(y1-py)); | ^~~~ a.cc:25:14: error: 'round' was not declared in this scope 25 | px = round(px * 1000) / 1000; | ^~~~~
s166624034
p00010
C++
int main(){ int cnt; cin >> cnt; ??? double x1, y1, x2, y2, x3, y3; ???double a1, a2, b1, b2, c1, c2; ???double xp, yp, r; while (cnt > 0 && cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) { a1 = 2 * (x2 - x1); b1 = 2 * (y2 - y1); c1 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2; ...
a.cc: In function 'int main()': a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> cnt; | ^~~ a.cc:4:4: error: expected primary-expression before '?' token 4 | ??? double x1, y1, x2, y2, x3, y3; | ^ a.cc:4:5: error: expected primary-expression before '?' token 4 | ...
s915220625
p00010
C++
using namespace std; int main(){ int cnt; cin >> cnt; ??? double x1, y1, x2, y2, x3, y3; ???double a1, a2, b1, b2, c1, c2; ???double xp, yp, r; while (cnt > 0 && cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) { a1 = 2 * (x2 - x1); b1 = 2 * (y2 - y1); c1 = x1 * x1 - x2 * x2 +...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> cnt; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:7:4: error: e...
s986400193
p00010
C++
#! -*- 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)...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #! -*- coding:utf-8 -*- | ^ a.cc:2:1: error: 'import' does not name a type 2 | import math | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
s073449542
p00010
C++
#include<iostream> #include<math.h> using namespace std; int main() { int n; int x1,x2,x3,y1,y2,y3; cin>>n; while(n--) { double x,y,r,dx,dy; cin>>x1<<y1<<x2<<y2<,x3<<y3; dx=(x2+x3-2*x1)/2; dy=(y2+y3-2*y1)/2; x=x1+dx; y=y1+dy; r=sqrt(dx*dx+dy*d...
a.cc: In function 'int main()': a.cc:13:16: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 13 | cin>>x1<<y1<<x2<<y2<,x3<<y3; | ~~~~~~~^~~~ | | | | | int | ...
s135638763
p00010
C++
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int w(int n) { return n * n; } int main() { double x1, y1, x2, y2, x3, y3; int n; double a, b, c; double px, py, r; cin >> n; for (int i = 0; i < n; i++){ cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; a = sqrt(w(x1 - x2) +...
a.cc: In function 'int main()': a.cc:29:5: error: 'x' was not declared in this scope 29 | x = ((a*a)-((b*b)+(c*c)))/(-2*b*c); | ^ a.cc:30:5: error: 'y' was not declared in this scope 30 | y = sqrt(1-x*x); | ^
s689907498
p00010
C++
#include <iostream> int main(){ int n; double a,b,c,d,e,f; double x1,x2,x3,y1,y2,y3; double px,py; double r; cin >> n; for(int i=0;i<n;i++){ cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; a = (x2-x1)*2.0; b = (y2-y1)*2.0; c = (x2*x2 + y2*y2 - x1*x1 - y1*y1); d = (x3-x1)*2.0; e = (y3-y...
a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to st...
s940213838
p00010
C++
#include<iostream> using namespace std; class Point { public: double x, y; }; double distance(Point x, Point y) { return pow(pow(fabs(x.x - y.x), 2) + pow(fabs(x.y - y.y), 2), 0.5); } int main() { Point p[3],s; for (int i = 0; i < 3; i++) { cin >> p[i].x >> p[i].y; } double a, b, c, d, e, f; a = (-2)*p[0].x + ...
a.cc: In function 'double distance(Point, Point)': a.cc:8:24: error: 'fabs' was not declared in this scope; did you mean 'labs'? 8 | return pow(pow(fabs(x.x - y.x), 2) + pow(fabs(x.y - y.y), 2), 0.5); | ^~~~ | labs a.cc:8:20: error: 'pow' was not dec...
s174946401
p00010
C++
#include<iostream> using namespace std; int main(){ int n; double x[3], y[3], a, b, c, d, e, f, l , m, n; cin >> n; while(n--){ ????????????????cin>> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; a = 2 * (x[1] - x[0]); b = 2 * (y[1] - y[0]); c = ( (x[1]*x[1]) + (y[1]*y[1]) ) -( (x[0]*x[0]) + (y[0]*y[0]) );...
a.cc: In function 'int main()': a.cc:5:53: error: conflicting declaration 'double n' 5 | double x[3], y[3], a, b, c, d, e, f, l , m, n; | ^ a.cc:4:13: note: previous declaration as 'int n' 4 | int n; | ^ a.cc:8:1: error:...
s317741540
p00010
C++
#include<iostream> #include<cmath> using namespace std; int main(){ int k; double x[3], y[3], a, b, c, d, e, f, l , m, n; cin >> k; while(k--){ ????????????????cin>> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; a = 2 * (x[1] - x[0]); b = 2 * (y[1] - y[0]); c = ( (x[1]*x[1]) + (y[1]*y[1]) ) -( (x[0]*x[0]) ...
a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '?' token 9 | ????????????????cin>> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; | ^ a.cc:9:2: error: expected primary-expression before '?' token 9 | ????????????????cin>> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; ...
s023163858
p00010
C++
#include<iostream> #include<cmath> using namespace std; int main(){ int k; double x[3], y[3], a, b, c, d, e, f, l , m, n; cin >> k; while(k--){ cin>> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; a = 2 * (x[1] - x[0]); b = 2 * (y[1] - y[0]); c = ( (x[1]*x[1]) + (y[1]*y[1]) ) -( (x[0]*x[0]) + (y[0]*y[0]) ); d = 2 * (x[2...
a.cc: In function 'int main()': a.cc:19:18: error: 'setprecision' was not declared in this scope 19 | cout << fixed << setprecision(3) << l << " " << m << " " << n << endl; | ^~~~~~~~~~~~ a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '...
s515738617
p00010
C++
#include<iostream> #include<cmath> using namespace std; int main(){ int k; double x[3], y[3], a, b, c, d, e, f, l , m, n; cin >> k; while(k--){ cin>> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; a = 2 * (x[1] - x[0]); b = 2 * (y[1] - y[0]); c = ( (x[1]*x[1]) + (y[1]*y[1]) ) -( (x[0]*x[0]) + (y[0]*y[0]) ); d = 2 * (x[2...
a.cc: In function 'int main()': a.cc:19:17: error: 'setprecision' was not declared in this scope 19 | cout << fixed <<setprecision(3) << l << " " << m << " " << n << endl; | ^~~~~~~~~~~~ a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#i...
s210134748
p00010
C++
#include<iostream> #include<algorithm> using namespace std; int d(int x1,int y1,int x2,int y2) { int k; k = sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)); return k; } int main() { int n; cin >> n; for (int k = 0; k < n; k++) { int A[3][2]; for (int i = 0; i < 3; i++) { ...
a.cc: In function 'int d(int, int, int, int)': a.cc:7:9: error: 'sqrt' was not declared in this scope 7 | k = sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)); | ^~~~
s656669893
p00010
C++
#include <iostream> #include <cstdio> #define MAX 1000000 using namespace std; int main() { double x1, y1, x2, y2, x3, y3; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double 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-x...
a.cc: In function 'int main()': a.cc:18:55: error: 'pow' was not declared in this scope 18 | printf("%.3f %.3f %.3f\n", x, y, sqrt(pow((x1 - x), 2) + pow((y1 - y), 2))); | ^~~ a.cc:18:50: error: 'sqrt' was not declared in this scope 18 | ...
s041547947
p00010
C++
#include <iostream> #include <stdio.h> #define MAX 1000000 using namespace std; int main() { double x1, y1, x2, y2, x3, y3; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double 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-...
a.cc: In function 'int main()': a.cc:18:55: error: 'pow' was not declared in this scope 18 | printf("%.3f %.3f %.3f\n", x, y, sqrt(pow((x1 - x), 2) + pow((y1 - y), 2))); | ^~~ a.cc:18:50: error: 'sqrt' was not declared in this scope 18 | ...
s439190058
p00010
C++
#include <iostream> #include "stdio.h" #define MAX 1000000 using namespace std; int main() { double x1, y1, x2, y2, x3, y3; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double 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-...
a.cc: In function 'int main()': a.cc:18:55: error: 'pow' was not declared in this scope 18 | printf("%.3f %.3f %.3f\n", x, y, sqrt(pow((x1 - x), 2) + pow((y1 - y), 2))); | ^~~ a.cc:18:50: error: 'sqrt' was not declared in this scope 18 | ...
s679340639
p00010
C++
#include <iostream> #include <cstdio> using namespace std; int main() { double x1, y1, x2, y2, x3, y3; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double 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)-2*(y1-y2)*(x1-x3))...
a.cc: In function 'int main()': a.cc:16:55: error: 'pow' was not declared in this scope 16 | printf("%.3f %.3f %.3f\n", x, y, sqrt(pow((x1 - x), 2) + pow((y1 - y), 2))); | ^~~ a.cc:16:50: error: 'sqrt' was not declared in this scope 16 | ...
s801064231
p00010
C++
#include<iostream> #include<math.h> using namespace std; #define MAX 256 float LOSER(float x){ if((int)(x*10000)%10 > 4)return x + 0.001; return x; } int main(void){ int n,i = 0; float x1,y1,x2,y2,x3,y3; float px[MAX],py[MAX],r[MAX]; cin >> n; while(i < n){ cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; px[i...
a.cc: In function 'int main()': a.cc:21:33: error: expression cannot be used as a function 21 | px[i] = ((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)+2*(y1-y2)(x1-x3)); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:21:66: error: express...
s442578888
p00010
C++
#include<iostream> #include<stdio,h> #include<math.h> using namespace std; #define MAX 256 float LOSER(float x){ if((int)(x*10000)%10 > 4)return x + 0.001; return x; } int main(void){ int n,i = 0; float x1,y1,x2,y2,x3,y3; float px[MAX],py[MAX],r[MAX]; cin >> n; while(i < n){ cin >> x1 >> y1 >> x2 >> y2 >...
a.cc:2:9: fatal error: stdio,h: No such file or directory 2 | #include<stdio,h> | ^~~~~~~~~ compilation terminated.
s847999656
p00010
C++
#include <iostream> #include <utility> using namespace std; class vec{ public: double x; double y; double normEXP2() const{ return x*x + y*y; } vec& operator+(const vec& v){ x += v.x; y += v.y; return *this; } vec& operator-(const vec& v){ x -= v.x; y -= v.y; return *this; } vec& operator*(doub...
a.cc: In function 'int main()': a.cc:68:21: error: 'sqrt' was not declared in this scope 68 | r = sqrt(solveVec.normEXP2()); | ^~~~
s849255872
p00010
C++
#include <iostream> #include <algorism> #include <stdio.h> #include <cmath> using namespace std; double min(double x0, double x1, double x2){ return min(min(x0, x1), x2); } double max(double x0, double x1, double x2){ return max(max(x0, x1), x2); } double d(double x, double y, double p, double q){ return sqrt((p-x)*(p...
a.cc:2:10: fatal error: algorism: No such file or directory 2 | #include <algorism> | ^~~~~~~~~~ compilation terminated.
s352875870
p00010
C++
int main(void){ int n; cin >> n; for(int i = 0;i < n;i++){ double x1,y1,x2,y2,x3,y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; double a = sqrt(pow(x2-x1,2) + pow(y2-y1,2)); double b = sqrt(pow(x3-x2,2) + pow(y3-y2,2)); double c = sqrt(pow(x3-x1,2) + pow(y3-y1,2)); double r = a*b*c / sq...
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin >> n; | ^~~ a.cc:11:21: error: 'pow' was not declared in this scope 11 | double a = sqrt(pow(x2-x1,2) + pow(y2-y1,2)); | ^~~ a.cc:11:16: error: 'sqrt' was not declared in this sco...
s585521977
p00010
C++
#include <bits/stdc++.h> #include <vector> using namespace std; double n, r, x1, y1, x2, y2, x3, y3, xa, ya, xb, yb, xc, yc, ma, mb, mc, y_hasil, x_hasil; int main(){ cin >> n; for(int i = 1; i <= n; i++){ cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ma = (x2-x1)/(y1-y2); mb = (x3-x2)/(y2-y3); mc = (x3-x1)/(y1-...
a.cc:5:18: error: 'double y1' redeclared as different kind of entity 5 | double n, r, x1, y1, x2, y2, x3, y3, xa, ya, xb, yb, xc, yc, ma, mb, mc, y_hasil, x_hasil; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_define...
s298150226
p00010
C++
#include <bits/stdc++.h> #include <vector> using namespace std; double n, r, x1, y1, x2, y2, x3, y3, xa, ya, xb, yb, xc, yc, ma, mb, mc, y_hasil, x_hasil; int main(){ cin >> n; for(int i = 1; i <= n; i++){ cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; ma = (x2-x1)/(y1-y2); mb = (x3-x2)/(y2-y3); mc = (x3-x1)/(y1-...
a.cc:5:18: error: 'double y1' redeclared as different kind of entity 5 | double n, r, x1, y1, x2, y2, x3, y3, xa, ya, xb, yb, xc, yc, ma, mb, mc, y_hasil, x_hasil; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_define...
s802848655
p00010
C++
#include <iostream> #include <vector> //#include <math.h> //#include <string> #include <cmath> #include <iomanip> int main(); double round(double dSrc, int iLen); int main(){ int cnt = 0; //データセットの個数 double x1, y1, x2, y2, x3, y3; std::vector<double> p; //外接円の中心のx座標 std::vector<double> q; //外接円の中心のy座標 std::ve...
a.cc: In function 'int main()': a.cc:76:1: error: a function-definition is not allowed here before '{' token 76 | { | ^ a.cc:83:2: error: expected '}' at end of input 83 | } | ^ a.cc:11:11: note: to match this '{' 11 | int main(){ | ^
s503331141
p00010
C++
#include<stdio.h> #include<math.h> int main(){ int a; cin >>a; while(a--){ double x1,y1,x2,y2,x3,y3; cin >>x1 >>y1 >>x2 >> y2 >> x3 >> y3; double a1=2*(x2-x1); double b1=2*(y2-y1); double c1=x1*x1-x2*x2+y1*y1-y2*y2; double a2=2*(x3-x1); double b2=2*(y3...
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'sin'? 5 | cin >>a; | ^~~ | sin
s176226079
p00010
C++
#include<stdio.h> #include<math.h> using namespace std; int main(){ int a; cin >>a; while(a--){ double x1,y1,x2,y2,x3,y3; cin >>x1 >>y1 >>x2 >> y2 >> x3 >> y3; double a1=2*(x2-x1); double b1=2*(y2-y1); double c1=x1*x1-x2*x2+y1*y1-y2*y2; double a2=2*(x3-x1); ...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >>a; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<math.h> +++ |+#include <iostream> 3 | using namespace s...
s344077172
p00010
C++
#include <iostream> #include <vector> #include<iomanip> using namespace std; struct Circles { double x; double y; double r; }; Circles countCircle(double x1,double y1, double x2, double y2, double x3, double y3){ double a = ((y2 - y1)*(y3*y3 - y1 * y1 + x3 * x3 - x1 * x1) - (y3 - y1)*(y2*y2 - y1 * y1 + x2 * x2 - ...
a.cc: In function 'Circles countCircle(double, double, double, double, double, double)': a.cc:15:20: error: 'sqrt' was not declared in this scope 15 | double r = sqrt((x1 - a)*(x1 - a) + (y1 - b)*(y1 - b)); | ^~~~
s815538470
p00010
C++
# -*- coding: utf-8 -*- from math import sqrt # import numpy as np n = int(input()) for i in range(n): tmp = input().split(' ') a, b, c = [(float(tmp[i]), float(tmp[i+1])) for i in range(0, len(tmp), 2)] #A = np.array(((a[0], a[1], 1), # (b[0], b[1], 1), # (c[0...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:3:3: warning: #import is a deprecated GCC extension [-Wdeprecated] 3 | # import numpy as np | ^~~~~~ a.cc:3:10: error: #import expects "FILENAME" or <FILENAME> 3 | # import numpy as np | ^...
s222800726
p00010
C++
#!/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 - x3 * x3 - y3 * y3) /...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python | ^ a.cc:2:1: error: 'from' does not name a type 2 | from math import * | ^~~~
s205976143
p00010
C++
include<iostream> #include<cmath> using namespace std; int main() { int n=0; double ax,ay,bx,by,cx,cy,S,R,a,b,c,x=0,y=0; cin>>n; for(int i=0; i<n; i++){ cin>>ax>>ay>>bx>>by>>cx>>cy; S=((bx-ax)*(cy-ay)-(cx-ax)*(by-ay))/2; a=sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by)); b=sqrt((cx-bx)*(cx-bx)+(cy-by)*(cy...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/cmath:45, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 16...
s133124462
p00010
C++
#include<stdio.h> #include<iostream> using namespace std; struct Line{ bool isRightX, isRightY; double x, y, a, b; }; Line getBisector(double x1, double y1, double x2, double y2){ Line bisector; bisector.isRightX = bisector.isRightY = false; if ( y1 == y2 ){ bisector.isRightY = true; bisecto...
a.cc: In function 'void compute()': a.cc:55:9: error: 'sqrt' was not declared in this scope 55 | r = sqrt( (x - x1)*(x - x1) + (y - y1)*(y - y1) ); | ^~~~
s037840530
p00010
C++
}else{ P max = point[0]; P min = point[0]; if(max.real() < point[1].real())max=point[1]; if(min.real() > point[1].real())min=point[1]; if(max.real() < point[1].real())max=point[2]; if(min.real() > point[1].real())min=point[2]; ans = max + min; ans = (ans.real()/2,ans....
a.cc:1:5: error: expected declaration before '}' token 1 | }else{ | ^ a.cc:1:6: error: expected unqualified-id before 'else' 1 | }else{ | ^~~~
s398246619
p00010
C++
#include <iostream> #include <iomanip> using namespace std; double get_num(double x){ x = x * 1000; if(x >= 0){ x = (int)(x + 0.5); return ((double)x / 1000); } else { x = (int)(x - 0.5); return ((double)x / 1000); } } int main() { int n; cin >> n; for(int i = 0; i < n; i++){ double x1, y1; double ...
a.cc: In function 'int main()': a.cc:49:21: error: 'sqrt' was not declared in this scope 49 | r = sqrt((xp - x1) * (xp - x1) + ((yp - y1) * (yp - y1))); | ^~~~