submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s771852087
|
p00004
|
C++
|
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<sstream>
#include<iomanip>
#include<cstdlib>
using namespace std;
int main()
{
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f)
{
double x = (c*e - b*f) / (a*e - b*d);
double y = (c*d - a*f) / (b*d - a*e);
if (x == 0)x = fabs(x);
if (y == 0)y = fabs(y);
cout << fixed << setprecision(3) << x << " ";
cout << fixed << setprecision(3) << y << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:32: error: 'fabs' was not declared in this scope; did you mean 'labs'?
17 | if (x == 0)x = fabs(x);
| ^~~~
| labs
a.cc:18:32: error: 'fabs' was not declared in this scope; did you mean 'labs'?
18 | if (y == 0)y = fabs(y);
| ^~~~
| labs
|
s152138630
|
p00004
|
C++
|
#include <cstdio>
int main() {
double a,b,c,d,e,f;
while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
prinff("%f %f\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
};
return 0;
};
|
a.cc: In function 'int main()':
a.cc:5:3: error: 'prinff' was not declared in this scope; did you mean 'printf'?
5 | prinff("%f %f\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
| ^~~~~~
| printf
|
s578761141
|
p00004
|
C++
|
#include <cstdio>
int main() {
double a,b,c,d,e,f;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
prinff("%lf %lf\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
};
return 0;
};
|
a.cc: In function 'int main()':
a.cc:5:3: error: 'prinff' was not declared in this scope; did you mean 'printf'?
5 | prinff("%lf %lf\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
| ^~~~~~
| printf
|
s242803709
|
p00004
|
C++
|
solve :: [Double] -> String
solve [a,b,c,d,e,f] = (shows ((c*e-b*f)/(a*e-b*d)) " ") ++ (show $ (a*f-c*d)/(a*e-b*d))
main = getContents >>= mapM_ putStrLn . map solve . map (map read . words) . lines
|
a.cc:1:1: error: 'solve' does not name a type
1 | solve :: [Double] -> String
| ^~~~~
|
s792250967
|
p00004
|
C++
|
solve :: [Double] -> String
solve [a,b,c,d,e,f] = (shows ((c*e-b*f)/(a*e-b*d)) " ") ++ (show $ (a*f-c*d)/(a*e-b*d))
main = getContents >>= mapM_ putStrLn . map solve . map (map read . words) . lines
|
a.cc:1:1: error: 'solve' does not name a type
1 | solve :: [Double] -> String
| ^~~~~
|
s767407336
|
p00004
|
C++
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line ="";
while((line = br.readLine())!=null){
String[] s= line.split(" ");
int a = Integer.parseInt(s[0]);
int b = Integer.parseInt(s[1]);
int c = Integer.parseInt(s[2]);
int d = Integer.parseInt(s[3]);
int e = Integer.parseInt(s[4]);
int f = Integer.parseInt(s[5]);
int x = (e*c - b*f)/(a*e - b*d);
int y = (a*f - c*d)/(a*e - b*d);
System.out.println(x+" "+y);
}
}
}
|
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.BufferedReader;
| ^~~~~~
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.io.IOException;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class Main {
| ^~~~~~
|
s989209895
|
p00004
|
C++
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line ="";
while((line = br.readLine())!=null){
String[] s= line.split(" ");
int a = Integer.parseInt(s[0]);
int b = Integer.parseInt(s[1]);
int c = Integer.parseInt(s[2]);
int d = Integer.parseInt(s[3]);
int e = Integer.parseInt(s[4]);
int f = Integer.parseInt(s[5]);
int x = (e*c - b*f)/(a*e - b*d);
int y = (a*f - c*d)/(a*e - b*d);
System.out.println(x+" "+y);
}
}
}
|
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.BufferedReader;
| ^~~~~~
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.io.IOException;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class Main {
| ^~~~~~
|
s707801729
|
p00004
|
C++
|
//#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
//#include <cstdlib>
//#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;
int main(void){
int a, b, c, d, e, f;
while(cin >> a >>b >> c >> d >> e >> f){
double y = (a * f - d * c)/(a * e - b * d);
double x = (e * c - b * f)/(a * e - b * d);
x = round(x * 1000) / 1000;
y = round(y * 1000) / 1000;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
/*
for(i=0;i<N;i++){
cin >> X[i];
}
for(i=0;i<N;i++){
for(j=0;j<N;j++){
cin >> X[i][j];
}
}
*/
|
a.cc: In function 'int main()':
a.cc:25:21: error: 'round' was not declared in this scope
25 | x = round(x * 1000) / 1000;
| ^~~~~
|
s736715416
|
p00004
|
C++
|
#include <cstdio>
#include <vector>
using namespace std;
int main(){
double a,b,c,d,e,f;
vector<double> out;
while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
out.push_back((c*e-b*f)/(a*e-b*d));
out.push_back((c*d-a*f)/(b*d-a*e));
}
for (int i=0;i<out.size();i+=2){
printf("%f %f\n",round(out[i]*1000)/1000.0,round(out[i+1]*1000)/1000.0);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:22: error: 'round' was not declared in this scope
14 | printf("%f %f\n",round(out[i]*1000)/1000.0,round(out[i+1]*1000)/1000.0);
| ^~~~~
|
s744759700
|
p00004
|
C++
|
#include<iostream>
using namespce std;
int main()
{
int a,b,c,d,e,f;
double x,y;
while(cin>>a>>b>>c>>d>>e>>f){
double l,m,n;
l=a/d;
m=b-e*l;
n=c-f*l;
y=n/m;
x=(c-by)/a;
cout<<x<<" "<<y<<endl;
}
return 0;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
2 | using namespce std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | while(cin>>a>>b>>c>>d>>e>>f){
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:14:14: error: 'by' was not declared in this scope; did you mean 'y'?
14 | x=(c-by)/a;
| ^~
| y
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout<<x<<" "<<y<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:15:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
15 | cout<<x<<" "<<y<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s261367741
|
p00004
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e,f;
double x,y;
while(cin>>a>>b>>c>>d>>e>>f){
double l,m,n;
l=a/d;
m=b-e*l;
n=c-f*l;
y=n/m;
x=(c-by)/a;
cout<<x<<" "<<y<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:14: error: 'by' was not declared in this scope; did you mean 'y'?
14 | x=(c-by)/a;
| ^~
| y
|
s726837808
|
p00004
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e,f;
double x,y;
for(int i=0;i<2;i++){
cin>>a>>b>>c>>d>>e>>f
double l,m,n;
l=a/d;
m=b-e*l;
n=c-f*l;
y=n/m;
x=(c-b*y)/a;
cout<<x<<" "<<y<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:30: error: expected ';' before 'double'
9 | cin>>a>>b>>c>>d>>e>>f
| ^
| ;
10 | double l,m,n;
| ~~~~~~
a.cc:11:9: error: 'l' was not declared in this scope
11 | l=a/d;
| ^
a.cc:12:9: error: 'm' was not declared in this scope
12 | m=b-e*l;
| ^
a.cc:13:9: error: 'n' was not declared in this scope
13 | n=c-f*l;
| ^
|
s477599539
|
p00004
|
C++
|
#include<iostream>
#include<cstio>
using namespace std;
int main()
{
int a,b,c,d,e,f;
double x,y;
while(cin>>a>>b>>c>>d>>e>>f){
y=(a*f-c*d)/(a*e-d*b);
x=(c-b*y)/a;
printf("%.3f %.3f\n",x,y);
}
return 0;
}
|
a.cc:2:9: fatal error: cstio: No such file or directory
2 | #include<cstio>
| ^~~~~~~
compilation terminated.
|
s685627057
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
printf("%.3f %.3f, (a * f - c * d) / (a * e - b * d), (b * f - c * e) / (b * d - a * e));
}
return 0;
}
|
a.cc:6:12: warning: missing terminating " character
6 | printf("%.3f %.3f, (a * f - c * d) / (a * e - b * d), (b * f - c * e) / (b * d - a * e));
| ^
a.cc:6:12: error: missing terminating " character
6 | printf("%.3f %.3f, (a * f - c * d) / (a * e - b * d), (b * f - c * e) / (b * d - a * e));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: expected primary-expression before '}' token
7 | }
| ^
|
s051957212
|
p00004
|
C++
|
#include <iostream>
#include <stdio>
using namespace std;
int main()
{
double a,b,c,d,e,f;
while(cin>>a>>b>>c>>d>>e>>f)
{
printf("%.3f %.3f\n", (b*f - c*e)/(b*d - a*e)+0.0001, (a*f - c*d)/(a*e - b*d)+0.0001);
}
return 0;
}
|
a.cc:2:10: fatal error: stdio: No such file or directory
2 | #include <stdio>
| ^~~~~~~
compilation terminated.
|
s046914906
|
p00004
|
C++
|
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
double a,b,c,d,e,f;
while(cin>>a>>b>>c>>d>>e>>f)
{
printf("%.3f %.3f\n", round((1.0 * b*f - c*e)/(b*d - a*e) * 1000) / 1000, round((1.0 * a*f - c*d)/(a*e - b*d) * 1000) / 1000);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:23: error: 'round' was not declared in this scope
9 | printf("%.3f %.3f\n", round((1.0 * b*f - c*e)/(b*d - a*e) * 1000) / 1000, round((1.0 * a*f - c*d)/(a*e - b*d) * 1000) / 1000);
| ^~~~~
|
s527797017
|
p00004
|
C++
|
File Edit Options Buffers Tools C++ Help
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
#define RENT 100000
int main(){
int n;
int cnt=0;
float a, b, c, d, e, f;
while(cin >> a >> b >> c >> d >> e >> f){
float detA = a*e - b*d;
float x = (e*c + (-b)*f)/(detA);
float y = ((-d)*c + a*f)/(detA);
cout << fixed << setprecision(3) << x << " " << y << endl;
}
}
|
a.cc:1:1: error: 'File' does not name a type
1 | File Edit Options Buffers Tools C++ Help
| ^~~~
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.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
|
s296261205
|
p00004
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
while (true)
{
double x, y;
double[] h = new double[6];
String str = Console.ReadLine();
if (str == null) break;
string[] s = str.Split();
for (int i = 0; i < 6; i++)
{
h[i] = double.Parse(s[i]);
x = ((h[2] * h[4]) - (h[1] * h[5])) / ((h[0] * h[4]) - (h[1] * h[3]));
y = ((h[2] * h[3]) - (h[0] * h[5])) / ((h[3] * h[1]) - (h[0] * h[4]));
x = Math.Floor(x * 1000) / 1000;
y = Math.Floor(y * 1000) / 1000;
Console.WriteLine("{0:0.000} {1:0.000}", x, y);
}
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:26: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:33:2: error: expected ';' after class definition
33 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication3::Program::Main(int*)':
a.cc:16:23: error: structured binding declaration cannot have type 'double'
16 | double[] h = new double[6];
| ^~
a.cc:16:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:16:23: error: empty structured binding declaration
a.cc:16:26: error: expected initializer before 'h'
16 | double[] h = new double[6];
| ^
a.cc:17:17: error: 'String' was not declared in this scope
17 | String str = Console.ReadLine();
| ^~~~~~
a.cc:18:21: error: 'str' was not declared in this scope; did you mean 'std'?
18 | if (str == null) break;
| ^~~
| std
a.cc:18:28: error: 'null' was not declared in this scope
18 | if (str == null) break;
| ^~~~
a.cc:19:17: error: 'string' was not declared in this scope
19 | string[] s = str.Split();
| ^~~~~~
a.cc:19:24: error: expected primary-expression before ']' token
19 | string[] s = str.Split();
| ^
a.cc:22:21: error: 'h' was not declared in this scope
22 | h[i] = double.Parse(s[i]);
| ^
a.cc:22:28: error: expected primary-expression before 'double'
22 | h[i] = double.Parse(s[i]);
| ^~~~~~
a.cc:26:21: error: 'Math' was not declared in this scope
26 | x = Math.Floor(x * 1000) / 1000;
| ^~~~
a.cc:28:17: error: 'Console' was not declared in this scope
28 | Console.WriteLine("{0:0.000} {1:0.000}", x, y);
| ^~~~~~~
a.cc: At global scope:
a.cc:33:2: error: expected '}' at end of input
33 | }
| ^
a.cc:8:1: note: to match this '{'
8 | {
| ^
|
s550788407
|
p00004
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
while (true)
{
double x, y;
double[] h = new double[6];
String str = Console.ReadLine();
if (str == null) break;
string[] s = str.Split();
for (int i = 0; i < 6; i++)
{
h[i] = double.Parse(s[i]);
x = ((h[2] * h[4]) - (h[1] * h[5])) / ((h[0] * h[4]) - (h[1] * h[3]));
y = ((h[2] * h[3]) - (h[0] * h[5])) / ((h[3] * h[1]) - (h[0] * h[4]));
x = Math.Floor(x * 1000) / 1000;
y = Math.Floor(y * 1000) / 1000;
Console.WriteLine("{0:0.000} {1:0.000}", x, y);
}
}
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:26: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:33:6: error: expected ';' after class definition
33 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication3::Program::Main(int*)':
a.cc:16:23: error: structured binding declaration cannot have type 'double'
16 | double[] h = new double[6];
| ^~
a.cc:16:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:16:23: error: empty structured binding declaration
a.cc:16:26: error: expected initializer before 'h'
16 | double[] h = new double[6];
| ^
a.cc:17:17: error: 'String' was not declared in this scope
17 | String str = Console.ReadLine();
| ^~~~~~
a.cc:18:21: error: 'str' was not declared in this scope; did you mean 'std'?
18 | if (str == null) break;
| ^~~
| std
a.cc:18:28: error: 'null' was not declared in this scope
18 | if (str == null) break;
| ^~~~
a.cc:19:17: error: 'string' was not declared in this scope
19 | string[] s = str.Split();
| ^~~~~~
a.cc:19:24: error: expected primary-expression before ']' token
19 | string[] s = str.Split();
| ^
a.cc:22:21: error: 'h' was not declared in this scope
22 | h[i] = double.Parse(s[i]);
| ^
a.cc:22:28: error: expected primary-expression before 'double'
22 | h[i] = double.Parse(s[i]);
| ^~~~~~
a.cc:26:25: error: 'Math' was not declared in this scope
26 | x = Math.Floor(x * 1000) / 1000;
| ^~~~
a.cc:28:21: error: 'Console' was not declared in this scope
28 | Console.WriteLine("{0:0.000} {1:0.000}", x, y);
| ^~~~~~~
|
s094355243
|
p00004
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
while (true)
{
double x, y;
double[] h = new double[6];
String str = Console.ReadLine();
if (str == null) break;
string[] s = str.Split();
for (int i = 0; i < 6; i++)
{
h[i] = double.Parse(s[i]);
x = ((h[2] * h[4]) - (h[1] * h[5])) / ((h[0] * h[4]) - (h[1] * h[3]));
y = ((h[2] * h[3]) - (h[0] * h[5])) / ((h[3] * h[1]) - (h[0] * h[4]));
x = Math.Floor(x * 1000) / 1000;
y = Math.Floor(y * 1000) / 1000;
Console.WriteLine("{0:0.000} {1:0.000}", x, y);
}
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:8:26: error: 'string' has not been declared
8 | static void Main(string[] args)
| ^~~~~~
a.cc:8:35: error: expected ',' or '...' before 'args'
8 | static void Main(string[] args)
| ^~~~
a.cc:30:6: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:13:23: error: structured binding declaration cannot have type 'double'
13 | double[] h = new double[6];
| ^~
a.cc:13:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:23: error: empty structured binding declaration
a.cc:13:26: error: expected initializer before 'h'
13 | double[] h = new double[6];
| ^
a.cc:14:17: error: 'String' was not declared in this scope
14 | String str = Console.ReadLine();
| ^~~~~~
a.cc:15:21: error: 'str' was not declared in this scope; did you mean 'std'?
15 | if (str == null) break;
| ^~~
| std
a.cc:15:28: error: 'null' was not declared in this scope
15 | if (str == null) break;
| ^~~~
a.cc:16:17: error: 'string' was not declared in this scope
16 | string[] s = str.Split();
| ^~~~~~
a.cc:16:24: error: expected primary-expression before ']' token
16 | string[] s = str.Split();
| ^
a.cc:19:21: error: 'h' was not declared in this scope
19 | h[i] = double.Parse(s[i]);
| ^
a.cc:19:28: error: expected primary-expression before 'double'
19 | h[i] = double.Parse(s[i]);
| ^~~~~~
a.cc:23:25: error: 'Math' was not declared in this scope
23 | x = Math.Floor(x * 1000) / 1000;
| ^~~~
a.cc:25:21: error: 'Console' was not declared in this scope
25 | Console.WriteLine("{0:0.000} {1:0.000}", x, y);
| ^~~~~~~
|
s824788935
|
p00004
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
double a, b, c, d, e, f;
double x, y;
cin >> a >> b >> c >> d >> e >> f;
x == (c*e - b*f) / (a*e - b*d);
y == (c - a*x) / b;
cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
//printf("%.3f %.3f\n", x, y);
}
|
a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::ios_base&(std::ios_base&)')
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | std::ios_base&(std::ios_base&)
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:15:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:15:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::ios_base& (&)(std::ios_base&)]':
a.cc:15:10: required from here
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:15:26: error: 'setprecision' was not declared in this scope
15 | cout >> fixed >> setprecision(3) >> x >> " " >> y >> endl;
| ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
2 | #include <algorithm>
+++ |+#include <iomanip>
3 |
|
s286147301
|
p00004
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
double a, b, c, d, e, f;
double x, y;
cin >> a >> b >> c >> d >> e >> f;
x == (c*e - b*f) / (a*e - b*d);
y == (c - a*x) / b;
cout << fixed << setprecision(3) << x << " " << y << endl;
//printf("%.3f %.3f\n", x, y);
}
|
a.cc: In function 'int main()':
a.cc:15:26: error: 'setprecision' was not declared in this scope
15 | cout << fixed << setprecision(3) << x << " " << y << endl;
| ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
2 | #include <algorithm>
+++ |+#include <iomanip>
3 |
|
s727532844
|
p00004
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
double a, b, c, d, e, f;
double x, y;
cin >> a >> b >> c >> d >> e >> f;
x == (c*e - b*f) / (a*e - b*d);
y == (c - a*x) / b;
cout << fixed << setprecision(3) << x << " " << y << endl;
//printf("%.3f %.3f\n", x, y);
}
|
a.cc: In function 'int main()':
a.cc:15:26: error: 'setprecision' was not declared in this scope
15 | cout << fixed << setprecision(3) << x << " " << y << endl;
| ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
2 | #include <algorithm>
+++ |+#include <iomanip>
3 |
|
s206511534
|
p00004
|
C++
|
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;
using namespace std;
typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;
int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };
int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;
string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;
int sum = 0;
vector<int> value;
vector<int> weight;
int dp[110][10010];
int data_[210][2] = { -2 };
void input(void) {
return;
}
int main(void) {
int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
double x = 0;
double y = 0;
while (scanf_s("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF) {
y = (double)(c * d - a * f) / (double)(b * d - a * e);
x = (double)(c - b * y) / (double)a;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:68:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
68 | while (scanf_s("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF) {
| ^~~~~~~
| scanf
|
s262762816
|
p00004
|
C++
|
#include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;
int size(string x){
string::size_type size=x.size();
return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define fi first
#define se second
typedef vector<string> vs;
typedef vector<int> vi;
double pi(){
return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int main(){
double a,b,c,d,e,f,a1;
while(cin>>a>>b>>c>>d>>e>>f){
double x,y,x1,y1;
x=(f-e*y)/d;*/
double det = a*e - b * d;
double x = 1 / det * (c * e - b * f);
double y = 1 / det * (f * a - c * d);
if(x<0.001&&x>=0) x=0;
if(y<0.001&&y>=0) y=0;
if(x<-0.001) x=0;
if(y<-0.001) y=0;
printf("%.3lf %.3lf\n",x,y);
}
}
|
a.cc: In function 'int main()':
a.cc:33:30: error: expected primary-expression before '/' token
33 | x=(f-e*y)/d;*/
| ^
a.cc:34:17: error: expected primary-expression before 'double'
34 | double det = a*e - b * d;
| ^~~~~~
a.cc:35:16: error: redeclaration of 'double x'
35 | double x = 1 / det * (c * e - b * f);
| ^
a.cc:31:24: note: 'double x' previously declared here
31 | double x,y,x1,y1;
| ^
a.cc:35:24: error: 'det' was not declared in this scope
35 | double x = 1 / det * (c * e - b * f);
| ^~~
a.cc:36:16: error: redeclaration of 'double y'
36 | double y = 1 / det * (f * a - c * d);
| ^
a.cc:31:26: note: 'double y' previously declared here
31 | double x,y,x1,y1;
| ^
|
s355404078
|
p00004
|
C++
|
#include <iostream>
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*e - b*d);
y = (c*d - a*f) / (b*d - a*e);
cout << fixed << setprecision(3) << x << " " << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:14:26: error: 'setprecision' was not declared in this scope
14 | cout << fixed << setprecision(3) << x << " " << endl;
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | #include <iostream>
+++ |+#include <iomanip>
2 |
|
s684290375
|
p00004
|
C++
|
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
float a, b, c, d, e, f, x, y;
while(cin >> a >> b >> c >> d >> e >> f){
x = (b * f - c * e) / (b * d - a * e);
y = (c - a * x) / b;
}
if(x > 0) {
x += 0.0005;
}
else(x < 0){
x -= 0.0005;
}
if(y > 0){
y += 0.0005;
}
else(y < 0){
y -= 0.0005;
}
cout << fixed << setprecision(3) << x << ' ' << y << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '{' token
14 | else(x < 0){
| ^
| ;
a.cc:20:20: error: expected ';' before '{' token
20 | else(y < 0){
| ^
| ;
|
s948251846
|
p00004
|
C++
|
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
double a,b,c,d,e,f;
double x,y;
while(cin>>a>>b>>c>>d>>e>>f){
x=(double)((e*c-b*f)/(a*e-b*d));
y = (double)((-(d*c)+a*f) / (a*e-b*d));
if(x == 0){x = 0;}
if(y == 0){y = 0;}
printf("%.3f %.3f\n",x,y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s573488323
|
p00004
|
C++
|
#include<iostream>
using namespace std;
int main()
{
double a,b,c,d,e,f;
double x,y;
while(cin>>a>>b>>c>>d>>e>>f){
x=(double)((e*c-b*f)/(a*e-b*d));
y = (double)((-(d*c)+a*f) / (a*e-b*d));
if(x == 0){x = 0;}
if(y == 0){y = 0;}
printf("%.3f %.3f\n",x,y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s443265665
|
p00004
|
C++
|
#include<iostream>
using namespace std;
int main()
{
double a,b,c,d,e,f;
double x,y;
while(cin>>a>>b>>c>>d>>e>>f){
x=(double)((e*c-b*f)/(a*e-b*d));
y = (double)((-(d*c)+a*f) / (a*e-b*d));
if(x == 0){x = 0;}
if(y == 0){y = 0;}
printf("%.3f %.3f\n",x,y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s725389023
|
p00004
|
C++
|
using namespace std;
int main()
{
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f)
{
b = b * d / a;
c = c * d / a;
a = a * d / a;
d = d - a; // d = 0
e = e - b;
f = f - c;
f = f * b / e;
e = e * b / e;
b = b - e; // b = 0
c = c - f;
c = c / a; // x = c
a = a / a;
f = f / e; // y = f
e = e / e;
cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope
7 | 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 namespace std;
a.cc:30:17: error: 'cout' was not declared in this scope
30 | cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
| ^~~~
a.cc:30:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:25: error: 'fixed' was not declared in this scope
30 | cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
| ^~~~~
a.cc:1:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
+++ |+#include <ios>
1 | using namespace std;
a.cc:30:34: error: 'setprecision' was not declared in this scope
30 | cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
| ^~~~~~~~~~~~
a.cc:1:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
+++ |+#include <iomanip>
1 | using namespace std;
a.cc:30:98: error: 'endl' was not declared in this scope
30 | cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
|
s715021842
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main()
{
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f)
{
b = b * d / a;
c = c * d / a;
a = a * d / a;
d = d - a; // d = 0
e = e - b;
f = f - c;
f = f * b / e;
e = e * b / e;
b = b - e; // b = 0
c = c - f;
c = c / a; // x = c
a = a / a;
f = f / e; // y = f
e = e / e;
cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:31:26: error: 'setprecision' was not declared in this scope
31 | cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | #include <iostream>
+++ |+#include <iomanip>
2 | using namespace std;
|
s464870586
|
p00004
|
C++
|
#include<cstdio>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
char line[200];
while(fgets(line, 200, stdin) != NULL) {
sscanf(line, "%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
x = ((double)(e*c - b*f)) / (a*e - d*b);
y = ((double)(a*f - d*c)) / (a*e - d*b);
if(abs(x) < 1.0e-4) x = 0;
if(abs(y) < 1.0e-4) y = 0;
printf("%.3f %.3f\n", x, y);
}
}
|
a.cc: In function 'int main()':
a.cc:13:20: error: 'abs' was not declared in this scope
13 | if(abs(x) < 1.0e-4) x = 0;
| ^~~
a.cc:14:20: error: 'abs' was not declared in this scope
14 | if(abs(y) < 1.0e-4) y = 0;
| ^~~
|
s568254759
|
p00004
|
C++
|
import java.util.Scanner;
public class main{
static int a,b,c,d,e,f;
static double x,y;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
while(true){
a = s.nextInt();
b = s.nextInt();
c = s.nextInt();
d = s.nextInt();
e = s.nextInt();
f = s.nextInt();
x = (e*c-b*f)/(a+e-b*d);
y = (a*f-d*c)/(a*e-b*d);
System.out.printf("%4.3f",x);
System.out.print(" ");
System.out.printf("%4.3f",y);
}
}
}
|
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class main{
| ^~~~~~
|
s780562187
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main() {
int i;
double a[2], b[2], c[2], x, y;
cin >> a[0] >> b[0] >> c[0] >> a[1] >> b[1] >> c[1];
if (a[0] == 0) {
y = c[0] / b[0];
x = (c[1] - b[1] * y) / a[1];
}
else if (b[0] == 0) {
x = c[0] / a[0];
y = (c[1] - a[1] * x) / b[1];
}
else if (a[1] == 0) {
y = c[1] / b[1];
x = (c[0] - b[0] * y) / a[0];
}
else if (b[1] == 0) {
x = c[1] / a[1];
y = (c[0] - a[0] * x) / b[0];
}
else {
x = (c[1] - c[0] * b[1] / b[0]) / (a[1] - a[0] * b[1] / b[0]);
y = (c[0] - a[0] * x) / b[0];
}
x = x * pow(10,3);
x = round(x);
x = x * pow(10, -3);
y = y * pow(10, 3);
y = round(y);
y = y * pow(10, -3);
cout << x << endl << y << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:27:17: error: 'pow' was not declared in this scope
27 | x = x * pow(10,3);
| ^~~
a.cc:28:13: error: 'round' was not declared in this scope
28 | x = round(x);
| ^~~~~
|
s288722815
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main() {
int i;
double a[2], b[2], c[2], x, y;
cin >> a[0] >> b[0] >> c[0] >> a[1] >> b[1] >> c[1];
if (a[0] == 0) {
y = c[0] / b[0];
x = (c[1] - b[1] * y) / a[1];
}
else if (b[0] == 0) {
x = c[0] / a[0];
y = (c[1] - a[1] * x) / b[1];
}
else if (a[1] == 0) {
y = c[1] / b[1];
x = (c[0] - b[0] * y) / a[0];
}
else if (b[1] == 0) {
x = c[1] / a[1];
y = (c[0] - a[0] * x) / b[0];
}
else {
x = (c[1] - c[0] * b[1] / b[0]) / (a[1] - a[0] * b[1] / b[0]);
y = (c[0] - a[0] * x) / b[0];
}
x = x * pow(10,3);
x = round(x);
x = x * pow(10, -3);
y = y * pow(10, 3);
y = round(y);
y = y * pow(10, -3);
cout << x << endl << y << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:27:17: error: 'pow' was not declared in this scope
27 | x = x * pow(10,3);
| ^~~
a.cc:28:13: error: 'round' was not declared in this scope
28 | x = round(x);
| ^~~~~
|
s060017573
|
p00004
|
C++
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
double det;
while (cin >> a >> b >> c >> d >> e >> f) {
det = a * e - b * d;
x = (e * c - b * f) / det;a
y = (-d * c + a * f) / det;
printf("%.3f %.3f\n", x, y);
}
}
|
a.cc: In function 'int main()':
a.cc:11:44: error: expected ';' before 'y'
11 | x = (e * c - b * f) / det;a
| ^
| ;
12 | y = (-d * c + a * f) / det;
| ~
|
s455179847
|
p00004
|
C++
|
#include<stdio.h>
int main(void)
{
int b,a,e,d,f,i,c;
float y,x;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
y=(c*d-a*f)/(b*d-a*e);
x=(c-(b*y))/a;
if(x<0.0000 && x>-0.0001){
x=;
}
if(y<0.000&&y>-0.0001){
y=0;
}
printf("%.3f %.3f\n",x,y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:27: error: expected primary-expression before ';' token
10 | x=;
| ^
|
s115702276
|
p00004
|
C++
|
#include<stdio.h>
main(){
double a,b,c,d,e,f;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)==""){
printf("%f %f\n",(c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d));
}
}
|
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:59: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
4 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)==""){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
|
s042380105
|
p00004
|
C++
|
#include<stdio.h>
main(){
double a,b,c,d,e,f;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!="EOF"){
printf("%f %f\n",(c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d));
}
}
|
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:59: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
4 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!="EOF"){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
|
s853118515
|
p00004
|
C++
|
#include<stdio.h>
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-b*d);
y = (a*f-c*d)/(a*e-b*d);
printf("%f %f\n",x,y);
}
}
|
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:59: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
4 | while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!="EOF"){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
|
s076425853
|
p00004
|
C++
|
main(){
double a,b,c,d,e,f,t;
for(;scanf("%lf%lf%lf&lf%lf%lf",&a,&b,&c,&d,&e,&f)==6;){
t=a*e-b*d;
printf("%.3lf%.3lf\n",(e*c-b*f)/t+0.0,(a*f-d*c)/t+0.0);
}
return 0;
}
|
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:10: error: 'scanf' was not declared in this scope
3 | for(;scanf("%lf%lf%lf&lf%lf%lf",&a,&b,&c,&d,&e,&f)==6;){
| ^~~~~
a.cc:5:9: error: 'printf' was not declared in this scope
5 | printf("%.3lf%.3lf\n",(e*c-b*f)/t+0.0,(a*f-d*c)/t+0.0);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | main(){
|
s567524902
|
p00004
|
C++
|
main(){
double a,b,c,d,e,f,t;
for(;scanf("%lf%lf%lf&lf%lf%lf",&a,&b,&c,&d,&e,&f)==6;){
t=a*e-b*d;
printf("%.3lf%.3lf\n",(e*c-b*f)/t+0.0,(a*f-d*c)/t+0.0);
}
return 0;
}
|
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:10: error: 'scanf' was not declared in this scope
3 | for(;scanf("%lf%lf%lf&lf%lf%lf",&a,&b,&c,&d,&e,&f)==6;){
| ^~~~~
a.cc:5:9: error: 'printf' was not declared in this scope
5 | printf("%.3lf%.3lf\n",(e*c-b*f)/t+0.0,(a*f-d*c)/t+0.0);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | main(){
|
s606167480
|
p00004
|
C++
|
import java.util.Scanner;
public class Main
{
public static void main(String[] args){
//??\???a,b,c,d,e,f
Scanner scan = new Scanner(System.in);
//??£???????¨????ax+by=c, dx+ey=f???x,y????±???????
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int d = scan.nextInt();
int e = scan.nextInt();
int f = scan.nextInt();
int a2 = scan.nextInt();
int b2 = scan.nextInt();
int c2 = scan.nextInt();
int d2 = scan.nextInt();
int e2 = scan.nextInt();
int f2 = scan.nextInt();
simultaneousEquation(a,b,c,d,e,f);
simultaneousEquation(a2,b2,c2,d2,e2,f2);
}
//??£???????¨????????????????
public static void simultaneousEquation(int a, int b, int c, int d, int e,int f){
double x = 0;
double y = 0;
//a?????????????????°????????????
int aCount = 1;
//d?????????????????°????????????
int dCount = 1;
//b,e????¨?????????????????´???????
int be;
//b,y????¨?????????????????´???????
double by;
//c,f????¨?????????????????´???????
int cf = 0;
//ax????¨?????????????????´???????
double ax;
//a????????????????´???????
int aFactorial = a;
int dFactorial = d;
while(true){
if(a - d == 0){
break;
}
if(a + d == 0){
break;
}
if(Math.abs(a) < Math.abs(d)){
a += aFactorial;
aCount++;
}
if(Math.abs(a) > Math.abs(d)){
d += dFactorial;
dCount++;
}
}
if(a - d == 0){
be = b * aCount - e * dCount;
cf = c * aCount - f * dCount;
y = cf / be;
}
if(a + d == 0){
be = b * aCount + e * dCount;
cf = c * aCount + f * dCount;
y = cf / be;
}
by = b * y;
x = (c - by) / aFactorial;
System.out.printf("%.3f %.3f\n",x,y);
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main
| ^~~~~~
|
s885978019
|
p00004
|
C++
|
import sys
for line in sys.stdin:
a,b,c,d,e,f = [float(w) for w in line.split()]
print("{:.3f} {:.3f}".format((e*c-b*f)/(a*e-a*b), (d*c-a*f)/(b*d-a*e)))
|
a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s700473294
|
p00004
|
C++
|
#include<iostream>
#include <iomanip>
using namespace std;
int main(){
double a,b,j,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in_ = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << x << ' ' << std::setprecision(3) << y << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:25: error: 'c' was not declared in this scope
9 | while (std::cin >>a>>b>>c>>d>>e>>f){
| ^
a.cc:10:1: error: 'in_' was not declared in this scope; did you mean 'in'?
10 | in_ = (a*e - b*d);
| ^~~
| in
|
s039650499
|
p00004
|
C++
|
#include<iostream>
#include <iomanip>
using namespace std;
int main(){
double a,b,j,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << x << ' ' << std::setprecision(3) << y << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:25: error: 'c' was not declared in this scope
9 | while (std::cin >>a>>b>>c>>d>>e>>f){
| ^
|
s827571764
|
p00004
|
C++
|
#include<iostream>
#include <iomanip>
using namespace std;
int main(){
double a,b,c,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<<fixed << y << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:92: error: expected unqualified-id before '<<' token
17 | std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<<fixed << y << std::endl;
| ^~
|
s067974072
|
p00004
|
C++
|
#include<iostream>
#include <iomanip>
int main(){
double a,b,c,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<< std::fixed << y << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:92: error: expected unqualified-id before '<<' token
16 | std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<< std::fixed << y << std::endl;
| ^~
|
s872009882
|
p00004
|
C++
|
#include<stdio.h>
#include <stdlib.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);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'sscanf_s' was not declared in this scope; did you mean 'sscanf'?
9 | sscanf_s(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
| ^~~~~~~~
| sscanf
|
s350659994
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f)
{
b *= d; c *= d;
e *= a; f *= a;
b -= e; c -= f;
y = c*1.0 / b;
x = (f - e*y)*1.0 / (d*a);
if (x < 0.0001 && x > -0.0001) x = 0.000;
if (y < 0.0001 && y > -0.0001) y = 0.000;
cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:34: error: 'setprecision' was not declared in this scope
17 | cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << 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>
+++ |+#include <iomanip>
2 | using namespace std;
|
s303208003
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f)
{
b *= d; c *= d;
e *= a; f *= a;
b -= e; c -= f;
y = c*1.0 / b;
x = (f - e*y)*1.0 / (d*a);
if (x < 0.0001 && x > -0.0001) x = 0.000;
if (y < 0.0001 && y > -0.0001) y = 0.000;
cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:34: error: 'setprecision' was not declared in this scope
17 | cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << 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>
+++ |+#include <iomanip>
2 | using namespace std;
|
s688123168
|
p00004
|
C++
|
#include <stdio.h>
int main(){
int a, b, c, d, e, f;
std::cin >> a;
std::cin >> b;
std::cin >> c;
std::cin >> d;
std::cin >> e;
std::cin >> f;
double x, y;
x = (c*e-b*f) / (a*e-b*d);
y = (a*f-c*d) / (a*e-b*d);
printf("%f.3 %f.3\n", x, y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' is not a member of 'std'
5 | std::cin >> a;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <stdio.h>
+++ |+#include <iostream>
2 |
a.cc:6:8: error: 'cin' is not a member of 'std'
6 | std::cin >> b;
| ^~~
a.cc:6:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:8: error: 'cin' is not a member of 'std'
7 | std::cin >> c;
| ^~~
a.cc:7:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:8: error: 'cin' is not a member of 'std'
8 | std::cin >> d;
| ^~~
a.cc:8:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:8: error: 'cin' is not a member of 'std'
9 | std::cin >> e;
| ^~~
a.cc:9:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:8: error: 'cin' is not a member of 'std'
10 | std::cin >> f;
| ^~~
a.cc:10:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s387620060
|
p00004
|
C++
|
#include <stdio.h>
int main(){
int a, b, c, d, e, f;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
scanf("%d",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
???x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%f.3 %f.3\n", x, y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:2: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:3: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:16: error: 'round' was not declared in this scope
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^~~~~
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
|
s890410415
|
p00004
|
C++
|
#include <stdio.h>
int main(){
int a, b, c, d, e, f;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
scanf("%d",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
???x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%f.3 %f.3\n", x, y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:2: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:3: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:16: error: 'round' was not declared in this scope
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^~~~~
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
|
s898794888
|
p00004
|
C++
|
#include <stdio.h>
int main(){
int a, b, c, d, e, f;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
scanf("%d",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
???x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%f.3 %f.3\n", x, y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:2: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:3: error: expected primary-expression before '?' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
a.cc:15:16: error: 'round' was not declared in this scope
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^~~~~
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
a.cc:15:42: error: expected ':' before ';' token
15 | ???x = (double)round(x*10000.0) / 10000.0;
| ^
| :
a.cc:15:42: error: expected primary-expression before ';' token
|
s273771569
|
p00004
|
C++
|
#include <stdio.h>
int main(){
int a, b, c, d, e, f;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
scanf("%d",&d);
scanf("%d",&e);
scanf("%d",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%f.3 %f.3\n", x, y);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:15: error: 'round' was not declared in this scope
15 | x = (double)round(x*10000.0) / 10000.0;
| ^~~~~
|
s833427825
|
p00004
|
C++
|
#include <stdio.h>
#include <math.h>
int main(){
int i = 0;
while(1){
i++;
int a, b, c, d, e, f;
scanf("%d ",&a);
scanf("%d ",&b);
scanf("%d ",&c);
scanf("%d ",&d);
scanf("%d ",&e);
scanf("%d ",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%.3f %.3f\n", x, y);
if(scanf()==EOF) break;
else{
int line = i * 6
fseek(STDIN, lineL, SEEK_SET);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:11: error: too few arguments to function 'int scanf(const char*, ...)'
23 | if(scanf()==EOF) break;
| ~~~~~^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from a.cc:1:
/usr/include/stdio.h:445:12: note: declared here
445 | extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
| ^~~~~~~~~~
a.cc:26:5: error: expected ',' or ';' before 'fseek'
26 | fseek(STDIN, lineL, SEEK_SET);
| ^~~~~
|
s061317447
|
p00004
|
C++
|
#include <stdio.h>
#include <math.h>
int main(){
int i = 0;
while(1){
i++;
int a, b, c, d, e, f;
scanf("%d ",&a);
scanf("%d ",&b);
scanf("%d ",&c);
scanf("%d ",&d);
scanf("%d ",&e);
scanf("%d ",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%.3f %.3f\n", x, y);
if(scanf("%d", &a)==EOF) break;
else{
int line = i * 6
fseek(STDIN, lineL, SEEK_SET);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:26:5: error: expected ',' or ';' before 'fseek'
26 | fseek(STDIN, lineL, SEEK_SET);
| ^~~~~
|
s864818357
|
p00004
|
C++
|
#include <stdio.h>
#include <math.h>
int main(){
int i = 0;
while(1){
i++;
int a, b, c, d, e, f;
scanf("%d ",&a);
scanf("%d ",&b);
scanf("%d ",&c);
scanf("%d ",&d);
scanf("%d ",&e);
scanf("%d ",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%.3f %.3f\n", x, y);
if(scanf("%d", &a)==EOF) break;
else{
int line = i * 6;
fseek(STDIN, lineL, SEEK_SET);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:26:11: error: 'STDIN' was not declared in this scope
26 | fseek(STDIN, lineL, SEEK_SET);
| ^~~~~
a.cc:26:18: error: 'lineL' was not declared in this scope; did you mean 'line'?
26 | fseek(STDIN, lineL, SEEK_SET);
| ^~~~~
| line
|
s885599756
|
p00004
|
C++
|
#include <stdio.h>
#include <math.h>
int main(){
int i = 0;
while(1){
i++;
int a, b, c, d, e, f;
scanf("%d ",&a);
scanf("%d ",&b);
scanf("%d ",&c);
scanf("%d ",&d);
scanf("%d ",&e);
scanf("%d ",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%.3f %.3f\n", x, y);
if(scanf("%d", &a)==EOF) break;
else{
int line = i * 6;
fseek(stdin, lineL, SEEK_SET);
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:26:18: error: 'lineL' was not declared in this scope; did you mean 'line'?
26 | fseek(stdin, lineL, SEEK_SET);
| ^~~~~
| line
|
s226680410
|
p00004
|
C++
|
#include <stdio.h>
#include <math.h>
int main(){
int i = 0;
int a, b, c, d, e, f;
while(scanf("%d", &a)!=EOF){
i++;
scanf("%d ",&b);
scanf("%d ",&c);
scanf("%d ",&d);
scanf("%d ",&e);
scanf("%d ",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%.3f %.3f\n", x, y);
long line = ftell(stdin);
if(scanf("%d", &a)==EOF) break;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
27 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s609355938
|
p00004
|
C++
|
#include <stdio.h>
#include <math.h>
int main(){
int i = 0;
int a, b, c, d, e, f;
while(scanf("%d", &a)!=EOF){
i++;
scanf("%d ",&b);
scanf("%d ",&c);
scanf("%d ",&d);
scanf("%d ",&e);
scanf("%d ",&f);
double x, y;
x = (double)(c*e-b*f) / (double)(a*e-b*d);
y = (double)(a*f-c*d) / (double)(a*e-b*d);
x = (double)round(x*10000.0) / 10000.0;
y = (double)round(y*10000.0) / 10000.0;
printf("%.3f %.3f\n", x, y);
scanf("%d", &a)
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:22:18: error: expected ';' before '}' token
22 | scanf("%d", &a)
| ^
| ;
23 | }
| ~
|
s300434458
|
p00004
|
C++
|
#include <iostream>
using namespace std;
float main(){
int a, b, c, d, e;
while(cin >> a >> b >> c >> d >> e){
float x, y;
x = (float)(b*f - c*e)/(b*d -a*e);
y = (float)(c - a*x)/b;
cout << x << " " << y << endl;
}
return 0;
}
|
a.cc:4:1: error: '::main' must return 'int'
4 | float main(){
| ^~~~~
a.cc: In function 'int main()':
a.cc:9:31: error: 'f' was not declared in this scope
9 | x = (float)(b*f - c*e)/(b*d -a*e);
| ^
|
s267037064
|
p00004
|
C++
|
#include <iostream>
using namespace std;
float main(){
int a, b, c, d, e, f;
while(cin >> a >> b >> c >> d >> e >> f){
float x, y;
x = (float)(b*f - c*e)/(b*d -a*e);
y = (float)(c - a*x)/b;
cout << x << " " << y << endl;
}
return 0;
}
|
a.cc:4:1: error: '::main' must return 'int'
4 | float main(){
| ^~~~~
|
s578511498
|
p00004
|
C++
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int a,b,c,d,e,f;
float x , y , delta;
while(cin >> a >> b >> c >> d >> e >> f){
delta = (a * e) - (b * d);
x = ((c * e) - (b * f)) / delta;
y = ((a * f) - (c * d)) / delta;
if(x % 10000 >= 5){
x += 0.001;
}if(y % 10000 >= 5){
y += 0.001;
}
printf("%f %f\n", x , y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:30: error: invalid operands of types 'float' and 'int' to binary 'operator%'
16 | if(x % 10000 >= 5){
| ~ ^ ~~~~~
| | |
| | int
| float
a.cc:18:31: error: invalid operands of types 'float' and 'int' to binary 'operator%'
18 | }if(y % 10000 >= 5){
| ~ ^ ~~~~~
| | |
| | int
| float
|
s250875905
|
p00004
|
C++
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int a,b,c,d,e,f;
float x , y , delta;
while(cin >> a >> b >> c >> d >> e >> f){
delta = (a * e) - (b * d);
x = ((c * e) - (b * f)) / delta;
y = ((a * f) - (c * d)) / delta;
if(x % 10000 >= 5){
x += 0.001;
}if(y % 10000 >= 5){
y += 0.001;
}
printf("%f %f\n", x , y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:30: error: invalid operands of types 'float' and 'int' to binary 'operator%'
16 | if(x % 10000 >= 5){
| ~ ^ ~~~~~
| | |
| | int
| float
a.cc:18:31: error: invalid operands of types 'float' and 'int' to binary 'operator%'
18 | }if(y % 10000 >= 5){
| ~ ^ ~~~~~
| | |
| | int
| float
|
s989070020
|
p00004
|
C++
|
#include <bits/stdc++.h>
using namespace std;
double a,b,c,d,e,f,y,x;
int main (){
while(cin>>a>>b>>c>>d>>e>>f){
y=(((c*d)-(f*a))/((b*d)-(e*a)));
x=((ac-(b*y))/a);
if(x==0){
x=abs(x);
}
if(y==0){
y=abs(y);
}
cout<<fixed<<showpoint<<setprecision(3);
cout<<x<<" "<<y<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:21: error: 'ac' was not declared in this scope; did you mean 'c'?
8 | x=((ac-(b*y))/a);
| ^~
| c
|
s182269976
|
p00004
|
C++
|
import java.util.Scanner;
public class V0_0004 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextInt()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int d = scanner.nextInt();
int e = scanner.nextInt();
int f = scanner.nextInt();
Equation equation_1 = new Equation(a, b, c);
Equation equation_2 = new Equation(d, e, f);
double[] solution = solve(equation_1, equation_2);
System.out.printf("%.3f %.3f\n", solution[0], solution[1]);
}
}
static double[] solve(Equation left, Equation right) {
double determinant = left.a * right.b - right.a * left.b;
double x = (right.b * left.c - left.b * right.c) / determinant;
double y = (-right.a * left.c + left.a * right.c) / determinant;
double[] result = { x, y };
return result;
}
}
// ax + by = c
class Equation {
Equation(int a, int b, int c) {
this.a = a;
this.b = b;
this.c = c;
}
public int a;
public int b;
public int c;
}
|
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 V0_0004 {
| ^~~~~~
a.cc:45:11: error: expected ':' before 'int'
45 | public int a;
| ^~~~
| :
a.cc:46:11: error: expected ':' before 'int'
46 | public int b;
| ^~~~
| :
a.cc:47:11: error: expected ':' before 'int'
47 | public int c;
| ^~~~
| :
a.cc:49:2: error: expected ';' after class definition
49 | }
| ^
| ;
a.cc: In constructor 'Equation::Equation(int, int, int)':
a.cc:40:14: error: request for member 'a' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
40 | this.a = a;
| ^
a.cc:41:14: error: request for member 'b' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
41 | this.b = b;
| ^
a.cc:42:14: error: request for member 'c' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
42 | this.c = c;
| ^
|
s493870079
|
p00004
|
C++
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextInt()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int d = scanner.nextInt();
int e = scanner.nextInt();
int f = scanner.nextInt();
Equation equation_1 = new Equation(a, b, c);
Equation equation_2 = new Equation(d, e, f);
double[] solution = solve(equation_1, equation_2);
System.out.printf("%.3f %.3f\n", solution[0], solution[1]);
}
}
static double[] solve(Equation left, Equation right) {
double determinant = left.a * right.b - right.a * left.b;
double x = (right.b * left.c - left.b * right.c) / determinant;
double y = (-right.a * left.c + left.a * right.c) / determinant;
double[] result = { x, y };
return result;
}
}
// ax + by = c
class Equation {
Equation(int a, int b, int c) {
this.a = a;
this.b = b;
this.c = c;
}
public int a;
public int b;
public int c;
}
|
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 {
| ^~~~~~
a.cc:45:11: error: expected ':' before 'int'
45 | public int a;
| ^~~~
| :
a.cc:46:11: error: expected ':' before 'int'
46 | public int b;
| ^~~~
| :
a.cc:47:11: error: expected ':' before 'int'
47 | public int c;
| ^~~~
| :
a.cc:49:2: error: expected ';' after class definition
49 | }
| ^
| ;
a.cc: In constructor 'Equation::Equation(int, int, int)':
a.cc:40:14: error: request for member 'a' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
40 | this.a = a;
| ^
a.cc:41:14: error: request for member 'b' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
41 | this.b = b;
| ^
a.cc:42:14: error: request for member 'c' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
42 | this.c = c;
| ^
|
s041112532
|
p00004
|
C++
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextInt()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int d = scanner.nextInt();
int e = scanner.nextInt();
int f = scanner.nextInt();
Equation equation_1 = new Equation(a, b, c);
Equation equation_2 = new Equation(d, e, f);
double[] solution = solve(equation_1, equation_2);
System.out.printf("%.3f %.3f\n", solution[0], solution[1]);
}
}
static double[] solve(Equation left, Equation right) {
double determinant = left.a * right.b - right.a * left.b;
double x = (right.b * left.c - left.b * right.c) / determinant;
double y = (-right.a * left.c + left.a * right.c) / determinant;
double[] result = { x, y };
return result;
}
}
// ax + by = c
class Equation {
Equation(int a, int b, int c) {
this.a = a;
this.b = b;
this.c = c;
}
public int a;
public int b;
public int c;
}
|
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 {
| ^~~~~~
a.cc:45:11: error: expected ':' before 'int'
45 | public int a;
| ^~~~
| :
a.cc:46:11: error: expected ':' before 'int'
46 | public int b;
| ^~~~
| :
a.cc:47:11: error: expected ':' before 'int'
47 | public int c;
| ^~~~
| :
a.cc:49:2: error: expected ';' after class definition
49 | }
| ^
| ;
a.cc: In constructor 'Equation::Equation(int, int, int)':
a.cc:40:14: error: request for member 'a' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
40 | this.a = a;
| ^
a.cc:41:14: error: request for member 'b' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
41 | this.b = b;
| ^
a.cc:42:14: error: request for member 'c' in '(Equation*)this', which is of pointer type 'Equation*' (maybe you meant to use '->' ?)
42 | this.c = c;
| ^
|
s719785848
|
p00004
|
C++
|
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
double a=1;, b, c, d, e, f;
while(a){
cin >> a >> b>> c>> d>> e>> f;
double x, y;
x =(c*e-b*f) / (a*e-b*d);
y = (c*d-a*f) / (b*d-a*e);
printf("%.3f %.3f\n",x, y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before ',' token
7 | double a=1;, b, c, d, e, f;
| ^
a.cc:7:14: error: 'b' was not declared in this scope
7 | double a=1;, b, c, d, e, f;
| ^
a.cc:7:17: error: 'c' was not declared in this scope
7 | double a=1;, b, c, d, e, f;
| ^
a.cc:7:20: error: 'd' was not declared in this scope
7 | double a=1;, b, c, d, e, f;
| ^
a.cc:7:23: error: 'e' was not declared in this scope
7 | double a=1;, b, c, d, e, f;
| ^
a.cc:7:26: error: 'f' was not declared in this scope
7 | double a=1;, b, c, d, e, f;
| ^
|
s072581957
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
//#include <fstream>
int main(int argc, char **argv){
//std::ifstream ifs("test.txt");
double a = 0;
double b = 0;
double c = 0;
double d = 0;
double e = 0;
double f = 0;
while(std::cin >> a >> b >> c >> d >> e >> f){
//while(ifs >> a >> b >> c >> d >> e >> f){
double det = a * e - b * d;
double x = (c * e - b * f) / det;
double y = (a * f - c * d) / det;
x = std::round(x * 1000) / 1000.0;
y = std::round(y * 1000) / 1000.0;
if(x == - 0){ x = 0; }
if(y == - 0){ y = 0; }
std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
}
return 0;
}
|
a.cc: In function 'int main(int, char**)':
a.cc:20:26: error: 'round' is not a member of 'std'
20 | x = std::round(x * 1000) / 1000.0;
| ^~~~~
a.cc:21:26: error: 'round' is not a member of 'std'
21 | y = std::round(y * 1000) / 1000.0;
| ^~~~~
|
s032705234
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
using namespace std;
int main() {
double a, b, c, d, e, f;
vector<string> v;
while (cin >> a >> b >> c >> d >> e >> f) {
double x, y;
x = ((c * e) - (b * f)) / ((a * e) - (b * d));
y = ((c * d) - (a * f)) / ((b * d) - (a * e));
x = x * 1000;
x = round(x);
x = x / 1000;
y = y * 1000;
y = round(y);
y = y / 1000;
stringstream ss;
ss << fixed << setprecision(3) << x << " " << y;
v.push_back(ss.str());
}
for (int i = 0; i < v.size(); i++) {
cout << v[i] << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:19:21: error: 'round' was not declared in this scope
19 | x = round(x);
| ^~~~~
|
s454206019
|
p00004
|
C++
|
#include<iostream>
#include<stdio.h>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f;) {
double bd = b*d;
double ea = e*a;
double cd = c*d;
double fa = f*a;
y = (cd - fa) / (bd - ea);
x = (c - b*y) / a;
printf("%.3f %.3f\n", x, y);
}
}
|
a.cc: In function 'int main()':
a.cc:6:49: error: expected ')' before ';' token
6 | while (cin >> a >> b >> c >> d >> e >> f;) {
| ~ ^
| )
a.cc:6:50: error: expected primary-expression before ')' token
6 | while (cin >> a >> b >> c >> d >> e >> f;) {
| ^
|
s105106067
|
p00004
|
C++
|
#include<cstdio>
#include<iostream>
class GCDandLCM{
public:
void solve(int a,int b){
int big=a,small=b;
if(a<b){
big=b;
small=a;
int tmp=a;
a=b;
b=tmp;
}
while(big%small!=0){
int tmp=big%small;
big=small;
small=tmp;
}
printf("%d %d\n",small,(a*b)/small);
}
};
int main(){
GCDandLCM inst;
int a,b;
while(cin>>a>>b){
inst.solve(a,b);
}
}
|
a.cc: In function 'int main()':
a.cc:25:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
25 | while(cin>>a>>b){
| ^~~
| std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
|
s396473043
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main()
{
double a[3], b[3];
while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2])
{
if (a[0] == 0)
{
double c = a[2] / a[1];
double d = (b[2] - b[1] * c) / b[1];
a[2] = d;
b[2] = d;
}
else
{
double c = 1;
if (b[0] != 0)
{
c = a[0] / b[0];
b[1] = b[1] * c - a[1];
b[2] = b[2] * c - a[2];
}
b[2] /= b[1];
b[1] = 1;
a[2] -= b[2] * a[1];
a[2] /= a[0];
}
if (a[2] < 0.0001 && a[2] > -0.0001)
a[2] = 0.000;
if (b[2] < 0.0001 && b[2] > -0.0001)
b[2] = 0.000;
cout << fixed << setprecision(3) << a[2] << b[2] << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:37:34: error: 'setprecision' was not declared in this scope
37 | cout << fixed << setprecision(3) << a[2] << b[2] << endl;
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | #include <iostream>
+++ |+#include <iomanip>
2 | using namespace std;
|
s855007683
|
p00004
|
C++
|
#include <iostream>
using namespace std;
int main()
{
double a[3], b[3];
while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2])
{
if (a[0] == 0)
{
double c = a[2] / a[1];
double d = (b[2] - b[1] * c) / b[1];
a[2] = d;
b[2] = d;
}
else
{
double c = 1;
if (b[0] != 0)
{
c = a[0] / b[0];
b[1] = b[1] * c - a[1];
b[2] = b[2] * c - a[2];
}
b[2] /= b[1];
b[1] = 1;
a[2] -= b[2] * a[1];
a[2] /= a[0];
}
if (a[2] < 0.0001 && a[2] > -0.0001)
a[2] = 0.000;
if (b[2] < 0.0001 && b[2] > -0.0001)
b[2] = 0.000;
cout << fixed << setprecision(3) << a[2] << b[2] << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:37:34: error: 'setprecision' was not declared in this scope
37 | cout << fixed << setprecision(3) << a[2] << b[2] << endl;
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | #include <iostream>
+++ |+#include <iomanip>
2 | using namespace std;
|
s746560126
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
using namespace std;
void OutputSolution(int a, int b, int c, int d, int e, int f)
{
if(b == 0){
double x = c / a;
double y = (f-d*x) / e;
}else{
int B = b;
a *= e;
b *= e;
c *= e;
d *= B;
e *= B;
f *= B;
double x = (c-f) / (a-d);
double y = (c-a*x) / b;
}
cout << fixed << setprecision(3) << x << ' ' << y << endl;
}
int main()
{
while(true){
int a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
if(cin.eof()) break;
OutputSolution(a, b, c, d, e, f);
}
return 0;
}
|
a.cc: In function 'void OutputSolution(int, int, int, int, int, int)':
a.cc:21:45: error: 'x' was not declared in this scope
21 | cout << fixed << setprecision(3) << x << ' ' << y << endl;
| ^
a.cc:21:57: error: 'y' was not declared in this scope
21 | cout << fixed << setprecision(3) << x << ' ' << y << endl;
| ^
|
s451244423
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
/*
ax + by = c
dx + ey = f
x = (c-by)/a
d(c-by)/a + ey = f
dc/a - dby/a + ey = f
ey - dby/a = f - dc/a
y(e-db/a) = f - dc/a
y = (f-dc/a)/(e-db/a)
aex + bey = ce
bdx + bey = bf
aex - bdx = ce - bf
x(ae - bd) = ce - bf
x = (ce - bf)/(ae - bd)
by = c - ax
y = (c - ax)/b
*/
int main()
{
while(true){
double a, b, c, d, e, f;
std::cin >> a >> b >> c >> d >> e >> f;
if(std::cin.eof()) break;
if(b){
double x = (c*e - b*f) / (a*e - b*d);
double y = (c - a*x) / b;
}else{
double y = (f-d*c/a)/(e-d*b/a);
double x = (c-b*y)/a;
}
std::cout << std::fixed << std::setprecision(3);
std::cout << x << " " << y << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:37:22: error: 'x' was not declared in this scope
37 | std::cout << x << " " << y << std::endl;
| ^
a.cc:37:34: error: 'y' was not declared in this scope
37 | std::cout << x << " " << y << std::endl;
| ^
|
s945029719
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
using namespace std;
void OutputSolution(int a, int b, int c, int d, int e, int f)
{
long long double x, y;
if(b == 0){
x = c / a;
y = (f-d*x) / e;
}else{
int B = b;
a *= e;
b *= e;
c *= e;
d *= B;
e *= B;
f *= B;
x = (c-f) / (a-d);
y = (c-a*x) / b;
}
cout << fixed << setprecision(3) << x << ' ' << y << endl;
}
int main()
{
while(true){
int a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
if(cin.eof()) break;
OutputSolution(a, b, c, d, e, f);
}
return 0;
}
|
a.cc: In function 'void OutputSolution(int, int, int, int, int, int)':
a.cc:7:10: error: 'long long' specified with 'double'
7 | long long double x, y;
| ^~~~
a.cc:7:10: error: 'long long' specified with 'double'
|
s044254489
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
using namespace std;
int main(???
{
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (c*e - b*f) / (a*e - b*d);
double y = (c*d - a*f) / (b*d - a*e);
printf("%.3f %.3f", x, y);
}
return 0;
}
|
a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main(???
| ^~~~
a.cc:5:10: error: expected primary-expression before '?' token
5 | int main(???
| ^
a.cc:5:11: error: expected primary-expression before '?' token
5 | int main(???
| ^
a.cc:5:12: error: expected primary-expression before '?' token
5 | int main(???
| ^
a.cc:6:1: error: expected primary-expression before '{' token
6 | {
| ^
a.cc:5:13: error: expected ':' before '{' token
5 | int main(???
| ^
| :
6 | {
| ~
a.cc:6:1: error: expected primary-expression before '{' token
6 | {
| ^
a.cc:5:13: error: expected ':' before '{' token
5 | int main(???
| ^
| :
6 | {
| ~
a.cc:6:1: error: expected primary-expression before '{' token
6 | {
| ^
a.cc:5:13: error: expected ':' before '{' token
5 | int main(???
| ^
| :
6 | {
| ~
a.cc:6:1: error: expected primary-expression before '{' token
6 | {
| ^
|
s521672919
|
p00004
|
C++
|
#include <iostream>
#include <stdio.h>
#define swap(a,b) {a=a+b; b=a-b; a=a-b;}
void q4() {
double a, b, c, d, e, f;
for (;;) {
cin >> a >> b >> c >> d >> e >> f;
//scanf_s("%lf %lf %lf %lf %lf %lf\n", &a, &b, &c, &d, &e, &f);
if (a == 0) {
swap(a, d);
swap(b, e);
swap(c, f);
}
b /= a;
c /= a;
a = 1;
e -= b * d;
f -= c * d;
d = 0;
f = f / e;
e = 1;
c -= f * b;
b = 0;
printf("%4lf %4lf\n", c, f);
}
}
int main() {
q4();
return 0;
}
|
a.cc: In function 'void q4()':
a.cc:8:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> a >> b >> c >> d >> e >> f;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
|
s892342843
|
p00004
|
C++
|
#include <iostream>
#include <stdio.h>
define swap(a,b) {a=a+b; b=a-b; a=a-b;}
using namespace std;
void q4() {
double a, b, c, d, e, f;
for (; cin >> a >> b >> c >> d >> e >> f;) {
//cin >> a >> b >> c >> d >> e >> f;
//scanf_s("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
if (a == 0) {
swap(a, d);
swap(b, e);
swap(c, f);
}
b /= a;
c /= a;
a = 1;
e -= b * d;
f -= c * d;
d = 0;
f = f / e;
e = 1;
c -= f * b;
b = 0;
printf("%.3f %.3f\n", c, f);
}
}
int main() {
q4();
return 0;
}
|
a.cc:3:1: error: 'define' does not name a type
3 | define swap(a,b) {a=a+b; b=a-b; a=a-b;}
| ^~~~~~
|
s084869433
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
using namespace std;
int main(void){
int a,b,c,d,e,f;
double ansX[1000],ansY[1000];
while(std::cin >> a >> b >> c >> d >> e >> f){
ansX = (c*e - b*f) / (a*e - b*d);
ansX *= 1000;
if(ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int(ansX);
ansX /= 1000;
ansY = (a*f - c*d) / (a*e - b*d);
ansY *= 1000;
if(ansY > 0)
ansY += 0.5;
else
ansY -= 0.5;
ansY = int(ansY);
ansY /= 1000;
std::cout <<fixed << setprecision(3) << ansX << " " << fixed << setprecision(3)<<ansY << std::endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:14: error: incompatible types in assignment of 'int' to 'double [1000]'
9 | ansX = (c*e - b*f) / (a*e - b*d);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:10:14: error: invalid operands of types 'double [1000]' and 'int' to binary 'operator*'
10 | ansX *= 1000;
| ~~~~~^~~~~~~
a.cc:10:14: note: in evaluation of 'operator*=(double [1000], int)'
a.cc:11:17: error: ordered comparison of pointer with integer zero ('double*' and 'int')
11 | if(ansX > 0)
| ~~~~~^~~
a.cc:12:18: error: invalid operands of types 'double [1000]' and 'double' to binary 'operator+'
12 | ansX += 0.5;
| ~~~~~^~~~~~
a.cc:12:18: note: in evaluation of 'operator+=(double [1000], double)'
a.cc:14:18: error: invalid operands of types 'double [1000]' and 'double' to binary 'operator-'
14 | ansX -= 0.5;
| ~~~~~^~~~~~
a.cc:14:18: note: in evaluation of 'operator-=(double [1000], double)'
a.cc:15:16: error: cast from 'double*' to 'int' loses precision [-fpermissive]
15 | ansX = int(ansX);
| ^~~~~~~~~
a.cc:15:14: error: incompatible types in assignment of 'int' to 'double [1000]'
15 | ansX = int(ansX);
| ~~~~~^~~~~~~~~~~
a.cc:16:14: error: invalid operands of types 'double [1000]' and 'int' to binary 'operator/'
16 | ansX /= 1000;
| ~~~~~^~~~~~~
a.cc:16:14: note: in evaluation of 'operator/=(double [1000], int)'
a.cc:18:14: error: incompatible types in assignment of 'int' to 'double [1000]'
18 | ansY = (a*f - c*d) / (a*e - b*d);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:19:14: error: invalid operands of types 'double [1000]' and 'int' to binary 'operator*'
19 | ansY *= 1000;
| ~~~~~^~~~~~~
a.cc:19:14: note: in evaluation of 'operator*=(double [1000], int)'
a.cc:20:17: error: ordered comparison of pointer with integer zero ('double*' and 'int')
20 | if(ansY > 0)
| ~~~~~^~~
a.cc:21:18: error: invalid operands of types 'double [1000]' and 'double' to binary 'operator+'
21 | ansY += 0.5;
| ~~~~~^~~~~~
a.cc:21:18: note: in evaluation of 'operator+=(double [1000], double)'
a.cc:23:18: error: invalid operands of types 'double [1000]' and 'double' to binary 'operator-'
23 | ansY -= 0.5;
| ~~~~~^~~~~~
a.cc:23:18: note: in evaluation of 'operator-=(double [1000], double)'
a.cc:24:16: error: cast from 'double*' to 'int' loses precision [-fpermissive]
24 | ansY = int(ansY);
| ^~~~~~~~~
a.cc:24:14: error: incompatible types in assignment of 'int' to 'double [1000]'
24 | ansY = int(ansY);
| ~~~~~^~~~~~~~~~~
a.cc:25:14: error: invalid operands of types 'double [1000]' and 'int' to binary 'operator/'
25 | ansY /= 1000;
| ~~~~~^~~~~~~
a.cc:25:14: note: in evaluation of 'operator/=(double [1000], int)'
|
s732996998
|
p00004
|
C++
|
#include <iostream>
#include<cstdo>
using namespace std;
int main() {
// your code goes here
int a,b,c,d,e,f;
while(cin >> a >> b >> c >> d >> e >> f ){
double x = (c*e-b*f)/(double)(a*e-b*d);
double y = (c*d-a*f)/(double)(b*d-a*e);
printf("%.3f %3f\n",x,y);
}
return 0;
}
|
a.cc:2:9: fatal error: cstdo: No such file or directory
2 | #include<cstdo>
| ^~~~~~~
compilation terminated.
|
s237315839
|
p00004
|
C++
|
#include <iostream>
#include<cstdio>
using namespace std;
??
int main() {
????????// your code goes here
??
????double a,b,c,d,e,f;
??
????while(cin >> a >> b >> c >> d >> e >> f ){
??
????????double x = (c*e-b*f)/(a*e-b*d);
????????double y = (c-a*x)/b;
????????if(x == -0.0){
????????????x = 0.0;
????????}
????????if(y == 0.0){
????????????y = 0.0;
????????}
??
????????printf("%.3lf %3lf\n",x,y);
??
????}
????????return 0;
}
|
a.cc:6:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
6 | ????????// your code goes here
a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
|
s746211109
|
p00004
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define Vi vector<int>
#define FOR(i,s,e) for (int i=s; i<e; i++)
#define ITER(v) v.begin(), v.end()
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c, d, e, f;
double den, x, y;
while (true) {
cin >> a >> b >> c >> d >> e >> f;
if (cin.eof()) { break; }
den = a * e - b * d;
x = static_cast<double>(c * e - b * f) / den;
y = static_cast<double>(- c * d + a * f) / den;
// avoid -0.000
x += 0.0
y += 0.0
cout << fixed << setprecision(3) << x << " " << y << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:17: error: expected ';' before 'y'
23 | x += 0.0
| ^
| ;
24 | y += 0.0
| ~
|
s742610033
|
p00004
|
C++
|
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)-(a*f))/((b*d)-(a*e)));
x=(((c*e)-(b*f))/((a*e)-(b*d)));
printf("%3lf %3lf\n",x,y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:3:15: error: 'scanf' was not declared in this scope
3 | while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
| ^~~~~
a.cc:3:62: error: 'EOF' was not declared in this scope
3 | while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
| ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(){
a.cc:6:17: error: 'printf' was not declared in this scope
6 | printf("%3lf %3lf\n",x,y);
| ^~~~~~
a.cc:6:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s365677640
|
p00004
|
C++
|
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 = (b*f - c*e) / (b*d - a*e);
y = (c*d - a*f) / (b*d - a*e);
if(abs(x) < 0.000001 && x < 0)
x = 0.0;
if(abs(y) < 0.000001 && y < 0)
y = 0.0;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
4 | while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF)
| ^~~~~
a.cc:4:64: error: 'EOF' was not declared in this scope
4 | while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF)
| ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main()
a.cc:8:10: error: 'abs' was not declared in this scope
8 | if(abs(x) < 0.000001 && x < 0)
| ^~~
a.cc:10:10: error: 'abs' was not declared in this scope
10 | if(abs(y) < 0.000001 && y < 0)
| ^~~
a.cc:12:7: error: 'printf' was not declared in this scope
12 | printf("%.3f %.3f\n", x, y);
| ^~~~~~
a.cc:12:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s037516423
|
p00004
|
C++
|
using namespace std;
#define j bai;
int main() {
double a, b, c, d, e, y, x, f, bai;
bool bo = false;
while (cin >> a >> b >> c >> d >> e >> f) {
if (a ==0 || b ==0) {
if (a) {
y = c / b;
x = f / d - e*y;
}
else if (b) {
x = a / c;
y = f / e - d*x;
}
bo = true;
}
else if (d == 0 || e == 0) {
if (d) {
y = f / e;
x = c / a - d*y;
}
else if (e) {
x = f / d;
y = f / e - d*x;
}
bo = true;
}
else if (a < d) {
bai = d / a;
a *= j;
b *= j;
c *= j;
}
else {
bai = a / d;
d *= j;
e *= j;
f *= j;
}
if (((a > 0 && d < 0) || (a < 0 && d>0)) && bo==false) {
y = (c + f) / (b + e);
x = (c - b*y) / a;
}
else if (bo == false) {
y = (c - f) / (b - e);
x = (c - b*y) / a;
}
if (x == -0.000) {
x = abs(x);
}
if (y == -0.000) {
y = abs(y);
}
printf("%.3lf %.3lf\n", x, y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope
7 | 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 |
a.cc:52:29: error: 'abs' was not declared in this scope
52 | x = abs(x);
| ^~~
a.cc:55:29: error: 'abs' was not declared in this scope
55 | y = abs(y);
| ^~~
a.cc:57:17: error: 'printf' was not declared in this scope
57 | printf("%.3lf %.3lf\n", x, y);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 |
|
s145252096
|
p00004
|
C++
|
//
// main.cpp
// Sample
//
// Created by h3037183 on 2017/07/31.
// Copyright ?? 2017??´ ?°????. All rights reserved.
//
#include <iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
double a,b,c,d,e,f,x,y;
for(;;){
cin>>a>>b>>c>>d>>e>>f;
x=(c*e-b*f)/(a*e-b*d);
y=(c*d-f*a)/(b*d-a*e);
printf("%.3lf %.3lf",x,y);
cout<<endl;
}
break
return 0;
}
|
a.cc: In function 'int main()':
a.cc:22:5: error: break statement not within loop or switch
22 | break
| ^~~~~
a.cc:22:10: error: expected ';' before 'return'
22 | break
| ^
| ;
23 | return 0;
| ~~~~~~
|
s748724509
|
p00004
|
C++
|
#include <iostream>
#include<cstdio>
using namespace std;
int main() {
// your code goes here
double a,b,c,d,e,f;
while(cin >> a >> b >> c >> d >> e >> f ){
double x = (double)((e*c-b*f) / (a*e-b*d));
????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
if(y == 0){
y = 0;
}
if(x == 0){
x = 0;
}
printf("%.3lf %3lf\n",x,y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:1: error: expected primary-expression before '?' token
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^
a.cc:13:2: error: expected primary-expression before '?' token
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^
a.cc:13:3: error: expected primary-expression before '?' token
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^
a.cc:13:4: error: expected primary-expression before '?' token
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^
a.cc:13:5: error: expected primary-expression before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
a.cc:13:5: error: expected ':' before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
| :
a.cc:13:5: error: expected primary-expression before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
a.cc:13:5: error: expected ':' before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
| :
a.cc:13:5: error: expected primary-expression before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
a.cc:13:5: error: expected ':' before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
| :
a.cc:13:5: error: expected primary-expression before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
a.cc:13:5: error: expected ':' before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
| :
a.cc:13:5: error: expected primary-expression before 'double'
13 | ????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
| ^~~~~~
a.cc:14:6: error: 'y' was not declared in this scope
14 | if(y == 0){
| ^
a.cc:23:29: error: 'y' was not declared in this scope
23 | printf("%.3lf %3lf\n",x,y);
| ^
|
s835589161
|
p00004
|
C++
|
#include <iostream>
#include<cstdio>
using namespace std;
int main() {
// your code goes here
double a,b,c,d,e,f;
double x,y
while(cin >> a >> b >> c >> d >> e >> f ){
x =(double)((e*c-b*f)/(a*e-b*d));
y = (double)((-(d*c)+a*f)/(a*e-b*d));
if(y == 0){
y = 0;
}
if(x == 0){
x = 0;
}
printf("%.3f %3f\n",x,y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:3: error: expected initializer before 'while'
11 | while(cin >> a >> b >> c >> d >> e >> f ){
| ^~~~~
|
s748790755
|
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)){
x=((c*e-f*b)/(a*e-d*b));
y=((c-a*x)/b);
if(x>0)x+=0.0005;
else x-=0.0005;
if(y>0)x+=0.0005;
else y=-=0.0005;
printf("%.3ld %.3ld",x,y);
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:3:32: error: expected unqualified-id before ';' token
3 | double a,b,c,d,e,f,x,y,;
| ^
a.cc:10:24: error: expected primary-expression before '-=' token
10 | else y=-=0.0005;
| ^~
|
s994346572
|
p00004
|
C++
|
#include<stdio.h>
int main(){
double a,b,c,d,e,f;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=-1){
printf("%.3lf %.3lf\n",(c*e-f*b)==0?0:(c*e-f*b)/(a*e-d*b),(c*d-a*f)==0?0:(cd-a*f)/(bd-ae));
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:91: error: 'cd' was not declared in this scope; did you mean 'd'?
5 | printf("%.3lf %.3lf\n",(c*e-f*b)==0?0:(c*e-f*b)/(a*e-d*b),(c*d-a*f)==0?0:(cd-a*f)/(bd-ae));
| ^~
| d
a.cc:5:100: error: 'bd' was not declared in this scope; did you mean 'd'?
5 | printf("%.3lf %.3lf\n",(c*e-f*b)==0?0:(c*e-f*b)/(a*e-d*b),(c*d-a*f)==0?0:(cd-a*f)/(bd-ae));
| ^~
| d
a.cc:5:103: error: 'ae' was not declared in this scope; did you mean 'e'?
5 | printf("%.3lf %.3lf\n",(c*e-f*b)==0?0:(c*e-f*b)/(a*e-d*b),(c*d-a*f)==0?0:(cd-a*f)/(bd-ae));
| ^~
| e
|
s265549953
|
p00004
|
C++
|
#include<stdio.h>
int main(){
double a,b,c,d,e,f;
double x,y,z,v;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=-1)
x=(c*e-b*f)/(a*e-b*d);
y=(c*d-a*f)/(b*d-a*e);
if(x>=-0.0005&&x<0.0005) x=0;
if(y>=-0.0005&&y<0.0005) y=0;
printf("%.3lf %.3lf\n",x,y);
}
}
|
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
s593178893
|
p00004
|
C++
|
#include <iostream>
#include <iomanip>
using namespace std;
constexpr double eps = 1e-8;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (c * e - b * f) / (a * e - b * d);
y = (c - a * x) / b;
if (fabs(x) < eps) x = 0;
if (fabs(y) < eps) y = 0;
cout << fixed << setprecision(3) << x << " " << y << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:11:9: error: 'fabs' was not declared in this scope; did you mean 'labs'?
11 | if (fabs(x) < eps) x = 0;
| ^~~~
| labs
a.cc:12:9: error: 'fabs' was not declared in this scope; did you mean 'labs'?
12 | if (fabs(y) < eps) y = 0;
| ^~~~
| labs
|
s293328902
|
p00004
|
C++
|
#include<iostream>
using namespace std;
void main(){
int a,b,c,d,e,f;
cout<<"ax+by=c"<<endl<<"dx+ef=f"<<endl;
cout<<" ????§£???x,y??????????????????"<<endl;
cout<<"a b c d e f >>>>";
cin>>a>>b>>c>>d>>e>>f;
cout<<"x="<<(e*c-b*f)/(a*e-b*d)
<<"y="<<(-c*d+a*f)/(a*e-b*d)<<endl;
}
|
a.cc:4:1: error: '::main' must return 'int'
4 | void main(){
| ^~~~
|
s107184409
|
p00004
|
C++
|
#include<iostream>
#include<iomanip>
double shisyagonyu(double x
if(x>0){
x += 0.0005;
}
if(x<0){
x -= 0.0005;
}
return x;
}
int main(){
double a,b,c,d,e,f,x,y;
while(std::cin >>a>>b>>c>>d>>e>>f){
/*x = (c*e-b*f)/(a*e-b*d);
y = (a*f-c*d)/(a*e-b*d);
std::cout << x;
std::cout << " " << y << std::endl;
*/
x = shisyagonyu((c*e-b*f)/(a*e-b*d));
y = shisyagonyu((a*f-c*d)/(a*e-b*d));
std::cout << std::fixed;
std::cout << std::setprecision(3) << x;
std::cout << " " << y << std::endl;
}
}
|
a.cc:5:3: error: expected ',' or '...' before 'if'
5 | if(x>0){
| ^~
a.cc:11:11: error: expected ')' before ';' token
11 | return x;
| ^
| )
a.cc:4:19: note: to match this '('
4 | double shisyagonyu(double x
| ^
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.