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];
}
i... | 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");
}
... | 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;
}
retu... | 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 declare... |
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;
el... | 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:4... |
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; ... |
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; ... |
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=in... |
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... |
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;... | 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 | i... |
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: err... |
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... |
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... | 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.... |
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") $ ma... |
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' wa... |
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... | 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>
+++ |+... |
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] == SideLengt... | 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 <algo... |
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] == SideLengt... | 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 <algo... |
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){
????????????... | 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 <ss... | 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... |
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[... | 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.rea... | 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.rea... | 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 | ... |
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... | 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: '... |
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... | 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: '... |
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... | 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: '... |
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 {
... | 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... | 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.L... |
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>
#inclu... | 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++){
... | 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... |
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(... | 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;
... | 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;
... | 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{
... | 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];
... | 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 includ... |
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:1... |
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;
v... | 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:... |
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;
... | 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 | } ... |
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;
... | 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 | } ... |
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;
... | 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 | } ... |
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;
}
... | 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 de... |
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/iostrea... |
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... | 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... |
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)... | 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) {
|... |
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++){
... | 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;
... | 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
2... |
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:... |
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)
... | 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(po... | 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::{... | 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: ... |
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... |
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[... |
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 << "YE... | 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... | 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;
| ... |
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... | 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... | 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... | 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 fi... |
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 fi... |
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 ... | 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){
... | 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... |
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());
... | 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 pri... |
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 ... | 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: err... |
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... | 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: err... |
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 ... | 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;
| ^~~~
| ... |
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++) {
... | 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::istrings... | 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");... |
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 constr... |
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.