submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s016335720
|
p00003
|
C++
|
#include "stdafx.h"
#include <iostream>
using namespace std;
int n;
int main()
{
cin >> n;
int i,a[1000],b[1000],c[1000],x[1000],y[1000],z[1000],res[1000];
for (i = 0; i < n; i++) {
cin >> a[i] >> b[i] >> c[i];
x[i] = a[i];
if (x[i] < b[i]) {
y[i] = x[i];
x[i] = b[i];
}
else {
y[i] = b[i];
}
if (x[i] < c[i]) {
z[i] = y[i];
y[i] = x[i];
x[i] = c[i];
}
else if (y[i] < c[i]) {
z[i] = y[i];
y[i] = c[i];
}
else {
z[i] = c[i];
}
}
for (i = 0; i < n; i++) {
res[i] = x[i] * x[i] - z[i] * z[i] - y[i] * y[i];
if (res[i] == 0) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s150904135
|
p00003
|
C++
|
#include<stdio.h>
int main(void)
{
int n,a,b,c,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d %d",&a,&b,&c);
if(a>b&&a>c){
if(b*b+c*c==a*a){
printf("YES\n");
}
else{
printf("NO\n");
}
}
else if(b>a&&b>c){
if(a*a+c*c==b*b){
printf("YES\n");
}
else{
printf("NO\n");
}
}
else(c>a&&c>b){
if(a*a+b*b==c*c){
printf("YES\n");
}
else{
printf("NO\n");
}
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:24:31: error: expected ';' before '{' token
24 | else(c>a&&c>b){
| ^
| ;
|
s366274850
|
p00003
|
C++
|
#include<iostream>
#include <cmath>
using namespace std;
int main(){
int n, a, b, c;
cin >> n;
while(n--){
cin >> a >> b >> c;
int sum = a + b + c;
x = max(a,max(b,c));
y = min(a,min(b,c));
z = sum - x - y;
if(y*y + z*z == x*x)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:17: error: 'x' was not declared in this scope
12 | x = max(a,max(b,c));
| ^
a.cc:13:17: error: 'y' was not declared in this scope
13 | y = min(a,min(b,c));
| ^
a.cc:14:17: error: 'z' was not declared in this scope
14 | z = sum - x - y;
| ^
|
s674515937
|
p00003
|
C++
|
#include<iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
int n, a, b, c, x, y, z;
cin >> n;
for(int i = 0; i < n; i++){
cin >> a >> b >> c;
int sum = a + b + c;
x = max(a,b,c);
y = min(a,b,c));
z = sum - x - y;
if((y*y) + (z*z) == x*x)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:31: error: expected ';' before ')' token
14 | y = min(a,b,c));
| ^
| ;
In file included from /usr/include/c++/14/string:51,
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/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:13:10: required from here
13 | x = max(a,b,c);
| ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
306 | if (__comp(__a, __b))
| ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:14:10: required from here
14 | y = min(a,b,c));
| ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s366629094
|
p00003
|
C++
|
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n, l[3]
cin >> n;
for(int i = 0; i < n; i++){
cin >> l[0] >> l[1] >> l[2];
sort(l,l+3);
if(l[0]*l[0] +l[1]*l[1] == l[2]*l[2])
cout << "Yes" << endl;
else
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:9: error: expected initializer before 'cin'
7 | cin >> n;
| ^~~
a.cc:9:24: error: 'l' was not declared in this scope
9 | cin >> l[0] >> l[1] >> l[2];
| ^
|
s751422782
|
p00003
|
C++
|
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
while(n--){
int a, b, c;
cin >> a >> b >> c;
int x, y ,z;
x = max(a,max(b,c));
y = min(a,min(b,c));
z = sum - x - y;
if(x*x == y*y + z*z)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:15:21: error: 'sum' was not declared in this scope
15 | z = sum - x - y;
| ^~~
|
s735755905
|
p00003
|
C++
|
#include<iostream>
#include<cmath>
int main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
int a, b, c;
cin >> a >> b >> c;
int x, y, z;
x = max(a,max(b,c));
y = min(a,min(b,c));
z = (a+b+c) - x - y;
if(x*x == y*y + z*z)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:27: error: 'max' was not declared in this scope; did you mean 'std::max'?
10 | x = max(a,max(b,c));
| ^~~
| std::max
In file included from /usr/include/c++/14/string:51,
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:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:10:21: error: 'max' was not declared in this scope; did you mean 'std::max'?
10 | x = max(a,max(b,c));
| ^~~
| std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:11:27: error: 'min' was not declared in this scope; did you mean 'std::min'?
11 | y = min(a,min(b,c));
| ^~~
| std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:11:21: error: 'min' was not declared in this scope; did you mean 'std::min'?
11 | y = min(a,min(b,c));
| ^~~
| std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:15:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout << "Yes" << 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:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
15 | cout << "Yes" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:17:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << "No" << 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:17:41: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s770304972
|
p00003
|
C++
|
#include<iostream>
#include<cmath>
int main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
int a, b, c;
cin >> a >> b >> c;
int x, y, z;
x = max(a,max(b,c));
y = min(a,min(b,c));
z = (a+b+c) - x - y;
if(x*x == y*y + z*z)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:11:27: error: 'max' was not declared in this scope; did you mean 'std::max'?
11 | x = max(a,max(b,c));
| ^~~
| std::max
In file included from /usr/include/c++/14/string:51,
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:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:11:21: error: 'max' was not declared in this scope; did you mean 'std::max'?
11 | x = max(a,max(b,c));
| ^~~
| std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:12:27: error: 'min' was not declared in this scope; did you mean 'std::min'?
12 | y = min(a,min(b,c));
| ^~~
| std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:12:21: error: 'min' was not declared in this scope; did you mean 'std::min'?
12 | y = min(a,min(b,c));
| ^~~
| std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
a.cc:16:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | cout << "Yes" << 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:16:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | cout << "Yes" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:18:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | cout << "No" << 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:18:41: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
18 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s185005673
|
p00003
|
C++
|
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
int l[3];
cin >> l[0] >> l[1] >> l[2];
sort(l,l+3);
if(l[2]l[2]=l[1]*l[1]+l[0]*l[0])
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:24: error: expected ')' before 'l'
12 | if(l[2]l[2]=l[1]*l[1]+l[0]*l[0])
| ~ ^
| )
|
s928677709
|
p00003
|
C++
|
num = []
i = 0
roop = gets.to_i
while i < roop
a = gets
num = []
num = a.split(nil)
num = num.map{|n| n.to_i}
num.sort!
if (num[2]**2) == ((num[1]**2) + (num[0]**2))
puts "YES"
else
puts "NO"
end
i = i + 1
end
|
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
1 | num = []
| ^~~
| enum
a.cc:10:9: error: 'num' does not name a type; did you mean 'enum'?
10 | num.sort!
| ^~~
| enum
|
s559059437
|
p00003
|
C++
|
n=int(input())
for i in range(n):
a=[]
a=input().split()
a=sorted(a)
if (int(a[0])**2)+(int(a[1])**2)==(int(a[2])**2):
print('YES')
else:
print('NO')
|
a.cc:7:19: warning: multi-character character constant [-Wmultichar]
7 | print('YES')
| ^~~~~
a.cc:9:19: warning: multi-character character constant [-Wmultichar]
9 | print('NO')
| ^~~~
a.cc:1:1: error: 'n' does not name a type
1 | n=int(input())
| ^
|
s849418474
|
p00003
|
C++
|
import sys
array = []
for line in sys.stdin:
try:
array = [int(x) for x in line.split()]
array.sort()
if array[2]**2 == (array[0]**2+array[1]**2):
print('YES')
else:
print('NO')
except(ValueError):
continue
|
a.cc:10:19: warning: multi-character character constant [-Wmultichar]
10 | print('YES')
| ^~~~~
a.cc:12:19: warning: multi-character character constant [-Wmultichar]
12 | print('NO')
| ^~~~
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'
|
s298116867
|
p00003
|
C++
|
#include <iostream>
using namespace std;
bool isRightTriangle(int a, int b, int c)
{
return (a*a + b*b == c*c);
}
int main()
{
int num_of_test;
cin >> num_of_test;
for (int i=0; i<num_of_test; i++) {
if ( isRightTriangle(a,b,c) || isRightTriangle(c,a,b) || isRightTriangle(b,c,a) ) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:38: error: 'a' was not declared in this scope
16 | if ( isRightTriangle(a,b,c) || isRightTriangle(c,a,b) || isRightTriangle(b,c,a) ) {
| ^
a.cc:16:40: error: 'b' was not declared in this scope
16 | if ( isRightTriangle(a,b,c) || isRightTriangle(c,a,b) || isRightTriangle(b,c,a) ) {
| ^
a.cc:16:42: error: 'c' was not declared in this scope
16 | if ( isRightTriangle(a,b,c) || isRightTriangle(c,a,b) || isRightTriangle(b,c,a) ) {
| ^
|
s411598268
|
p00003
|
C++
|
#include<iostream>
#Include<cstdio>
using namespace std;
int main(){
int n;
int a,b,c;
scans(" %d",&n);
for(int i=0;i<n;i++){
scanf(" %d %d %d",&a,&b,&c);
if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc:2:2: error: invalid preprocessing directive #Include; did you mean #include?
2 | #Include<cstdio>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:9:1: error: 'scans' was not declared in this scope; did you mean 'scanf'?
9 | scans(" %d",&n);
| ^~~~~
| scanf
a.cc:13:30: error: lvalue required as left operand of assignment
13 | if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s607617408
|
p00003
|
C++
|
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int n;
int a,b,c;
scans(" %d",&n);
for(int i=0;i<n;i++){
scanf(" %d %d %d",&a,&b,&c);
if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:1: error: 'scans' was not declared in this scope; did you mean 'scanf'?
9 | scans(" %d",&n);
| ^~~~~
| scanf
a.cc:13:30: error: lvalue required as left operand of assignment
13 | if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s519829755
|
p00003
|
C++
|
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int n;
int a,b,c;
scanf(" %d",&n);
for(int i=0;i<n;i++){
scanf(" %d %d %d",&a,&b,&c);
if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:30: error: lvalue required as left operand of assignment
13 | if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s669033721
|
p00003
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int n, a[3];
cin >> n;
while (cin >> a[0] >> a[1] >> a[2])
{
sort(a, a + 3);
if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
cout << "YES" << endl;
else
cout << "NO" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(a, a + 3);
| ^~~~
| short
|
s496002944
|
p00003
|
C++
|
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int n,j=0;
int a[3];
cin>>n;
while(j<n){
for(int i=0;i<3;i++){
cin>>a[i];
}
sort(a,a+3);
if(pow(a[2],2)==pow(a[1],2)+pow(a[0],2)){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
j++;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
12 | sort(a,a+3);
| ^~~~
| sqrt
|
s667552414
|
p00003
|
C++
|
#include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
int n,j=0;
int a[3];
cin>>n;
for(int i=0;i<n;i++){
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
if(a[2]*a[2]==(a[1]*a[1])+(a[0]*a[0])){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin>>n;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<algorithm>
+++ |+#include <iostream>
3 | using namespace std;
a.cc:12:5: error: 'cout' was not declared in this scope
12 | cout<<"Yes"<<endl;
| ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
12 | cout<<"Yes"<<endl;
| ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
2 | #include<algorithm>
+++ |+#include <ostream>
3 | using namespace std;
a.cc:15:5: error: 'cout' was not declared in this scope
15 | cout<<"No"<<endl;
| ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:17: error: 'endl' was not declared in this scope
15 | cout<<"No"<<endl;
| ^~~~
a.cc:15:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s153468044
|
p00003
|
C++
|
#include <iostream>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
int data[3],tmp;
cin>>data[0]>>data[1]>>data[2];
for(int j=0;j<2;j++){
if(data[j]>data[j+1]){
tmp=data[j];
data[j+1]=data[j];
data[j]=tmp;
}
}
if(data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:19:70: error: expected ')' before '{' token
19 | if(data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
| ~ ^
| )
a.cc:25:9: error: expected primary-expression before '}' token
25 | }
| ^
|
s372642989
|
p00003
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> a(3);
cin >> a[0];
while(cin>>a[0]>>a[1]>>a[2]){
sort(a.begin(),a.end());
if(a[2]*a[2]==a[0]*a[0] + a[1]*a[1]){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:8:17: error: 'sort' was not declared in this scope; did you mean 'short'?
8 | sort(a.begin(),a.end());
| ^~~~
| short
|
s286093738
|
p00003
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
vector<int> a(3);
cin >> n;
for(int i=0;i<n;i++){
cin>>a[0]>>a[1]>>a[2];
sort(a.begin(),a.end());
if(a[2]*a[2]==a[0]*a[0] + a[1]*a[1]){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(a.begin(),a.end());
| ^~~~
| short
|
s766130437
|
p00003
|
C++
|
import Control.Monad
import Data.List
main = do
n <- readLn
s <- map (map (read :: (String -> Int)) . words) <$> replicateM n getLine
mapM_ putStrLn $ map (\x -> if x then "YES" else "NO") $ map (\x -> (x !! 2) ^ 2 == (x !! 0) ^ 2 + (x !! 1) ^ 2) $ map (sort) s
|
a.cc:7:25: error: stray '\' in program
7 | mapM_ putStrLn $ map (\x -> if x then "YES" else "NO") $ map (\x -> (x !! 2) ^ 2 == (x !! 0) ^ 2 + (x !! 1) ^ 2) $ map (sort) s
| ^
a.cc:7:65: error: stray '\' in program
7 | mapM_ putStrLn $ map (\x -> if x then "YES" else "NO") $ map (\x -> (x !! 2) ^ 2 == (x !! 0) ^ 2 + (x !! 1) ^ 2) $ map (sort) s
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import Control.Monad
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s914599776
|
p00003
|
C++
|
using namespace std;
int main(){
int N,a,b,c;
cin>>N;
for(int i=0;i<N;i++){
cin>>a>>b>>c;
if((a*a)==(b*b)+(c*c))
cout<<"YES"<<endl;
else if((b*b)==(a*a)+(c*c))
cout<<"YES"<<endl;
else if((c*c)==(a*a)+(b*b))
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin>>N;
| ^~~
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:8:7: error: 'cout' was not declared in this scope
8 | cout<<"YES"<<endl;
| ^~~~
a.cc:8:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:20: error: 'endl' was not declared in this scope
8 | cout<<"YES"<<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;
a.cc:10:7: error: 'cout' was not declared in this scope
10 | cout<<"YES"<<endl;
| ^~~~
a.cc:10:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:20: error: 'endl' was not declared in this scope
10 | cout<<"YES"<<endl;
| ^~~~
a.cc:10:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:7: error: 'cout' was not declared in this scope
12 | cout<<"YES"<<endl;
| ^~~~
a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:20: error: 'endl' was not declared in this scope
12 | cout<<"YES"<<endl;
| ^~~~
a.cc:12:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:7: error: 'cout' was not declared in this scope
14 | cout<<"NO"<<endl;
| ^~~~
a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:19: error: 'endl' was not declared in this scope
14 | cout<<"NO"<<endl;
| ^~~~
a.cc:14:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s956544710
|
p00003
|
C++
|
#include <iostream>
using namespace std;
int main(){
const int N = 3;
int l[N];
int n;
cin >> n;
for(int i = 0; i < n; ++i) {
cin >> l[0] >> l[1] >> l[2];
sort(l, l + N);
if(l[0] * l[0] + l[1] * l[1] == l[2] * l[2]) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:17: error: 'sort' was not declared in this scope; did you mean 'short'?
11 | sort(l, l + N);
| ^~~~
| short
|
s816707549
|
p00003
|
C++
|
#include <iostream>
#include <cstdio>
using namespace std;
int main() {
int n;
scanf("%d",&n);
int a[3];
while(n--){
for(int i=0;i<3;i++){
cin>>a[i];
}
sort(a,a+3);
if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(a,a+3);
| ^~~~
| short
|
s756207011
|
p00003
|
C++
|
n = int(input())
for i in range(n):
h = list(map(int,input()))
h.sort()
if h[0]**2 ++ h[1]**2 == h[2]**2:
print('YES')
else:
print('NO')
|
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
6 | print('YES')
| ^~~~~
a.cc:8:11: warning: multi-character character constant [-Wmultichar]
8 | print('NO')
| ^~~~
a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s493583974
|
p00003
|
C++
|
//clang 3.8.0
#include <stdio.h>
int main(void)
{
int *a, *b, *c;
int n, i, temp;
scanf("%d", &n);
a = (int *)malloc(sizeof(int) * n);
b = (int *)malloc(sizeof(int) * n);
c = (int *)malloc(sizeof(int) * n);
for(i = 0; i < n; i ++){
scanf("%d %d %d", &a[i], &b[i], &c[i]);
if(a[i] > b[i]){
if(a[i] > c[i]){
temp = c[i];
c[i] = a[i];
a[i] = temp;
}else{
//no_problem
}
}else if(b[i] > c[i]){
temp = c[i];
c[i] = b[i];
b[i] = temp;
}else{
//no_problem
}
}
for(i = 0; i < n; i ++){
printf("%s\n", (a[i] * a[i] + b[i] * b[i] == c[i] * c[i]) ? ("Yes") : ("No"));
}
free(a); free(b); free(c);
}
|
a.cc: In function 'int main()':
a.cc:12:16: error: 'malloc' was not declared in this scope
12 | a = (int *)malloc(sizeof(int) * n);
| ^~~~~~
a.cc:4:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
3 | #include <stdio.h>
+++ |+#include <cstdlib>
4 |
a.cc:40:5: error: 'free' was not declared in this scope
40 | free(a); free(b); free(c);
| ^~~~
a.cc:40:5: note: 'free' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
|
s672530859
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
bool IsRightTriangle(const int a, const int b, const int c)
{
vector<int> SideLength(3);
SideLength[0] = a;
SideLength[1] = b;
SideLength[2] = c;
sort(SideLength.begin(), SideLength.end(), greater<int>());
if(SideLength[0] * SideLength[0] == SideLength[1] * SideLength[1] + SideLength[2] * SideLength[2]){
return true;
}else{
return false;
}
}
int main()
{
int N;
cin >> N;
for(int i = 0; i < N; i++){
int a, b, c;
cin >> a >> b >> c;
if(IsRightTriangle(a, b, c)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'bool IsRightTriangle(int, int, int)':
a.cc:7:9: error: 'vector' was not declared in this scope
7 | vector<int> SideLength(3);
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vector>
3 | using namespace std;
a.cc:7:16: error: expected primary-expression before 'int'
7 | vector<int> SideLength(3);
| ^~~
a.cc:8:9: error: 'SideLength' was not declared in this scope
8 | SideLength[0] = a;
| ^~~~~~~~~~
a.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
17 | }
| ^
|
s377386861
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
bool IsRightTriangle(const int a, const int b, const int c)
{
vector<int> SideLength(3);
SideLength[0] = a;
SideLength[1] = b;
SideLength[2] = c;
sort(SideLength.begin(), SideLength.end(), greater<int>());
if(SideLength[0] * SideLength[0] == SideLength[1] * SideLength[1] + SideLength[2] * SideLength[2]){
return true;
}else{
return false;
}
}
int main()
{
int N;
cin >> N;
for(int i = 0; i < N; i++){
int a, b, c;
cin >> a >> b >> c;
if(IsRightTriangle(a, b, c)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'bool IsRightTriangle(int, int, int)':
a.cc:7:9: error: 'vector' was not declared in this scope
7 | vector<int> SideLength(3);
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vector>
3 | using namespace std;
a.cc:7:16: error: expected primary-expression before 'int'
7 | vector<int> SideLength(3);
| ^~~
a.cc:8:9: error: 'SideLength' was not declared in this scope
8 | SideLength[0] = a;
| ^~~~~~~~~~
a.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
17 | }
| ^
|
s862388497
|
p00003
|
C++
|
#include<stdio.h>
??
int main(void){
????????????????int a,b,c,temp;
????????????????int i,j;
????????????????int N;
??
????????????????scanf("%d",&N);
??
????????????????int k[N][3];
??
????????????????i=0;
??
????????????????while(scanf("%d %d %d",&a,&b,&c)!=EOF){
????????????????????????????????if(a>b){
????????????????????????????????temp=b;
????????????????????????????????b=a;
????????????????????????????????a=temp;
????????????????????????????????}
????????????????????????????????if(b>c){
????????????????????????????????temp=c;
????????????????????????????????c=b;
????????????????????????????????b=temp;
????????????????????????????????}
??
????????????????????????????????k[i][0]=a;
????????????????????????????????k[i][1]=b;
????????????????????????????????k[i][2]=c;
????????????????????????????????i++;
????????????????????????????????if(N==i) break;
??
????????????????}
??
????????????????for(j=0;j<N;j++){
????????????????????????????????if(k[j][2]*k[j][2]==k[j][1]*k[j][1]+k[j][0]*k[j][0]){
????????????????????????????????printf("YES \n");
????????????????????????????????}else{
????????????????????????????????printf("NO \n");
????????????????????????????????}
????????????????}
??
????????????????return 0;
}
|
a.cc:2:1: error: expected unqualified-id before '?' token
2 | ??
| ^
|
s344028858
|
p00003
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
int i;
cin>>i;
for(int j = 0 ; j<i ; j++){
cin>>a>>b>>c
if(a*a == b*b+c*c)
cout<<"YES"<<endl;
else if(b*b == a*a+c*c)
cout<<"YES"<<endl;
else if(c*c == b*b+a*a)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'if'
8 | cin>>a>>b>>c
| ^
| ;
9 | if(a*a == b*b+c*c)
| ~~
a.cc:11:3: error: 'else' without a previous 'if'
11 | else if(b*b == a*a+c*c)
| ^~~~
|
s260656517
|
p00003
|
C++
|
import Control.Applicative
import Control.Monad
import Data.List
main = do
n <- read<$>getLine
tris <- map (map read.words)<$>replicateM n getLine
mapM_ (putStrLn.yesOrNo.isRightTriangle) tris
isRightTriangle list = x^2 + y^2 == z^2
where [x,y,z] = sort list
yesOrNo x = if x then "YES" else "NO"
|
a.cc:1:1: error: 'import' does not name a type
1 | import Control.Applicative
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s572570876
|
p00003
|
C++
|
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main()
{
int n ;
cin >> n;
for (int i = 0; i < n; i++) {
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
if (a[2] < a[1] + a[0]&&a[1]<a[2]+a[0]&&a[0]<a[1]+a[2]) { cout << "YES"; }
else { cout << "NO"; }
cout << endl;
}
return 0;
|
a.cc: In function 'int main()':
a.cc:36:18: error: expected '}' at end of input
36 | return 0;
| ^
a.cc:25:1: note: to match this '{'
25 | {
| ^
|
s224666933
|
p00003
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int sq(int x){return x*x;}
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
int a,b,c;
cin>>a>>b>>c;
cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
}
return 0;
}
|
a.cc: In lambda function:
a.cc:11:26: error: expected '{' before ')' token
11 | cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
| ^
a.cc: In function 'int main()':
a.cc:11:18: error: no matching function for call to 'max(main()::<lambda()>)'
11 | cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: template argument deduction/substitution failed:
a.cc:11:18: note: 'main()::<lambda()>' is not derived from 'std::initializer_list<_Tp>'
11 | cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
| ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 1 provided
|
s367172859
|
p00003
|
C++
|
public class HelloWorld {
public static void main (String[] args) {
int n;
int a,b,c;
int a[3];
string str[];
n = Integer.parseInt(br.readLine());
str[]=new str[n];
for(int i=0;i<n;i++){
a = Integer.parseInt(br.readLine());
b = Integer.parseInt(br.readLine());
c = Integer.parseInt(br.readLine());
a[0]=max(a,b,c);
if(a[0]==a){
a[1]=b;
a[2]=c;
}elseif(a[0]==b){
a[1]=a;
a[2]=c;
}elseif(a[0]==c){
a[1]=b;
a[2]=a;
}
if(a[0]^2==a[1]^2+a[2]^2){
str[i]="YES";
}else{
str[i]="NO";
}
}
for(int i=0;i<n;i++){
System.out.println(str[i]);
}
}
}
|
a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class HelloWorld {
| ^~~~~~
|
s828877987
|
p00003
|
C++
|
Class Tenmou{
public class HelloWorld {
public static void main (String[] args) {
int n;
int a,b,c;
int a[3];
string str[];
n = Integer.parseInt(br.readLine());
str[]=new str[n];
for(int i=0;i<n;i++){
a = Integer.parseInt(br.readLine());
b = Integer.parseInt(br.readLine());
c = Integer.parseInt(br.readLine());
a[0]=max(a,b,c);
if(a[0]==a){
a[1]=b;
a[2]=c;
}elseif(a[0]==b){
a[1]=a;
a[2]=c;
}elseif(a[0]==c){
a[1]=b;
a[2]=a;
}
if(a[0]^2==a[1]^2+a[2]^2){
str[i]="YES";
}else{
str[i]="NO";
}
}
for(int i=0;i<n;i++){
System.out.println(str[i]);
}
}
}
}
|
a.cc:1:1: error: 'Class' does not name a type; did you mean 'class'?
1 | Class Tenmou{
| ^~~~~
| class
|
s918032613
|
p00003
|
C++
|
class Tenmou{
public class HelloWorld {
public static void main (String[] args) {
int n;
int a,b,c;
int a[3];
string str[];
n = Integer.parseInt(br.readLine());
str[]=new str[n];
for(int i=0;i<n;i++){
a = Integer.parseInt(br.readLine());
b = Integer.parseInt(br.readLine());
c = Integer.parseInt(br.readLine());
a[0]=max(a,b,c);
if(a[0]==a){
a[1]=b;
a[2]=c;
}elseif(a[0]==b){
a[1]=a;
a[2]=c;
}elseif(a[0]==c){
a[1]=b;
a[2]=a;
}
if(a[0]^2==a[1]^2+a[2]^2){
str[i]="YES";
}else{
str[i]="NO";
}
}
for(int i=0;i<n;i++){
System.out.println(str[i]);
}
}
}
}
|
a.cc:2:7: error: expected ':' before 'class'
2 | public class HelloWorld {
| ^~~~~~
| :
a.cc:3:11: error: expected ':' before 'static'
3 | public static void main (String[] args) {
| ^~~~~~~
| :
a.cc:3:30: error: 'String' has not been declared
3 | public static void main (String[] args) {
| ^~~~~~
a.cc:3:39: error: expected ',' or '...' before 'args'
3 | public static void main (String[] args) {
| ^~~~
a.cc:40:2: error: expected ';' after class definition
40 | }
| ^
| ;
a.cc:41:2: error: expected ';' after class definition
41 | }
| ^
| ;
a.cc: In static member function 'static void Tenmou::HelloWorld::main(int*)':
a.cc:7:13: error: conflicting declaration 'int a [3]'
7 | int a[3];
| ^
a.cc:6:13: note: previous declaration as 'int a'
6 | int a,b,c;
| ^
a.cc:8:9: error: 'string' was not declared in this scope
8 | string str[];
| ^~~~~~
a.cc:10:13: error: 'Integer' was not declared in this scope
10 | n = Integer.parseInt(br.readLine());
| ^~~~~~~
a.cc:10:30: error: 'br' was not declared in this scope; did you mean 'b'?
10 | n = Integer.parseInt(br.readLine());
| ^~
| b
a.cc:11:9: error: 'str' was not declared in this scope; did you mean 'std'?
11 | str[]=new str[n];
| ^~~
| std
a.cc:11:13: error: expected primary-expression before ']' token
11 | str[]=new str[n];
| ^
a.cc:11:19: error: 'str' does not name a type
11 | str[]=new str[n];
| ^~~
a.cc:18:10: error: invalid types 'int[int]' for array subscript
18 | a[0]=max(a,b,c);
| ^
a.cc:18:14: error: 'max' was not declared in this scope
18 | a[0]=max(a,b,c);
| ^~~
a.cc:19:13: error: invalid types 'int[int]' for array subscript
19 | if(a[0]==a){
| ^
a.cc:20:18: error: invalid types 'int[int]' for array subscript
20 | a[1]=b;
| ^
a.cc:21:18: error: invalid types 'int[int]' for array subscript
21 | a[2]=c;
| ^
a.cc:22:18: error: invalid types 'int[int]' for array subscript
22 | }elseif(a[0]==b){
| ^
a.cc:22:10: error: 'elseif' was not declared in this scope
22 | }elseif(a[0]==b){
| ^~~~~~
a.cc:25:18: error: invalid types 'int[int]' for array subscript
25 | }elseif(a[0]==c){
| ^
a.cc:29:13: error: invalid types 'int[int]' for array subscript
29 | if(a[0]^2==a[1]^2+a[2]^2){
| ^
a.cc:29:21: error: invalid types 'int[int]' for array subscript
29 | if(a[0]^2==a[1]^2+a[2]^2){
| ^
a.cc:29:28: error: invalid types 'int[int]' for array subscript
29 | if(a[0]^2==a[1]^2+a[2]^2){
| ^
a.cc:37:33: error: 'System' was not declared in this scope
37 | System.out.println(str[i]);
| ^~~~~~
|
s038407561
|
p00003
|
C++
|
#include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;
int main(){
vector<vector<int> > a;
int lines = 0;
scanf("%d", &lines);
bool isOk[lines];
for (int i = 0; i < lines; ++i)
{
int l[3];
for (int j = 0; j < 3; ++j)
scanf("%d", &l[j]);
if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
}
for (int i = 0; i < lines; ++i)
{
if(isOk[i]) printf("YES\n");
else printf("NO\n");
}
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf' was not declared in this scope
10 | scanf("%d", &lines);
| ^~~~~
a.cc:26:29: error: 'printf' was not declared in this scope
26 | if(isOk[i]) printf("YES\n");
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include <math.h>
+++ |+#include <cstdio>
4 | using namespace std;
a.cc:27:22: error: 'printf' was not declared in this scope
27 | else printf("NO\n");
| ^~~~~~
a.cc:27:22: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s150499491
|
p00003
|
C++
|
#include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;
int main(){
vector<vector<int> > a;
int lines = 0;
scanf("%d", &lines);
bool isOk[lines];
for (int i = 0; i < lines; ++i)
{
int l[3];
for (int j = 0; j < 3; ++j)
scanf("%d", &l[j]);
if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
}
for (int i = 0; i < lines; ++i)
{
if(isOk[i]) printf("YES\n");
else printf("NO\n");
}
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf' was not declared in this scope
10 | scanf("%d", &lines);
| ^~~~~
a.cc:26:29: error: 'printf' was not declared in this scope
26 | if(isOk[i]) printf("YES\n");
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include <math.h>
+++ |+#include <cstdio>
4 | using namespace std;
a.cc:27:22: error: 'printf' was not declared in this scope
27 | else printf("NO\n");
| ^~~~~~
a.cc:27:22: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s478420340
|
p00003
|
C++
|
#include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;
int main(){
vector<vector<int> > a;
int lines = 0;
scanf("%d", &lines);
bool isOk[lines];
for (int i = 0; i < lines; ++i)
{
int l[3];
for (int j = 0; j < 3; ++j)
scanf("%d", &l[j]);
if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
}
for (int i = 0; i < lines; ++i)
{
if(isOk[i]) printf("YES\n");
else printf("NO\n");
}
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf' was not declared in this scope
10 | scanf("%d", &lines);
| ^~~~~
a.cc:26:29: error: 'printf' was not declared in this scope
26 | if(isOk[i]) printf("YES\n");
| ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
3 | #include <math.h>
+++ |+#include <cstdio>
4 | using namespace std;
a.cc:27:22: error: 'printf' was not declared in this scope
27 | else printf("NO\n");
| ^~~~~~
a.cc:27:22: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s695913066
|
p00003
|
C++
|
#include <iostream>
int main ()
{
int N, x, y, z, X, Y, Z;
std::cin >> N;
for (int n = N; n > 0; --n) {
std::cin >> x >> y >> z;
X = x * x;
Y = y * y;
Z = z * z;
if (X + Y = Z || Y + Z = X || Z + X = Y) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:36: error: lvalue required as left operand of assignment
12 | if (X + Y = Z || Y + Z = X || Z + X = Y) {
| ~~^~~~~~~~
|
s896508784
|
p00003
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AthleteProgramming
{
class Program
{
static void Main()
{
int n = int.Parse(Console.ReadLine());
for(int i = 0; i < n; i++)
{
int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
Sort(ref array);
CheckRightTriangle(array);
}
}
static void CheckRightTriangle(int[] array)
{
if (array[0] * array[0] == array[1] * array[1] + array[2] * array[2])
{
Console.WriteLine("YES");
}
else
{
Console.WriteLine("NO");
}
}
static void Sort(ref int[] array)
{
for(int i = array.Length-1; i >= 0; i--)
{
for(int j = 0; j < i; j++)
{
if (array[j] < array[j + 1])
{
Swap(ref array[j], ref array[j + 1]);
}
}
}
}
static void Swap(ref int a, ref int b)
{
int tmp = a;
a = b;
b = tmp;
}
}
}
|
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:21:46: error: expected ',' or '...' before 'array'
21 | static void CheckRightTriangle(int[] array)
| ^~~~~
a.cc:33:26: error: 'ref' has not been declared
33 | static void Sort(ref int[] array)
| ^~~
a.cc:33:26: error: two or more data types in declaration of 'parameter'
a.cc:33:35: error: expected ')' before 'array'
33 | static void Sort(ref int[] array)
| ~ ^~~~~~
| )
a.cc:33:34: error: expected ';' at end of member declaration
33 | static void Sort(ref int[] array)
| ^
| ;
a.cc:33:36: error: 'array' does not name a type
33 | static void Sort(ref int[] array)
| ^~~~~
a.cc:47:26: error: 'ref' has not been declared
47 | static void Swap(ref int a, ref int b)
| ^~~
a.cc:47:26: error: two or more data types in declaration of 'a'
a.cc:47:35: error: expected ')' before ',' token
47 | static void Swap(ref int a, ref int b)
| ~ ^
| )
a.cc:47:37: error: variable or field 'ref' declared void
47 | static void Swap(ref int a, ref int b)
| ^~~
a.cc:47:37: error: expected ';' at end of member declaration
47 | static void Swap(ref int a, ref int b)
| ^~~
| ;
a.cc:47:45: error: expected ';' at end of member declaration
47 | static void Swap(ref int a, ref int b)
| ^
| ;
a.cc:47:46: error: expected unqualified-id before ')' token
47 | static void Swap(ref int a, ref int b)
| ^
a.cc:54:6: error: expected ';' after class definition
54 | }
| ^
| ;
a.cc: In static member function 'static void AthleteProgramming::Program::Main()':
a.cc:12:21: error: expected primary-expression before 'int'
12 | int n = int.Parse(Console.ReadLine());
| ^~~
a.cc:15:20: error: structured binding declaration cannot have type 'int'
15 | int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
| ^~
a.cc:15:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:15:20: error: empty structured binding declaration
a.cc:15:23: error: expected initializer before 'array'
15 | int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
| ^~~~~
a.cc:16:22: error: 'ref' was not declared in this scope
16 | Sort(ref array);
| ^~~
a.cc:17:36: error: 'array' was not declared in this scope
17 | CheckRightTriangle(array);
| ^~~~~
a.cc: In static member function 'static void AthleteProgramming::Program::CheckRightTriangle(int*)':
a.cc:23:17: error: 'array' was not declared in this scope
23 | if (array[0] * array[0] == array[1] * array[1] + array[2] * array[2])
| ^~~~~
a.cc:25:17: error: 'Console' was not declared in this scope
25 | Console.WriteLine("YES");
| ^~~~~~~
a.cc:29:17: error: 'Console' was not declared in this scope
29 | Console.WriteLine("NO");
| ^~~~~~~
|
s921798286
|
p00003
|
C++
|
// 0003.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include<stdio.h>
#include "stdafx.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main()
{
int n ;
cin >> n;
for (int i = 0; i < n; i++) {
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
if (a[2]*a[2]==a[1]*a[1]+a[0]*a[0]) { cout << "YES"<<endl; }
else { cout << "NO"<<endl; }
}
return 0;
}
|
a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s659072042
|
p00003
|
C++
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
using namespace std;
bool check(int a, int b , int c){
if((a * a) == (b * b + c * c) ){
return true ;
}
return false ;
}
int main(){
int i, a, b, c;
cin >> i;
for(int j = 0 ; j < i; j++){
cin >> a >> b >> c;
if(check(a, b, c) || check(b, c, a) || check(c, a, b) ){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 1
| ^
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:26:
/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'?
179 | _GLIBCXX_NODI
|
s641326428
|
p00003
|
C++
|
def main():
def inputs():
li = []
count = 0
try:
N = input()
while count < int(N):
li.append(input())
count += 1
except EOFError:
return li
return li
li = inputs()
for x in li:
tmp = x.split(" ")
tmp = sorted(tmp)
a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
if c**2 == a**2 + b**2:
print("YES")
else:
print("NO")
return None
main()
|
a.cc:1:1: error: 'def' does not name a type
1 | def main():
| ^~~
|
s687895759
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n = 0;
int a[3];
cin >> n;
for(int i = 0; i < n; i++){
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3, greater<int>());
if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:12: error: 'pow' was not declared in this scope
11 | if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
| ^~~
|
s595493718
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n = 0;
int a[3];
cin >> n;
for(int i = 0; i < n; i++){
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3, greater<int>());
if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:12: error: 'pow' was not declared in this scope
11 | if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
| ^~~
|
s063906230
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n = 0;
int a[3];
cin >> n;
for(int i = 0; i < n; i++){
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3);
if((pow(a[0], 2) + pow(a[1], 2)) == pow(a[2], 2)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:13: error: 'pow' was not declared in this scope
11 | if((pow(a[0], 2) + pow(a[1], 2)) == pow(a[2], 2)){
| ^~~
|
s088659044
|
p00003
|
C++
|
nano 2.6.1 File: 29.cpp
#include <iostream>
#include <sstream>
int main()
{
unsigned int count=0;
std::cin>>count;
std::string* res;
res=new std::string [count+1];
for(unsigned int i=0;i<=count;i++)
{
std::string str;
getline(std::cin,str);
unsigned int a,b,c;
std::stringstream s(str);
s>>a>>b>>c;
if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
res[i]="YES";
else
res[i]="NO";
}
for(unsigned int i=1;i<=count;i++)
std::cout<<res[i]<<std::endl;
return 0;
}
|
a.cc:1:8: error: too many decimal points in number
1 | nano 2.6.1 File: 29.cpp
| ^~~~~
a.cc:1:3: error: 'nano' does not name a type
1 | nano 2.6.1 File: 29.cpp
| ^~~~
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:3:
/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* operat
|
s210413799
|
p00003
|
C++
|
#include <bits/stdc++>
using namespace std;
int N;
int a[3];
int main() {
for (int i = 0; i < N; ++i) {
scanf("%d %d %d",a[1],a[2],a[3]);
sort(a,a+3);
if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
printf("%s\n" , YES);
} else {
printf("%s\n" , NO);
}
}
}
|
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include <bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s546499463
|
p00003
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int N;
int a[3];
int main() {
for (int i = 0; i < N; ++i) {
scanf("%d %d %d",a[1],a[2],a[3]);
sort(a,a+3);
if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
printf("%s\n" , YES);
} else {
printf("%s\n" , NO);
}
}
}
|
a.cc: In function 'int main()':
a.cc:11:19: error: lvalue required as left operand of assignment
11 | if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
| ~~~~~~~~~~^~~~~~~~~~~
a.cc:12:23: error: 'YES' was not declared in this scope
12 | printf("%s\n" , YES);
| ^~~
a.cc:14:23: error: 'NO' was not declared in this scope; did you mean 'N'?
14 | printf("%s\n" , NO);
| ^~
| N
|
s615867083
|
p00003
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int N;
int a[3];
int main() {
for (int i = 0; i < N; ++i) {
scanf("%d %d %d",a[1],a[2],a[3]);
sort(a,a+3);
if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
a.cc: In function 'int main()':
a.cc:11:19: error: lvalue required as left operand of assignment
11 | if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
| ~~~~~~~~~~^~~~~~~~~~~
|
s889415013
|
p00003
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int N;
int a[3];
int b,c,d;
int main() {
for (int i = 0; i < N; ++i) {
scanf("%d %d %d",a[1],a[2],a[3]);
sort(a,a+3);
b = a[1]*a[1];
c = a[2]*a[2];
d = a[3]*a[3];
if ( b + c = d ) {
printf("YES\n");
} else {
printf("NO\n");
}
}
}
|
a.cc: In function 'int main()':
a.cc:15:12: error: lvalue required as left operand of assignment
15 | if ( b + c = d ) {
| ~~^~~
|
s969540579
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#define MAX 1000
#define MIN 1
using namespace std;
bool right(int a,int b,int c) {
if(((a * a) + (b * b)) == (c * c)) {
return true;
} else {
return false;
}
int main() {
int i = 0,j;
int n;
int side[3];
bool cnt = false;
vector<string> judge;
cin >> n;
while(i < n) {
cin >> side[0] >> side[1] >> side[2];
for(j = 0;j < 3;++j) {
if((side[j] < MIN) || (side[j] > MAX)) {
cnt = true;
}
}
if(cnt == true) continue;
sort(side, side + 3);
if((right(side[0],side[1],side[2]) == true) {
judge.push_back("YES");
} else {
judge.push_back("NO");
}
++i;
}
for(i = 0;i < judge.size();++i) {
cout << judge.at(i) << endl;
}
return 0;
}
|
a.cc: In function 'bool right(int, int, int)':
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
18 | int main() {
| ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
18 | int main() {
| ^~
| --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:18:12: error: a function-definition is not allowed here before '{' token
18 | int main() {
| ^
a.cc:54:2: error: expected '}' at end of input
54 | }
| ^
a.cc:11:31: note: to match this '{'
11 | bool right(int a,int b,int c) {
| ^
|
s732181482
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#define MAX 1000
#define MIN 1
using namespace std;
bool right(int a,int b,int c) {
if(((a * a) + (b * b)) == (c * c)) {
return true;
} else {
return false;
}
}
int main() {
int i = 0,j;
int n;
int side[3];
bool cnt = false;
vector<string> judge;
cin >> n;
while(i < n) {
cin >> side[0] >> side[1] >> side[2];
for(j = 0;j < 3;++j) {
if((side[j] < MIN) || (side[j] > MAX)) {
cnt = true;
}
}
if(cnt == true) continue;
sort(side, side + 3);
if((right(side[0],side[1],side[2]) == true) {
judge.push_back("YES");
} else {
judge.push_back("NO");
}
++i;
}
for(i = 0;i < judge.size();++i) {
cout << judge.at(i) << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:41:46: error: expected ';' before '{' token
41 | if((right(side[0],side[1],side[2]) == true) {
| ^~
| ;
a.cc:43:5: error: expected primary-expression before 'else'
43 | } else {
| ^~~~
a.cc:43:4: error: expected ')' before 'else'
43 | } else {
| ^~~~~
| )
a.cc:41:5: note: to match this '('
41 | if((right(side[0],side[1],side[2]) == true) {
| ^
|
s569661319
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#define MAX 1000
#define MIN 1
using namespace std;
bool right(int a,int b,int c) {
if(((a * a) + (b * b)) == (c * c)) {
return true;
} else {
return false;
}
}
int main() {
int i = 0,j;
int n;
int side[3];
bool cnt = false;
vector<string> judge;
cin >> n;
while(i < n) {
cin >> side[0] >> side[1] >> side[2];
for(j = 0;j < 3;++j) {
if((side[j] < MIN) || (side[j] > MAX)) {
cnt = true;
}
}
if(cnt == true) continue;
sort(side, side + 3);
if((right(side[0],side[1],side[2]) == true) {
judge.push_back("YES");
} else {
judge.push_back("NO");
}
++i;
}
for(i = 0;i < judge.size();++i) {
cout << judge.at(i) << endl;
}
return 0;
|
a.cc: In function 'int main()':
a.cc:41:46: error: expected ';' before '{' token
41 | if((right(side[0],side[1],side[2]) == true) {
| ^~
| ;
a.cc:43:5: error: expected primary-expression before 'else'
43 | } else {
| ^~~~
a.cc:43:4: error: expected ')' before 'else'
43 | } else {
| ^~~~~
| )
a.cc:41:5: note: to match this '('
41 | if((right(side[0],side[1],side[2]) == true) {
| ^
a.cc:54:11: error: expected '}' at end of input
54 | return 0;
| ^
a.cc:19:12: note: to match this '{'
19 | int main() {
| ^
|
s539213708
|
p00003
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#define MAX 1000
#define MIN 1
using namespace std;
bool right(int a,int b,int c) {
if(((a * a) + (b * b)) == (c * c)) {
return true;
} else {
return false;
}
}
int main() {
int i = 0,j;
int n;
int side[3];
bool cnt = false;
vector<string> judge;
cin >> n;
while(i < n) {
cin >> side[0] >> side[1] >> side[2];
for(j = 0;j < 3;++j) {
if((side[j] < MIN) || (side[j] > MAX)) {
cnt = true;
}
}
if(cnt == true) continue;
sort(side, side + 3);
if((right(side[0],side[1],side[2]) == true) {
judge.push_back("YES");
} else {
judge.push_back("NO");
}
++i;
}
for(i = 0;i < judge.size();++i) {
cout << judge.at(i) << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:41:46: error: expected ';' before '{' token
41 | if((right(side[0],side[1],side[2]) == true) {
| ^~
| ;
a.cc:43:5: error: expected primary-expression before 'else'
43 | } else {
| ^~~~
a.cc:43:4: error: expected ')' before 'else'
43 | } else {
| ^~~~~
| )
a.cc:41:5: note: to match this '('
41 | if((right(side[0],side[1],side[2]) == true) {
| ^
|
s871298998
|
p00003
|
C++
|
#include<stdio.h>
int main(){
int N,x,y,z;
scanf("%d %d %d",&x,&y,&z);
for(i=0;i<N;i++){
if(x^2+y^2==z^2||x^2+z^2==y^2||y^2+z^2==x^2){
printf("Yes\n");
}
else {
printf("No\n");
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:13: error: 'i' was not declared in this scope
5 | for(i=0;i<N;i++){
| ^
|
s568914077
|
p00003
|
C++
|
#include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int N=0;
int a[10000]={0},b[10000]={0},c[10000]={0};
for(int i-0;i<N;i++){
cin>>a[i]>>b[i]>>c[i];
}
for(int i=0;i<N;i++){
if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before '-' token
7 | for(int i-0;i<N;i++){
| ^
| ;
a.cc:7:18: error: expected ')' before ';' token
7 | for(int i-0;i<N;i++){
| ~ ^
| )
a.cc:7:19: error: 'i' was not declared in this scope
7 | for(int i-0;i<N;i++){
| ^
a.cc:11:13: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:17: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:21: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:26: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:30: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:34: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:39: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:43: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
a.cc:11:47: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
11 | if(a*a=b*b+c*c||b*b=c*c+a*a||c*c=a*a+b*b){
| ~^~
| | |
| | int [10000]
| int [10000]
|
s466618307
|
p00003
|
C++
|
#include <iostream>
usingnamespace std;
int main(){
int a,b,c,d;
cin>>a;
for(int i=0;i<a;i++){
cin>>b>>c>>d;
if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
cout <<"YES"<<endl;
}else{
cout <<"NO"<<endl;
}
}
return 0;
}
|
a.cc:3:1: error: 'usingnamespace' does not name a type
3 | usingnamespace std;
| ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a;
| ^~~
| 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:10:30: error: lvalue required as left operand of assignment
10 | if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout <<"YES"<<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:11:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | cout <<"YES"<<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)
| ^~~~
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout <<"NO"<<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:13:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout <<"NO"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s374718913
|
p00003
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a;
for(int i=0;i<a;i++){
cin>>b>>c>>d;
if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
cout <<"YES"<<endl;
}else{
cout <<"NO"<<endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:30: error: lvalue required as left operand of assignment
10 | if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
|
s089655147
|
p00003
|
C++
|
#include<stdio.h>
#include<math.h>
#define N 1000
struct{int a[3];} d[N];
int main(){
int i,j,L;
int longest,short;
for(i=0; i<N,scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2])!=EOF; i++);
L=i;
for(i=0;i<L;i++){
longest=0;
for(j=0;j<3;j++)
if(longest<d[i].a[j])
longest=d[i].a[j];
for(j=0;j<3;j++)
if(d[i].a[j]!=longest)
short+=pow(d[i].a[j],2);
if(short==pow(longest,2))
printf("YES");
else
printf("NO");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:17: error: expected unqualified-id before 'short'
10 | int longest,short;
| ^~~~~
a.cc:21:22: error: expected unqualified-id before '+=' token
21 | short+=pow(d[i].a[j],2);
| ^~
a.cc:22:17: error: expected unqualified-id before '==' token
22 | if(short==pow(longest,2))
| ^~
|
s222261443
|
p00003
|
C++
|
#include"bits/stdc++.h"
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
REP(i, v.size()) { if (i)os << " "; os << v[i]; }return os;
}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
REP(i, v.size()) { if (i)os << endl; os << v[i]; }return os;
}
using namespace std;
void solve();
int main() {
solve();
return 0;
}
void solve() {
vector<ll> v(3);
ll n;
cin >> n;
REP(i, n) {
cin >> v[0] >> v[1] >> v[2];
cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
}
}
|
a.cc:10:22: error: 'ostream' does not name a type
10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
| ^~~~~~~
a.cc:13:22: error: 'ostream' does not name a type
13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
| ^~~~~~~
a.cc: In function 'void solve()':
a.cc:31:16: error: 'll' was not declared in this scope
31 | vector<ll> v(3);
| ^~
a.cc:31:18: error: template argument 1 is invalid
31 | vector<ll> v(3);
| ^
a.cc:31:18: error: template argument 2 is invalid
a.cc:32:11: error: expected ';' before 'n'
32 | ll n;
| ^~
| ;
a.cc:34:16: error: 'n' was not declared in this scope
34 | cin >> n;
| ^
a.cc:36:13: error: expected ';' before 'i'
36 | REP(i, n) {
| ^
a.cc:3:28: note: in definition of macro 'FOR'
3 | #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
| ^
a.cc:36:9: note: in expansion of macro 'REP'
36 | REP(i, n) {
| ^~~
a.cc:36:13: error: 'i' was not declared in this scope
36 | REP(i, n) {
| ^
a.cc:3:49: note: in definition of macro 'FOR'
3 | #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
| ^
a.cc:36:9: note: in expansion of macro 'REP'
36 | REP(i, n) {
| ^~~
a.cc:3:51: error: '__last_i' was not declared in this scope
3 | #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
| ^~~~~~~
a.cc:5:18: note: in expansion of macro 'FOR'
5 | #define REP(i,n) FOR(i,0,n)
| ^~~
a.cc:36:9: note: in expansion of macro 'REP'
36 | REP(i, n) {
| ^~~
a.cc:37:25: error: invalid types 'int[int]' for array subscript
37 | cin >> v[0] >> v[1] >> v[2];
| ^
a.cc:37:33: error: invalid types 'int[int]' for array subscript
37 | cin >> v[0] >> v[1] >> v[2];
| ^
a.cc:37:41: error: invalid types 'int[int]' for array subscript
37 | cin >> v[0] >> v[1] >> v[2];
| ^
a.cc:38:27: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:32: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:37: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:42: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:48: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:53: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:61: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:66: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:71: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:76: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:82: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:87: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:95: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:100: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:105: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:110: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:116: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
a.cc:38:121: error: invalid types 'int[int]' for array subscript
38 | cout << (v[0]*v[0]+v[1]*v[1]==v[2]*v[2] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
| ^
|
s429468528
|
p00003
|
C++
|
//
// main.cpp
// b
//
// Created by h3037178 on 2017/07/31.
// Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//
#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
int n,a,i[3],f[3];
cin>>n;
if(n>1000){
break;
}
for(int l=0;l<n;l++){
for(a=0;a<3;a++){
cin>>i[a];
f[a]=i[a]^2;
}
if(i[a]<=0||i[a]>1000){
break;
}
sort(f,f+3);
if(f[2]==f[0]+f[1]){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:17:9: error: break statement not within loop or switch
17 | break;
| ^~~~~
|
s796138642
|
p00003
|
C++
|
int main(){
int a[3];
int N;
int i,j,k,tmp;
cin>>N;
for(k=0;k<N;k++){
cin>>a[0]>>a[1]>>a[2];
for(i=0;i<2;i++){
for(j=i+1;j<3;j++){
if(a[j]>a[i]){
tmp=a[i];
a[i]=a[j];
a[j]=tmp;
}
}
}
if(pow(a[0],2)==pow(a[1],2)+pow(a[2],2)){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin>>N;
| ^~~
a.cc:22:12: error: 'pow' was not declared in this scope
22 | if(pow(a[0],2)==pow(a[1],2)+pow(a[2],2)){
| ^~~
a.cc:23:13: error: 'cout' was not declared in this scope
23 | cout<<"YES"<<endl;
| ^~~~
a.cc:23:26: error: 'endl' was not declared in this scope
23 | cout<<"YES"<<endl;
| ^~~~
a.cc:25:13: error: 'cout' was not declared in this scope
25 | cout<<"NO"<<endl;
| ^~~~
a.cc:25:25: error: 'endl' was not declared in this scope
25 | cout<<"NO"<<endl;
| ^~~~
|
s016052254
|
p00003
|
C++
|
#include <iostream>
using namespace std;
void sjx(double a, double b, double c)
{
if (a < b + c && b < a + c && c < a + b)
cout << "yes" << endl;
else
cout << "no" << endl;
}
int main()
{
int a;
|
a.cc: In function 'int main()':
a.cc:13:15: error: expected '}' at end of input
13 | int a;
| ^
a.cc:12:1: note: to match this '{'
12 | {
| ^
|
s409300774
|
p00003
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
while(scanf("%d %d %d",&a,&b,&c)!=EOF){
if(a*a+b*b==c*c) printf("YES\n");
else if(a*a+c*c==b*b) printf("YES\n");
else if(b*b+c*c==a*a) printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:4:27: error: 'a' was not declared in this scope
4 | while(scanf("%d %d %d",&a,&b,&c)!=EOF){
| ^
a.cc:4:30: error: 'b' was not declared in this scope
4 | while(scanf("%d %d %d",&a,&b,&c)!=EOF){
| ^
a.cc:4:33: error: 'c' was not declared in this scope
4 | while(scanf("%d %d %d",&a,&b,&c)!=EOF){
| ^
|
s393433654
|
p00003
|
C++
|
#include <iostream>
#include <math.h>
using namespace std;
int main(){
int a,b[3]={0};
cin>>a;
for (int A=0;A<a;A++){
cin>>b[0]>>b[1]>>b[2];
sort(b,b+3);
b[0]=pow(b[0],2);
b[1]=pow(b[1],2);
b[2]=pow(b[2],2);
if (b[2]==b[0]+b[1])cout<<"Yes"<<endl;
else cout<<"NO"<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
9 | sort(b,b+3);
| ^~~~
| sqrt
|
s976518428
|
p00003
|
C++
|
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
int n,a,b,c,a1,b2,c2;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>a>>b>>c;
a1=pow(a,2);
b2=pow(b,2);
c2=pow(c,2);
if(a1+b2==c2)
cout<<"YES"<<endl;
if(a1+c2==b2)
cout<<"YES"<<endl;
if(b2+c2==a2)
cout<<"YES"<<endl;
if(a1+b2!=c2&&a1+c2!=b2&&b2+c2!=a1)
cout<<"NO"<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:20:27: error: 'a2' was not declared in this scope; did you mean 'c2'?
20 | if(b2+c2==a2)
| ^~
| c2
|
s082329282
|
p00003
|
C++
|
#include<iostream>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n,a,b,c;
cin >> n
while(n--){
cin >> a >> b >> c;
if(a<b) swap(a,b);
if(a<c) swap(a,c);
if((a*a)==(b*b+c*c)) cout << "YES\n";
else cout << "NO\n";
}
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before 'while'
7 | cin >> n
| ^
| ;
8 | while(n--){
| ~~~~~
|
s221995086
|
p00003
|
C++
|
#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>
int main() {
int n;
std::vector<int> V;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
int a, b, c; std::cin >> a >> b >> c;
V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
std::sort(V.begin(), V.end());
if (v[2] == v[1] + v[0]) printf("YES\n");
else printf("NO\n");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:13: error: 'v' was not declared in this scope
16 | if (v[2] == v[1] + v[0]) printf("YES\n");
| ^
|
s232215789
|
p00003
|
C++
|
fn main(){
let n=readln();
for _i in 0..n{
let mut v:Vec<i64> = readln();
v.sort();
if v[0]*v[0] + v[1]*v[1]==v[2]*v[2] {
println!("YES");
}
else{
println!("NO");
}
}
}
// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
pub trait FromLn {
fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
let mut buf = String::new();
let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
let mut vs = vec![];
for _ in 0..n {
vs.push(readln());
}
vs
}
macro_rules! fromln_primitives {
($($t:ty),*) => { $(
impl FromLn for $t {
fn fromln(s: &str) -> $t {
s.parse().unwrap()
}
}
)* }
}
fromln_primitives!(
String,
bool,
f32,
f64,
isize,
i8,
i16,
i32,
i64,
usize,
u8,
u16,
u32,
u64
);
impl<T> FromLn for Vec<T>
where
T: FromLn,
{
fn fromln(s: &str) -> Vec<T> {
s.split_whitespace().map(T::fromln).collect()
}
}
impl FromLn for Vec<char> {
fn fromln(s: &str) -> Vec<char> {
s.chars().collect()
}
}
macro_rules! fromln_tuple {
($($t:ident),*) => {
impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
fn fromln(s: &str) -> ($($t),*) {
let mut it = s.split_whitespace();
let t = ($($t::fromln(it.next().unwrap())),*);
assert_eq!(it.next(), None);
t
}
}
}
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);
|
a.cc:3:15: error: too many decimal points in number
3 | for _i in 0..n{
| ^~~~
a.cc:18:2: error: invalid preprocessing directive #[
18 | #[allow(unused_imports)]
| ^
a.cc:20:2: error: invalid preprocessing directive #[
20 | #[allow(unused_imports)]
| ^
a.cc:32:14: error: too many decimal points in number
32 | for _ in 0..n {
| ^~~~
a.cc:1:1: error: 'fn' does not name a type
1 | fn main(){
| ^~
a.cc:19:1: error: 'use' does not name a type
19 | use std::cmp::{max, min};
| ^~~
a.cc:22:1: error: 'pub' does not name a type
22 | pub trait FromLn {
| ^~~
a.cc:25:1: error: 'pub' does not name a type
25 | pub fn readln<T: FromLn>() -> T {
| ^~~
a.cc:30:1: error: 'pub' does not name a type
30 | pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
| ^~~
a.cc:37:1: error: 'macro_rules' does not name a type
37 | macro_rules! fromln_primitives {
| ^~~~~~~~~~~
a.cc:46:1: error: 'fromln_primitives' does not name a type
46 | fromln_primitives!(
| ^~~~~~~~~~~~~~~~~
a.cc:62:1: error: 'impl' does not name a type
62 | impl<T> FromLn for Vec<T>
| ^~~~
a.cc:70:1: error: 'impl' does not name a type
70 | impl FromLn for Vec<char> {
| ^~~~
a.cc:75:1: error: 'macro_rules' does not name a type
75 | macro_rules! fromln_tuple {
| ^~~~~~~~~~~
a.cc:87:1: error: 'fromln_tuple' does not name a type
87 | fromln_tuple!(A, B);
| ^~~~~~~~~~~~
a.cc:88:1: error: 'fromln_tuple' does not name a type
88 | fromln_tuple!(A, B, C);
| ^~~~~~~~~~~~
a.cc:89:1: error: 'fromln_tuple' does not name a type
89 | fromln_tuple!(A, B, C, D);
| ^~~~~~~~~~~~
a.cc:90:1: error: 'fromln_tuple' does not name a type
90 | fromln_tuple!(A, B, C, D, E);
| ^~~~~~~~~~~~
a.cc:91:1: error: 'fromln_tuple' does not name a type
91 | fromln_tuple!(A, B, C, D, E, F);
| ^~~~~~~~~~~~
|
s941235378
|
p00003
|
C++
|
#!/usr/bin/env ruby
n = gets.split[0].to_i
1.upto(n) do |i|
line = gets
a, b, c = line.split.map {&:to_i}.sort
if a ** 2 + b ** 2 == c ** 2
puts "YES"
else
puts "NO"
end
end
|
a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env ruby
| ^
a.cc:3:1: error: 'n' does not name a type
3 | n = gets.split[0].to_i
| ^
a.cc:6:36: error: expected unqualified-id before '.' token
6 | a, b, c = line.split.map {&:to_i}.sort
| ^
|
s263778094
|
p00003
|
C++
|
#include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int i, n,j,cnt = 0;
scanf("%d",&n);tri[3];
for (i = 0; i < n; i++){
for (j = 0; j < 3; j++){
scanf("%d",tri[i]);
}
sort(tri,tri+3);
if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
}
printf("%d\n",cnt);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:16: error: 'tri' was not declared in this scope
6 | scanf("%d",&n);tri[3];
| ^~~
|
s508879510
|
p00003
|
C++
|
#include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }
|
a.cc:3:20: warning: extra tokens at end of #include directive
3 | #include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s792837933
|
p00003
|
C++
|
#include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",&tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }
|
a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",&tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s787234184
|
p00003
|
C++
|
#include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int i, n,j,cnt = 0,tri[3];
scanf("%d",&n);
for (i = 0; i < n; i++){
for (j = 0; j < 3; j++){
scanf("%d",&tri[j]);
}
sort(tri,tri+3);
if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
} printf("%d\n",cnt);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:21: error: lvalue required as left operand of assignment
12 | if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
|
s337557512
|
p00003
|
C++
|
#include <iostream>
int N;
int x, y, z;
int main() {
std::cin >> N;
int a = 0, b = 0, c = 0;
for(i = 0; i<N; ++i) {
int a = std::min(x, std::min(y, z));
int c = std::max(x, std::max(y, z));
int b = (x + y + z) - (a + c);
if(a*a + b*b == c*c) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
10 | for(i = 0; i<N; ++i) {
| ^
|
s044879329
|
p00003
|
C++
|
#include<iostream>
#include<algorithm>
inline bool isTriangle(int edge[]){
return edge[2]<edge[0]+edge[1]?true:false;
}
int main(void){
int edge[3];
int n;
std::cin>>n;
for(int i=0;i<n;i++){
std::cin>>edge[0]>>edge[1]>>edge[2];
std::sotr(edge,edge+3);
std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
}
return 0;
}
|
a.cc:15:46: warning: missing terminating " character
15 | std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
| ^
a.cc:15:46: error: missing terminating " character
15 | std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
| ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:14: error: 'sotr' is not a member of 'std'; did you mean 'sort'?
14 | std::sotr(edge,edge+3);
| ^~~~
| sort
a.cc:15:44: error: 'NO' was not declared in this scope
15 | std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
| ^~
a.cc:15:46: error: expected ')' before '}' token
15 | std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
| ~ ^
| )
16 | }
| ~
|
s027649282
|
p00003
|
C++
|
#include<iostream>
#include<algorithm>
inline bool isTriangle(int edge[]){
return edge[2]<edge[0]+edge[1]?true:false;
}
int main(void){
int edge[3];
int n;
std::cin>>n;
for(int i=0;i<n;i++){
std::cin>>edge[0]>>edge[1]>>edge[2];
std::sotr(edge,edge+3);
std::cout<<(isTriangle(edge)?"YES":"NO")<<std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:14: error: 'sotr' is not a member of 'std'; did you mean 'sort'?
14 | std::sotr(edge,edge+3);
| ^~~~
| sort
|
s869008576
|
p00003
|
C++
|
#include <iostream>
#include <vector>
#include <functional>
#include <cmath>
using namespace std;
int main() {
int N;
cin >> N;
int a, b, c;
for(int i = 0; i < N; i++) {
cin >> a >> b >> c;
vector<int> vec;
vec.push_back(a);
vec.push_back(b);
vec.push_back(c);
sort(vec.begin(), vec.end(), greater<int>());
if(pow(vec[0], 2) == pow(vec[1], 2) + pow(vec[2], 2)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
23 | sort(vec.begin(), vec.end(), greater<int>());
| ^~~~
| sqrt
|
s188698931
|
p00003
|
C++
|
#include <iostream>
#include <vector>
#include <functional>
#include <cmath>
using namespace std;
int main() {
int N;
cin >> N;
int a, b, c;
for(int i = 0; i < N; i++) {
cin >> a >> b >> c;
vector<int> vec;
vec.push_back(a);
vec.push_back(b);
vec.push_back(c);
sort(vec.begin(), vec.end(), greater<int>());
if(pow(vec[0], 2) == pow(vec[1], 2) + pow(vec[2], 2)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
23 | sort(vec.begin(), vec.end(), greater<int>());
| ^~~~
| sqrt
|
s035543449
|
p00003
|
C++
|
int main(void){
int i,N,a,b,c;
scanf("%d",&N);
for(i=1;i<=N;i++){
scanf("%d %d %d",&a,&b,&c);
if ((a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
&& (a > 0 && b > 0 && c > 0)) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:3:4: error: 'scanf' was not declared in this scope
3 | scanf("%d",&N);
| ^~~~~
a.cc:8:8: error: 'printf' was not declared in this scope
8 | printf("YES\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(void){
a.cc:11:4: error: 'printf' was not declared in this scope
11 | printf("NO\n");
| ^~~~~~
a.cc:11:4: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s184995339
|
p00003
|
C++
|
int main(void){
int i,N,a,b,c;
scanf("%d",&N);
for(i=1;i<=N;i++){
scanf("%d %d %d",&a,&b,&c);
if ((a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
&& (a > 0 && b > 0 && c > 0)) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:3:4: error: 'scanf' was not declared in this scope
3 | scanf("%d",&N);
| ^~~~~
a.cc:8:8: error: 'printf' was not declared in this scope
8 | printf("YES\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(void){
a.cc:11:4: error: 'printf' was not declared in this scope
11 | printf("NO\n");
| ^~~~~~
a.cc:11:4: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s719135517
|
p00003
|
C++
|
def main():
n = int(input())
for i in range(n):
a, b, c=(int(x) for x in input().split())
if a+b<=c or a+c<=b or b+c<=a:
print("NO")
else:
print("YES")
main()
|
a.cc:1:1: error: 'def' does not name a type
1 | def main():
| ^~~
|
s454199160
|
p00003
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main(){
int N;
int a,b,c;
int n=0;
while(1){
cin >> N;
if(N <= 0 || N > 1000)
else
break;
}
string x[N];
while(N > 0 && cin >> a >> b >> c){
while(1){
if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
break;
}
else{
if(a+b>c && b+c>a && c+a>b){
x[n]="YES";
}
else{
x[n]="NO";
}
N--;
n++;
break;
}
}
}
for(int i = 0;i < n;i++)
cout << x[i] << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:5: error: expected primary-expression before 'else'
16 | else
| ^~~~
|
s808866322
|
p00003
|
C++
|
#include <cstdin>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
vector<string> splitString(const string& str, const string& separator = " ") {
vector<string> ret;
std::size_t bp, ep;
bp = ep = 0;
while((ep = str.find_first_of(separator, bp)) != string::npos){
if(bp != ep){
ret.push_back(string(str.begin() + bp, str.begin() + ep));
}
bp = ep + 1;
}
if(bp <= str.size() - 1){
ret.push_back(string(str.begin() + bp, str.end()));
}
return ret;
}
template <class T>
T convertStringToNumber(const string& str) {
stringstream ss;
T ret;
ss << str;
ss >> ret;
return ret;
}
void inputData(vector<string>& data_set) {
string buffer;
getline(cin, buffer);
int n = convertStringToNumber<int>(buffer);
for(int i = 0; i < n; ++i) {
getline(cin, buffer);
data_set.push_back(buffer);
}
}
bool isRightTriangle(const vector<int>& edge_set) {
int max_index = 0;
if(edge_set[max_index] < edge_set[(max_index+1)%3])
max_index = (max_index+1)%3;
if(edge_set[max_index] < edge_set[(max_index+2)%3])
max_index = (max_index+2)%3;
return ((edge_set[max_index] * edge_set[max_index]) ==
(edge_set[(max_index+1)%3] * edge_set[(max_index+1)%3]
+ edge_set[(max_index+2)%3] * edge_set[(max_index+2)%3]));
}
vector<bool> evaluateTriangle(const vector<string>& data_str) {
vector<bool> ret(data_str.size());
for(int i = 0; i < data_str.size(); ++i) {
auto temp = splitString(data_str[i]);
vector<int> buff { convertStringToNumber<int>(temp[0]),
convertStringToNumber<int>(temp[1]),
convertStringToNumber<int>(temp[2])};
ret[i] = isRightTriangle(buff);
}
return ret;
}
void doAllProcess() {
vector<string> buffer;
inputData(buffer);
vector<bool> ret = evaluateTriangle(buffer);
for(int i = 0; i < ret.size(); ++i)
std::cout << (ret[i] ? "YES" : "NO") << std::endl;
}
int main() {
doAllProcess();
return 0;
}
|
a.cc:1:10: fatal error: cstdin: No such file or directory
1 | #include <cstdin>
| ^~~~~~~~
compilation terminated.
|
s804189629
|
p00003
|
C++
|
for i in range(int(input())):
llist = list(map(int,input().split()))
llist.sort()
if(llist[2]**2 == llist[0]**2 + llist[1]**2):
print('Yes')
else:
print('No')
|
a.cc:5:15: warning: multi-character character constant [-Wmultichar]
5 | print('Yes')
| ^~~~~
a.cc:7:15: warning: multi-character character constant [-Wmultichar]
7 | print('No')
| ^~~~
a.cc:1:1: error: expected unqualified-id before 'for'
1 | for i in range(int(input())):
| ^~~
|
s503162899
|
p00003
|
C++
|
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
int n;
n = int.Parse(Console.ReadLine());
for (int i = 0; i < n; i++)
{
int a, b, c;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (c * c == a * a + b * b)
{
Console.WriteLine("YES");
}
else Console.WriteLine("NO");
}
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:24:6: error: expected ';' after class definition
24 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication1::Program::Main()':
a.cc:10:17: error: expected primary-expression before 'int'
10 | n = int.Parse(Console.ReadLine());
| ^~~
a.cc:14:21: error: expected primary-expression before 'int'
14 | a = int.Parse(Console.ReadLine());
| ^~~
a.cc:15:21: error: expected primary-expression before 'int'
15 | b = int.Parse(Console.ReadLine());
| ^~~
a.cc:16:21: error: expected primary-expression before 'int'
16 | c = int.Parse(Console.ReadLine());
| ^~~
a.cc:19:21: error: 'Console' was not declared in this scope
19 | Console.WriteLine("YES");
| ^~~~~~~
a.cc:21:22: error: 'Console' was not declared in this scope
21 | else Console.WriteLine("NO");
| ^~~~~~~
|
s127808164
|
p00003
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a[3];
while(cin >> a[0] >> a[1] >> a[2] && a[0] != EOF)
{
sort(a,a+3);
if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2])
cout << "YES";
else
cout << "NO";
cout << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(a,a+3);
| ^~~~
| short
|
s501256069
|
p00003
|
C++
|
#include <stdio.h>
int try(int a, int b, int c){
if(a*a+b*b==c*c){
return 1;
}
return 0;
}
int main (void){
int a, b, c, i, n;
scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%d%d%d", &a, &b, &c);
if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}
|
a.cc:3:5: error: expected unqualified-id before 'try'
3 | int try(int a, int b, int c){
| ^~~
a.cc: In function 'int main()':
a.cc:15:20: error: expected primary-expression before 'try'
15 | if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
| ^~~
a.cc:15:20: error: expected ')' before 'try'
15 | if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
| ~^~~
| )
|
s492749393
|
p00003
|
C++
|
#include <stdio.h>
int try(int a, int b, int c){
if(a*a+b*b==c*c){
return 1;
}
return 0;
}
int main (void){
int a, b, c, i, n;
scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%d%d%d", &a, &b, &c);
if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
}
|
a.cc:4:5: error: expected unqualified-id before 'try'
4 | int try(int a, int b, int c){
| ^~~
a.cc: In function 'int main()':
a.cc:16:20: error: expected primary-expression before 'try'
16 | if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
| ^~~
a.cc:16:20: error: expected ')' before 'try'
16 | if(try(a, b, c) || try(a, c, b) || try(c, b, a)){
| ~^~~
| )
|
s701858033
|
p00003
|
C++
|
#include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
string tri(int a, int b, int c){
if(a + b >= c && a - b <= c)return true;
return false;
}
int main(void) {
int len, a, b, c;
cin >> len;
for(int i = 0; i < len; i++){
cin >> a >> b >> c;
cout << tri(a, b, c) << endl;
}
}
|
a.cc: In function 'std::string tri(int, int, int)':
a.cc:25:44: error: could not convert 'true' from 'bool' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
25 | if(a + b >= c && a - b <= c)return true;
| ^~~~
| |
| bool
a.cc:26:16: error: could not convert 'false' from 'bool' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
26 | return false;
| ^~~~~
| |
| bool
|
s226938270
|
p00003
|
C++
|
#include <iostream>
using namespace std;
void solve(int a, int b, int c) {
bool f = false;
int max_num = max(a, max(b, c);
int sum = a+b+c-max_num;
if (max_num < sum) f = true;
if (f) cout << "YES" << endl;
else cout << "NO" << endl;
}
int main() {
int num, a, b, c;
cin >> num;
for (int i=0; i<num; i++) {
cin >> a >> b >> c;
solve(a,b,c);
}
return 0;
}
|
a.cc: In function 'void solve(int, int, int)':
a.cc:7:39: error: expected ')' before ';' token
7 | int max_num = max(a, max(b, c);
| ~ ^
| )
|
s611452920
|
p00003
|
C++
|
#include <string>
#include <sstream>
#include <iostream>
int main(void)
{
std::string str;
int lens[3];
int nolines;
getline(std::cin, str);
std::istringstream str_s(str);
str_s >> nolines;
int i;
for (i = 0; i < nolines; i++) {
getline(std::cin, str);
std::istringstream str_s(str);
str_s >> lens[0] >> lens[1] >> lens[2];
std::sort(lens, lens+3);
if (lens[2] * lens[2] == lens[0] * lens[0] + lens[1] * lens[1])
std::cout << "YES" << std::endl;
else
std::cout << "NO" << std::endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:24:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
24 | std::sort(lens, lens+3);
| ^~~~
| qsort
|
s209355188
|
p00003
|
C++
|
#include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
if(cin.eof())return;
while(N--){
int x,y,z;
cin>>x>>y>>z;
if((x^2+y^2)==(z^2)||(x^2+z^2)==(y^2)||(y^2+z^2)==(x^2))cout<<"YES\n";
else cout<<"NO\n";
}
}
|
a.cc: In function 'int main()':
a.cc:8:18: error: return-statement with no value, in function returning 'int' [-fpermissive]
8 | if(cin.eof())return;
| ^~~~~~
|
s926454827
|
p00003
|
C++
|
main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))a*=a,b*=b,c*=c;
}
|
a.cc:2:79: warning: missing terminating " character
2 | for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))a*=a,b*=b,c*=c;
| ^
a.cc:2:79: error: missing terminating " character
2 | for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))a*=a,b*=b,c*=c;
| ^~~~~~~~~~~~~~~~~~
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b,c){
| ^
|
s648205721
|
p00003
|
C++
|
main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))
a*=a,b*=b,c*=c;
exit(0);
}
|
a.cc:3:36: warning: missing terminating " character
3 | puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))
| ^
a.cc:3:36: error: missing terminating " character
3 | puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))
| ^~~
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b,c){
| ^
|
s611742505
|
p00003
|
C++
|
main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts((a+b-c&&a+c-b&&b+c-a)?"NO":"YES"))
a*=a,b*=b,c*=c;
exit(0);
}
|
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b,c){
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.