submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s924409300
p00004
C
#include<stdio.h> int main(){ double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ x=(c*e-f*b)/(a*e-d*b); y=(c*d-f*a)/(b*d-e*a); if((int)(x==0)x=0; if((int)(y==0)y=0; printf("%.3f %.3f\n",x,y); } return 0; }
main.c: In function 'main': main.c:7:15: error: expected ')' before 'x' 7 | if((int)(x==0)x=0; | ~ ^ | ) main.c:12:1: error: expected expression before '}' token 12 | } | ^ main.c:12:1: error: expected declaration or statement at end of input
s988823342
p00004
C
float d,b,f,e,c,a;main(X){~scanf("%f",&a+--X)?main(X+5?X:!!printf("%.3f %.3f\n",(e-c*d)/a,d/=a*b-c*f,d=a*d-f*e)):0}
main.c:1:19: error: return type defaults to 'int' [-Wimplicit-int] 1 | float d,b,f,e,c,a;main(X){~scanf("%f",&a+--X)?main(X+5?X:!!printf("%.3f %.3f\n",(e-c*d)/a,d/=a*b-c*f,d=a*d-f*e)):0} | ^~~~ main.c: In function 'main': main.c:1:19: error: type of 'X' defaults to 'int' [-Wimplicit-int] mai...
s150070895
p00004
C
#include<stdio.h> int main(void){ int a,b,c,d,e,f; double ansx,ansy; scanf("%d %d %d %d %d %d",a,b,c,d,e,f); ansy = (b*f-c*e)/(a*f-c*d); ansx = (f - e*ansy)/d; printf("%f %f\n" ,anx,ansy); return 0; }
main.c: In function 'main': main.c:11:20: error: 'anx' undeclared (first use in this function); did you mean 'ansx'? 11 | printf("%f %f\n" ,anx,ansy); | ^~~ | ansx main.c:11:20: note: each undeclared identifier is reported only once for each function it appears in
s944365407
p00004
C
#include<stdio.h> double determinant(double a, double b, double c, double d) { return (a * d) - (b * c); } int main(void) { double a, b, c, d, e, f; double A, D1, D2; double x, y, X, Y; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);) { A = determinant(a, b, d, e); D1 = determinant(c, b, f,...
main.c: In function 'main': main.c:13:71: error: expected ')' before ';' token 13 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);) | ~ ^ | )
s283407271
p00004
C
#include<stdio.h> int main(){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ x=(c*e-b*f)/(a*e-b*d); y=(c*d-a*f)/(b*d-a*e); printf("%lf %lf\n",x,y); } return 0;
main.c: In function 'main': main.c:16:1: error: expected declaration or statement at end of input 16 | return 0; | ^~~~~~
s572301668
p00004
C
#include<stdio.h> #include<math.h> float round_f(float x) { if ( x > 0.0 ) { return floor(x + 0.005); } else { return -1.0 * floor(fabs(x) + 0.005); } } int main(){ float a,b,c,d,e,f,x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){ x=(bf-ce)/(bd-ae); x=round_f(x); y=(af-cd)/(...
main.c: In function 'main': main.c:15:4: error: 'bf' undeclared (first use in this function); did you mean 'f'? 15 | x=(bf-ce)/(bd-ae); | ^~ | f main.c:15:4: note: each undeclared identifier is reported only once for each function it appears in main.c:15:7: error: 'ce' undeclared (first use in this...
s920046105
p00004
C
#include<stdio.h> #include<math.h> float round_f(float x) { if ( x > 0.0 ) { return floor(x + 0.005); } else { return -1.0 * floor(fabs(x) + 0.005); } } int main(){ float a,b,c,d,e,f,x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){ x=(b*f-ce)/(b*d-a*e); x=round_f(x); y=(a*f-c...
main.c: In function 'main': main.c:15:8: error: 'ce' undeclared (first use in this function); did you mean 'e'? 15 | x=(b*f-ce)/(b*d-a*e); | ^~ | e main.c:15:8: note: each undeclared identifier is reported only once for each function it appears in main.c:18:3: error: implicit declaration of...
s242234966
p00004
C
#include<stdio.h> #include<math.h> float round_f(float x) { if ( x > 0.0 ) { return floor(x + 0.005); } else { return -1.0 * floor(fabs(x) + 0.005); } } int main(){ float a,b,c,d,e,f,x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){ x=(b*f-c*e)/(b*d-a*e); x=round_f(x); y=(a*f-...
main.c: In function 'main': main.c:18:3: error: implicit declaration of function 'roundf_'; did you mean 'round_f'? [-Wimplicit-function-declaration] 18 | y=roundf_(y); | ^~~~~~~ | round_f
s290051549
p00004
C
#include <stdio.h> #include <math.h> double round_d(double x) { if ( x >= 0.0 ) { return floor(x + 0.5); } else { return -1.0 * floor(fabs(x) + 0.5); } } #include <stdio.h> #include <math.h> double round_d(double x) { if ( x >= 0.0 ) { return floor(x + 0.5); } else { ...
main.c:15:8: error: redefinition of 'round_d' 15 | double round_d(double x) { | ^~~~~~~ main.c:4:8: note: previous definition of 'round_d' with type 'double(double)' 4 | double round_d(double x) { | ^~~~~~~
s050832046
p00004
C
#include <stdio.h> #include <math.h> double round_d(double x) { if ( x >= 0.0 ) { return floor(x + 0.5); } else { return -1.0 * floor(fabs(x) + 0.5); } } int main(){ double num1[10000],num2[10000],num3[10000],num4[10000],num5[10000],num6[10000],x=0.0,y=0.0; while(scanf("%lf %lf %lf %lf %lf...
main.c: In function 'main': main.c:14:45: error: 'i' undeclared (first use in this function) 14 | while(scanf("%lf %lf %lf %lf %lf %lf",&num1[i],&num2[i],&num3[i],&num4[i],&num5[i],&num6[i])!=EOF){ | ^ main.c:14:45: note: each undeclared identifier is reported only o...
s003459638
p00004
C
#include <stdio.h> #include <math.h> double round_d(double x) { if ( x >= 0.0 ) { return floor(x + 0.5); } else { return -1.0 * floor(fabs(x) + 0.5); } } int main(){ double num1,num2,num3,num4,num5,num6,x=0.0,y=0.0; while(scanf("%lf %lf %lf %lf %lf %lf",&num1,&num2,&num3,&num4,&num5,&num6)...
main.c: In function 'main': main.c:26:1: error: expected '}' before 'else' 26 | else{break;} | ^~~~ main.c: At top level: main.c:30:1: error: expected identifier or '(' before 'return' 30 | return 0; | ^~~~~~ main.c:31:1: error: expected identifier or '(' before '}' token 31 | } | ^
s308696349
p00004
C
#include <stdio.h> int main(void) { double a, b, c, d, e, f; double x, y; while(scanf(buff,("%lf %lf %lf %lf %lf %lf"), &a, &b, &c, &d, &e, &f) != 6){ x = (c*e - f*b) / (a*e - b*d); y = (c*d - f*a) / (b*d - a*e); printf("%.3f %.3f\n",x ,y); } return 0; }
main.c: In function 'main': main.c:7:21: error: 'buff' undeclared (first use in this function) 7 | while(scanf(buff,("%lf %lf %lf %lf %lf %lf"), &a, &b, &c, &d, &e, &f) != 6){ | ^~~~ main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in...
s729536932
p00004
C
#include <stdio.h> int main(void) { double a, b, c, d, e, f; double x, y; while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) == 6) { if( a < -1000 || a > 1000 || b < -1000 || b > 1000 || c < -1000 || d > 1000 || d < -1000 || d > 1000 |...
main.c:23:5: error: expected identifier or '(' before 'return' 23 | return 0; | ^~~~~~ main.c:24:1: error: expected identifier or '(' before '}' token 24 | } | ^
s770257613
p00004
C
#include <stdio.h> int main(void) { double a, b, c, d, e, f; double x, y; while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) == 6) { x = (c*e - f*b) / (a*e - b*d); y = (c*d - f*a) / (b*d - a*e); printf("%.3f %.3f\n",x ,y); } } return 0; }
main.c:13:5: error: expected identifier or '(' before 'return' 13 | return 0; | ^~~~~~ main.c:14:1: error: expected identifier or '(' before '}' token 14 | } | ^
s507643540
p00004
C
#include<stdio.h> int det(int a00, int a01, int a10, int a11) { return a00*a11 - a01*a10; } int main() { int a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f) { int t = det(a, b, d, e); printf("%.3f %.3f\n", (double)det(c, b, f, e) / t, (double)det(a, c, d, f) / t); } return 0; }
main.c: In function 'main': main.c:11:16: error: 'cin' undeclared (first use in this function) 11 | while (cin >> a >> b >> c >> d >> e >> f) | ^~~ main.c:11:16: note: each undeclared identifier is reported only once for each function it appears in
s722565038
p00004
C
#include<stdio.h> int main(void){ int a,b,c,d,e,f; int num1=0,num2=0; int x=0,y=0; while (scanf("%lf %lf %lf %lf %lf %lf", &ax, &by, &c, &dx, &ey, &f) != EOF) { y = (c * dx - ax * f) / (by * dx - ax * ey); x = (c - by * y) / ax; printf("%.3lf %.3lf\n", x, y); } return 0; }
main.c: In function 'main': main.c:9:51: error: 'ax' undeclared (first use in this function); did you mean 'x'? 9 | while (scanf("%lf %lf %lf %lf %lf %lf", &ax, &by, &c, &dx, &ey, &f) != EOF) { | ^~ | ...
s099566501
p00004
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(void) { int a,b,c,d,e,f; double x,y,det; while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF){ det=(double)(a*e-b*ds); x=(double)(c*e-b*f)/det; y=(double)(-d*c+a*f)/det; printf("%.3lf %.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:10:24: error: 'ds' undeclared (first use in this function); did you mean 'd'? 10 | det=(double)(a*e-b*ds); | ^~ | d main.c:10:24: note: each undeclared identifier is reported only once for each function it appears in
s666333632
p00004
C
#include<stdio.h> int main(void) { double a,b,c,d,e,f,x,y; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF) { x = ((c*e)-(b*f))/((a*e)-(b*d)); y = (c-a*x)/b; if(x == -0.0) x = 0; if(y == -0.0) y = 0; printf("%.3lf %.3lf\n",x,y); } return 0...
main.c: In function 'main': main.c:15:5: error: expected declaration or statement at end of input 15 | return 0; | ^~~~~~
s392770034
p00004
C
#include<stdio.h> int main(void){ double a,b,c,d,e,f,g,x,y; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){ y=(f-c*d/a)/(e-b*d/a); x=(f-c*e/b)/(d-a*e/b); if(-0.0004<x&&x<=0)x=0; if(-0.0004<y&&y<=0)y=0; printf("%.3f %.3f\n",x,y); } return...
main.c: In function 'main': main.c:17:5: error: expected declaration or statement at end of input 17 | return 0; | ^~~~~~
s159612838
p00004
C
include <stdio.h> #include <stdlib.h> #include <string.h> #define DBG 0 #define BUFSIZE 40 static short h[6]; // return 0 : EOF // 1 : read success int getSimEq() { char buf[BUFSIZE] = {0}; char *p; int i, j; if (NULL == fgets(buf, BUFSIZE, stdin)) { if (DBG) { fprintf (stderr, "EOF\n"); ...
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...
s094860594
p00004
C
#include <stdio.h> int main(void) { int a, b, c, d, e, f; while(scanf("%d %d %d %d %d %d"), &a, &b, &c, &d, &e, &f) == 6) { printf("%5.3f %5.3f\n", (c*e-b*f)/(a*e-b*d)+0.0005, (d*a-c*b)/(a*e-d*b)+0.0005); } return 0; }
main.c: In function 'main': main.c:5:67: error: expected expression before '==' token 5 | while(scanf("%d %d %d %d %d %d"), &a, &b, &c, &d, &e, &f) == 6) { | ^~ main.c:5:71: error: expected statement before ')' token 5 | whi...
s074954683
p00004
C
#include <stdio.h> #include <math.h> int main(void) { int A1, B1, E1, A2, B2, E2; double x, y; while(scanf("%d %d %d %d %d %d", &A1, &B1, &E1, &A2, &B2, &E2) == 6) { x = round(1.0*(E1*B2-B1*E2)/(A1*B2-B1*A2), 3); y = round(1.0*(E2*A1-E1*A2)/(A1*B2-A2*B1), 3); printf("%.3f %3f", x, y); } return 0; } do...
main.c: In function 'main': main.c:8:21: error: too many arguments to function 'round' 8 | x = round(1.0*(E1*B2-B1*E2)/(A1*B2-B1*A2), 3); | ^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:...
s199734089
p00004
C
#include <stdio.h> int main (void) { double a[6],b; int i,c[2]; for(i=0;i<6;i++){ scanf("%lf",&a[i]); } if(a[0]==0) { b=a[3]; a[3]=a[0]; a[0]=b; } b=a[0]; a[0]/=b a[1]/=b; a[2]/=b; // b=a[3]; a[3]-=a[0]*b; a[4]-=a[1]*b; a[5]...
main.c: In function 'main': main.c:16:12: error: expected ';' before 'a' 16 | a[0]/=b | ^ | ; 17 | a[1]/=b; | ~
s341975355
p00004
C
#include <stdio.h> int main(void){ int a, b, c, d, e, f, t; unsigned double x, y; while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF){ t = 1.0*a*e - 1.0*b*d; x = (1.0*e*c - 1.0*b*f)/t + 0.0001; y = (1.0*a*f - 1.0*d*c)/t + 0.0001; printf("%.3f %.3f\n", x, y); } return 0; }
main.c: In function 'main': main.c:5:18: error: both 'unsigned' and 'double' in declaration specifiers 5 | unsigned double x, y; | ^~~~~~
s861100533
p00004
C
#include <stdio.h> int func(int a ,int b,int c,int d,int e,int f){ return (c*e-b*f)/(a*e-b*d); } int main(int argc, const char * argv[]) { double ax, by, c, dx, ey, f; double x, y; while (scanf("%lf %lf %lf %lf %lf %lf", &ax, &by, &c, &dx, &ey, &f) != EOF) { x=func(a,b,c,d,e,f); y=((...
main.c: In function 'main': main.c:14:16: error: 'a' undeclared (first use in this function) 14 | x=func(a,b,c,d,e,f); | ^ main.c:14:16: note: each undeclared identifier is reported only once for each function it appears in main.c:14:18: error: 'b' undeclared (first use in this function)...
s639775772
p00004
C
#include <stdio.h> int func(int a ,int b,int c,int d,int e,int f){ return (c*e-b*f)/(a*e-b*d); } int main(void){/* double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){ x=func(a,b,c,d,e,f); y=((c-(a*x))/b); x = (double)((long)(x * 1000)) / 1000; y = (double)((long)(y *...
main.c: In function 'main': main.c:7:16: error: unterminated comment 7 | int main(void){/* | ^ main.c:7:1: error: expected declaration or statement at end of input 7 | int main(void){/* | ^~~
s234827860
p00004
C
#include <stdio.h> int func(int a ,int b,int c,int d,int e,int f){ return (c*e-b*f)/(a*e-b*d); } int main(void){/* double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){ x=func(a,b,c,d,e,f); y=((c-(a*x))/b); x = ((long)(x * 1000)) / 1000; y = ((long)(y * 1000)) / 1000; ...
main.c: In function 'main': main.c:7:16: error: unterminated comment 7 | int main(void){/* | ^ main.c:7:1: error: expected declaration or statement at end of input 7 | int main(void){/* | ^~~
s642864555
p00004
C
int main(void){ double a,b,c,d,e,f,x,y; while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) != EOF){ y=(c*d-a*f)/(b*d-a*e)+0.00001; x=(c-b*y)/a+0.00001; printf("%.3lf %.3lf\n",x,y); } return 0; }
main.c: In function 'main': main.c:3:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#i...
s352852622
p00004
C
#include <stdio.h> int func(double a ,double b,double c,double d,double e,double f){ int y; y=(c*d-a*f)/(b*d-a*e)+0.00001 return y; } int main(void){ double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){ y=func(a,b,c,d,e,f); x=(c-b*y)/a+0.00001; printf("%.3lf %.3lf\n",x,...
main.c: In function 'func': main.c:5:38: error: expected ';' before 'return' 5 | y=(c*d-a*f)/(b*d-a*e)+0.00001 | ^ | ; 6 | return y; | ~~~~~~
s713232986
p00004
C
#include <stdio.h> void func(double a ,double b,double c,double d,double e,double f,double* x,double* y){ *y=(c*d-a*f)/(b*d-a*e)+0.00001; *x=(c-b*(*y))/a+0.00001; } int main(void){ double a,b,c,d,e,f; double* x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){ //y=func(a,b,c,d,e,f); //x=(c...
main.c: In function 'main': main.c:14:43: error: invalid type argument of unary '*' (have 'double') 14 | printf("%.3lf %.3lf\n",*x,*y); | ^~
s585426359
p00004
C
#include <stdio.h> double func(double a ,double b,double c,double d,double e,double f){ return (c*d-a*f)/(b*d-a*e); } int main(void){ double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){ y=func(a,b,c,d,e,f); x=(c-b*y)/a; //func(a,b,c,d,e,f,x,y); printf("%.3lf %.3lf\n",*...
main.c: In function 'main': main.c:13:40: error: invalid type argument of unary '*' (have 'double') 13 | printf("%.3lf %.3lf\n",*x,*y); | ^~ main.c:13:43: error: invalid type argument of unary '*' (have 'double') 13 | printf("%.3lf %.3lf...
s148108360
p00004
C
#include <stdio.h> int main(int argc, const char * argv[]) { double a, b, c, d, e, f; double x, y; while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != -1) { if (-1000 > a || a < 1000 || -1000 > b || b < 1000 || -1000 > c || c < 1000 || -1000 > d || d < 1000 || -1000 > e || e < 1000 |...
main.c: In function 'main': main.c:8:138: error: expected expression before '||' token 8 | if (-1000 > a || a < 1000 || -1000 > b || b < 1000 || -1000 > c || c < 1000 || -1000 > d || d < 1000 || -1000 > e || e < 1000 || ||-1000 > f || f < 1000) { | ...
s771967946
p00004
C++
#include<iostream> #include<cmath> #include<string> int main(int, char**) { double a, b, c, d, e, f = 0; while (std::cin >> a >> b >> c >> d >> e >> f) { double y = (c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e)); printf_s("%.3f %.3f\n", ((c - f) - (b - e) * y) / (a - d), y); } }
a.cc: In function 'int main(int, char**)': a.cc:11:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 11 | printf_s("%.3f %.3f\n", ((c - f) - (b - e) * y) / (a - d), y); | ^~~~~~~~ | printf
s088769076
p00004
C++
#include<iostream> #include<cmath> #include<string> int main(int, char**) { double a, b, c, d, e, f = 0; while (std::cin >> a >> b >> c >> d >> e >> f) { double y = (c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e)); printf_s("%.3f %.3f\n", ((c - f) - (b - e) * y) / (a - d), y); } }
a.cc: In function 'int main(int, char**)': a.cc:11:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 11 | printf_s("%.3f %.3f\n", ((c - f) - (b - e) * y) / (a - d), y); | ^~~~~~~~ | printf
s509253494
p00004
C++
#include<iostream> int main(int, char**) { double a, b, c, d, e, f = 0; while (std::cin >> a >> b >> c >> d >> e >> f) { double y = std::roundl((c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e)) * 1000.0) / 1000.0; double x = std::roundl(((c - f) - (b - e) * y) / (a - d) * 1000.0) / 1000.0; printf("%.3...
a.cc: In function 'int main(int, char**)': a.cc:8:33: error: 'roundl' is not a member of 'std' 8 | double y = std::roundl((c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e)) * 1000.0) / 1000.0; | ^~~~~~ a.cc:9:33: error: 'roundl' is not a member of 'std' ...
s190980864
p00004
C++
#include<cmath #include<iostream> int main(int, char**) { double a, b, c, d, e, f = 0; while (std::cin >> a >> b >> c >> d >> e >> f) { double y = std::roundl((c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e)) * 1000.0) / 1000.0; double x = std::roundl(((c - f) - (b - e) * y) / (a - d) * 1000.0) / 1000.0...
a.cc:1:15: error: missing terminating > character 1 | #include<cmath | ^
s658367747
p00004
C++
using System; // ガウス・ジョルダン法 // https://www.mk-mode.com/blog/2013/09/20/cpp-simultaneous-equation-by-gauss-jorden/# namespace Prob0004 { class Program { static void Main(string[] args) { const int COLUMN = 2; const int ROW = 3; string line; whil...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | stat...
s819337258
p00004
C++
#include<iostream> #include<iomanip> using namespace std; int main() { double x, y; double a, b, c, d, e, f; int J = 1; while (J){ J = cin >> a >> b >> c >> d >> e >> f; if ( J == 0) break; y = ((d * c) - (a * f)) / ((b * d) - (e * a)); x = (c...
a.cc: In function 'int main()': a.cc:13:50: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' in assignment 13 | J = cin >> a >> b >> c >> d >> e >> f; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ | ...
s915775773
p00004
C++
#include<iostream> #include<iomanip> using namespace std; int main() { double x, y; double a, b, c, d, e, f; int J = 1; while (J){ J = (int)(cin >> a >> b >> c >> d >> e >> f); if (J == 0) break; y = ((d * c) - (a * f)) / ((b * d) - (e * a)); x = (c - b * y) / a; x *= 10000; x = x + 0.5 - (x < ...
a.cc: In function 'int main()': a.cc:13:21: error: invalid cast from type 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to type 'int' 13 | J = (int)(cin >> a >> b >> c >> d >> e >> f); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s273797082
p00004
C++
#include <iostream> #include <iomanip> #include <cstdio> using namespace std; int main() { int a, b, c, d, e, f; cout << showpoint << setprecision(3); while (cin >> a >> b >> c >> d >> e >> f){ double x = ((double)(b*f - c*e)) / (double)(b*d - a*e); double y = ((double)(c*d - a*f)) / (doub...
a.cc: In function 'int main()': a.cc:13:34: error: expected ';' before '}' token 13 | printf(".3f .3f", &x, &y) | ^ | ; 14 | } | ~
s882238251
p00004
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int a, b, c, d, e, f; cout << showpoint << setprecision(3); while (cin >> a >> b >> c >> d >> e >> f){ double x = ((double)(b*f - c*e)) / (double)(b*d - a*e); double y = ((double)(c*d - a*f)) / (double)(b*d - a*e); //cout << x << ' ' << y...
a.cc: In function 'int main()': a.cc:8:30: error: 'setprecision' was not declared in this scope 8 | cout << showpoint << setprecision(3); | ^~~~~~~~~~~~ a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <ioma...
s732201011
p00004
C++
#include<cstdio> int main(void) { int a,b,c,d,e,f; double x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f))!=EOF) { y=(a*f-d*c)/(-(d*b)+a*e); x=(c-b*y)/a; printf("%.3lf %.3lf\n",x,y); } return 0; } /* ax=c-by ->x=(c-by)/a d((c-by)/a)+ey=f (dc-dby)/a+ey=f (dc-dby)+aey=af -dby+aey=af-dc y(-db+ae)=af-dc...
a.cc: In function 'int main()': a.cc:6:60: error: expected primary-expression before '!=' token 6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f))!=EOF) | ^~
s126360129
p00004
C++
#include <iostream> #include <cstdio> #ifndef repeat #define repeat(i,n) for (int i = 0; i < (n); ++i) #endif #ifndef repeat_from #define repeat_from(i,m,n) for (int i = (m); i < (n); ++i) #endif #ifndef repeat_one #define repeat_one(i,n) for (int i = 1; i <= (n); ++i) #endif #ifndef repeat_rev #define repeat_rev(i,n) ...
a.cc: In function 'std::vector<double> gaussian_elim(std::vector<std::vector<double> >)': a.cc:69:13: error: 'assert' was not declared in this scope 69 | assert (pivot != -1); | ^~~~~~ a.cc:20:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#inclu...
s415730743
p00004
C++
using namespace std; int main(void){ int a,b,c,d,e,f; double x,y; while( cin>>a >>b >>c >>d >>e >>f){ x =(double) (e*c-b*f)/(a*e-b*d); y =(double) (a*f-d*c)/(a*e-b*d); if(x==0) x=0; if(y==0) y=0; printf("%.3f %.3f\n",x,y); } }
a.cc: In function 'int main()': a.cc:6:11: error: 'cin' was not declared in this scope 6 | while( cin>>a >>b >>c >>d >>e >>f){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using nam...
s351891037
p00004
C++
import sys for line in sys.stdin: a, b, c, d, e, f = map(float, line.split()) x = (c * e - b * f)/(a * e - b * d) y = (a * f - c * d)/(a * e - b * d) print '%f %f' % (x, y)
a.cc:8:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 8 | print '%f %f' % (x, y) | ^~~~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s354926497
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main(){ double a, b, c, d, e, f, x, y; while( cin >> a >> b >> c >> d >> e >> f ){ x = (c*e - b*f) / (a*e - b*d); y = (c*d - a*f) / (b*d - a*e); if( fabs(x) < 0.0005 ) x = 0.0; if( fabs(y) < 0.0005 ) y = 0.0; cout << fixed << std::setprecision...
a.cc: In function 'int main()': a.cc:10:21: error: 'fabs' was not declared in this scope; did you mean 'labs'? 10 | if( fabs(x) < 0.0005 ) x = 0.0; | ^~~~ | labs a.cc:11:21: error: 'fabs' was not declared in this scope; did you mean 'labs'? 11 | ...
s492779244
p00004
C++
#include<queue> #include<stack> #include<cstdio> using namespace std; double a,b,c,d,e,f,x,y; int main(){ while(cin>>a>>b>>c>>d>>e>>f){ x=(c*e-f*b)/(a*e-d*b); y=(c-a*x)/b; printf("%.3f %.3f\n",x+(1e-10),y+(1e-10)); } return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: 'cin' was not declared in this scope 7 | while(cin>>a>>b>>c>>d>>e>>f){ | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include<cstdio> +++ |+#include ...
s338667327
p00004
C++
#include <iostream> using namespace std; int main(){ float a,b,c,d,e,f; float x,y; while(cin >> >> a >> b >> c >> d >> e >> f){ y = (c*d-a*f) / (b*d-a*e); x = (c - b*y) /a; printf("%.3f %.3f\n",x,y); } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: expected primary-expression before '>>' token 7 | while(cin >> >> a >> b >> c >> d >> e >> f){ | ^~
s066815990
p00004
C++
#include<iostream> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<vector> #include<cmath> #include<cstdio> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define mp make_pair #define it ::iterator #define all(in) in.begin(),in.end...
a.cc: In function 'int main()': a.cc:26:3: error: expected primary-expression before '}' token 26 | } | ^ a.cc:25:31: error: expected ')' before '}' token 25 | printf("%.3f %.3f\n",x,y); | ^ | ) 26 | } | ~ ...
s895257228
p00004
C++
module Input def numread() s = gets().split() p = Array.new() for i in 0...s.size() p[i] = s[i].to_i() end return p end module_function:numread end include Input loop{ if(STDIN.eof()) break end w = numread() x = (w[2] * w[4] - w[1] * w[5]).to_f / (w[0] * w[4] - w[1] * w[3]) y = (w[2] * w[3] -...
a.cc:5:26: error: too many decimal points in number 5 | for i in 0...s.size() | ^~~~~~~~~~ a.cc:1:1: error: 'module' does not name a type 1 | module Input | ^~~~~~ a.cc:1:1: note: C++20 'module' only available with '-fmodules-ts'
s504962544
p00004
C++
#include <stdio.h> #include <math.h> int main(){ double a,b,c,e,f,y,x; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ y=((c*e)-(a*f))/((b*d)-(a*e)); x=(c*e)-(b*f)/((a*e)-(b*d)); printf("%.3lf %.3lf\n", x,y); } return 0; }
a.cc: In function 'int main()': a.cc:5:44: error: 'd' was not declared in this scope 5 | while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ | ^
s478082847
p00004
C++
#include <stdio.h> #include <math.h> int main(){ double a,b,c,d,e,f,y[10000],x[10000]; int i=0,n; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ y[i]=((c*d)-(a*f))/((b*d)-(a*e)); x[i]=((c*e)-(b*f))/((a*e)-(b*d)); i++; } n=i; for(i=0;i < n; i++){ if(x == 0){x = 0;} if(y == 0){y = 0;} prin...
a.cc: In function 'int main()': a.cc:13:16: error: incompatible types in assignment of 'int' to 'double [10000]' 13 | if(x == 0){x = 0;} | ~~^~~ a.cc:14:16: error: incompatible types in assignment of 'int' to 'double [10000]' 14 | if(y == 0){y = 0;} | ~~^~~
s700170436
p00004
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double a,b,c,d,e,f,y[10000],x[10000]; int i=0,n; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ y[i]=((c*d)-(a*f))/((b*d)-(a*e)); x[i]=((c*e)-(b*f))/((a*e)-(b*d)); i++; } n=i; for(i=0;i < n; i++){ if(x == 0){x = 0;} if(y...
a.cc: In function 'int main()': a.cc:14:16: error: incompatible types in assignment of 'int' to 'double [10000]' 14 | if(x == 0){x = 0;} | ~~^~~ a.cc:15:16: error: incompatible types in assignment of 'int' to 'double [10000]' 15 | if(y == 0){y = 0;} | ~~^~~
s868967948
p00004
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double a,b,c,d,e,f,y[1000],x[1000]; int i=0,n; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ y[i]=((c*d)-(a*f))/((b*d)-(a*e)); x[i]=((c*e)-(b*f))/((a*e)-(b*d)); i++; } n=i; for(i=0;i < n; i++){ if(x == 0){x = 0;} if(y =...
a.cc: In function 'int main()': a.cc:14:16: error: incompatible types in assignment of 'int' to 'double [1000]' 14 | if(x == 0){x = 0;} | ~~^~~ a.cc:15:16: error: incompatible types in assignment of 'int' to 'double [1000]' 15 | if(y == 0){y = 0;} | ~~^~~
s492290961
p00004
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double a,b,c,d,e,f,y,x; int i=0,n; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ y=((c*d)-(a*f))/((b*d)-(a*e)); x=((c*e)-(b*f))/((a*e)-(b*d)); if(x == 0){x = 0;} if(y == 0){y = 0;} printf("%.3lf %.3lf\n", x,y); } i++; }...
a.cc:16:3: error: expected unqualified-id before 'return' 16 | return 0; | ^~~~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s486214465
p00004
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double a,b,c,d,e,f,y,x; int i=0,n; while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){ y=((c*d)-(a*f))/((b*d)-(a*e)); x=((c*e)-(b*f))/((a*e)-(b*d)); if(x == 0){x = 0;} if(y == 0){y = 0;} printf("%.3lf %.3lf\n", x,y); } i++; }...
a.cc:16:3: error: expected unqualified-id before 'return' 16 | return 0; | ^~~~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s415741036
p00004
C++
#include <iostream> #include <cstdio> #include <vector> int main() { std::vector<int> x, y; int a, b, c, d, p, q; while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF) { x.push_back(d*p - b*q / (a*d - b*c)); y.push_back(p*c - a*q / (b*c - a*d)); } for (int i = 0; i < x.size(); ++i) std::cou...
a.cc: In function 'int main()': a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF) | ^~~~~~~ | scanf
s770342694
p00004
C++
#include <iostream> #include <cstdio> #include <vector> int main() { std::vector<int> x, y; int a, b, c, d, p, q; while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF) { x.push_back(d*p - b*q / (a*d - b*c)); y.push_back(p*c - a*q / (b*c - a*d)); } for (int i = 0; i < x.size(); ++i) std::cou...
a.cc: In function 'int main()': a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF) | ^~~~~~~ | scanf
s703285238
p00004
C++
include <stdio.h> int main() { double a, b, c, d, e, f; double x, y; while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) { x = (c*e-b*f)/(a*e-b*d); y = (a*f-c*d)/(a*e-b*d); printf("%.3lf %.3lf\n", x, y); } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <stdio.h> | ^~~~~~~
s153745130
p00004
C++
package task0004; import java.util.Scanner; public class Main { void run() { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { double a = sc.nextInt(); double b = sc.nextInt(); double c = sc.nextInt(); double d = sc.nextInt(); double e = sc.nextInt(); double f = sc.nextInt(); //...
a.cc:1:1: error: 'package' does not name a type 1 | package task0004; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 | pub...
s888780805
p00004
C++
#include<iostream> #include<iomanip> using namespace std; int main(){ double a11,a12,c,a21,a22,f; while(cin>>a11>>a12>>c>>a21>>a22>>f){ double x,y,delta=((double)a11*a22-(double)a12*a21); x=((double)a22*c-(double)a12*f)/delta; y=((double)a11*f-(double)c*a21)/delta; if(x>0){x=(double)(((int)((x*1000)+0.5))/10...
a.cc: In function 'int main()': a.cc:12:25: error: expected '(' before '{' token 12 | }else if{x=(double)(((int)((x*1000)-0.5))/1000);}else{x=0;} | ^ | ( a.cc:12:66: error: 'else' without a previous 'if' 12 | }else if{x=(d...
s185030721
p00004
C++
#include<stdio.h> int main(){ double a,b,c,d,e,f,x,y,dd; y=0;x=0; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ dd=e*a-b*d; if(dd!=0;){ y=(d*c-a*f)/(b*d-a*e); x=(e*c-b*f)/(e*a-b*d); x=(x==fabs(x))?fabs(x):x; y=(y==fabs(y))?fabs(y):y; printf("%.3f %.3f\n",x,y); } } return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: expected primary-expression before ')' token 8 | if(dd!=0;){ | ^ a.cc:11:7: error: 'fabs' was not declared in this scope 11 | x=(x==fabs(x))?fabs(x):x; | ^~~~
s789643354
p00004
C++
import java.text.DecimalFormat; import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); double a = Double.parseDouble(scan.next()); double b = Double.parseDouble(scan.next()); double c = Double.parseDouble(scan.next()); double d = Double.parseDouble(sc...
a.cc:1:1: error: 'import' does not name a type 1 | import java.text.DecimalFormat; | ^~~~~~ 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.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmo...
s963301811
p00004
C++
#include <cstdio> using namespace std; int main() { double a, b, c, d, e, f; double x, y; while (scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF) { y = (c*d-f*a) / (b*d-e*a); if (isnan(y)) y=0; x = (c-b*y) / a; if (isnan(x)) x=0; printf("%.3f %.3f\n", x, y); }...
a.cc: In function 'int main()': a.cc:10:13: error: 'isnan' was not declared in this scope 10 | if (isnan(y)) y=0; | ^~~~~ a.cc:12:13: error: 'isnan' was not declared in this scope 12 | if (isnan(x)) x=0; | ^~~~~
s258550098
p00004
C++
int main(void){ double a,b,c,d,e,f,i,j,x,y; while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { i=(c*e-f*b)/(a*e-d*b); j=(c*d-f*a)/(b*d-e*a); x=i+0.0005; y=j+0.0005; printf("%.3f %.3f\n",x,y); return 0; }
a.cc: In function 'int main()': a.cc:3:8: error: 'scanf' was not declared in this scope 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ^~~~~ a.cc:3:56: error: 'EOF' was not declared in this scope 3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) { | ...
s463679628
p00004
C++
#include<iostream> #include<cstdio> using namespace std; double A,B,C,D,E,F; int main() { while(cin >> A >> B >> C >> D >> E >> F){ printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e)); } return 0; }
a.cc: In function 'int main()': a.cc:8:25: error: 'c' was not declared in this scope 8 | printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e)); | ^ a.cc:8:27: error: 'e' was not declared in this scope 8 | printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e)); ...
s610060839
p00004
C++
#include <iostream> #include <iomanip> using namespace std; float a,b,c,d,e,f; float findoutx,findouty; float x,y,yadd; float Timers1,Timers2; int main() { while((cin >> a >> b >> c >> d >> e >> f)!=EOF) { Timers1 = a; Timers2 = d; a=a*Timers2; b=b*Timers2; c=c*Timers2; d=d*Timers1; ...
a.cc: In function 'int main()': a.cc:11:46: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 11 | while((cin >> a >> b >> c >> d >> e >> f)!=EOF) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ | ...
s904344991
p00004
C++
#include <iostream> #include <iomanip> #include <algorithm> using namespace std; float a,b,c,d,e,f; float findoutx,findouty; float x,y,yadd; float Timers1,Timers2; int main() { while((cin >> a >> b >> c >> d >> e >> f)!=EOF) { Timers1 = a; Timers2 = d; a=a*Timers2; b=b*Timers2; c=c*Timers2; ...
a.cc: In function 'int main()': a.cc:11:46: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 11 | while((cin >> a >> b >> c >> d >> e >> f)!=EOF) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ | ...
s204554495
p00004
C++
#include <iostream> #include <array> #include <vector> #include <cmath> #include <iomanip> using namespace std; //?????¨?????\ double round_four(double value){ value *= 1000; value += (value / fabs(value)) * 0.5; int nValue = static_cast<int>(value); value = static_cast<double>(nValue) / 1000; ret...
a.cc:11:5: error: 'value' does not name a type 11 | value *= 1000; | ^~~~~ a.cc:12:5: error: 'value' does not name a type 12 | value += (value / fabs(value)) * 0.5; | ^~~~~ a.cc:13:35: error: 'value' was not declared in this scope; did you mean 'nValue'? 13 | int nValue = static...
s130817449
p00004
C++
#include <iostream> #include <cstdio> #define N 2 using namespace std; class Calc{ public: double A[N][N+1]; int i, j, k; void calcSi(); void printSi(); } void Calc::calcSi(){ for(i=0;i<N-1;i++){ for(j=i+1;j<N;j++){ int tmp = A[j][i] / A[i][i]; for(k=i+1; k<=N;...
a.cc:13:2: error: expected ';' after class definition 13 | } | ^ | ; a.cc: In member function 'void Calc::calcSi()': a.cc:25:9: error: 'tmp' was not declared in this scope; did you mean 'tm'? 25 | tmp = A[i][N]; | ^~~ | tm a.cc: In function 'int main()': a.cc:45:1...
s930165571
p00004
C++
#include <iostream> #include <cstdio> #define N 2 using namespace std; class Calc{ private: double A[N][N+1]; int i, j, k; double tmp; public: void setNum(double**); void calcSi(); void printSi(); }; void Calc::setNum(double** A){ for(i=0;i<N;i++){ for(j=0;j<N+1;j++){ ...
a.cc: In function 'int main()': a.cc:56:18: error: cannot convert 'double [2][3]' to 'double**' 56 | c.setNum(A); | ^ | | | double [2][3] a.cc:17:28: note: initializing argument 1 of 'void Calc::setNum(double**)' 17 | void Calc::setNum...
s572929741
p00004
C++
require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(z){i=z.split(' ');console.log(x=((i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])).toFixed(3),((i[2]-i[0]*x)/i[1]).toFixed(3))})
a.cc:1:8: error: expected constructor, destructor, or type conversion before '(' token 1 | require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(z){i=z.split(' ');console.log(x=((i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])).toFixed(3),((i[2]-i[0]*x)/i[1]).toFixed(3))}) | ^ a.cc...
s008927566
p00004
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ double a , b , c , d , e , f ,ans1 , ans2; while(cin>>a>>b>>c>>d>>e>>f){ ans1=(double)((c*e-b*f)/(a*e-b*d)); ans2=(double)((c*d-a*f)/(b*d-a*e)); if (x==0) x=0; if (y==0) y=0; printf("%.3f %.3f\n" , ans1 , ans2); } return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: 'x' was not declared in this scope 10 | if (x==0) x=0; | ^ a.cc:11:21: error: 'y' was not declared in this scope 11 | if (y==0) y=0; | ^
s813219757
p00004
C++
#include <math.h> #include <iostream> #include <ios> #include <iomanip> #include <algorithm> #include <functional> #include <string> #define YES "YES" #define NO "NO" #define space ' ' using namespace std; void func(); int main(void) { func(); return 0; } // using matrix ?????????????????´?????? void func() {...
a.cc: In function 'void func()': a.cc:38:17: error: 'else' without a previous 'if' 38 | else | ^~~~
s108665222
p00004
C++
#include <iostream> using namespace std; int main() { float a,b,c,d,e,f,x,y=0; while((cin >> a >> b >> c >> d >> e >> f)!=EOF){ x = (c*e - b*f)/(a*e - b*d); y = (c*d - a*f)/(b*d - a*e); printf("%.3f %.3f\n",x,y); } return 0; }
a.cc: In function 'int main()': a.cc:8:50: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 8 | while((cin >> a >> b >> c >> d >> e >> f)!=EOF){ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ | ...
s322446223
p00004
C++
#include<iostream> #include<cstdio> /* * Wrong Answer * 2015-06-26 02:00 */ int main(void) { int a. b. c. d. e. f; double x, y; while( std::cin >> a >> b >> c >> d >> e >> f ){ y = ( a * f - c * d ) / ( a * e - b * d ); x = ( c - b * y ) / a; printf("%.3f %.3f\n", x, y ); } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: expected initializer before '.' token 11 | int a. b. c. d. e. f; | ^ a.cc:14:28: error: 'a' was not declared in this scope 14 | while( std::cin >> a >> b >> c >> d >> e >> f ){ | ^ a.cc:14:33: er...
s929745264
p00004
C++
int main(){ float a,b,c,d,e,f,x,y; while(scanf("%f",&a)){ scanf("%f%f%f%f%f",&b,&c,&d,&e,&f); x=(c*e-b*f)/(a*e-b*d); y=(c*d-a*f)/(b*d-a*e); printf("%.3f %.3f",x,y); std::cout<<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:3:15: error: 'scanf' was not declared in this scope 3 | while(scanf("%f",&a)){ | ^~~~~ a.cc:7:9: error: 'printf' was not declared in this scope 7 | printf("%.3f %.3f",x,y); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in head...
s385285737
p00004
C++
#include<iostream> #include<iomanip> int main(){ float a, b, c, d, e, f; float x, y; while (std::cin >> a >> b >> c >> d >> e >> f){ if (a*d<0){ d = -d; e = -e; f = -f; } x = (c - b*(c - f*a / d) / (b - e*a / d)) / a; y = (c - f*a / d) / (b - e*a / d); if (x == 0)x = 0; if (y == 0)y = 0; x = ...
a.cc: In function 'int main()': a.cc:17:21: error: 'round' was not declared in this scope 17 | x = round(x); | ^~~~~
s117432345
p00004
C++
#include<iostream> #include<iomanip> #include <math.h> int main(){ float a, b, c, d, e, f; float x, y; while (std::cin >> a >> b >> c >> d >> e >> f){ if (a*d<0){ d = -d; e = -e; f = -f; } x = (c - b*(c - f*a / d) / (b - e*a / d)) / a; y = (c - f*a / d) / (b - e*a / d); if (x == 0)x = 0; if (y ...
a.cc: In function 'int main()': a.cc:18:22: error: no matching function for call to 'round(float&, int)' 18 | round(x, 4); | ~~~~~^~~~~~ In file included from /usr/include/c++/14/math.h:36, from a.cc:3: /usr/include/c++/14/cmath:2699:5: note: candidate: 'templat...
s954293414
p00004
C++
#include<iostream> #include<cstdio> using namespace std; int main() { double a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){ x = (c-b*(c*d-a*f)/(b*d-a*e))/a; y = (c*d-a*f)/(b*d-a*e); if(x == -0)x = 0; if(y == -0)y = 0; pirntf("%3f %3f",x,y); } }
a.cc: In function 'int main()': a.cc:12:5: error: 'pirntf' was not declared in this scope; did you mean 'printf'? 12 | pirntf("%3f %3f",x,y); | ^~~~~~ | printf
s112577034
p00004
C++
#include <iostream> #include <vector> #include <algorithm> #include <functional> #include <cassert> #include <iomanip> #define EPS (1e-6) void solveSimultaneousEquation(double a, double b, double c, double d, double e, double f, std::pair<double, double>* pResult) { assert(b * d - a ...
a.cc: In function 'void solveSimultaneousEquation(double, double, double, double, double, double, std::pair<double, double>*)': a.cc:19:7: error: 'fabs' was not declared in this scope; did you mean 'labs'? 19 | if (fabs(result.first) < EPS) { | ^~~~ | labs a.cc:22:7: error: 'fabs' was not d...
s138652878
p00004
C++
#include <cstdio> #include <iostream> using namespace std; int main(){ double x,y,a,b,c,d,e,f; while(){ cin>>a>>b>>c>>d>>e>>f; if(a=="\n") break; x=(c*e-f*b)/(a*e-d*b); y=(a*f-d*c)/(a*e-d*b); printf("%.3lf %.3lf\n",x,y); } return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: expected primary-expression before ')' token 8 | while(){ | ^ a.cc:10:7: error: invalid operands of types 'double' and 'const char [2]' to binary 'operator==' 10 | if(a=="\n") break; | ~^~~~~~ | | | | | const char...
s676539222
p00004
C++
#include <cstdio> #include <iostream> using namespace std; int main(){ double x,y,a,b,c,d,e,f; while(1){ cin>>a>>b>>c>>d>>e>>f; if(a=="\n") break; x=(c*e-f*b)/(a*e-d*b); y=(a*f-d*c)/(a*e-d*b); printf("%.3lf %.3lf\n",x,y); } return 0; }
a.cc: In function 'int main()': a.cc:10:7: error: invalid operands of types 'double' and 'const char [2]' to binary 'operator==' 10 | if(a=="\n") break; | ~^~~~~~ | | | | | const char [2] | double
s248216108
p00004
C++
#include<stdio.h> int main(void){ double a, b, c,d,e,f,x,y; while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){ y=(a*f-c)/(e-d*b); x=(f-e*y)/a; printf("%-3f %-3f", x, y); } return 0; }
a.cc:6:51: error: stray '\' in program 6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){ | ^ a.cc: In function 'int main()': a.cc:6:12: error: lvalue required as left operand of assignment 6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\...
s543178957
p00004
C++
from sympy import * a, b, c, d, e, f = map(int, raw_input().strip().split(' ')) x, y = symbols('x y') # ax + by = c # dx + ey = f res = solve((a*x+b*y - c , d*x+e*y - f), x, y) x = res[x] y = res[y] x = float(str(x)) y = float(str(y)) print "%.3f %.3f" % (x, y)
a.cc:5:16: warning: multi-character character constant [-Wmultichar] 5 | x, y = symbols('x y') | ^~~~~ a.cc:7:3: error: invalid preprocessing directive #ax 7 | # ax + by = c | ^~ a.cc:8:3: error: invalid preprocessing directive #dx 8 | # dx + ey = f | ^~ a.cc:1:1: error:...
s055132922
p00004
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <math.h> using namespace std; int main() { double A, B, C, D, E, F, X, Y, G , H; while(cin >> A >> B >> C >> D >> E >> F) { G = A / D; D *= G; E *= G; F *= G; Y = (F-C) / (E-B); D /= G; E /= G; F /= G; H = B / E; D *= H; E ...
a.cc: In function 'int main()': a.cc:29:29: error: expected ';' before '}' token 29 | if(X==0){X=0}; | ^ | ; a.cc:30:29: error: expected ';' before '}' token 30 | if(Y==0){Y=0}; | ...
s084990453
p00004
C++
#include <iostream> #include <cstdlib> using namespace std; struct vector2{ float x, y; vector2() : x(0), y(0){} vector2(float x, float y) : x(x), y(y){} }; struct sim_elem{ float a, b, c, d, e, f; sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){} sim_elem(float a, float b, float c, float d, float e, float f) :a...
a.cc: In function 'float placement4(float)': a.cc:43:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 43 | sprintf_s(ret, "%.3f", val); | ^~~~~~~~~ | sprintf
s421886151
p00004
C++
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; struct vector2{ float x, y; vector2() : x(0), y(0){} vector2(float x, float y) : x(x), y(y){} }; struct sim_elem{ float a, b, c, d, e, f; sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){} sim_elem(float a, float b, float c, float d, fl...
a.cc: In function 'float placement4(float)': a.cc:44:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 44 | sprintf_s(ret, "%.3f", val); | ^~~~~~~~~ | sprintf
s104334143
p00004
C++
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; struct vector2{ float x, y; vector2() : x(0), y(0){} vector2(float x, float y) : x(x), y(y){} }; struct sim_elem{ float a, b, c, d, e, f; sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){} sim_elem(float a, float b, float c, float d, fl...
a.cc: In function 'float placement4(float)': a.cc:44:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 44 | sprintf_s(ret, sizeof(ret), "%.3f", val); | ^~~~~~~~~ | sprintf
s090588006
p00004
C++
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; struct vector2{ float x, y; vector2() : x(0), y(0){} vector2(float x, float y) : x(x), y(y){} }; struct sim_elem{ float a, b, c, d, e, f; sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){} sim_elem(float a, float b, float c, float d, fl...
a.cc: In function 'float placement4(float)': a.cc:44:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 44 | sprintf_s(ret, sizeof(ret), "%.3f", val); | ^~~~~~~~~ | sprintf
s832140375
p00004
C++
#include <iostream> #include <cstdio> using namespace std; void solve(int a, int b, int c, int d, int e, int f) { double???y=(a*f-c*d)/(a*e-b*d);; double???x=(c-b*y)/a;; print("%.3f %.3f\n",x,y);; } int main() { int a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f) { solve(a,b,c,d,e,f); } return...
a.cc: In function 'void solve(int, int, int, int, int, int)': a.cc:7:15: error: expected unqualified-id before '?' token 7 | double???y=(a*f-c*d)/(a*e-b*d);; | ^ a.cc:8:15: error: expected unqualified-id before '?' token 8 | double???x=(c-b*y)/a;; | ^ a.cc...
s469402754
p00004
C++
import sys x = 0 y = 0 while True: try: a,b,c,d,e,f = map(float,raw_input().split()) if a == 0: y = c / b x = (f - e * c / b) / d elif b == 0: x = c / a y = (f - d * c / a) / e elif d == 0: y = f / e x = (c - a * f / e) / a elif e == 0: x = f / d y = (c - a...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s403918577
p00004
C++
#include <iostream> #include <iomanip> using namespace std; double delta(double o, double p, double q , double r, double s, double t) { //cout << "o=" << o << "s=" << s << "v=" << "r=" << "o*s-p*r=" << (o*s-p*r) << endl; // |o p ||x| |q| // |r s ||y| = |t| return (o*s-p*r);//a???o b???p c???q d???r e???s ...
a.cc: In function 'int main()': a.cc:46:135: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<' 46 | cout << fixed << setprecision(3) << (deltacfbe(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) , (deltaadcf(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) << endl; | ...
s043645527
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { double a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f){ cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d)) << "???" << (a*f-c*d)/((a*e-b*d)) << endl; } return 0;
a.cc: In function 'int main()': a.cc:16:18: error: expected '}' at end of input 16 | return 0; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s247294801
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { double a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f){ cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d)) << " " << (a*f-c*d)/((a*e-b*d)) << endl; } return 0;
a.cc: In function 'int main()': a.cc:16:18: error: expected '}' at end of input 16 | return 0; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s387619606
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { double a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f){ cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d)) << " " << ((a*f-c*d)/(a*e-b*d)) << endl; } return 0;
a.cc: In function 'int main()': a.cc:16:18: error: expected '}' at end of input 16 | return 0; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s107226466
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { double a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f){ cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d)) << " " << ((a*f-c*d)/(a*e-b*d)) << endl; } return 0;
a.cc: In function 'int main()': a.cc:16:14: error: expected '}' at end of input 16 | return 0; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s897740603
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main(void){ double a,b,c,d,e,f; //int X[2][2]={ {c,b}, {f,e} }; //int Y[2][2]={ {a,c}, {d,f} }; double x,y; double A,X,Y; while(cin>>a>>b>>c>>d>>e>>f){ A=a*e-b*d; X=c*e-b*f; Y=a*f-c*d; x=(1/A)*X; y=(1/A)*Y; cout << fixed << setprecision(...
a.cc: In function 'int main()': a.cc:17:66: error: expected ';' before '}' token 17 | cout << fixed << setprecision(3) << x << ' ' << y | ^ | ; 18 | ...
s060420043
p00004
C++
import numpy #while True: # try: # a,b,c,d,e,f = (int(i) for i in input().split()) # x,y = [numpy.dot(numpy.linalg.inv(numpy.array([[a,b],[d,e]])),numpy.array([c,f]))[0],numpy.dot(numpy.linalg.inv(numpy.array([[a,b],[d,e]])),numpy.array([c,f]))[1]] # print("{0:.3f} {1:.3f}".format(x,y)) # except...
a.cc:2:2: error: invalid preprocessing directive #while 2 | #while True: | ^~~~~ a.cc:3:5: error: invalid preprocessing directive #try 3 | # try: | ^~~ a.cc:4:9: error: invalid preprocessing directive #a 4 | # a,b,c,d,e,f = (int(i) for i in input().split()) | ^ a.cc:5:...
s527334263
p00004
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<sstream> #include<iomanip> using namespace std; int main() { double a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f) { double x = (c*e - b*f) / (a*e - b*d); double y = (c*d - a*f) / (b*d - a*e); if (x == 0)x = fabs(x)...
a.cc: In function 'int main()': a.cc:16:32: error: 'fabs' was not declared in this scope; did you mean 'labs'? 16 | if (x == 0)x = fabs(x); | ^~~~ | labs a.cc:17:32: error: 'fabs' was not declared in this scope; did you mean 'l...