submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s375265839 | p00004 | C | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
float si(float a) {
a *= 1000;
if (a > 0) {
a += 0.5;
}
else {
a -= 0.5;
}
a = int(a);
a /= 1000;
return a;
}
int main() {
float a, b, c, d, e, f;
while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) {
b *= d;
c *= d;
... | main.c: In function 'si':
main.c:13:13: error: expected expression before 'int'
13 | a = int(a);
| ^~~
|
s614038052 | p00004 | C | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
float si(float a) {
a *= 1000;
if (a > 0) {
a += 0.5;
}
else {
a -= 0.5;
}
a = int(a);
a /= 1000;
return a;
}
int main() {
float a, b, c, d, e, f;
while (~scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)) {
b *= d;
c *= d;
e *= a... | main.c: In function 'si':
main.c:13:13: error: expected expression before 'int'
13 | a = int(a);
| ^~~
|
s005247564 | p00004 | C | #include<stdio.h>
float s(float a) {
a *= 1000;
if (a > 0) {
a += 0.5;
}
else {
a -= 0.5;
}
a = int(a);
a /= 1000;
return a;
}
int main() {
float a, b, c, d, e, f;
while (~scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)) {
b *= d;
c *= d;
e *= a;
f *= a;
float x, y;
if (a != 0) {
y = (... | main.c: In function 's':
main.c:11:13: error: expected expression before 'int'
11 | a = int(a);
| ^~~
|
s409544286 | p00004 | C | #include<stdio.h>
#include<math.h>
rround(double x);
double det(double a,double b,double c,double d);
int main(){
double a,b,c,d,e,f;
while(scanf("\n%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
printf("%.3lf %.3lf\n",rround(1000*det(c,f,b,e)/det(a,d,b,e))/1000.0,rround(1000*det(a,d,c,f)/det(a,d,b,e))/1000.0);
... | main.c:3:1: warning: data definition has no type or storage class
3 | rround(double x);
| ^~~~~~
main.c:3:1: error: type defaults to 'int' in declaration of 'rround' [-Wimplicit-int]
main.c:18:8: error: conflicting types for 'rround'; have 'double(double)'
18 | double rround(double x){
| ^~~~~... |
s895807654 | p00004 | C | #include<stdio.h>
#include<math.h>
double rround(double x);
double det(double a,double b,double c,double d);
int main(){
double a,b,c,d,e,f;
while(scanf("\n%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
printf("%.3lf %.3lf\n",rround(1000*det(c,f,b,e)/det(a,d,b,e))/1000.0,rround(1000*det(a,d,c,f)/det(a,d,b,e))/100... | main.c: In function 'rround':
main.c:20:5: error: expected ';' before '}' token
20 | x=-x
| ^
| ;
21 | }
| ~
|
s343287229 | p00004 | C | #include <stdio.h>
int main()
{
int i=0,k;
double a[10],b[10],c[10],d[10],e[10],f[10],x[10],y[10];
while(scanf("%d %d %d %d %d %d",&a[i],&b[i],&c[i],&d[i],&e[i],&f[i])!=EOF)
{
i++; k++;
}
for(i=0;i<k;i++)
{
y[i] = (c[i]*d[i]-f[i]*a[i])-(b[i]*d[i]-e[i]*a[i]);
x[i] = (c[i]*e[i]-f[i]*b[i])-(a[i]*e[i]-d[i... | main.c: In function 'main':
main.c:17:42: error: expected ';' before '}' token
17 | printf("%d %d",x[i],y[i])
| ^
| ;
18 | }
| ~
|
s525761713 | p00004 | C | #include<stdio.h>
void calc_inverse_matrix(double mat[2][2], double inv_mat[2][2])
{
double det = mat[0][0]*mat[1][1] - mat[0][1]*mat[1][0];
inv_mat[0][0] = mat[1][1]/det;
inv_mat[0][1] = -mat[0][1]/det;
inv_mat[1][0] = -mat[1][0]/det;
inv_mat[1][1] = mat[0][0]/det;
}
int read_inputline(double ma... | main.c:20:48: error: unknown type name 'ans'
20 | void calc_ans(double mat[2][2], double vec[2], ans[2])
| ^~~
main.c: In function 'main':
main.c:34:9: error: implicit declaration of function 'calc_ans' [-Wimplicit-function-declaration]
34 | calc_ans(ma... |
s755687921 | p00004 | C | #include<stdio.h>
main()
double a,b,c,d,e,f,x,y;
while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
x=(b*f-c*e)/(a*e-b*d);
y=(a*f-c*d)/(b*d-a*e);
printf("%4.3f %4.3f",x,y);
}
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:4:5: error: expected declaration specifiers before 'while'
4 | while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
| ^~~~~
main.c:9:5: error: expected declaration spec... |
s221400633 | p00004 | C | #include <stdio.h>
int main(void){
double a,b,c,d,e,f,x,y;
while(EOF==scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) ){
y = (c-f*(a/d)) / (b-e*(a/d))
x = (c - b*y)/a
printf("%lf %lf\n", x, y);
}
return 0;
} | main.c: In function 'main':
main.c:7:34: error: expected ';' before 'x'
7 | y = (c-f*(a/d)) / (b-e*(a/d))
| ^
| ;
8 | x = (c - b*y)/a
| ~
|
s365732571 | p00004 | C | #include <cstdio>
int main(){
int a, b, c, d, e, f;
double x, y;
while(scanf("%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f) != EOF){
y = (double)(a * f - c * d) / (double)(a * e - b * d);
x = ((double)c - (double)b * y) / (double)a;
printf("%.3f %.3f\n", x, y);
}
return 0;
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s969011551 | p00004 | C | #include <stdio.h>
int gcd(int a, int b);
int main(void)
{
int a, b, c, d, e, f;
double x, y;
int g, l;
while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF){
g = gcd(a, d);
if (g < 0)g *= -1;
l = a / g * d;
b *= d * g;
e *= a * g;
c *= d * g;
f *= a * g;
printf("becflgad = %d,%d,%d,%d,%d... | main.c: In function 'main':
main.c:20:22: error: expected expression before '{' token
20 | if ( {
| ^
main.c:31:9: error: expected expression before '}' token
31 | }
| ^
|
s320351434 | p00004 | C | #include<stdio.h>
#include<stdlib.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 a,b,c,d,e,f,kai1[4096],kai2[4096];
int i=0,n;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,... | main.c: In function 'round_d':
main.c:7:13: error: expected expression before '>' token
7 | if ( x => 0.0 ) {
| ^
|
s613508110 | p00004 | C | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
double a,b,c,d,e,f,kai1,kai2;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
kai1=(c*e/b-f)/(a*e/b-d);
kai2=(c-a*kai1[i])/b;
printf("%.3lf %.3lf\n",kai1+0,00001,kai2+0,00001);
}
return 0;
} | main.c: In function 'main':
main.c:16:32: error: 'i' undeclared (first use in this function)
16 | kai2=(c-a*kai1[i])/b;
| ^
main.c:16:32: note: each undeclared identifier is reported only once for each function it appears in
|
s968751510 | p00004 | C | #include<stdio.h>
#include<math.h>
int main(void){
double a,b,c,d,e,f,det;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
det=a*e-b*d;
x=(e*c-b*f)/det;
y=(-d*c+a*f)/det;
printf("%.3lf %.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:10:5: error: 'x' undeclared (first use in this function)
10 | x=(e*c-b*f)/det;
| ^
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: 'y' undeclared (first use in this function)
11 | y=(-d*c+a... |
s549245834 | 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;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s779627439 | p00004 | C | int main(){
double a,b,c,d,e,f,i,j,x,y;
while (scanf("%d %d %d %d %d %d",&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.5;
y=j+0.5;
printf("%.41f %.41f\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) !=EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 |... |
s098883635 | p00004 | C | int main(){
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.5;
y=j+0.5;
printf("%.31f %.31f\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 ... |
s403728828 | p00004 | C | int main(){
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.5;
y=j+0.5;
printf("%.31f %.31f\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 ... |
s330789053 | p00004 | C | int main(){
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;
} | main.c: In function 'main':
main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 ... |
s508358103 | p00004 | C | int main(void){
double a,b,c,d,e,f,i,j,x,y;
while (scanf("%1f %1f %1f %1f %1f %1f",&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;
} | main.c: In function 'main':
main.c:3:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | while (scanf("%1f %1f %1f %1f %1f %1f",&a,&b,&c,&d,&e,&f) != EOF) {
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
... |
s619094041 | p00004 | C | #include <stdio.h>
int main(){
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;
} | main.c: In function 'main':
main.c:12:1: error: expected declaration or statement at end of input
12 | }
| ^
|
s748196983 | p00004 | C | #include <stdio.h>
int main(){
double a,b,c,d,e,f,x,y;
while (scanf("%1f %1f %1f %1f %1f %1f",&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);
printf("%.31f %.31f\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:10:1: error: expected declaration or statement at end of input
10 | }
| ^
|
s025072133 | p00004 | C | #include<stdio.h>
//#define EPS 0.0000001
int main(void){
double x,y,r,s,t,u,a,b,p,c,d,q;
while(1){
if(scanf("%lf",&a)==EOF)break;
scanf("%lf%lf%lf%lf%lf",&b,&p,&c,&d,&q);
r=p*d-b*q;
s=a*d-b*c;
x=r/s;
t=a*q-p*c;
u=a*d-b*c;
y=t/u;
if(-EP... | main.c: In function 'main':
main.c:14:13: error: 'EPS' undeclared (first use in this function)
14 | if(-EPS<x && x<=0) x = 0;
| ^~~
main.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
|
s557283062 | p00004 | C | #include<stdio.h>
int main(void){
int a,b,c,d,e,f,i
double x,y;
for(i=0;i<2;i++)
scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
x=(c*e-f*e)/(a*e-b*d);
y=(c*d-a*f)/(b*d-a*e);
printf("%.3f %.3f ",x,y);
return(0);
} | main.c: In function 'main':
main.c:4:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double'
4 | double x,y;
| ^~~~~~
main.c:6:7: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<2;i++)
| ^
main.c:6:7: note: each undeclared identifier is reported only o... |
s046863749 | p00004 | C | #include<stdio.h>
int main(void){
int a,b,c,d,e,f,i
double x,y;
for(i=0;i<2;i++){
scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
x=(c*e-f*e)/(a*e-b*d);
y=(c*d-a*f)/(b*d-a*e);
printf("%.3f %.3f ",x,y);
}
return(0);
} | main.c: In function 'main':
main.c:4:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double'
4 | double x,y;
| ^~~~~~
main.c:6:7: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<2;i++){
| ^
main.c:6:7: note: each undeclared identifier is reported only ... |
s031277660 | p00004 | C |
int main(void){
int a,b,c,d,e,f;
int i,countx=0,county=0;
double x,y;
double tempx,tempy;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
x = (double)(c*e-f*b)/(a*e-b*d);
y = (double)-(c*d-f*a)/(a*e-b*d);
tempx = x;
tempy = y;
for(i = 0;i < 4;i++){
tempx *= 10;
tempy *= 10;
}
... | main.c: In function 'main':
main.c:8:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
8 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <s... |
s923329414 | p00004 | C | #include <cstdlib>
#include <iostream>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main()
{
double x1,x2,y1,c1,y2,c2,y,x;
while((scanf("%lf %lf %lf %lf %lf %lf",&x1,&x2,&y1,&y2,&c1,&c2))!=EOF)
{
x=((c1*y1-x2*c2)/(x1*c1-x2*y2));
y=((-(y2*y1)+x1*c2)/(x1*c1-x2*y2));
if(x==0)
{
x=0;
}
if(y==0)
{
y=0... | main.c:1:10: fatal error: cstdlib: No such file or directory
1 | #include <cstdlib>
| ^~~~~~~~~
compilation terminated.
|
s702290455 | p00004 | C | include<stdio.h>
int main()
{
double a[6],num;
int i;
double ans[2];
for(;;){
for(i=0;i<6;i++){
scanf("%lf",&a[i]);
}
num=a[0]*a[4]-a[1]*a[3];
ans[0]=(a[4]*a[2]-a[1]*a[5])/num;
ans[1]=(a[0]*a[5]-a[3]*a[2])/num;
printf("%.3lf %.3lf\n",ans[0],ans[1]);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s850654775 | p00004 | C | /*****************************************
AOJ 0004
*****************************************/
/*-------------
ax + by = c
dx + ey = f
-------------*/
#include<stdio.h>
#define NUM 10
int main(void)
{
int i = 0;
double a, b, c;
double d, e, f;
double x[NUM] = { 0 };
double y[NUM]... | main.c: In function 'main':
main.c:60:14: error: 'j' undeclared (first use in this function)
60 | for (j = 0; j < i; j++) {
| ^
main.c:60:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:61:50: error: expected ';' before '}' token
61 | ... |
s224495714 | p00004 | C | include <stdio.h>
int main(void){
float a, b, c, d, e, f;
float x, y;
while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)==6){
x=(c*e-b*f)/(a*e-b*d);
y=(c-a*x)/b;
printf("%.3f %.3f\n", x, y);
return (0);
}
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s498045300 | p00004 | C | include <stdio.h>
int main(void){
float a, b, c, d, e, f;
float x, y;
while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)==6){
x=(c*e-b*f)/(a*e-b*d);
y=(c-a*x)/b;
printf("%.3f %.3f\n", x, y);
return (0);
}
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s038123894 | p00004 | C | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int a = atoi(argv[1]);
int b = atoi(argv[2]);
int c = atoi(argv[3]);
int d = atoi(argv[4]);
int e = atoi(argv[5]);
int f = atoi(argv[6]);
int tr = a*e-b*d;
double x = (int)(1000*(e... | main.c:21:1: error: expected identifier or '(' before '~' token
21 | ~
| ^
|
s349406358 | p00004 | C | //#include<iostream>
#include<cstdio>
//using namespace std;
int main(){
double a,b,c,d,e,f,x,y;
scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
y=(c*d-f*a)/(b*d-e*a);
x=(c-b*y)/a;
if(x==-0)x=0;
if(y==-0)y=0;
printf("%.3f %.3f\n",x,y);
return 0;
} | main.c:2:9: fatal error: cstdio: No such file or directory
2 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s142099468 | 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){
y=(c*d-f*a)/(b*d-e*a);
x=(c-b*y)/a;
if(x==-0)x=0;
if(y==-0)y=0;
printf("%.3f %.3f\n",x,y);
}
return 0;
} | main.c:2:9: fatal error: cstdio: No such file or directory
2 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s718023734 | 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)=-1);
y=(f-c*d/a)/(e-b*d/a);
x=c/a-b*y/a;
printf("%.3f %.3f\n",x+0.00005,y+0.00005);
return 0;
} | main.c: In function 'main':
main.c:5:56: error: lvalue required as left operand of assignment
5 | while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)=-1);
| ^
|
s930155218 | p00004 | C | #include<stdio.h>
int main()
{
int a,b,c,d,e,f;
double m,n;
while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF)
{
m=(a*f-c*d)/(a*e-b*d);
n=(c-b*y)/a;
printf("%.3lf %.3lf\n",m,n);
}
return 0;
} | main.c: In function 'main':
main.c:10:8: error: 'y' undeclared (first use in this function)
10 | n=(c-b*y)/a;
| ^
main.c:10:8: note: each undeclared identifier is reported only once for each function it appears in
|
s292605576 | p00004 | C | #include<stdio.h>
int main(void) {
double a, b, c, d, e, f,x,y;
while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) {
x = e*c - b*f / a*e - b*d;
y = c*d - a*f / b*d - a*c;
printf("%.3lf %.3lf ", x, y);
}
return 0;
} | main.c: In function 'main':
main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) {
| ^~~~~~~
| scanf
|
s745696994 | p00004 | C | #include<stdio.h>
int main(void) {
double a, b, c, d, e, f,x,y;
while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) {
x = (e*c - b*f) / (a*e - b*d);
y = (f - d*x) / e;
printf("%.3lf %.3lf ", x, y);
}
return 0;
} | main.c: In function 'main':
main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | while (scanf_s("%lf %lf %lf %lf %lf %lf", &a,&b, &c, &d, &e, &f) !=EOF) {
| ^~~~~~~
| scanf
|
s857491611 | p00004 | C | #include <stdio.h>
/* Aizu Online Judge Problem */
/* Volume0 0004:Simultaneous Equation */
/* ax + by = c
dx + ey = f */
#define NUM 1000
typedef struct{
double formula_1[3];
double formula_2[3];
} formula_t;
double seek_x(formula_t fml);
double seek_y(formula_t fml, double x);
int main(void)
{
formula_... | main.c: In function 'main':
main.c:25:26: error: incompatible type for argument 2 of 'seek_y'
25 | y[cnt] = seek_y(fml, x);
| ^
| |
| double *
main.c:15:37: note: expected 'double' but argument is of type 'double *'
1... |
s826891700 | p00004 | C | #include <stdio.h>
/* Aizu Online Judge Problem */
/* Volume0 0004:Simultaneous Equation */
/* ax + by = c
dx + ey = f */
typedef struct{
double formula_1[3];
double formula_2[3];
} formula_t;
double seek_x(formula_t fml);
double seek_y(formula_t fml, double x);
int main(void)
{
formula_t fml;
double x,... | main.c: In function 'seek_x':
main.c:33:18: error: 'NUM' undeclared (first use in this function)
33 | for(i = 0; i < NUM; i++){
| ^~~
main.c:33:18: note: each undeclared identifier is reported only once for each function it appears in
|
s004242568 | 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;
} | main.c: In function 'main':
main.c:6:51: error: stray '\' in program
6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){
| ^
main.c:6:52: error: lvalue required as left operand of assignment
6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\... |
s523093553 | p00004 | C | #include <stdio.h>
/* Aizu Online Judge Problem */
/* Volume0 0004:Simultaneous Equation */
/* ax + by = c
dx + ey = f */
int main(void)
{
formula_t fml;
double x, y;
double a, b, c, d, e, f;
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
x = (b * f - c * e)/(b * d - a * e);
y = (... | main.c: In function 'main':
main.c:9:3: error: unknown type name 'formula_t'
9 | formula_t fml;
| ^~~~~~~~~
main.c:12:65: error: expected ')' before ';' token
12 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
| ~ ^... |
s239735860 | p00004 | C | #include <stdio.h>
/* Aizu Online Judge Problem */
/* Volume0 0004:Simultaneous Equation */
/* ax + by = c
dx + ey = f */
int main(void)
{
double x, y;
double a, b, c, d, e, f;
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
x = (b * f - c * e)/(b * d - a * e);
y = (a * f - c * d)/(a... | main.c: In function 'main':
main.c:11:65: error: expected ')' before ';' token
11 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
| ~ ^
| )
main.c:15:3: error:... |
s401475194 | p00004 | C | #include <stdio.h>
/* Aizu Online Judge Problem */
/* Volume0 0004:Simultaneous Equation */
/* ax + by = c
dx + ey = f */
int main(void)
{
double x, y;
double a, b, c, d, e, f;
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f))
x = (b * f - c * e)/(b * d - a * e);
y = (a * f - c * d)/(a... | main.c:16:3: error: expected identifier or '(' before 'return'
16 | return 0;
| ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
17 | }
| ^
|
s205115872 | p00004 | C | #include <stdio.h>
/* Aizu Online Judge Problem */
/* Volume0 0004:Simultaneous Equation */
/* ax + by = c
dx + ey = f */
int main(void)
{
double x, y;
double a, b, c, d, e, f;
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)???!= EOF)
{
x = (b * f - c * e)/(b * d - a * e);
y = (a * ... | main.c: In function 'main':
main.c:11:66: warning: trigraph ??! ignored, use -trigraphs to enable [-Wtrigraphs]
11 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)???!= EOF)
main.c:11:66: error: expected expression before '?' token
11 | while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e... |
s580826289 | p00004 | C | #include<stdio.h>
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) {
x = (double)((e*c-b*f) / (a*e-b*d));
y = (double)((-(d*c)+a*f) / (a*e-b*d));
if (x == -0.000000) x = 0.000000;
... | main.c:15:1: error: expected identifier or '(' before '~' token
15 | ~
| ^
|
s070219375 | p00004 | C | #include <stdio.h>
int main()
{
float a,b,c,d,e,f,x,y;
while (scanf("%f %f %f %f %f %f",&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("%.3f %.3f\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:5:57: error: expected expression before '!=' token
5 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f))!=EOF
| ^~
|
s614519246 | p00004 | C | #include <stdio.h>
#include <math.h>
int main()
{
long long a,b,c,d,e,f;
double x,y;
while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e?,&f)!=EOF){
y = (((a*f)-(c*d)/?(a*e)-b));
x = ((a*e)/?((a*e)+(f-d)));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:60: error: expected expression before ',' token
8 | while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e?,&f)!=EOF){
| ^
main.c:10:19: error: expected expression before '?' token
10 | y = (((a*f)-(c*d)/?(a... |
s228641925 | p00004 | C | #include<stdio.h>
int main()
{
int a,b,c;
char A='A',B='B',C='C',D='*';
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
if(a==b && a!=c)
{
printf("%c\n",C);
}
else if(a==c && c!=b)
{
printf("%c\n",B);
}
else if(b==c && b!=a)
{
printf("%c\n",A);
}
el... | main.c: In function 'main':
main.c:22:25: error: expected ';' before '}' token
22 | printf("%c\n",D)
| ^
| ;
23 | }
| ~
|
s492591029 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s524290708 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s861147697 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s492796555 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s418431966 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s993999297 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s373623695 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s019854001 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s755959682 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s941783803 | p00004 | C | #include <stdio.h>
#include <math.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){
y = (((f)*(a)-(d)*(c))/((e)*(a)-(d)*(b)));
x = (((c)-(b)*(y))/(a));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:8:62: error: expected expression before '!=' token
8 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
| ^~
main.c:8:67: error: expected statement before ')' token
8 | while(scanf("%lf ... |
s564286437 | p00004 | C | #include <stdio.h>
#include <math.h>
int main()
{
double p,q,r,s,t,u;
double x,y;
while(scanf("%lf %lf %lf %lf %lf %lf",&p,&q,&r,&s,&t,&u)!=EOF){
y = (((f)*(p)-(q)*(r))/((s)*(t)-(u)*(q)));
x = (((r)-(q)*(y))/(p));
printf("%0.3lf %0.3lf\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:10:12: error: 'f' undeclared (first use in this function)
10 | y = (((f)*(p)-(q)*(r))/((s)*(t)-(u)*(q)));
| ^
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
|
s358070086 | p00004 | C | 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){
printf("%.3lf %.3lf\n",(e*c-b*f)/(a*e-b*d),(c*d-a*f)/(b*d-a*e));
}
return 0;
} | main.c: In function 'main':
main.c:6:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | 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'
+++ |+#include <stdi... |
s580801320 | p00004 | C | #include <stdio.h>
int main(void) {
??? int a, b, c, d, e, f;
??? float x, y;
???
??? while(scanf("%d %d %d %d %d %d", &a ,&b, &c, &d, &e, &f) != -1){
??? x = (float)(c*e - b*f)/(a*e - b*d);
??? y = (float)(c*d - a*f)/(b*d - a*e);
??? if(-0.0005<x && x <=0)
??? x=0;
??? if(-0.005<y && y <=0)
??? y=0;
??? pr... | main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
4 | ??? int a, b, c, d, e, f;
| ^
main.c:5:1: error: expected expression before '?' token
5 | ??? float x, y;
| ^
main.c:6:1: error: expected expression before '?' token
6 | ???
| ^
|
s588756072 | p00004 | C | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (-b * f + c * e) / (-b * d + a * e);
y = (a * f - c * d) / (a * e - b * d);
printf("%.3f %.3f\n", x, y);
}
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s025748829 | p00004 | C | #include <cstdio>
int main(){
int a,b,c,d,e,f;
while(scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f)+1){
double x = (c*e-b*f)/(a*e-b*d);
double y = (c*d-a*f)/(b*d-a*e);
printf("%.3lf %.3lf\n", x, y);
}
return 0;
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s760773564 | p00004 | C | #include<stdio.h>
int main(){
float a,b,c,d,e,f,x,y;
while(scanf_s("%f",&a)!=EOF){
scanf_s("%f %f %f %f %f",&b,&c,&d,&e,&f);
y=(c*d-a*f)/(b*d-a*e);
x=(c*e-b*f)/(a*e-b*d);
printf("%f %f\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:4:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
4 | while(scanf_s("%f",&a)!=EOF){
| ^~~~~~~
| scanf
|
s084335581 | p00004 | C | #include<stdio.h>
int main(){
float a,b,c,d,e,f,x,y;
//while(scanf_s("%f",&a)!=EOF){
while(scanf_s("%f %f %f %f %f %f",&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);
printf("%f %f\n",x,y);
}
return 0;
} | main.c: In function 'main':
main.c:5:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | while(scanf_s("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
| ^~~~~~~
| scanf
|
s784376596 | p00004 | C | #include <stdio.h>
#include <math.h>
int main(){
float a,b,c,d,e,f;
float x,y;
while(1){
a=-2000;
scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
if(a<=-1000){
break;
}
x=(b*f-c*e)/(b*d-a*e);
y=(c*d-a*f)/(b*d-a*e);
x=roundf(x,3);
... | main.c: In function 'main':
main.c:18:11: error: too many arguments to function 'roundf'
18 | x=roundf(x,3);
| ^~~~~~
In file included from main.c:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:334:1: note: declared here
334 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
| ^... |
s204418348 | p00004 | C | #include <stdio.h>
#include <math.h>
int main(void){
float a,b,c,d,e,f;
float x,y;
float tmp1,tmp2;
while(1){
a = 2000;
scanf("%.3f %.3f %.3f %.3f %.3f %.3f", &a, &b, &c, &d, &e, &f);
if(a == 2000)break;
tmp1 = c*e - b*f;
tmp2 = a*e - b*d;
x = tmp1 / tm... | main.c: In function 'main':
main.c:22:34: error: expected ';' before '}' token
22 | x = floor(x + 0.0005)
| ^
| ;
23 | }
| ~
main.c:29:34: error: expected ';' before '}' token
... |
s544670246 | p00004 | C | #include <stdio.h>
int main(){
int a, b, c, d, e, f;
double x, y;
while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &f) != EOF)J{
x = (double)(e*c - b*f)/(e*a - b*d);
y = (double)(c*d - a*f)/(b*d - a*e);
printf("%.3f %.3f\n", );
}
return 0;
} | main.c: In function 'main':
main.c:5:64: error: 'J' undeclared (first use in this function)
5 | while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &f) != EOF)J{
| ^
main.c:5:64: note: each undeclared identifier is reported only once for each func... |
s195498131 | p00004 | C | #include<stdio.h>
int main()
{
double a,b,c,d,e,f,x,y;
printf("ax+by=c\n");
scanf("%lf%lf%lf",&a,&b,&c);
printf("dx+ey=f\n");
scanf("%lf%lf%lf",&d,&e,&f);
if(((a*e-d*b)!=0)&&((b*d-e*a)!=0))
{
x=(c*e-f*b)/(a*e-d*b);
y=(c*d-f*a)/(b*d-e*a);
printf("%.3lf %.3lf\n",x,y);
}
else
if(((a*e-d*b)==0)&&((b*d-e*a)==0)&&((c*e-f*b)=... | main.c: In function 'main':
main.c:25:1: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
25 | getch();
| ^~~~~
| getc
|
s184171569 | p00004 | C | #include <stdio.h>
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 = (double)(d * c - a * f) / (b * d - a * e);
x = (double)(e * c - b * f) / (a * e - d * b);
if (x > -0.0005 && x <= 0) x = 0;
if (y > -0.0005 && y <= 0) y = 0;
... | main.c: In function 'main':
main.c:17:1: error: expected declaration or statement at end of input
17 | }
| ^
|
s758501890 | p00004 | C | #include <stdio.h>
int main(){
double a,b,c,d,e,f;
double x,y;
double det;
double inv[2][2];
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b,
&c, &d,&e, &f) != EOF) {
printf("%f %f %f %f %f %f
\n",a,b,c,d,e,f);
det = a*e-b*d;
inv[0][0] = e/det;
inv[0][1] = -b/det;
inv[1][0] = -d/det;
inv[1][1] = a/... | main.c: In function 'main':
main.c:11:24: warning: missing terminating " character
11 | printf("%f %f %f %f %f %f
| ^
main.c:11:24: error: missing terminating " character
11 | printf("%f %f %f %f %f %f
| ^~~~~~~~~~~~~~~~~~
m... |
s176819112 | p00004 | C | #include <stdio.h>
int main(void)
{
double a[6], i, acopy, x , y;
while (scanf ("%lf %lf %lf %lf %lf %lf", &a[0], &a[1], &a[2], &a[3], &a[4], &a[5])!= EOF){
acopy = a[1];
for (i = 0; i < 3; i++)
{
a[i] *= a[4];
}
for (i = 3; i < 6; i++)
{
a[i] *= acopy;
}
a[0] -= a[3];
if (a[0] == 0) x = 0;... | main.c: In function 'main':
main.c:11:26: error: array subscript is not an integer
11 | a[i] *= a[4];
| ^
main.c:15:26: error: array subscript is not an integer
15 | a[i] *= acopy;
| ^
|
s530095067 | p00004 | C | #include <stdio.h>
int main(){
signed int a,b,c,d,e,f;
float x,y;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
a=a*d;
b=b*d;
c=c*d;
d=d*a;
e=e*a;
f=f*a;
y=(c-f)/(b-e);
x=(c-by)/a;
printf("%3d %3d",x,y);
}
return(0)
} | main.c: In function 'main':
main.c:16:22: error: 'by' undeclared (first use in this function); did you mean 'y'?
16 | x=(c-by)/a;
| ^~
| y
main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:... |
s271794927 | p00004 | C | #include <stdio.h>
int main(){
signed int a,b,c,d,e,f;
float x,y;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
a=a*d;
b=b*d;
c=c*d;
d=d*a;
e=e*a;
f=f*a;
y=(c-f)/(b-e);
x=(c-b*y)/a;
printf("%3f %3f",x,y);
}
return(0)
} | main.c: In function 'main':
main.c:21:18: error: expected ';' before '}' token
21 | return(0)
| ^
| ;
22 | }
| ~
|
s123293217 | p00004 | C | #include <stdio.h>
int main(){
signed int a,b,c,d,e,f;
float x,y;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != -1){
a=a*d;
b=b*d;
c=c*d;
d=d*a;
e=e*a;
f=f*a;
y=(c-f)/(b-e);
x=(c-b*y)/a;
printf("%.3f %.3f\n",x,y);
}
return(0)
} | main.c: In function 'main':
main.c:21:18: error: expected ';' before '}' token
21 | return(0)
| ^
| ;
22 | }
| ~
|
s439925161 | p00004 | C | include <stdio.h>
int main()
{
double a,b,c,d,e,f;
double x,y;
scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
y=(a*f-c*d)/(a*e-b*d);
x=((-1)*b*y+c)/a;
printf("%.3lf %.3lf\n",x,y);
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s341486854 | p00004 | C | include <stdio.h>
int main()
{
double a,b,c,d,e,f;
double x,y;
scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
y=(a*f-c*d)/(a*e-b*d);
x=((-1)*b*y+c)/a;
printf("%.3lf %.3lf\n",x,y);
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s348757959 | p00004 | C | include <stdio.h>
int main()
{
double a,b,c,d,e,f;
double x,y;
scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
y=(a*f-c*d)/(a*e-b*d);
x=((-1)*b*y+c)/a;
printf("%.3lf %.3lf\n",x,y);
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s420082483 | p00004 | C | #include<stdio.h>
int main(){
float buf[12],n,x,y;
if(scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5])>0{
n=buf[0];
buf[0]=buf[0]/n;
buf[1]=buf[0]/n;
buf[2]=buf[0]/n;
n=buf[3];
buf[3]=buf[3]/n;
buf[4]=buf[3]/n;
buf[5]=buf[3]/n;
buf[6]=buf[0]-buf[3];
buf[7]=buf[1]-buf[4];
buf[8]=buf[2]-buf[5];
... | main.c: In function 'main':
main.c:7:74: error: expected ')' before '{' token
7 | if(scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5])>0{
| ~ ^
| ... |
s931842323 | p00004 | C | #include<stdio.h>
int main(){
float buf[12],n,m,x,y;
scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5])
m=buf[0];
n=buf[3];
buf[0]*=n;
buf[1]*=n;
buf[2]*=n;
buf[3]*=m;
buf[4]*=m;
buf[5]*=m;
buf[6]=buf[0]-buf[3];
buf[7]=buf[1]-buf[4];
buf[6]=buf[2]-buf[5];
y=buf[8]/buf[7];
x=(buf[2]-(buf[1]*y))... | main.c: In function 'main':
main.c:7:69: error: expected ';' before 'm'
7 | scanf("%f %f %f %f %f %f",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5])
| ^
| ;
8 |
9 ... |
s266417703 | p00004 | C | #include <stdio.h>
#include <math.h>
int main(){
int i;
double a[6];
double x,y;
while(scanf("%lf",&a[0])!=EOF){
for(i=1;i<6;i++)scanf("%lf",&a[i]);
x = (a[4]*a[2]-a[5]*a[1])/(a[4]*a[0]-a[3]*a[1]);
if(x==0) x=abs(x);
y = (a[3]*a[2]-a[5]*a[0])/(a[3]*a[1]-a[4]*a[0]);
if(y==0) y=abs(y);
printf("%.3f %.3f\n",x,y);... | main.c: In function 'main':
main.c:16:12: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
16 | if(x==0) x=abs(x);
| ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
2 | #include <math.h>
+++ |+#include <stdlib.h>
3 |
main.c:16:16... |
s793152649 | p00004 | C | #include <stdio.h>
#include <math.h>
int main(){
int i;
double a[6];
double x,y;
while(scanf("%lf",&a[0])!=EOF){
for(i=1;i<6;i++)scanf("%lf",&a[i]);
x = (a[4]*a[2]-a[5]*a[1])/(a[4]*a[0]-a[3]*a[1]);
if(x==0) x=abs(x);
y = (a[3]*a[2]-a[5]*a[0])/(a[3]*a[1]-a[4]*a[0]);
if(y==0) y=abs(y);
printf("%.3f %.3f\n",x,y);... | main.c: In function 'main':
main.c:16:12: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
16 | if(x==0) x=abs(x);
| ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
2 | #include <math.h>
+++ |+#include <stdlib.h>
3 |
main.c:16:16... |
s983837517 | p00004 | C | ##include<stdio.h>
int main(){
int input[6];
int dial,i;;
double x,y;
while(scanf("%d %d %d %d %d %d",&input[0],&input[1],&input[2],&input[3],&input[4],&input[5])!=EOF){
dial=input[3];
if(input[0]==dial){
input[4]=input[4]-input[1];
input[5]=input[5]-input[2];
y=(double)input[5]/input[4];
x=(double... | main.c:1:1: error: stray '##' in program
1 | ##include<stdio.h>
| ^~
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | ##include<stdio.h>
| ^
|
s181805503 | p00004 | C | #include<stdio.h>
int main(){
int input[6];
int dial,i;;
double x,y;
while(scanf("%d %d %d %d %d %d",&input[0],&input[1],&input[2],&input[3],&input[4],&input[5])!=EOF){
dial=input[3];
if(input[0]==dial){
input[4]=input[4]-input[1];
input[5]=input[5]-input[2];
y=(double)input[5]/input[4];
x=(double)... | main.c: In function 'main':
main.c:39:17: error: expected '}' before 'else'
39 | else
| ^~~~
|
s451550434 | p00004 | C | #include<stdio.h>
double matrix_x(int,int);
double matrix_y(int,int,int,int,int,int);
double sisyagonyu(double);
int main() {
int a,b,c,d,e,f,count=0;
double x,y,a1,d1;
while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF)
count++;
for(i=0;i<count;i++){
printf("%f %f\n",matrix_x(a,c),matrix_y(a,b,c,d,e,f));
}
return... | main.c: In function 'main':
main.c:14:5: error: 'i' undeclared (first use in this function)
14 | for(i=0;i<count;i++){
| ^
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'sisyagonyu':
main.c:33:11: error: expected ';' before 'if'
3... |
s776440579 | p00004 | C | #include<stdio.h>
double matrix_x(int,int,int,int,int,int);
double matrix_y(int,int,int,int,int,int);
double sisyagonyu(double);
int main() {
int a[10],b[10],c[10],d[10],e[10],f[10],count=0,i;
double x,y,a1,d1;
while(scanf("%d%d%d%d%d%d",&a[count],&b[count],&c[count],&d[count],&e[count],&f[count])!=EOF)
count++;
fo... | main.c: In function 'main':
main.c:15:18: error: implicit declaration of function 'sisyagosyu'; did you mean 'sisyagonyu'? [-Wimplicit-function-declaration]
15 | printf("%f %f\n",sisyagosyu(matrix_x(a[i],b[i],c[i],d[i],e[i],f[i])),sisyagonyu(matrix_y(a[i],b[i],c[i],d[i],e[i],f[i])));
| ^~~~~~~... |
s402297514 | p00004 | C | #include<stdio.h>
typedef struct _Node{
int a,b,c,d,e,f;
double x,y;
struct _Node *next
}Node
int main(){
Node *head,*p;
p=malloc(sizeof(Node));
head=p;
while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){
p->next=malloc(sizeof(Node));
p=p->next;
}
p->next=NULL;
p=head;
... | main.c:7:1: warning: no semicolon at end of struct or union
7 | }Node
| ^
main.c:7:6: error: expected ';' before 'int'
7 | }Node
| ^
| ;
8 |
9 | int main(){
| ~~~
main.c: In function 'main':
main.c:10:3: error: unknown type name 'Node'
10 | Node *head,*p;
... |
s339961622 | p00004 | C | #include<stdio.h>
typedef struct _Node{
int a,b,c,d,e,f;
double x,y;
struct _Node *next;
}Node;
int main(){
Node *head,*p;
p=malloc(sizeof(Node));
head=p;
while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){
p->next=malloc(sizeof(Node));
p=p->next;
}
p->next=NULL;
p=head... | main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
11 | p=malloc(sizeof(Node));
| ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
1 | #include<stdio.h>
+++ |+#include <stdlib.h>
2 |
main... |
s602621278 | p00004 | C | #include<stdio.h>
typedef struct _Node{
int a,b,c,d,e,f;
double x,y;
struct _Node *next;
}Node;
int main(){
Node *head,*p;
p=malloc(sizeof(Node));
head=p;
while(scanf("%d %d %d %d %d %d",p->a,p->b,p->c,p->d,p->e,p->f)!=EOF){
p->next=malloc(sizeof(Node));
p=p->next;
}
p->next=NULL;
p=head... | main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
11 | p=malloc(sizeof(Node));
| ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
1 | #include<stdio.h>
+++ |+#include <stdlib.h>
2 |
main... |
s357703684 | p00004 | C | #include<stdio.h>
#include<stdlib.h>
typedef struct _Node{
int a,b,c,d,e,f;
double x,y;
struct _Node *next;
}Node;
int main(){
int i;
Node *head,*p;
p=(Node *)calloc(1,sizeof(Node));
head=p;
for(i=0;i<2;i++){
scanf("%d %d %d %d %d %d",&p->a,&p->b,&p->c,&p->d,&p->e,&p->f));
p->next=(Node *)call... | main.c: In function 'main':
main.c:16:67: error: expected ';' before ')' token
16 | scanf("%d %d %d %d %d %d",&p->a,&p->b,&p->c,&p->d,&p->e,&p->f));
| ^
| ;
main.c:16:67... |
s045650556 | 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 - b*f) / (a*e - d*b);
y = (c*d - a*f) / (b*d - a*e);
if (x > -0.0005 && x < 0) {
x = 0;
}
if (y > -0.0005 && y < 0) {
y = 0;
}
printf("%.3f %.3f\n",x,y);
} | main.c: In function 'main':
main.c:15:9: error: expected declaration or statement at end of input
15 | }
| ^
|
s988492733 | p00004 | C | #include<stdio.h>
#include<math.h>
int main(){
char buf[18];
double a,b,c,d,e,f,x,y;
while(fgets(buf,sizeof(buf),stdin)!=NULL){
sscanf_s(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
x=(b*f-c*e)/(b*d-a*e);
y=-1.0*(x*a-c)/b;
printf("%.3lf %.3lf\n",x==0.0 ? fabs(x) : x, y==0.0 ? fabs(y) : y);
}
retu... | main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'sscanf_s'; did you mean 'sscanf'? [-Wimplicit-function-declaration]
8 | sscanf_s(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
| ^~~~~~~~
| sscanf
|
s388811358 | p00004 | C | #include<stdio.h>
#include<math.h>
int main(){
double a,b,c,d,e,f,x,y;
while(scanf_s("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
x=(b*f-c*e)/(b*d-a*e);
y=-1.0*(x*a-c)/b;
printf("%.3lf %.3lf\n",x==0.0 ? fabs(x) : x, y==0.0 ? fabs(y) : y);
}
return 0;
} | main.c: In function 'main':
main.c:6:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | while(scanf_s("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
| ^~~~~~~
| scanf
|
s841930987 | p00004 | C | #include <stdio.h>
int main()
{
int a, b, c, d, e, f;
// x = (bf-ce) / (bd-ae)
// y = (cd-af) / (bd-ae)
while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){
printf("%.3f %.3f\n", (float)(bf-ce)/(float)(bd-ae), (float)(cd-af)/(float)(bd-ae));
}
return 0;
} | main.c: In function 'main':
main.c:9:52: error: 'EOf' undeclared (first use in this function); did you mean 'EOF'?
9 | while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){
| ^~~
| EOF
main.c:9:52: n... |
s872598078 | p00004 | C | #include <stdio.h>
int main()
{
int a, b, c, d, e, f;
// x = (bf-ce) / (bd-ae)
// y = (cd-af) / (bd-ae)
while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){
printf("%.3f %.3f\n", (float)(b*f-c*e)/(float)(b*d-a*e), (float)(c*d-a*f)/(float)(b*d-a*e));
}
return 0;
} | main.c: In function 'main':
main.c:9:52: error: 'EOf' undeclared (first use in this function); did you mean 'EOF'?
9 | while(scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOf){
| ^~~
| EOF
main.c:9:52: n... |
s401705976 | p00004 | C | #include<stdio.h>
int main()
{
? ?int a,b,c,d,e,f;
? ?float x,y;
? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f);
? ?while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF)
? ?{
? ? ? ?x=(c*e-b*f)/(a*c-b*d);
? ? ? ?y=(c*d-a*f)/(b*d-a*e);
? ? ? ?printf(".3%f .3%f",x,y);
? ?}
? ?return 0;
} | main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
4 | ? ?int a,b,c,d,e,f;
| ^
main.c:5:1: error: expected expression before '?' token
5 | ? ?float x,y;
| ^
main.c:6:1: error: expected expression before '?' token
6 | ? ?("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f);
... |
s852745716 | p00004 | C | #include<stdio.h>
main()
{
int a,b,c,d,e,f;
float x,y;
a*x+b*y=c;
d*x+e*y=f;
scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
{
x=((c*e-b*f)/(a*e-b*d));
y=((a*f-d*c)/(a*e-b*d));
}
printf("%.3f %.3f",x,y);
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:6:8: error: lvalue required as left operand of assignment
6 | a*x+b*y=c;
| ^
main.c:7:8: error: lvalue required as left operand of assignment
7 | d*x+e*y=f;
| ... |
s856199606 | p00004 | C | #include<stdio.h>
int main()
{
? ?float a,b,c,d,e,f;
? ?float x,y;
? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f);
? ?while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF)
? ?{
? ? ? ?x=(c*e-b*f)/(a*e-b*d)*1.000;
? ? ? ?y=(c*d-a*f)/(b*d-a*e)*1.000;
? ? ? ?printf("%.3f %.3f\n",x,y);
? ?}
? ?return 0;
} | main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
4 | ? ?float a,b,c,d,e,f;
| ^
main.c:5:1: error: expected expression before '?' token
5 | ? ?float x,y;
| ^
main.c:6:1: error: expected expression before '?' token
6 | ? ?("%f %f %f %f %f %f\n",&a,&b,&c,&d,&e,&f)... |
s566741704 | p00004 | C | #include<stdio.h>
int main()
{
int a,b,c,d,e,f,x,y;
printf("Enter number:");
scanf("%d%d",&x,&y);
if(f(-1,000 ? a, b, c, d, e, f ? 1,000)!=EOF)
{
printf("%d%d",ax +by = c);
printf("%d%d",dx + ey = f);
}
else
printf("Input invalid");
return 0;
} | main.c: In function 'main':
main.c:7:43: error: expected ':' before ')' token
7 | if(f(-1,000 ? a, b, c, d, e, f ? 1,000)!=EOF)
| ^
| :
main.c:7:8: error: called object 'f' is not a function or function pointer
7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.