submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s910882878
p00004
C++
* * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004 */ #include <iomanip> #include <iostream> #include <sstream> #include <vector> #define N 2 #define L N*(N+1) using namespace std; int main() { string line; while (getline(cin, line)) { istringstream iss(line); vector <float> coef(L); for (in...
a.cc:2:8: error: expected constructor, destructor, or type conversion before ':' token 2 | * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/iomanip:41, from a.cc:4: /usr/i...
s535492009
p00004
C++
#include <iostream> #include <iomanip> using namespace std; double a, b, c, d, e, f; double x(double, double, double, double, double, double) { return (c*e - b*f) / (a*e - b*d); } double y(double, double, double, double, double, double) { return (a*f - c*d) / (a*e - b*d); } double round(double dat, int keta){ ...
a.cc: In function 'double round(double, int)': a.cc:20:20: error: 'pow' was not declared in this scope 20 | fct = (int)pow(10, keta - 1); | ^~~
s512089199
p00004
C++
#include <iostream> #include <iomanip> #include <cmath> using namespace std; double a, b, c, d, e, f; double x(double, double, double, double, double, double) { return (c*e - b*f) / (a*e - b*d); } double y(double, double, double, double, double, double) { return (a*f - c*d) / (a*e - b*d); } double round(doubl...
a.cc: In function 'double round(double, int)': a.cc:23:16: error: expected primary-expression before 'double' 23 | fct = double pow(10, keta - 1); | ^~~~~~
s401992501
p00004
C++
#include <iostream> #include <iomanip> #include <cmath> using namespace std; double a, b, c, d, e, f; double x(double, double, double, double, double, double) { return (c*e - b*f) / (a*e - b*d); } double y(double, double, double, double, double, double) { return (a*f - c*d) / (a*e - b*d); } double round(doubl...
a.cc: In function 'double round(double, int)': a.cc:23:16: error: expected primary-expression before 'int' 23 | fct = int pow(10, keta - 1); | ^~~
s304139283
p00004
C++
#include<iostream> #include<iomanip> int main(){ int a,b,c,d,e,f; while(std::cin >> a >> b >> c >> d >> e >> f){ double x, y; int p,q; p = a * e - d * b; q = c * e - f * b; x = q / p; y = (c - a * x) / b; ...
a.cc:18:1: error: expected class-name before '~' token 18 | ~ | ^
s516577932
p00004
C++
t = 0 while t == 0: try: a,b,e,c,d,f = [int(i) for i in input().split()] except: break else: x = (d*e - b*f) / (a*d - b*c) + 0 y = (a*f - c*e) / (a*d - b*c) + 0 print("{0:.3f}".format(x) + "{0:.3f}".format(y))
a.cc:1:1: error: 't' does not name a type 1 | t = 0 | ^
s772883609
p00004
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> void main(void) { char string[99]; printf("a,b,c,d,e,f??????????????????????????§??\?????????????????????\n"); double a=0, b=0, c=0, d=0, e=0, f=0; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); double x = (f*b - e*c) / (d*b - e*a); double y = (f*a - d*...
a.cc:6:1: error: '::main' must return 'int' 6 | void main(void) { | ^~~~ a.cc: In function 'int main()': a.cc:14:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 14 | return; | ^~~~~~
s697904702
p00004
C++
#include <stdio.h> void main(void){ double a=0, b=0, c=0, d=0, e=0, f=0; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); double x = (f*b - e*c) / (d*b - e*a); double y = (f*a - d*c) / (e*a - d*b); printf("%f %f\n", x, y); return; }
a.cc:4:1: error: '::main' must return 'int' 4 | void main(void){ | ^~~~ a.cc: In function 'int main()': a.cc:10:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 10 | return; | ^~~~~~
s102126074
p00004
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> void main(void) { printf("a,b,c,d,e,f??????????????????????????§??\?????????????????????\n"); double a=0, b=0, c=0, d=0, e=0, f=0; scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f); double x = (f*b - e*c) / (d*b - e*a); double y = (f*a - d*c) / (e*a - d*b); print...
a.cc:7:1: error: '::main' must return 'int' 7 | void main(void) { | ^~~~ a.cc: In function 'int main()': a.cc:14:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 14 | return; | ^~~~~~
s530191953
p00004
C++
#include<iostream> #include<iomanip> #include<cstdio> #include<vector> #include<algorithm> #include<cmath> #include<queue> #include<stack> #include<functional> #include<string> #include<cstring> #include <sstream> using namespace std; int main(void){ double a,b,c,d,e,f,x,y; while(cin >> a >> b >> c >> d >> e >>...
a.cc:32:70: error: stray '\' in program 32 | cout << fixed << std::setprecision(3) << x << " " << fixed <<\???std::setprecision(3) << y << endl; | ^ a.cc: In function 'int main()': a.cc:32:71: error: expected primary-expression before...
s302221440
p00004
C++
#include <cstdio> #include <iostream> double sol[10000][2]; int main() { double a, b, e, c, d, f; int i = 0; while (std::cin >> a >> b >> e >> c >> d >> f) { double det = a * d - b * c; double aa = d / det, bb = -b / det, cc = -c / det, dd = a / det; sol[i][0] = aa * e + bb * f...
a.cc: In function 'int main()': a.cc:20:14: error: expected '}' at end of input 20 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s344856027
p00004
C++
#include<iostream> #include<algorithm> #include<stdio.h> using namespace std; int main(){ int a,b,c,d,e,f; int o,p,q,r,s,t; float x,y; for(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF){ o=a;p=b;q=c;r=d;s=e;t=f; o*=d;p*=d;q*=d; r*=a;s*=a;t*=a; //printf("%d %d %d %d %d %d \n",o,p,q,r,s,t); p-=s; q-=t; y...
a.cc: In function 'int main()': a.cc:9:57: error: expected ';' before ')' token 9 | for(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF){ | ^ a.cc:22:1: error: expected primary-expression before '}' token 22 | } | ^ a.cc:21:10: error: expec...
s460212250
p00004
C++
#include<iostream> #include<iomanip> #include<vector> #include<map> #include<string> using namespace std; /* ??£???????¨???? ax + by = c dx + ey = f ????§£x, y???????????????????????°?????? */ int main() { double a, b, c, d, e, f; int cnt = 0; //??\??????????????£???????¨????????????° std::vector<double> x_v...
a.cc: In function 'int main()': a.cc:35:35: error: 'round' was not declared in this scope 35 | double x_result = round(x_vector[i] * 1000) / 1000; | ^~~~~
s879868035
p00004
C++
#include<iostream> #include<iomanip> #include<vector> #include<map> #include<string> using namespace std; /* ??£???????¨???? ax + by = c dx + ey = f ????§£x, y???????????????????????°?????? */ int main() { double a, b, c, d, e, f; int cnt = 0; //??\??????????????£???????¨????????????° std::vector<double> x_v...
a.cc: In function 'int main()': a.cc:35:40: error: 'round' is not a member of 'std' 35 | double x_result = std::round(x_vector[i] * 1000) / 1000; | ^~~~~ a.cc:36:40: error: 'round' is not a member of 'std' 36 | double y_result = std::rou...
s495537100
p00004
C++
while(True): try: a,b,c,d,e,f = map(float,input().split(" ")) z = a*e - b*d if(z!=0): x = (c*e-b*f)/z y = (a*f-c*d)/z print("{:.3f} {:.3f}".format(x+0,y+0)) except: break
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while(True): | ^~~~~
s502540213
p00004
C++
#include <bits/stdc++.h> // #include "bits/stdc++.h" #define pout(n) printf ("%d\n", n) #define rep(i,a,n) for (int i = a;i < n;i++) #define per(i,n,a) for (int i = n-1;i >= a;i--) const int d4x[4] = {1, 0, -1, 0}; const int d4y[4] = {0, 1, 0, -1}; const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 }; const int d8y[8] = { 0,1...
a.cc: In function 'int main()': a.cc:20:42: error: expected ')' before ';' token 20 | while(cin >> a >> b >> c >> d >> e >> f;){ | ~ ^ | ) a.cc:20:43: error: expected primary-expression before ')' token 20 | while(cin ...
s097219071
p00004
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s753012750
p00004
C++
#include <iostream> #include <cstdio> using namespace std; void calc(double x1, double y1, double a, double x2, double y2, double b) { double d1 = x2; double d2 = x1; double xx1 = d1 * x1; double xy1 = d1 * y1; double a1 = d1 * a; double xx2 = d2 * x2; double xy2 = d2 * y2; double b1 = d2 * b; double y = xy1 -...
a.cc: In function 'int main()': a.cc:44:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 44 | while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &y2 , &b) != EOF) | ^~~~~~~ | scanf
s684196278
p00004
C++
#include <iostream> #include <cstdio> using namespace std; void calc(double x1, double y1, double a, double x2, double y2, double b) { double d1 = x2; double d2 = x1; double xx1 = d1 * x1; double xy1 = d1 * y1; double a1 = d1 * a; double xx2 = d2 * x2; double xy2 = d2 * y2; double b1 = d2 * b; double y = xy1 -...
a.cc: In function 'int main()': a.cc:44:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 44 | while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &b) != EOF) | ^~~~~~~ | scanf
s300953643
p00004
C++
#include <iostream> #include <cstdio> using namespace std; void calc(double x1, double y1, double a, double x2, double y2, double b) { double d1 = x2; double d2 = x1; double xx1 = d1 * x1; double xy1 = d1 * y1; double a1 = d1 * a; double xx2 = d2 * x2; double xy2 = d2 * y2; double b1 = d2 * b; double y = xy1 -...
a.cc: In function 'int main()': a.cc:44:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 44 | while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &b) != EOF) | ^~~~~~~ | scanf
s531585373
p00004
C++
#include <iostream> #include <cstdio> using namespace std; void calc(double x1, double y1, double a, double x2, double y2, double b) { double d1 = x2; double d2 = x1; double xx1 = d1 * x1; double xy1 = d1 * y1; double a1 = d1 * a; double xx2 = d2 * x2; double xy2 = d2 * y2; double b1 = d2 * b; double y = xy1 -...
a.cc: In function 'int main(int, const char**)': a.cc:44:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 44 | while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &b) != EOF) | ^~~~~~~ | scanf
s933070385
p00004
C++
#include <cstdio> void calc(int x1, int y1, int a, int x2, int y2, int b) { double d1 = x2; double d2 = x1; double xx1 = d1 * x1; double xy1 = d1 * y1; double a1 = d1 * a; double xx2 = d2 * x2; double xy2 = d2 * y2; double b1 = d2 * b; double y = xy1 - xy2; double c = a1 - b1; y = c / y; d1 = y2; d2 = y1...
a.cc: In function 'int main(int, const char**)': a.cc:42:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 42 | while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &b) != EOF) | ^~~~~~~ | scanf
s217254233
p00004
C++
use std::io::{stdin, BufRead, BufReader}; fn main(){ let input = BufReader::new(stdin()); for line in input.lines(){ let v: Vec<f32> = line.unwrap().split_whitespace().filter_map(|x| x.parse::<f32>().ok()).collect(); println!("{:.3} {:.3}", (v[2]*v[4]-v[1]*v[5])/(v[0]*v[4]-v[...
a.cc:16:2: error: invalid preprocessing directive #[ 16 | #[allow(unused_imports)] | ^ a.cc:18:2: error: invalid preprocessing directive #[ 18 | #[allow(unused_imports)] | ^ a.cc:30:14: error: too many decimal points in number 30 | for _ in 0..n { | ^~~~ a.cc:1:1: error: 'u...
s139054421
p00004
C++
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <sstream> using namespace std; using DataSet = vector<double>; void readInputData(vector<string>& input_data){ string buff; while(getline(cin, buff)){ input_data.push_back(buff); } } void _parseString(const stri...
a.cc:89:1: error: expected declaration before '}' token 89 | } | ^
s110627624
p00004
C++
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <sstream> using namespace std; using DataSet = vector<double>; void readInputData(vector<string>& input_data){ string buff; while(getline(cin, buff)){ input_data.push_back(buff); } } void _parseString(const stri...
a.cc:89:1: error: expected declaration before '}' token 89 | } | ^
s401103982
p00004
C++
#include<iostream> #include<iomanip> #include<algorithm> #include<vector> using namespace std; int main() { double a, b, c, d, e, f, xx, yy; while (cin >> a >> b >> c >> d >> e >> f) { double y = (a * f - c * d) / (a * e - b * d); double y = (c*d - a * f) / (b*d - a * e); cout << fixed << setprecision(3) <<...
a.cc: In function 'int main()': a.cc:11:20: error: redeclaration of 'double y' 11 | double y = (c*d - a * f) / (b*d - a * e); | ^ a.cc:10:24: note: 'double y' previously declared here 10 | double y = (a * f - c * d) / (a * e - b * d); | ...
s435692860
p00004
C++
#include<iostream> #include<iomanip> #include<algorithm> #include<vector> using namespace std; int main() { double a, b, c, d, e, f, xx, yy; while (cin >> a >> b >> c >> d >> e >> f) { double y = (a * f - c * d) / (a * e - b * d);    double y = (c*d - a * f) / (b*d - a * e); cout << fixed << setprecision(3) ...
a.cc:11:12: error: extended character   is not valid in an identifier 11 |    double y = (c*d - a * f) / (b*d - a * e); | ^ a.cc:11:12: error: extended character   is not valid in an identifier a.cc: In function 'int main()': a.cc:11:12: error: '\U00003000\U00003000' was not declared in t...
s289787855
p00004
C++
#include<iostream> #include<iomanip> #include<algorithm> #include<vector> using namespace std; int main() { double a, b, c, d, e, f, xx, yy; while (cin >> a >> b >> c >> d >> e >> f) { double y = (a * f - c * d) / (a * e - b * d); double y = (c*d - a * f) / (b*d - a * e); cout << fixed << setprecision(3) << x << ...
a.cc: In function 'int main()': a.cc:11:16: error: redeclaration of 'double y' 11 | double y = (c*d - a * f) / (b*d - a * e); | ^ a.cc:10:16: note: 'double y' previously declared here 10 | double y = (a * f - c * d) / (a * e - b * d); | ^ a.cc:12:45: error...
s803671869
p00004
C++
#include <stdio.h> #include <vector> #include <utility> #include <algorithm> #include <iostream> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) #define ld long double ld a,b,c,d,e,f,x,y; ld shish(ld a) { a*=1000; a+=0.5; a=int(a); a/=1000; } int main(){ while(cin>>a>>b>>c>>d>>e>>f){ y=(a*f-c*d)/(ld)(a...
a.cc: In function 'long double shish(long double)': a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type] 16 | } | ^ a.cc: In function 'int main()': a.cc:22:7: error: 'sihsh' was not declared in this scope; did you mean 'shish'? 22 | y=sihsh(y); | ^~~~~ ...
s624630243
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) { double y = (a * f - c * d) / (a * e - b * d); double x = (c - b * y) / a; cout << fixed << setprecision(3) << x << " " << y << endl; } return 0; }
a.cc:6:9: error: expected initializer before 'double' 6 | double a, b, c, d, e, f; | ^~~~~~ a.cc:7:9: error: expected unqualified-id before 'while' 7 | while (cin >> a >> b >> c >> d >> e >> f) { | ^~~~~ a.cc:12:9: error: expected unqualified-id before 'return' 12 ...
s097861647
p00004
C++
using namespace std; int main(){ int a,b,c,d,e,f; double x,y; while(cin>>a>>b>>c>>d>>e>>f){ if(x != 0) x=(b*f-c*e)/(b*d-a*e); else x=0; if(y != 0)y = (a*f-c*d)/(a*e-b*d); else y = 0; cout<<fixed<<setprecision(3)<<x<<' '<<y<<endl; } return 0; ...
a.cc: In function 'int main()': a.cc:5:11: error: 'cin' was not declared in this scope 5 | 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 namespac...
s327481629
p00004
C++
#include<stdio.h> int main(void){ double a, b, c, d, e, f; double A,B; double x, y; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ if ( (a >= 0 && d < =0)|| (a >= 0 && d >= 0)) { A = c*d - f*a; B = b*d - e*a; y = A / B; } else if ((a < 0 && d > 0) || (a <...
a.cc: In function 'int main()': a.cc:11:30: error: expected primary-expression before '=' token 11 | if ( (a >= 0 && d < =0)|| (a >= 0 && d >= 0)) { | ^
s184806801
p00004
C++
#include<stdio.h> int main(void){ double a, b, c, d, e, f; double A,B; double x, y; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ if ( (a >= 0 && d <= 0)|| (a >= 0 && d >= 0)) { A = c*d - f*a; B = b*d - e*a; y = A / B; } else if ((a < 0 && d > 0) || (a <...
a.cc:11:30: error: extended character   is not valid in an identifier 11 | if ( (a >= 0 && d <= 0)|| (a >= 0 && d >= 0)) { | ^ a.cc: In function 'int main()': a.cc:11:30: error: '\U000030000' was not declared in this scope 11 | if ( (a >= 0 && d <= 0)|| (a >= 0...
s831388784
p00004
C++
#include<stdio.h> int main(void){ double a, b, c, d, e, f; double A,B; double x, y; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ if ( (a > 0 && d < 0)|| (a > 0 && d > 0)) { A = c*d - f*a; B = b*d - e*a; y = A / B; } else if ((a <= 0 && d >= 0) || (a <= ...
a.cc:11:28: error: extended character   is not valid in an identifier 11 | if ( (a > 0 && d < 0)|| (a > 0 && d > 0)) { | ^ a.cc: In function 'int main()': a.cc:11:28: error: '\U000030000' was not declared in this scope 11 | if ( (a > 0 && d < 0)|| (a > 0 && d > 0...
s465419448
p00004
C++
#include<stdio.h> int main(void){ double a, b, c, d, e, f; double A,B; double x, y; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ if ( (a > 0 && d < 0)|| (a > 0 && d > 0)) { A = c*d - f*a; B = b*d - e*a; y = A / B; } else { A = c*d + f*a; B = b*d + e...
a.cc:11:28: error: extended character   is not valid in an identifier 11 | if ( (a > 0 && d < 0)|| (a > 0 && d > 0)) { | ^ a.cc: In function 'int main()': a.cc:11:28: error: '\U000030000' was not declared in this scope 11 | if ( (a > 0 && d < 0)|| (a > 0 && d > 0...
s623349407
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { double a,b,c,d,e,f; double x,y; while(cin >> a >> b >> c >> d >> e >> f) { x = (c*e-b*f) / (a*e0d*b); y = (c-a*x) / c; cout << fixed << setprecision(3) << x << " " << y << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: 'e0d' was not declared in this scope 9 | x = (c*e-b*f) / (a*e0d*b); | ^~~
s663341127
p00004
C++
def ans(a, b, c, d, e, f): x = ((e*c - b*f)/(a*e-b*d)) y = ((-d*x + f)/e) x = "%.3f" % x y = "%.3f" % y return x, y sets = [] while True: try: line = list(map(int, input().split())) if(line[0] == " "): break; else: sets.append(line) except ...
a.cc:2:1: error: 'def' does not name a type 2 | def ans(a, b, c, d, e, f): | ^~~ a.cc:17:9: error: expected unqualified-id before 'else' 17 | else: | ^~~~
s657822722
p00004
C++
#include<bits/stdc++.h> using namespace std; int main(){ double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; double x, y; y = (a * f - d * c) / (a * e - d * b); x = (c - b * y) / a //小数点以下4桁で四捨五入して表示 cout << fixed << setprecision(3) << x << " " << y << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:28: error: expected ';' before 'cout' 9 | x = (c - b * y) / a | ^ | ; ...... 12 | cout << fixed << setprecision(3) << x << " " << y << endl; | ~~~~
s103089448
p00004
C++
import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; public class Main { private static FastScanner sc = new FastScanner(); public static void main(String[] args) { double a = sc.nextDouble(); double b = sc.nextDouble(); double c = sc.nextDouble(); dou...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ 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.io.InputStream; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodu...
s840281308
p00004
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,e,f; while(scanf(%d%d%d%d%d%d,&a,&b,&c,&d,&e,&f) ) { double y=(double)(c*d-a*f)/(double)(b*d-a*e); if(a!=0) printf("%.3f %.3f\n",(c-b*y)/a,y); else printf("%.3f %.3f\n",(f-e*y)/d,y); } } return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: expected primary-expression before '%' token 10 | while(scanf(%d%d%d%d%d%d,&a,&b,&c,&d,&e,&f) ) | ^ a.cc: At global scope: a.cc:23:5: error: expected unqualified-id before 'return' 23 | return 0; | ^~~~~~ a.cc:25:5:...
s957386995
p00004
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,e,f; while (∼scanf( "%d%d%d%d%d%d" ,&a,&b,&c,&d,&e,&f) ) { double y=(double)(c*d-a*f)/(double)(b*d-a*e); if(a!=0) printf("%.3f %.3f\n",(c-b*y)/a,y); else printf("%.3f %.3f\n",(f-e*y)/d,y); } return 0; }
a.cc:10:16: error: extended character ∼ is not valid in an identifier 10 | while (∼scanf( "%d%d%d%d%d%d" ,&a,&b,&c,&d,&e,&f) ) | ^ a.cc: In function 'int main()': a.cc:10:16: error: '\U0000223cscanf' was not declared in this scope; did you mean 'wscanf'? 10 | while (∼scanf( "%...
s077207473
p00004
C++
#include <iostream> #include <cstdlib> using namespace std; int main() { double a, b, c, d, e, f; while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF){ double ans1 = (e*c-f*b)/(e*a-b*d); double ans2 = (d*c-f*a)/(b*d-a*e); ans1 = (fabs(ans1) < 1e-15) ? 0.0 : ans1; ans2 = (fabs(ans2) < 1e-15) ? 0...
a.cc: In function 'int main()': a.cc:12:25: error: 'fabs' was not declared in this scope; did you mean 'labs'? 12 | ans1 = (fabs(ans1) < 1e-15) ? 0.0 : ans1; | ^~~~ | labs
s409909951
p00004
C++
import java.util.*; import java.lang.*; import java.math.*; public class Main { Scanner sc = new Scanner(System.in); void run() { int a,b,c,d,e,f; while ( sc.hasNext() ) { a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); d = sc.nextInt(); e = sc.nextInt(); f = sc.nextInt(); ...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.lang.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1...
s547208471
p00004
C++
#include<iostream> #include<iomanip> double halfadjust(double x){ int tmp = (x*10000); tmp = tmp%10; double ans = static_cast<double>(static_cast<int>(x*1000)); ans = ans/1000; if(tmp >= 5) ans += 0.001; if(tmp <= -5) ans -= 0.001; return ans; } double a,b,c,d,e,f; void solve(){ using namespace std; dou...
a.cc: In function 'int main()': a.cc:28:23: error: expected ';' before 'while' 28 | using std::cin | ^ | ; 29 | while(cin >> a&& cin >> b&& cin >> c&& cin >> d&& cin >> e&& cin >> f){ | ~~~~~
s493855952
p00004
C++
#include <iostream> using namespace std; int main() { float a[6]; float x,y; while(true) cin >> a[0]; cin >> a[1]; cin >> a[2]; cin >> a[3]; cin >> a[4]; cin >> a[5]; if(cin.eof()) break; x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]); y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]); ...
a.cc: In function 'int main()': a.cc:15:25: error: break statement not within loop or switch 15 | break; | ^~~~~ a.cc: At global scope: a.cc:23:9: error: expected unqualified-id before 'return' 23 | return 0; | ^~~~~~ a.cc:24:1: error: ex...
s085463363
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main(){ double a[6]; double x,y; while(true){ cin >> a[0]; cin >> a[1]; cin >> a[2]; cin >> a[3]; cin >> a[4]; cin >> a[5]; if(cin.eof()) break; x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]); y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*...
a.cc: In function 'int main()': a.cc:21:25: error: 'setprecission' was not declared in this scope 21 | cout << setprecission(3) << x << " " <<setprecision(3) << y << endl; | ^~~~~~~~~~~~~
s669102994
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main(){ double a[6]; double x,y; while(true){ cin >> a[0]; cin >> a[1]; cin >> a[2]; cin >> a[3]; cin >> a[4]; cin >> a[5]; if(cin.eof()) break; x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]); y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*...
a.cc: In function 'int main()': a.cc:21:25: error: 'setprecission' was not declared in this scope 21 | cout << setprecission(3) << x << " " <<setprecision(3) << y << endl; | ^~~~~~~~~~~~~
s678810392
p00004
C++
#include <iostream> using namespace std; /* aX+bY=c dX+eY=f */ void solve(int a, int b, int c, int d, int e, int f) { int x = (f - ec/b) / (d - ec/b); int y = (c - ax) / b; cout << x << " " << y << endl; } int main() { int a, b, c, d, e, f; while (cin >> a >> b >> c >> d >> e >> f) { solve(a,b,c,d,e,f); } ...
a.cc: In function 'void solve(int, int, int, int, int, int)': a.cc:11:22: error: 'ec' was not declared in this scope; did you mean 'c'? 11 | int x = (f - ec/b) / (d - ec/b); | ^~ | c a.cc:12:22: error: 'ax' was not declared in this scope; did you mean 'x'...
s716782018
p00004
C++
#include <iostream.h> using namespace std; int main(){ int i; float x[6]; while(cin >> x[0]){ for(i=1; i<6; i++){ cin >> x[i]; } //normalize x[1]/=x[0]; x[2]/=x[1]; x[0]=1; //subtraction x[4]-=x[3]*x[1]; x[5]-=x[3]*x[2]; x[3]=0; //normalize x[5]/=x[4]; x[4]=1; //sub...
a.cc:1:10: fatal error: iostream.h: No such file or directory 1 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s712177371
p00004
C++
#include <iostream> using namespace std; { double a,b,c,d,e,f; double x,y; while (cin>>a>>b>>c>>d>>e>>f, cin.eof()) { y = (c * d - a * f) / (b * d - e * a); x = (c - (b * y)) / a; cout<<setprecision(3)<<setiosflags(ios::fixed)<<x<<" "<<y<<endl; } return 0; }
a.cc:4:1: error: expected unqualified-id before '{' token 4 | { | ^
s599048001
p00004
C++
#include <iostream> #include <iomanip> using namespace std; { double a,b,c,d,e,f; double x,y; while (cin>>a>>b>>c>>d>>e>>f, cin.eof()) { y = (c * d - a * f) / (b * d - e * a); x = (c - (b * y)) / a; cout<<setprecision(3)<<setiosflags(ios::fixed)<<x<<" "<<y<<endl; } return 0; }
a.cc:5:1: error: expected unqualified-id before '{' token 5 | { | ^
s970017391
p00004
C++
#include<stdio.h> int main(void){ double a,b,c,d,e,f,x,y; cin >> a >> b >> c >> d >> e >> f; y = (f-d*c/a)/(e-d*b/a); x = c/a-b/a*y; printf("%.4f",x); printf(" "); printf("%.4f\n",y); }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin >> a >> b >> c >> d >> e >> f; | ^~~
s453870850
p00004
C++
#include<stdio.h> #include<iostream> int main(void){ double a,b,c,d,e,f,x,y; cin >> a >> b >> c >> d >> e >> f; y = (f-d*c/a)/(e-d*b/a); x = c/a-b/a*y; printf("%.4f %.4f\n",x); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> a >> b >> c >> d >> e >> f; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | exter...
s253497081
p00004
C++
#include<stdio.h> int main(void) { double x=0 , y=0 ; int a , b , c , d , e , f , p=0 , r=0 , s=0 ; while(scanf("%d %d %d %d %d %d",&a ,&b ,&c ,&d ,&e ,&f) != EOF) { p=a*e-b*d ; q=c*e-b*f ; x=(double)q/p ; r=b*d-a*e ; s=c*d-a*f ; y=(double)s/r ; if(x==-0) x=0 ; if(y==-0) y=0 ; printf("%.3f %.3f\n",x ,y) ; } return ...
a.cc: In function 'int main()': a.cc:10:1: error: 'q' was not declared in this scope 10 | q=c*e-b*f ; | ^
s838764053
p00004
C++
#include <stdio.h> #include <stdlib.h> #include <math.h> #define EPS 1e-12; 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){ x=(c*e-b*f)/(a*e-b*d); y=(d*c-a*f)/(b*d-a*e); if(abs(x) < EPS) x = 0.000; if(abs(y) < EPS) y = 0.00...
a.cc: In function 'int main()': a.cc:15:20: error: expected primary-expression before ')' token 15 | if(abs(x) < EPS) x = 0.000; | ^ a.cc:16:20: error: expected primary-expression before ')' token 16 | if(abs(y) < EPS) y = 0.000; | ^
s903547857
p00004
C++
#include<stdio.h> int main(void){ float a,b,c,d,e,f,x,y,i; while(scanf("%d %d %d %d %d %d",&a, &b,&c,&d,&e,&f)!=EOF){ x=(e*c-b*f)/(d*e-b*d); y=(a*f-c*d)/(d*e-b*d); printf(" %f %f\n",x,y);}1 return 0; }
a.cc: In function 'int main()': a.cc:7:30: error: expected ';' before 'return' 7 | printf(" %f %f\n",x,y);}1 | ^ | ; ...... 12 | return 0; | ~~~~~~
s189560244
p00004
C++
int main() { std::cout << std::setprecision(3); std::cout.setf(std::ios::fixed, std::ios::floatfield); double a, b, c, d, e, f; while( std::cin >> a >> b >> c >> d >> e >> f ) { const double x = (b*f-c*e) / (b*d-a*e); const double y = (c-a*x) / b; std::cout << ((-0.0005<=x && x<0.0005)?0.0:x) << " " << ((-0....
a.cc: In function 'int main()': a.cc:3:14: error: 'cout' is not a member of 'std' 3 | std::cout << std::setprecision(3); | ^~~~ a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc...
s024841428
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { double a, b, c, d, e, f, x, y; cin >> a >> b >> c >> d >> e >> f) y = ( c * d - a * f ) / ( b * d - a * e ); x = ( c - b * y ) / a; cout << showpoint << setprecision(3); cout << setiosflags( ios::fixed ); cout << ( x == -0.0 ? 0.0 : x ...
a.cc: In function 'int main()': a.cc:8:42: error: expected ';' before ')' token 8 | cin >> a >> b >> c >> d >> e >> f) | ^ | ;
s442959964
p00004
C++
#include <iostream> #include <vector> #include <map> typedef vector< typedef pair<int,int> mat; using namespace std; int main() { int a,b,c,d,e,f; double A[2][2]; double B[2]; double inv_A[2][2]; scanf("%d %d %d %d %d %d",a&,&b,&c,&d,&e,&f); int det = a*e-b*d; A[0][0]=a; A[0][1] = b; A[1][0]=d; A[1][1] = e; B[0] = c; ...
a.cc:5:9: error: 'vector' does not name a type 5 | typedef vector< | ^~~~~~ a.cc: In function 'int main()': a.cc:14:29: error: expected primary-expression before ',' token 14 | scanf("%d %d %d %d %d %d",a&,&b,&c,&d,&e,&f); | ^
s776444671
p00004
C++
#include <iostream> #include <vector> #include <map> typedef pair<int,int> mat; using namespace std; int main() { int a,b,c,d,e,f; double A[2][2]; double B[2]; double inv_A[2][2]; scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f); int det = a*e-b*d; A[0][0]=a; A[0][1] = b; A[1][0]=d; A[1][1] = e; B[0] = c; B[1] = f; inv_...
a.cc:5:9: error: 'pair' does not name a type 5 | typedef pair<int,int> mat; | ^~~~
s519842230
p00004
C++
#include <stdio.h> //#define DEBUGNOW #ifdef DEBUGNOW #define debug #else #define debug 1 ? (void)0 : #endif double sishagonyu(double num) { //int num2; if (num == 0) return num; if (num > 0) { num += 0.0005; } else { num -= 0.0005; } num = (double)(int)(num * 1000) / 1000; // num *= 1000; // num2 =...
a.cc: In function 'int main()': a.cc:44:29: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void' 44 | debug printf("input:\n%f %f %f\n%f %f %f\n", a, b, c, d, e, f); //input | ~~~~~~^~~~...
s121198726
p00004
C++
#include <stdio.h> //#define DEBUGNOW /* #ifdef DEBUGNOW #define debug #else */ #define debug 1 ? (void)0 : //#endif double sishagonyu(double num) { //int num2; if (num == 0) return num; if (num > 0) { num += 0.0005; } else { num -= 0.0005; } num = (double)(int)(num * 1000) / 1000; // num *= 1000; //...
a.cc: In function 'int main()': a.cc:45:29: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void' 45 | debug printf("input:\n%f %f %f\n%f %f %f\n", a, b, c, d, e, f); //input | ~~~~~~^~~~...
s528872431
p00004
C++
import java.io.*; import java.text.DecimalFormat; class Main{ public static void main(String[] args)throws IOException{ BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); String buf; double[][] data=new double[2][3]; double x,y; while((buf=br.readLine()) != null){ String[] buf2=buf...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ 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.text.DecimalFormat; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts...
s180772415
p00004
C++
#include<iostream> using namespace std; double round(double source, int precision) { // 四捨五入 return floor((fabs(source) * pow(10, (double)precision) + 0.5)) / pow(10, (double)precision) * (source < 0 ? -1 : 1); } int main() { double a, b, c, d, e, f, x, y; while (cin >> a >> b >> c >> d >> e >> f) { x = (c * e...
a.cc: In function 'double round(double, int)': a.cc:6:23: error: 'fabs' was not declared in this scope; did you mean 'labs'? 6 | return floor((fabs(source) * pow(10, (double)precision) + 0.5)) / pow(10, (double)precision) * (source < 0 ? -1 : 1); | ^~~~ | ...
s082466261
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) { y=(a*f-c*d)/(a*e-d*b); x=(c-b*y)/a: printf("%.3f %.3f\n",x,y); } }
a.cc: In function 'int main()': a.cc:8:28: error: found ':' in nested-name-specifier, expected '::' 8 | x=(c-b*y)/a: | ^ | :: a.cc:8:27: error: 'a' is not a class, namespace, or enumeration 8 | x=(c-b*y)/a: |...
s692965816
p00004
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double a,b,c,d,e,f; double x,y; while(cin>>a){ cin>>b; cin>>c; cin>>d; cin>>e; cin>>f; x = (e * c + (-b)*f)/(a*e-b*d); y = (-d * c + a * f)/(a*e-b*d); if(fabs(x)<1e-3 && fabs(y)<1e-3){ printf("%.3f %.3f\n",fabs(x),fabs(y))...
a.cc: In function 'int main()': a.cc:21:20: error: 'fabs' was not declared in this scope; did you mean 'labs'? 21 | if(fabs(x)<1e-3 && fabs(y)<1e-3){ | ^~~~ | labs
s536146575
p00004
C++
#include <conio.h> #include <iostream> #include <iomanip> using namespace std; int main() { int a,b,c,d,e,f; double x,y; while(cin>>a>>b>>c>>d>>e>>f) { -1000 <= a, b, c, d, e, f <= 1000; x= (c*e-b*f)/(a*e-b*d); y= (c*d-a*f)/(b*d-a*e); if(x == -0.00){x=0.00;} if(y == -0.00){y=0.00;} cout<<setprecision(3...
a.cc:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s773512845
p00004
C++
#include <conio.h> #include <iostream> #include <iomanip> using namespace std; int main() { int a,b,c,d,e,f; double x,y; while(cin>>a>>b>>c>>d>>e>>f) { -1000 <= a, b, c, d, e, f <= 1000; x= (c*e-b*f)/(a*e-b*d); y= (c*d-a*f)/(b*d-a*e); if(x == -0.00){x=0.00;} if(y == -0.00){y=0.00;} cout<<setprecision(3...
a.cc:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s293365523
p00004
C++
#include <conio.h> #include <iostream> #include <iomanip> #include <math.h> using namespace std; int main() { int a,b,c,d,e,f; double x,y; while(cin>>a>>b>>c>>d>>e>>f) { -1000 <= a, b, c, d, e, f <= 1000; x= (c*e-b*f)/(a*e-b*d); y= (c*d-a*f)/(b*d-a*e); cout<<setprecision(3)<<fixed; cout<<x<<" "<<y<<en...
a.cc:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s205103402
p00004
C++
#include <conio.h> #include <iostream> #include <iomanip> #include <math.h> using namespace std; int main() { int a,b,c,d,e,f; double x,y; while(cin>>a>>b>>c>>d>>e>>f) { -1000 <= a, b, c, d, e, f <= 1000; x= (c*e-b*f)/(a*e-b*d); y= (c*d-a*f)/(b*d-a*e); cout<<setprecision(3)<<fixed; cout<<x<<" "<<y<<en...
a.cc:1:10: fatal error: conio.h: No such file or directory 1 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s497053480
p00004
C++
#include <iostream> #include <iomanip> using namespace std; int main() { int a,b,c,d,e,f; double x,y; cin>>a>>b>>c>>d>>e>>f -1000 <= a, b, c, d, e, f <= 1000; x= (c*e-b*f)/(a*e-b*d); y= (c*d-a*f)/(b*d-a*e); if(x == -0.00){x=0.00;} if(y == -0.00){y=0.00;} cout<<setprecision(3)<<fixed; cout<<x<<" "<<y...
a.cc: In function 'int main()': a.cc:9:27: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 9 | cin>>a>>b>>c>>d>>e>>f | ~~~~~~~~~~~~~~~~~~^~~ | | | ...
s201675965
p00004
C++
#include<iostream> using namespace std; int main(){ double a,b,c,d,e,f,x,y; while(cin>>a>>b>>c>>d>>e>>f){ x=(c-f*b/e)/(a-d*b/e)+0.0005; y=(c-a*x)/b+0.0005; x-=x%0.001; y-=y%0.001; cout<<x<<" "<<y<<endl;}}
a.cc: In function 'int main()': a.cc:9:5: error: invalid operands of types 'double' and 'double' to binary 'operator%' 9 | x-=x%0.001; | ~^~~~~~ | | | | | double | double a.cc:10:5: error: invalid operands of types 'double' and 'double' to binary 'operator%' 10 | y-=y%0.001; ...
s072000289
p00004
C++
#include<stdio.h> #include<math.h> int main(){ double A[2][3],x,y,i; /* printf("6つの実数を入力してください 例:6 3 4 8 9 1\n"); scanf("%lf%lf%lf%lf%lf%lf",&A[0][0],&A[0][1],&A[0][2],&A[1][0],&A[1][1],&A[1][2]); printf("連立方程式%lfx+%lfy=%lf,%lfx+%lfy=%lfを解きます\n",A[0][0],A[0][1],A[0][2],A[1][0],A[1][1],A[1][2]); */ while(scan...
a.cc: In function 'int main()': a.cc:18:29: error: invalid types 'double [3][double]' for array subscript 18 | A[0][i] /= A[0][0]; | ^
s840039380
p00004
C++
#include<stdio.h> int a ; int b ; int c ; int d ; int e ; int f ; double x ; double y ; int main() { while ( scanf ( "%d %d %d %d %d %d" , &a , &b , &c , &d , &e , & ) == 6 ) { y = (c*a-f*a)/(b*a-e*a) ; x = ( c - b*(c*a-f*a)/(b*a-e*a) ) / a ; printf ( "%.3llf %.3llf\n" , x , y ) ; } return 0 ; }
a.cc: In function 'int main()': a.cc:14:74: error: expected primary-expression before ')' token 14 | while ( scanf ( "%d %d %d %d %d %d" , &a , &b , &c , &d , &e , & ) == 6 ) { | ^
s000690822
p00004
C++
#include<stdio.h> void printFunc(int a,int b,int c,int d,int e,int f); int main(){ int a,b,c,d,e,f; float ansX,ansY; scanf ("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); printFunc(a,b,c,d,e,f); scanf ("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f); printFunc(a,b,c,d,e,f); return 0; } void printFunc(int a,int b...
a.cc: In function 'void printFunc(int, int, int, int, int, int)': a.cc:19:5: error: 'ansY' was not declared in this scope 19 | ansY = 0; | ^~~~ a.cc:22:5: error: 'ansY' was not declared in this scope 22 | ansY = (float)(b*f - e*c)/(float)(b*d - e*a); | ^~~~ a.cc:26:5: error: 'ansX' was...
s670533548
p00004
C++
#include <iostream> #include <cstdio> using namespace std; int main(int argc, char *argv[]) { double a, b, c, d, e, f; while (true) { cin >> a >> b >> c >> d >> e >> f; if (cin.eof()) break; a -= d * b / e; c -= f * b / e; double x = c / a; if (x >= 0) x = (int)(x * 100 + 0.5)...
a.cc: In function 'int main(int, char**)': a.cc:27:33: error: expected ')' before ';' token 27 | printf("%.3lf %.3lf\n", x, y; | ~ ^ | ) a.cc:29:2: error: expected '}' at end of input 29 | } | ^ a.cc:6:34: note: to match this '{'...
s097751164
p00004
C++
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #include <iostream> using namespace std; int main(int argc, char **argv) { double a, b, c, d, e, f, tmp, s, t; while((cin >> a >> b >> c >> d >> e >> f)){ tmp = (a*e-b*d); s = ((e*c-b*f)/tmp); t = ((a*f-d*c)/tmp); ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a...
s034620067
p00004
C++
(function set_utils(undefined){ this.print_float = function print_float(val, base, pad, prec) { var p10=Math.pow(10,prec); var ival=""+Math.round(val*p10); if ( ival === '0' ) return '0.'+Array(prec+1).join('0'); var ilen=ival.length-prec; if(ilen===0) return "0."+ival.substr(ilen,prec); return ival....
a.cc:6:32: warning: multi-character character constant [-Wmultichar] 6 | return '0.'+Array(prec+1).join('0'); | ^~~~ a.cc:15:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 15 | 'use strict'; | ...
s351450421
p00004
C++
#include<iostream> #include<iomanip> using namespace std; double a,b,c,d,e,f; int main(void){ //cin>>a>>b>>c>>d>>e>>f; while(cin>>a>>b>>c>>d>>e>>f){ double x,y; /* ax+by=c; dx+ey=f; ax=c-by; x=(c-by)/a; d(c-by)/a+ey=f; dc/a-dby/a+ey=f; -dby/a+ey=f-dc/a; (e-db/a)y=f-dc/a; y=(f-dc/a)/(e-db/a); ...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:7:15: note: to match this '{' 7 | int main(void){ | ^
s665085412
p00004
C++
#include<stdio.h> void main() { float a,b,c,d,e,f; float x,y; scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f); y=(c*d-a*f)/(b*d-a*e); x=(c-b*y)/a; printf("x=%f,y=%f",x,y); }
a.cc:2:1: error: '::main' must return 'int' 2 | void main() | ^~~~
s020815547
p00004
C++
#include <iostream> #include <iomanip> using namespace std; double* solve_equations(int *a) { // クラメルの公式を用いる int data_size=sizeof(a[0]); /*cout << "data_size=" << data_size << endl; cout << "a=" << a << endl; cout << "*(a + data_size*1)=" << *(a + 1) << endl; cout << "*(a + data_size*0) * *(a + data_size*4)" << ...
a.cc: In function 'double* solve_equations(int*)': a.cc:22:14: error: 'pow' was not declared in this scope 22 | ax = pow(z,-1)*x; | ^~~ a.cc:28:16: warning: address of local variable 'ans' returned [-Wreturn-local-addr] 28 | return ans; | ^~~ a.cc:27:16: not...
s739261715
p00004
C++
#include <iostream> #include <iomanip> using namespace std; double* solve_equations(int *a) { // クラメルの公式を用いる int data_size=sizeof(a[0]); /*cout << "data_size=" << data_size << endl; cout << "a=" << a << endl; cout << "*(a + data_size*1)=" << *(a + 1) << endl; cout << "*(a + data_size*0) * *(a + data_size*4)" << ...
a.cc: In function 'double* solve_equations(int*)': a.cc:22:14: error: 'pow' was not declared in this scope 22 | ax = pow(z,-1)*x; | ^~~ a.cc:28:16: warning: address of local variable 'ans' returned [-Wreturn-local-addr] 28 | return ans; | ^~~ a.cc:27:16: not...
s961881270
p00004
C++
#include <iostream> #include <iomanip> #include <stdio.h> using namespace std; double* solve_equations(int *a) { // クラメルの公式を用いる int data_size=sizeof(a[0]); /*cout << "data_size=" << data_size << endl; cout << "a=" << a << endl; cout << "*(a + data_size*1)=" << *(a + 1) << endl; cout << "*(a + data_size*0) * *(a ...
a.cc: In function 'double* solve_equations(int*)': a.cc:23:14: error: 'pow' was not declared in this scope 23 | ax = pow(z,-1)*x; | ^~~ a.cc:29:16: warning: address of local variable 'ans' returned [-Wreturn-local-addr] 29 | return ans; | ^~~ a.cc:28:16: not...
s645833809
p00004
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ int t; double a, b, c, d, e, f, x, y; cin >> t; while(t--){ cin >> a >> b >> c >> d >> e >> f; y = (c/(d)a - f/d)/(b/a - e/d); x = (c-b*y)/a; cout << x << " " << y << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: expected ')' before 'a' 12 | y = (c/(d)a - f/d)/(b/a - e/d); | ~ ^ | )
s890643635
p00004
C++
#include<iostream> #include<vector> #include<iomanip> using namespace std; typedef struct Shiki{ double a,b,c;//ax+by=c double x,y; }; Shiki Equation (Shiki, Shiki); main(){ Shiki shiki1,shiki2; vector<Shiki> ans; int i=0; while(cin){ cin>>shiki1.a>>shiki1.b>>shiki1.c>>shiki2.a>>shiki2.b>>shiki2...
a.cc:7:1: warning: 'typedef' was ignored in this declaration 7 | typedef struct Shiki{ | ^~~~~~~ a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 14 | main(){ | ^~~~ a.cc: In function 'Shiki Equation(Shiki, Shiki)': a.cc:55:18: error: invalid operands of types 'd...
s205889333
p00004
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextDouble(); double b = sc.nextDouble(); double c = sc.nextDouble(); double d = sc.nextDouble(); double e = sc.nextDouble(); double f = sc.nextDouble(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s774739020
p00004
C++
#include<iostream> #include <iomanip.h> using namespace std; int main() { double a,b,c,d,e,f; double n; double x,y,ty,tc; while( cin>>a>>b>>c>>d>>e>>f ) { n=(a/d); d = d * n; e = e * n; f = f * n; ty = b-e; tc = c-f; y = tc/ty; tc = c - (b*y); x = tc/a; cout << setiosflags(ios::fixed); ...
a.cc:2:10: fatal error: iomanip.h: No such file or directory 2 | #include <iomanip.h> | ^~~~~~~~~~~ compilation terminated.
s814293818
p00004
C++
#include <stdio.h> void Renritsu(double a,double b,double c,double d,double e,double f){ double ta = a * d; double tb = b * d; double tc = c * d; double td = d * a; double te = e * a; double tf = f * a; td -= ta; te -= tb; tf -= tc; double y = tf / te; ta = a * e; tb = b * e; tc = c * e; td = d * b; te ...
a.cc:28:1: error: '::main' must return 'int' 28 | void main() | ^~~~
s130743288
p00004
C++
int gcm(int a,int b){ int c=a%b; while(c!=0){ a=b; b=c; c=a%b; } return b; } int main(){ int x[2],y[3],sum[3]; double ans[2]; while(cin>>x[0]>>y[0]>>sum[0]>>x[1]>>y[1]>>sum[1]){ if(x[0]==0){ ans[1]=(double)sum[0]/y[0]; ans[0]=(sum[1]-y[1]*ans[1])/x[1]; }else if(x[1]==0){ ans[1]=(double...
a.cc: In function 'int main()': a.cc:14:15: error: 'cin' was not declared in this scope 14 | while(cin>>x[0]>>y[0]>>sum[0]>>x[1]>>y[1]>>sum[1]){ | ^~~ a.cc:33:17: error: 'printf' was not declared in this scope 33 | printf("%.3f %.3f\n",ans[0],ans[1]); | ...
s073445997
p00004
C++
#include<stdio.h> int main(){ double x1,y1,z1,x2,y2,z2,num1=0,x=0,y=0,z=0,sum1=0,sum2=0,vx=0,vy=0,vz=0; scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&z1,&x2,&y2,&z2); if((x1>0&&x2>0)||(x1<0&&x2>0)){ num1=x2/x1*-1; } else if((x1>0&&x2<0)||(x1<0&&x2<0)){ num1=x2/x1; } else if() vx=x1*num1; vy=y1*nu...
a.cc: In function 'int main()': a.cc:17:17: error: expected primary-expression before ')' token 17 | else if() | ^
s797626289
p00004
C++
while line = gets (a, b, c, d, e, f) = line.split(" ").map{|str|Integer str} z = a*e - b*d x = (c*e-f*b)/z + 0.000 y = (f*a-c*d)/z + 0.000 puts sprintf("%.3f %.3f", x, y) end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while line = gets | ^~~~~ a.cc:3:3: error: 'z' does not name a type 3 | z = a*e - b*d | ^
s067320971
p00004
C++
try : while True : (a,b,c,d,e,f) = map(int, raw_input().split()) print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d)) except EOFError : pass
a.cc:1:1: error: expected unqualified-id before 'try' 1 | try : | ^~~
s896810196
p00004
C++
#include<iostream> #include<iomanip> #include<stdio.h> using namespace std; int main() { double a,b,c,d,e,f; double x,y; while(true){ cin >> a >> b >> c >> d >> e >> f; double tempb = b; a*=e;b*=e;c*=e; d*=tempb;e*=tempb;f*=tempb; a-=d;b-=e;c-=f; x = c/a; y = (f-(d*x))/e; if(x == -0) x = 0;...
a.cc: In function 'int main()': a.cc:28:21: error: 'floor' was not declared in this scope 28 | x = floor((x+0.0005)*1000)/1000; | ^~~~~
s347577792
p00004
C++
#include "iostream" #include "iomanip" using namespace std; double main() { double a,b,c,d,e,f,x,y; while(cin>>a>>b>>c>>d>>e>>f) { y=(a*f-c*d)/(a*e-b*d); x=(c*e-b*f)/(a*e-b*d); cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl; } return 0; }
a.cc:5:1: error: '::main' must return 'int' 5 | double main() | ^~~~~~
s961706788
p00004
C++
#include<bits/stdc++.h> #include<cstdio> #include<sstream> #include<cstdlib> #include<cctype> #include<cmath> #include<algorithm> #include<set> #include<queue> #include<stack> #include<list> #include<iostream> #include<fstream> #include<numeric> #include<string> #include<vector> #include<cstring> #include<map> #include...
a.cc: In function 'int main()': a.cc:74:34: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 74 | while((cin>>a>>b>>c>>d>>e>>f)!=EOF) | ~~~~~~~~~~~~~~~~~~~~~~~^~ | | ...
s283383731
p00004
C++
#include <iostream> using namespace std; int main(){ double a,b,c,d,e,f,x,y; while(cin>>a>>b>>c>>d>>e>>f){ y=(c*d-f*e)/(b*d-a*e); x=(c-b*y)/a; cout<<setprecision(3)<<x<<y<<endl;} return 0;}
a.cc: In function 'int main()': a.cc:8:7: error: 'setprecision' was not declared in this scope 8 | cout<<setprecision(3)<<x<<y<<endl;} | ^~~~~~~~~~~~ a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>' 1 | #include <iostream> ...
s897626898
p00004
C++
#include<iostream> using namespace std; int main(){ double a, b, c, d, e, f, x, y; double thousand = 1000.000; cin >> a >> b >> c >> d >> e >> f; x = (c*e - f*b) / (a*e - b*d); y = (d*c - f*a) / (b*d - a*e); x = x * pow(10.0, 3.0); x += 0.5; x = (int)x; x = (double)x/thousand; y = y * pow(10.0, 3.0);...
a.cc: In function 'int main()': a.cc:17:17: error: 'pow' was not declared in this scope 17 | x = x * pow(10.0, 3.0); | ^~~
s544626246
p00004
C++
#include<cstdio> #include<cmath> #include<algorithm> #define rep(i,a,b) for(int i = (a); i<=(b); i++) using namespace std; const int num = 100; double matrix[num][num + 1]; //邉サ謨ー遏ゥ髦オ?御サ?蠑?ァ?double ans[num]; //扈捺棡謨ー扈? void exchange_col(int p1,int p2,int n) //莠、謐「p1陦悟柱p2陦檎噪謇?怏謨ー謐ョ { double t; in...
a.cc:17:5: error: expected initializer before 'int' 17 | int i,j,k; | ^~~ a.cc:21:5: error: expected unqualified-id before 'for' 21 | for(i = 0 ; i < n - 1 ; i++) | ^~~ a.cc:21:17: error: 'i' does not name a type 21 | for(i = 0 ; i < n - 1 ; i++) | ^ a.cc:2...
s232849636
p00004
C++
z = [] while True: try: a, b, c, d, e, f = map(float, raw_input().split()) x = (c * e - b * f) / (a * e - d * b) y = (c * d - f * a) / (b * d - e * a) z.append([x, y]) except: break for i in z: print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 0))
a.cc:1:1: error: 'z' does not name a type 1 | z = [] | ^
s350026996
p00004
C++
#include <iostream> #include <cstdio> using namespace std; int main() { double 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); if(x*10000%10>=5) x=x+0.001; if(y*10000%10>=5) y=y+0.001; printf("%.3lf %.3lf\n",x,y); } return 0; }
a.cc: In function 'int main()': a.cc:13:27: error: invalid operands of types 'double' and 'int' to binary 'operator%' 13 | if(x*10000%10>=5) x=x+0.001; | ~~~~~~~^~~ | | | | double int a.cc:14:27: error: invalid operands...