submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s557911366
p00003
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <string.h> #include <math.h> using namespace std; int main(){ double a[1010], n, s, k=0, i=0; cin >> n; for(i=0; i<n;i++){ cin>>a[0]>>a[1]>>a[2]; sort(a, a+3); k=(a[1]*a[1])+(a[0]*a[0]); if(a[2]==sqrt(k)) printf("YES\n"); else printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:12:14: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 12 | sort(a, a+3); | ^~~~ | sqrt
s335837422
p00003
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int num[3],n; cin>>n; for(int i=0;i<n;i++){ cin>>num[0]>>num[1]>>cnum[2]; sort(num,num+3); if(num[0]*num[0]+num[1]*num[1]==num[2]*num[2]){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'cnum' was not declared in this scope; did you mean 'num'? 8 | cin>>num[0]>>num[1]>>cnum[2]; | ^~~~ | num
s624513829
p00003
C++
#include <stdlib.h> #include <stdio.h> typedef struct triangle_cont { int sideOne; int sideTwo; int sideThree; } triangle; int main () { int numberOfTriangles, i; scanf("%d", &numberOfTriangles); if (numberOfTriangles > 1000) return; triangle x[numberOfTriangles]; for (i = 0; i < numberOfTriangles; i++) { scanf("%d %d %d", &x[i].sideOne, &x[i].sideTwo, &x[i].sideThree); } for (i = 0; i < numberOfTriangles; i++) { if (x[i].sideOne < 1 || x[i].sideOne >1000) { printf("NO\n"); } else if (x[i].sideTwo < 1 || x[i].sideTwo >1000) { printf("NO\n"); } else if (x[i].sideThree < 1 || x[i].sideThree >1000) { printf("NO\n"); } else if (x[i].sideOne*x[i].sideOne + x[i].sideTwo * x[i].sideTwo == x[i].sideThree * x[i].sideThree) { printf("YES\n"); } else { printf("NO\n"); } } }
a.cc: In function 'int main()': a.cc:14:17: error: return-statement with no value, in function returning 'int' [-fpermissive] 14 | return; | ^~~~~~
s640756733
p00003
C++
#include <iostream> #include <cstdio> #include <cmath> using namespace std; long dd(int n){ return n*n; } int main(){ int n, t[3]; cin >> n; for(int i=0; i<n; ++i){ for(int j=0; j<3; ++j) scanf(" %d", &t[j]); sort(t, t+3); if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n"); else printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:19:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 19 | sort(t, t+3); | ^~~~ | sqrt
s171800021
p00003
C++
#include <iostream> #include <algorithm> using namespace std; int main () { int v[3]; cin >> v[0]; while (cin >> v[0] >> v[1] >> v[2]) sort (v, v+3), cout << (*v**v + *(v+1)**(v+1) == *(v+2)**(v+2) ? "YES" : "NO") << endl; }
a.cc:4:12: error: extended character   is not valid in an identifier 4 | int main () { | ^ a.cc:4:12: error: expected initializer before '\U00003000' 4 | int main () { | ^~
s360139762
p00003
C++
#include<iostream> using namespace std; int main(){ int n,a[3]; cin>>n; for(int i=0;i<n;i++){ cin>>a[0]>>a[1]>>a[2]; sort(a,a+3);//a[0]<=a[1]<=a[2] if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } } }
a.cc: In function 'int main()': a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(a,a+3);//a[0]<=a[1]<=a[2] | ^~~~ | short
s590237179
p00003
C++
#include <iostream> #include <vector> using namespace std; int main() { int ignore; cin >> ignore; int fi; int se; int th; vector<int> v; while(cin >> fi >> se >> th) { v.push_back(fi); v.push_back(se); v.push_back(th); sort(v.begin(), v.end(), greater<int>()); if(v[0] * v[0] == v[1] * v[1] + v[2] * v[2]) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }
a.cc: In function 'int main()': a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(v.begin(), v.end(), greater<int>()); | ^~~~ | short
s533242587
p00003
C++
#include <iostream> #include <math.h> #include <algorithm> using namespace std; int main() { int n; cin >>n; for(int i=0;i<n;i++){ int a,b,c; cin >>a >>b >>c; int tmp; if(b>=a && b>=c){ tmp = b; b = a; a = tmp; }else if(c>=a && c>=b){ tmp = c; c = a; a = tmp; } if(a*a = b*b + c*c){ cout <<"YES" <<endl; }else{ cout <<"NO" <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:24:13: error: lvalue required as left operand of assignment 24 | if(a*a = b*b + c*c){ | ~^~ a.cc:32:2: error: expected '}' at end of input 32 | } | ^ a.cc:7:1: note: to match this '{' 7 | { | ^
s919978022
p00003
C++
#include <iostream> #include <vector> using namespace std; int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int i, n, a, b, c; vector<int> triangle; cin >> n; for (i = 0; i < n; i++) { cin >> a; cin >> b; cin >> c; triangle.push_back(a); triangle.push_back(b); triangle.push_back(c); sort(triangle.begin(), triangle.end()); if (triangle.at(0) * triangle.at(0) + triangle.at(1) * triangle.at(1) == triangle.at(2) * triangle.at(2)) { cout << "YES" << endl; } else { cout << "NO" << endl; } triangle.clear(); } return 0; }
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(triangle.begin(), triangle.end()); | ^~~~ | short
s323435979
p00003
C++
#include<iostream> #include<math.h> using namespace std; void main() { /*FILE *a; char b[20],op; int p,cod,caso; float c; do { fflush(stdin); cout<<"\nLa Cato S.A"<<endl; cout<<"\nA.Crear archivo.\nB.Ingresar Cliente. \nC.Mostrar Clientes. \nD.Salir del programa"<<endl; cin>>op; switch (op) { case 'A': a=fopen("La cato.txt","w"); cout<<"\nARCHIVO CREADO"<<endl; break; case 'B': if(fopen("La cato.txt","w")==NULL) cout<<"NO HA CREADO ARCHIVO PRIMERO"<<endl; if(caso!=0) a=fopen("La cato.txt","a"); do { p=0; fflush(stdin); puts("\nINGRESE NOMBRE: "); gets(b); for(int j=0;j<strlen(b);j++) { if(b[j]!=' '&&(b[j]<'A'||b[j]>'Z')) { fflush(stdin); cout<<"HAY LETRAS NO MAYUSCULAS"<<endl; p=1; break; } } }while(p); fflush(stdin); fprintf(a,"%s ",b); do { cout<<"INGRESE CODIGO"<<endl; fflush(stdin); cin>>cod; }while(cod<100000||cod>999999); fprintf(a,"%d ",cod); for(int i=0;i<3;i++) { fflush(stdin); do { cout<<"INGRESE PRECIO "<<i+1<<endl; //INGRSAMOS precios fflush(stdin); cin>>c; if(c<0) cout<<"ERROR, NEGATIVO"<<endl; }while(c<0); fprintf(a,"%10.2f ",c); } caso++; break; case 'C': fclose(a); a=fopen("La cato.txt","r"); do { c=getc(a); putchar(c); }while(c!=EOF); break; case 'D': fclose(a); break; default: cout<<"INGRESE LETRA CORRECTO"<<endl; } }while(op!='D');*/ int cant,a,b,hip; cin>>cant; for(int i=0;i<cant;i++) { cin>>a>>b>>hip; if((a*a)+(b*b)==hip*hip) cout<<"YES"<<endl; else cout<<"NO"<<endl; } //return 0; }
a.cc:4:1: error: '::main' must return 'int' 4 | void main() | ^~~~
s083135633
p00003
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); for (int i = 0; i < n; i++) { String[] array = sc.nextLine().split("[\\s]"); int n1 = Integer.parseInt(array[0]); int n2 = Integer.parseInt(array[1]); int n3 = Integer.parseInt(array[2]); if ((n1 * n1) + (n2 * n2) == (n3 * n3)) { System.out.println("YES"); } else { System.out.println("NO"); } } sc.close(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s759945170
p00003
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int n; int t[3]; cin >> n; for(int i=0;i<n;i++){ for(int j=0;j<3;j++) cin >> t[j]; sort(t,t+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:13:8: error: 'a' was not declared in this scope 13 | if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) cout << "YES" << endl; | ^
s259919828
p00003
C++
#include <iostream> #incude <cmath> using namespace std; int main () { int n, a,b,c,i; for(i=0;i<n;i++){ cin >> a >> b >> c; if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl; else cout << " No" << endl; } }
a.cc:2:2: error: invalid preprocessing directive #incude; did you mean #include? 2 | #incude <cmath> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:9:12: error: 'hypot' was not declared in this scope 9 | if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl; | ^~~~~
s886903860
p00003
C++
#include <iostream> #include <cmath> using namespace std; int main () { int n,i; float a,b,c for(i=0;i<n;i++){ cin >> a >> b >> c; if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "YES" << endl; else cout << " NO" << endl; } }
a.cc: In function 'int main()': a.cc:8:5: error: expected initializer before 'for' 8 | for(i=0;i<n;i++){ | ^~~ a.cc:8:20: error: expected ';' before ')' token 8 | for(i=0;i<n;i++){ | ^ | ;
s386746972
p00003
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(){ ci<<n; while(n--){ vector<int> v(3); for (int i = 0; i < 3; ++i){ cin>>v[i]; } sort(v.begin(), v.end()); if (v[2]*v[2] == v[0]*v[0] + v[1]*v[1]) cout<<"YES"; else cout<<"NO"; cout<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'ci' was not declared in this scope 7 | ci<<n; | ^~ a.cc:7:13: error: 'n' was not declared in this scope 7 | ci<<n; | ^
s332771026
p00003
C++
#include<stdio.h> void temp(int x,int y,int z) { int tmp; if(x<y){tmp=y;y=x;x=tmp;} if(x<z){tmp=x;x=z;z=tmp;} if(y<z){tmp=z;z=y;y=tmp;} } int main() { int x,y,z.n; scanf("%d",&n); while(n-->=0) { scanf("%d",&x);scanf("%d",&y);scanf("%d",&z); temp(x,y,z); if(x*x=y*y+z*z)printf("YES\n"); else printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:11:10: error: expected initializer before '.' token 11 | int x,y,z.n; | ^ a.cc:12:13: error: 'n' was not declared in this scope 12 | scanf("%d",&n); | ^ a.cc:15:43: error: 'z' was not declared in this scope 15 | scanf("%d",&x);scanf("%d",&y);scanf("%d",&z); | ^
s966665018
p00003
C++
#include <iostream> #include <string> #include <sstream> using namespace std; int main() { int n; int a,b,c; cin >> n; while (n) { cin >> a >> b >> c; if (pow(c, 2) == pow(a, 2) + pow(b, 2)) cout << "YES" << endl; else cout << "NO" << endl; n--; } return 0; }
a.cc: In function 'int main()': a.cc:19:21: error: 'pow' was not declared in this scope 19 | if (pow(c, 2) == pow(a, 2) + pow(b, 2)) | ^~~
s137965846
p00003
C++
#include <cstdio> #include <algorithm> int main() { int n; scanf("%d", &n); for(int i = 0; i < n; ++i) { int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); sort(s, s + 3); int a=s[0], b=s[1], c=s[2]; if (c*c == (a+b)*(a+b)) puts("YES"); else puts("NO"); } }
a.cc: In function 'int main()': a.cc:8:53: error: expected identifier before numeric constant 8 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); | ^ a.cc: In lambda function: a.cc:8:55: error: expected '{' before ')' token 8 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); | ^ a.cc: In function 'int main()': a.cc:8:52: error: taking address of rvalue [-fpermissive] 8 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); | ^~~ a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 10 | sort(s, s + 3); | ^~~~ | std::sort In file included from /usr/include/c++/14/algorithm:86, from a.cc:2: /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~
s133606667
p00003
C++
#include <cstdio> #include <algorithm> using namespace std; int main() { int n; scanf("%d", &n); for(int i = 0; i < n; ++i) { int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); sort(s, s + 3); int a=s[0], b=s[1], c=s[2]; if (c*c == (a+b)*(a+b)) puts("YES"); else puts("NO"); } }
a.cc: In function 'int main()': a.cc:10:53: error: expected identifier before numeric constant 10 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); | ^ a.cc: In lambda function: a.cc:10:55: error: expected '{' before ')' token 10 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); | ^ a.cc: In function 'int main()': a.cc:10:52: error: taking address of rvalue [-fpermissive] 10 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]); | ^~~
s571763418
p00003
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CSharpPractice { class Program { static bool IsRightTriangle(int a, int b, int c) { return a * a + b * b == c * c; } static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int j = 0; j < n; j++) { List<int> list = new List<int>(); foreach (string val in Console.ReadLine().Split(' ')) { list.Add(int.Parse(val)); } bool flg = false; for (int i = 0; i < 3; i++) { flg |= IsRightTriangle(list[i], list[(i + 1) % 3], list[(i + 2) % 3]); } Console.WriteLine(flg ? "YES" : "NO"); } } } }
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:14:34: error: 'string' has not been declared 14 | static void Main(string[] args) | ^~~~~~ a.cc:14:43: error: expected ',' or '...' before 'args' 14 | static void Main(string[] args) | ^~~~ a.cc:32:10: error: expected ';' after class definition 32 | } | ^ | ; a.cc: In static member function 'static void CSharpPractice::Program::Main(int*)': a.cc:16:33: error: expected primary-expression before 'int' 16 | int n = int.Parse(Console.ReadLine()); | ^~~ a.cc:19:33: error: 'List' was not declared in this scope 19 | List<int> list = new List<int>(); | ^~~~ a.cc:19:38: error: expected primary-expression before 'int' 19 | List<int> list = new List<int>(); | ^~~ a.cc:20:42: error: 'string' was not declared in this scope 20 | foreach (string val in Console.ReadLine().Split(' ')) | ^~~~~~ a.cc:20:33: error: 'foreach' was not declared in this scope 20 | foreach (string val in Console.ReadLine().Split(' ')) | ^~~~~~~ a.cc:27:64: error: 'list' was not declared in this scope 27 | flg |= IsRightTriangle(list[i], list[(i + 1) % 3], list[(i + 2) % 3]); | ^~~~ a.cc:29:33: error: 'Console' was not declared in this scope 29 | Console.WriteLine(flg ? "YES" : "NO"); | ^~~~~~~
s993543662
p00003
C++
#include <iostream> using namespace std; int loop; int panjang[1000][3]; int y = 0; int temp; int main() { cin >> loop; for(int x=0;x<loop;x++) { cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2]; } for(int looper= 0;looper<loop;looper++) { for(int looper2 = 0;looper2<5;looper2++) { if((panjang[looper][y])<(panjang[looper][y+1])) { temp = panjang[looper][y]; panjang[looper][y]=panjang[looper][y+1]; panjang[looper][y+1]=temp; temp = 0; if((panjang[looper][y+1]<(panjang[looper][y+2]))) { temp = panjang[looper][y+1]; panjang[looper][y+1]=panjang[looper][y+2]; panjang[looper][y+2]=temp; temp = 0; } } } cout << std; } for(int pyth=0;pyth<loop;pyth++) { if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2]) cout << "YES" << endl; else cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:36:12: error: expected primary-expression before ';' token 36 | cout << std; | ^
s508408079
p00003
C++
#include <iostream> using namespace std; int loop; int panjang[1000][1000]; int y = 0; int temp = 0; int main() { cin >> loop; for(int x=0;x<loop;x++) { cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2]; } for(int looper= 0;looper<loop;looper++) { for(int looper2 = 0;looper2<4;looper2++) { if((panjang[looper][y+1])<(panjang[looper][y+2])) { temp = panjang[looper][y+1]; panjang[looper][y+1]=panjang[looper][y+2]; panjang[looper][y+2]=temp; temp = 0; if((panjang[looper][y])<(panjang[looper][y+1])) { temp = panjang[looper][y]; panjang[looper][y]=panjang[looper][y+1]; panjang[looper][y+1]=temp; temp = 0; } } } for(int pyth=0;pyth<loop;pyth++) { if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2]) cout << "YES" << endl; else cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:45:2: error: expected '}' at end of input 45 | } | ^ a.cc:9:1: note: to match this '{' 9 | { | ^
s593196540
p00003
C++
#include<iostream> int main(){ int a,b,c,n,i; std::cin>>n; for(i=0;i<n;i++){ std::cin>>a>>b>>c; if(a*a==b*b+c*c)std::cout<<"YES"<<std::endl; else if(b*b==a*a+c*c)std::cout<<"YES"<<std::endl; else if(c*c==a*a+b*b)std::cout<<"YES"<<std::endl; else std::cout<<"NO"<<std::endl; } return 0;
a.cc: In function 'int main()': a.cc:12:10: error: expected '}' at end of input 12 | return 0; | ^ a.cc:2:11: note: to match this '{' 2 | int main(){ | ^
s253344389
p00003
C++
#include<iostream> using namespace std; int main(){ int a, b, c, buf; int n; bool x[1000]; cin >> n; for(int i = 0; i < n; i++){ cin >> a >> b >> c; if(c > b){ buf = c; c = b; b = buf; } if(b > a){ buf = b; b = a; a = buf; } if(a*a==b*b+c*c) x[i] = 1; else x[i] = 0; } for(int i = 0; i < n; i++){ if(x[i] == 0) cout << "NO\n"; else cout << "YES\n"; return 0; }
a.cc: In function 'int main()': a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s332259777
p00003
C++
/*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp*/ #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin>>n; for (int i = 0; i < n; ++i) { vector<int> lens; for (int j = 0; j < 3; ++j) { int tmp; cin>>tmp; lens.push_back(tmp); } sort(lens.begin(),lens.end(),greater<int>()); if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:21:12: error: 'pow' was not declared in this scope 21 | if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){ | ^~~
s343618596
p00003
C++
#include<stdio.h> #include<iostream> #include<cmath> using namespace std; int main() { int a, b, c, n; cin >> n; for(int i = 0; i < n; i++) { cin >> a >> b >> c; if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b) { printf("YES\n"); }else printf("NO\n"); } return 0;
a.cc: In function 'int main()': a.cc:16:18: error: expected '}' at end of input 16 | return 0; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s861100964
p00003
C++
#include <algorithm> #include <iostream> int pow2(int i) { return std::pow(i, (double) 2); } int main() { int in[3]; while (std::cin >> in[0] >> in[1] >> in[2]) { std::sort(in, in + 3); if (pow2(in[2]) == pow2(in[0]) + pow2(in[1])) std::cout << "YES" << std::endl; else std::cout << "NO" << std::endl; } }
a.cc: In function 'int pow2(int)': a.cc:5:21: error: 'pow' is not a member of 'std' 5 | return std::pow(i, (double) 2); | ^~~
s271076166
p00003
C++
#include <algorithm> #include <iostream> int pow2(int i) { return std::pow((double) i, (double) 2); } int main() { int in[3]; while (std::cin >> in[0] >> in[1] >> in[2]) { std::sort(in, in + 3); if (pow2(in[2]) == pow2(in[0]) + pow2(in[1])) std::cout << "YES" << std::endl; else std::cout << "NO" << std::endl; } }
a.cc: In function 'int pow2(int)': a.cc:5:21: error: 'pow' is not a member of 'std' 5 | return std::pow((double) i, (double) 2); | ^~~
s624662305
p00003
C++
#include <stdio.h> int main(void) { int a,b,c,i,j; scanf("%d",&j); for (i=1;i<=j;i++){ scanf("%d%d%d",&a,&b,&c); if (a*a + b*b == c*c||a*a + c*c == b*b||c*c + b*b == a*a){ printf("YES"); } else{ printf("NO"); } } } } return 0; }
a.cc:16:17: error: expected declaration before '}' token 16 | } | ^ a.cc:17:9: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s912939664
p00003
C++
#include<iostream> #include<stdio.h> int main(){ int a,b,c; std::cin>>a; std::cin>>b; std::cin>>c; if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl}; else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl}; else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl}; else std::cout<<"NO"<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:54: error: expected ';' before '}' token 9 | if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl}; | ^ | ; a.cc:10:3: error: 'else' without a previous 'if' 10 | else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl}; | ^~~~ a.cc:10:53: error: expected ';' before '}' token 10 | else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl}; | ^ | ; a.cc:11:3: error: 'else' without a previous 'if' 11 | else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl}; | ^~~~ a.cc:11:53: error: expected ';' before '}' token 11 | else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl}; | ^ | ; a.cc:12:3: error: 'else' without a previous 'if' 12 | else std::cout<<"NO"<<std::endl; | ^~~~
s492843130
p00003
C++
#include<iostream> #include<stdio.h> int main(){ int a,b,c; std::cin>>a; std::cin>>b; std::cin>>c; if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl}; else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl}; else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl}; else std::cout<<"NO"<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:54: error: expected ';' before '}' token 9 | if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl}; | ^ | ; a.cc:10:3: error: 'else' without a previous 'if' 10 | else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl}; | ^~~~ a.cc:10:53: error: expected ';' before '}' token 10 | else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl}; | ^ | ; a.cc:11:3: error: 'else' without a previous 'if' 11 | else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl}; | ^~~~ a.cc:11:53: error: expected ';' before '}' token 11 | else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl}; | ^ | ; a.cc:12:3: error: 'else' without a previous 'if' 12 | else std::cout<<"NO"<<std::endl; | ^~~~
s906377981
p00003
C++
#include<iostream> int main(){ int a,b,c; std::cin>>a>>b>>c if(a*a+b*b==c*c){ std::cout<<"YES"; }else if(a*a+c*c==b*b){ std::cout<<"YES"; }else if(b*b+c*c==a*a){ std::cout<<"YES"; }else{ std::cout<<"NO"; } return 0; }
a.cc: In function 'int main()': a.cc:5:26: error: expected ';' before 'if' 5 | std::cin>>a>>b>>c | ^ | ; 6 | if(a*a+b*b==c*c){ | ~~ a.cc:8:10: error: 'else' without a previous 'if' 8 | }else if(a*a+c*c==b*b){ | ^~~~
s872076950
p00003
C++
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc= new Scanner (System.in); int n = sc.nextInt(); int i[]; i = new int[3]; for(int a=0;a<=n;a++){ for(int d=0;d<3;d++ ){ i[d]=sc.nextInt(); Arrays.sort(i); if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){ System.out.println("Yes"); } else System.out.println("No"); } } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s037644612
p00003
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { /** * <p> * 与えられた三辺で直角三角形が作れるかを判定する。 * </p> * * @param args * 利用しない。 * @throws IOException */ public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int lineCount = Integer.parseInt(br.readLine()); for (int i = 0; i < lineCount; i++) { String line = br.readLine(); // 三辺の長さをリストに格納し、ソート List<Integer> sideList = new ArrayList<Integer>(); String[] input = line.split(" "); sideList.add(Integer.parseInt(input[0])); sideList.add(Integer.parseInt(input[1])); sideList.add(Integer.parseInt(input[2])); Collections.sort(sideList); if (isRightTriangle(sideList.get(2), sideList.get(1), sideList.get(0))) { System.out.println("YES"); } else { System.out.println("NO"); } } } /** * 三辺の長さから、直角三角形であるかどうかを判定する。<br> * 注意:第一引数に最も長い辺を与えること。 * * @param side1 * 辺1 * @param side2 * 辺2 * @param side3 * 辺3 * @return 直角三角形であるかどうか */ private static boolean isRightTriangle(int side1, int side2, int side3) { return (side1 * side1 == side2 * side2 + side3 * side3); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStreamReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.util.ArrayList; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.util.Collections; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: 'import' does not name a type 6 | import java.util.List; | ^~~~~~ a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: expected unqualified-id before 'public' 8 | public class Main { | ^~~~~~
s714106354
p00003
C++
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int a; int b; int c; int N = stdIn.nextInt(); int count = 0; int box; while (true) { if(N<=0){ break; } a = stdIn.nextInt(); b = stdIn.nextInt(); c = stdIn.nextInt(); if (a < b) { box = a; a = b; b = box; } if (a < c) { box = a; a = c; c = box; } a = a * a; b = b * b; c = c * c; if (a == b + c) System.out.println("YES"); else System.out.println("NO"); count=count+1; if (count == N){ break; } } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class A { | ^~~~~~
s253588988
p00003
C++
#include <stdio.h> void right_triangle (int x, int y, int z) { scanf("%d %d %d", &x, &y, &z); if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){ printf("YES\n"); } else { printf("NO\n"); } } int main(void) { int n; scanf("%d", &n); for (int i = 0; i < n; ++i){ right_triangle(); } return 0; }
a.cc: In function 'void right_triangle(int, int, int)': a.cc:6:55: error: lvalue required as left operand of assignment 6 | if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){ | ~~~~~~~~~~~~~~^~~~~~~~ a.cc: In function 'int main()': a.cc:18:23: error: too few arguments to function 'void right_triangle(int, int, int)' 18 | right_triangle(); | ~~~~~~~~~~~~~~^~ a.cc:3:6: note: declared here 3 | void right_triangle (int x, int y, int z) | ^~~~~~~~~~~~~~
s015253473
p00003
C++
#include <stdio.h> void right_triangle (int x, int y, int z) { if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){ printf("YES\n"); } else { printf("NO\n"); } } int main(void) { int n; scanf("%d", &n); for (int i = 0; i < n; ++i){ int x, y, z; scanf("%d %d %d", &x, &y, &z); right_triangle(x, y, z); } return 0; }
a.cc: In function 'void right_triangle(int, int, int)': a.cc:5:55: error: lvalue required as left operand of assignment 5 | if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){ | ~~~~~~~~~~~~~~^~~~~~~~
s601907818
p00003
C++
#include <stdio.h> #include <stdbool.h> void judge(int x, int y, int z) { static bool flag = false; if (x * x + y * y == z * z){ flag = true; } } int main(void) { int repeat, a, b, c; scanf("%d", &repeat); for (int i = 0; i < repeat ; ++i){ scanf("%d %d %d", &a, &b, &c); judge (a, b, c); judge (b, c, a); judge (c, a, b); if (flag == true){ printf("YES\n"); }else{ printf("NO\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:22:13: error: 'flag' was not declared in this scope 22 | if (flag == true){ | ^~~~
s230819990
p00003
C++
#include <stdio.h> #include <stdbool.h> void judge(int x, int y, int z, bool flag) { if (x * x + y * y == z * z){ flag = true; } } int main(void) { int repeat, a, b, c; bool flag = false; scanf("%d", &repeat); for (int i = 0; i < repeat ; ++i){ scanf("%d %d %d", &a, &b, &c); judge (a, b, c); judge (b, c, a); judge (c, a, b); if (flag == true){ printf("YES\n"); }else{ printf("NO\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:19:15: error: too few arguments to function 'void judge(int, int, int, bool)' 19 | judge (a, b, c); | ~~~~~~^~~~~~~~~ a.cc:4:6: note: declared here 4 | void judge(int x, int y, int z, bool flag) | ^~~~~ a.cc:20:15: error: too few arguments to function 'void judge(int, int, int, bool)' 20 | judge (b, c, a); | ~~~~~~^~~~~~~~~ a.cc:4:6: note: declared here 4 | void judge(int x, int y, int z, bool flag) | ^~~~~ a.cc:21:15: error: too few arguments to function 'void judge(int, int, int, bool)' 21 | judge (c, a, b); | ~~~~~~^~~~~~~~~ a.cc:4:6: note: declared here 4 | void judge(int x, int y, int z, bool flag) | ^~~~~
s924735153
p00003
C++
#include <stdio.h> int triJudgefunc(int x, int y, int z); int main(void) { int row; scanf("%d", &row); for (int i = 0; i < row; ++i) { int firstn, secondn ,thirdn; scanf("%d %d %d", &firstn, &secondn, &thirdn); if (judgefunc(firstn, secondn, thirdn) = true) { printf("YES\n"); } else { printf("NO\n"); } } return 0; } int triJudgefunc(int x, int y, int z) { double maxlength, notmax1, notmax2; if (x > y) { //x > y if (x > z) { maxlength = x, notmax1 = y, notmax2 = z; //x???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } else { //y > x if (y > z) { notmax1 = x, maxlength = y, notmax2 = z; //y???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2; return result; }
a.cc: In function 'int main()': a.cc:12:13: error: 'judgefunc' was not declared in this scope; did you mean 'triJudgefunc'? 12 | if (judgefunc(firstn, secondn, thirdn) = true) { | ^~~~~~~~~ | triJudgefunc
s404160824
p00003
C++
#include <stdio.h> int triJudgefunc(int x, int y, int z); int main(void) { int row; scanf("%d", &row); for (int i = 0; i < row; ++i) { int firstn, secondn ,thirdn; scanf("%d %d %d", &firstn, &secondn, &thirdn); if (triJudgefunc(firstn, secondn, thirdn) = true) { printf("YES\n"); } else { printf("NO\n"); } } return 0; } int triJudgefunc(int x, int y, int z) { double maxlength, notmax1, notmax2; if (x > y) { //x > y if (x > z) { maxlength = x, notmax1 = y, notmax2 = z; //x???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } else { //y > x if (y > z) { notmax1 = x, maxlength = y, notmax2 = z; //y???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2; return result; }
a.cc: In function 'int main()': a.cc:12:25: error: lvalue required as left operand of assignment 12 | if (triJudgefunc(firstn, secondn, thirdn) = true) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
s560257073
p00003
C++
#include <stdio.h> int triJudgefunc(int x, int y, int z); int main(void) { int row; scanf("%d", &row); for (int i = 0; i < row; ++i) { int firstn, secondn ,thirdn; scanf("%d %d %d", &firstn, &secondn, &thirdn); if (triJudgefunc(firstn, secondn, thirdn) = true) { printf("YES\n"); } else { printf("NO\n"); } } return 0; } int triJudgefunc(int x, int y, int z) { int maxlength, notmax1, notmax2; if (x > y) { //x > y if (x > z) { maxlength = x, notmax1 = y, notmax2 = z; //x???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } else { //y > x if (y > z) { notmax1 = x, maxlength = y, notmax2 = z; //y???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2; return result; }
a.cc: In function 'int main()': a.cc:12:25: error: lvalue required as left operand of assignment 12 | if (triJudgefunc(firstn, secondn, thirdn) = true) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
s067177277
p00003
C++
#include <stdio.h> int triJudgefunc(int x, int y, int z); int main(void) { int row; scanf("%d", &row); for (int i = 0; i < row; ++i) { int firstn, secondn ,thirdn; scanf("%d %d %d", &firstn, &secondn, &thirdn); if (triJudgefunc(firstn, secondn, thirdn) = 0) { printf("YES\n"); } else { printf("NO\n"); } } return 0; } int triJudgefunc(int x, int y, int z) { int maxlength, notmax1, notmax2; if (x > y) { //x > y if (x > z) { maxlength = x, notmax1 = y, notmax2 = z; //x???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } else { //y > x if (y > z) { notmax1 = x, maxlength = y, notmax2 = z; //y???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2; return result; }
a.cc: In function 'int main()': a.cc:12:25: error: lvalue required as left operand of assignment 12 | if (triJudgefunc(firstn, secondn, thirdn) = 0) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
s803368894
p00003
C++
#include <stdio.h> int triJudgefunc(int x, int y, int z); int main(void) { int row; scanf("%d", &row); for (int i = 0; i < row; ++i) { int firstn, secondn ,thirdn; scanf("%d %d %d", &firstn, &secondn, &thirdn); if (triJudgefunc(firstn, secondn, thirdn) = 0) { printf("YES\n"); } else { printf("NO\n"); } } return 0; } int triJudgefunc(int x, int y, int z) { int maxlength, notmax1, notmax2; if (x > y) { //x > y if (x > z) { maxlength = x, notmax1 = y, notmax2 = z; //x???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } else { //y > x if (y > z) { notmax1 = x, maxlength = y, notmax2 = z; //y???max } else { notmax1 = x, notmax2 = y, maxlength = z; //z???max } } int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2; return result; }
a.cc: In function 'int main()': a.cc:12:25: error: lvalue required as left operand of assignment 12 | if (triJudgefunc(firstn, secondn, thirdn) = 0) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
s618320501
p00003
C++
#include <stdio.h> int triJudgefunc(int x, int y, int z); int main(void) { int row; scanf("%d", &row); for (int i = 0; i < row; ++i) { int firstn, secondn ,thirdn; scanf("%d %d %d", &firstn, &secondn, &thirdn); if (triJudgefunc(firstn, secondn, thirdn) = 0) { printf("YES\n"); } else { printf("NO\n"); } } return 0; } int triJudgefunc(int x, int y, int z) { int maxlength, notmax1, notmax2; if (x > y) { //x > y if (x > z) { maxlength = x; notmax1 = y; notmax2 = z; //x???max } else { notmax1 = x; notmax2 = y; maxlength = z; //z???max } } else { //y > x if (y > z) { notmax1 = x; maxlength = y; notmax2 = z; //y???max } else { notmax1 = x; notmax2 = y; maxlength = z; //z???max } } int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2; return result; }
a.cc: In function 'int main()': a.cc:12:25: error: lvalue required as left operand of assignment 12 | if (triJudgefunc(firstn, secondn, thirdn) = 0) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
s546522323
p00003
C++
#include <stdio.h> int print(void) { if (C == A + B) { printf("YES\n"); } else if (A == B + C) { printf("YES\n"); } else if (B == C + A) { printf("YES\n"); } else { printf("NO\n"); } } int main(void) { int i, N, a, b, c, A, B, C; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%d %d %d\n", &a, &b, &c); A = a * a; B = b * b; C = c * c; print(); } return 0; }
a.cc: In function 'int print()': a.cc:5:9: error: 'C' was not declared in this scope 5 | if (C == A + B) { | ^ a.cc:5:14: error: 'A' was not declared in this scope 5 | if (C == A + B) { | ^ a.cc:5:18: error: 'B' was not declared in this scope 5 | if (C == A + B) { | ^ a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type] 14 | } | ^
s350836329
p00003
C++
#include<iostream> using namespace std; int main(){ int n; int a,b,c; int tmp; cin >> n; for(int i=0;i<n;i++) { cin >> a >> b >> c; } if(a>c){ tmp=a; a=c; c=tmp; } if(b>c){ tmp=b; b=c; c=tmp; } if(a*a+b*b==c*c) cin >> YES >> endl; else cin >> NO >> endl; return 0; }
a.cc: In function 'int main()': a.cc:27:12: error: 'YES' was not declared in this scope 27 | cin >> YES >> endl; | ^~~ a.cc:29:12: error: 'NO' was not declared in this scope 29 | cin >> NO >> endl; | ^~
s798287650
p00003
C++
#include<iostream> using namespace std; int main(){ int n; int a,b,c; int tmp; cin >> n; for(int i=0;i<n;i++) { cin >> a >> b >> c; } if(a>c){ tmp=a; a=c; c=tmp; } if(b>c){ tmp=b; b=c; c=tmp; } if(a*a+b*b==c*c) cout >> "YES" >> endl; else cout >> "NO" >> endl; return 0; }
a.cc: In function 'int main()': a.cc:27:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 27 | cout >> "YES" >> endl; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:27:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 27 | cout >> "YES" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:27:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:27:13: required from here 27 | cout >> "YES" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:29:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 29 | cout >> "NO" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:29:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 29 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:29:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 29 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:29:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 29 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:29:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 29 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:29:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 29 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:29:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 29 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substi
s361501348
p00003
C++
#include<stdio.h> int main() { int a, b, c, d, c2; a = 0; b = 0; c = 0; d = 0; c2 = 0; while(scanf("%d %d %d", &a, &b, &c)( { d = a * a + b * b; c2 = c * c; if( d == c2 ) { printf("YES"); } else { printf("NO"); } } }
a.cc: In function 'int main()': a.cc:12:34: error: expected '}' before ';' token 12 | d = a * a + b * b; | ^ a.cc:11:9: note: to match this '{' 11 | { | ^ a.cc:12:34: error: expected ')' before ';' token 12 | d = a * a + b * b; | ^ | ) a.cc:10:44: note: to match this '(' 10 | while(scanf("%d %d %d", &a, &b, &c)( | ^ a.cc:12:34: error: expected ')' before ';' token 12 | d = a * a + b * b; | ^ | ) a.cc:10:14: note: to match this '(' 10 | while(scanf("%d %d %d", &a, &b, &c)( | ^ a.cc: At global scope: a.cc:23:1: error: expected declaration before '}' token 23 | } | ^
s412575673
p00003
C++
#include<iostream> int main() { int a, b, c, d, c2; a = 0; b = 0; c = 0; d = 0; c2 = 0; while(cin >> a >> b >> c) { d = a * a + b * b; c2 = c * c; if( d == c2 ) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }
a.cc: In function 'int main()': a.cc:10:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | while(cin >> a >> b >> c) | ^~~ | 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: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 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:20:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 20 | 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:20:41: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 20 | cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s274676238
p00003
C++
#include<iostream> using namespace std; int main() { int a, b, c, d, c2, irekae; a = 0; b = 0; c = 0; d = 0; c2 = 0; for( i = 0; i < n; i++) { cin << a << b << c; d = (a * a) + (b * b); c2 = (c * c); cout << d << " " << c2; if( d == c2 ) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }
a.cc: In function 'int main()': a.cc:11:14: error: 'i' was not declared in this scope 11 | for( i = 0; i < n; i++) | ^ a.cc:11:25: error: 'n' was not declared in this scope 11 | for( i = 0; i < n; i++) | ^ a.cc:13:21: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 13 | cin << a << b << c; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:13:21: note: candidate: 'operator<<(int, int)' (built-in) 13 | cin << a << b << c; | ~~~~^~~~ a.cc:13:21: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, 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/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:13:17: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 13 | cin << a << b << c; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:13:10: required from here 13 |
s309035460
p00003
C++
#include<iostream> using namespace std; int main() { int a, b, c, d, c2, irekae, i; a = 0; b = 0; c = 0; d = 0; c2 = 0; for( i = 0; i < n; i++) { cin << a << b << c; d = (a * a) + (b * b); c2 = (c * c); cout << d << " " << c2; if( d == c2 ) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }
a.cc: In function 'int main()': a.cc:11:25: error: 'n' was not declared in this scope 11 | for( i = 0; i < n; i++) | ^ a.cc:13:21: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 13 | cin << a << b << c; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:13:21: note: candidate: 'operator<<(int, int)' (built-in) 13 | cin << a << b << c; | ~~~~^~~~ a.cc:13:21: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, 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/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:13:17: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 13 | cin << a << b << c; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:13:24: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:13:10: required from here 13 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'ty
s862250794
p00003
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int N; cin >> N; while(N--){ int i[3],c; int max; cin >> i[0] >> i[1] >> i[2]; sort(i,i+3); cout << ((i[0]*i[0]+i[1]*i[1]==i[2]*i[2])?"YES\n":"NO\n"; }}
a.cc: In function 'int main()': a.cc:12:57: error: expected ')' before ';' token 12 | cout << ((i[0]*i[0]+i[1]*i[1]==i[2]*i[2])?"YES\n":"NO\n"; | ~ ^ | )
s959167815
p00003
C++
#include<stdio.h> int main(){ int n,a,b,c,t; scanf("%d",&n); while(n--){ scnaf("%d %d %d",&a,&b,&c); if(a<b){t=a;a=b;b=t;} if(a<c){t=a;a=c;c=t;} if(a*a==b*b+c*c)printf("Yes\n"); else printf("No\n); } return 0; }
a.cc:10:24: warning: missing terminating " character 10 | else printf("No\n); | ^ a.cc:10:24: error: missing terminating " character 10 | else printf("No\n); | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 6 | scnaf("%d %d %d",&a,&b,&c); | ^~~~~ | scanf a.cc:11:1: error: expected primary-expression before '}' token 11 | } | ^
s235057746
p00003
C++
gets.to_i.times do a=gets.split.map(&:to_i).sort if a[0]*a[0]+a[1]*a[1]==a[2]*a[2] then puts "YES" else puts "NO" end end
a.cc:1:1: error: 'gets' does not name a type 1 | gets.to_i.times do | ^~~~
s623597564
p00003
C++
#include<stdio.h> int main(void) { int n,a,b,c,i,l; scanf("%d",&n); for(i=0;i<n;i++){ l=0; scanf("%d %d %d",&a,&b,&c); if(a<c&&b<c){ if(a*a+b*b==c*c){ l=1; printf("YES\n"); } } else if(a<b&&c<b){ if(a*a+c*c==b*b){ l=1; printf("YES\n"); } } else if(b<a&&c<a){ if(c*c+b*b==a*a){ l=1; printf("YES\n"); } } if(l==0){ printf("NO\n"); } } return 0;
a.cc: In function 'int main()': a.cc:31:18: error: expected '}' at end of input 31 | return 0; | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s645998336
p00003
C++
if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){ #include <iostream> using namespace std; int main(){ int a; int b; int c; int n; cin >> n; for(int i=1; i<=n; i++){ cin >> a >> b >> c; if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){ cout << "Yes\n"; } else { cout << "No" << endl; } } }
a.cc:1:17: error: expected unqualified-id before 'if' 1 | if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){ | ^~
s698440708
p00003
C++
#include<stido.h> int main(void) { int a,b,c1,c2,c3,i; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d %d %d",&c1,&c2,&c3); } if(c1*c1+c2*c2==c3*c3){ printf("YES\n"); } else if(c1*c1+c3*c3==c2*c2){ printf("YES\n"); } else if(c2*c2+c3*c3==c1*c1){ printf("YES\n"); } else{ printf("NO\n"); } return 0; }
a.cc:1:9: fatal error: stido.h: No such file or directory 1 | #include<stido.h> | ^~~~~~~~~ compilation terminated.
s958056684
p00003
C++
#include<iostream> #include<utility> #include<climits> using namespace std; int main() { double a, b, c; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> a >> b >> c; if (pow(a, 2) == pow(b, 2) + pow(c, 2) ||pow(b, 2) == pow(c, 2) + pow(a, 2) ||pow(c, 2) == pow(a, 2) + pow(b, 2)) {cout << "YES" << endl;} else {cout << "NO" << endl;} } return 0; }
a.cc: In function 'int main()': a.cc:16:21: error: 'pow' was not declared in this scope 16 | if (pow(a, 2) == pow(b, 2) + pow(c, 2) | ^~~
s831471097
p00003
C++
import java.util.*; import java.io.*; import java.awt.geom.*; import java.math.*; public class Main { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { int n = in.nextInt(); while (n-- > 0) { int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); if (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b) { System.out.println("YES"); } else { System.out.println("NO"); } } } public static void main(String[] args) { long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); //trace(end-start + "ms"); in.close(); out.close(); } static void trace(Object... o) { System.out.println(Arrays.deepToString(o));} }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.awt.geom.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.math.*; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: expected unqualified-id before 'public' 6 | public class Main { | ^~~~~~
s539287045
p00003
C++
#include<stdio.h> int main(void){ int n1, n2, n3, m; scanf("%d\n",&m); for(i = 0;i < m;i++) { scanf("%d %d %d",&n1,&n2,&n3); if(n1 * n1 + n2 * n2 = n3 * n3) printf("YES"); else printf("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i = 0;i < m;i++) { | ^ a.cc:8:20: error: lvalue required as left operand of assignment 8 | if(n1 * n1 + n2 * n2 = n3 * n3) | ~~~~~~~~^~~~~~~~~
s115374373
p00003
C++
#include<stdio.h> int main(void){ int n1, n2, n3, m; scanf("%d",&m); for(i = 0;i < m;i++) { scanf("%d %d %d",&n1,&n2,&n3); if(n1 * n1 + n2 * n2 = n3 * n3) printf("YES"); else printf("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i = 0;i < m;i++) { | ^ a.cc:8:20: error: lvalue required as left operand of assignment 8 | if(n1 * n1 + n2 * n2 = n3 * n3) | ~~~~~~~~^~~~~~~~~
s656891667
p00003
C++
import sys N = (int)(raw_input()) a = [0,0,0] for i in range(N): a[0],a[1],a[2] = map(int,raw_input().split()) a.sort() if a[0]^2 + a[1]^2 == a[2]^2: print("YES") else: 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'
s720262894
p00003
C++
#include <stdio.h> #include <math.h > int main(void) { int a, b, c, t, x, y; t = a ; x = b ; y = c; if(t<=b){ t = b ; x = c ; y = a ; } if(t<=c){ t = c ; x = a ; y = b; } if(t==sqrt(pow(x)+pow(y))){ printf("YES"); } else{ printf("NO"); } return 0; }
a.cc:2:10: fatal error: math.h : No such file or directory 2 | #include <math.h > | ^~~~~~~~~ compilation terminated.
s051570921
p00003
C++
using namespace std; int main(void){ int n , a[3]; cin >> n; for (int i=0; i<n; i++){ 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:5:9: error: 'cin' was not declared in this scope 5 | 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:17: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(a,a+3); | ^~~~ | short a.cc:10:25: error: 'cout' was not declared in this scope 10 | cout << "YES" << endl; | ^~~~ a.cc:10:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:42: error: 'endl' was not declared in this scope 10 | 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:12:25: error: 'cout' was not declared in this scope 12 | cout << "NO" << endl; | ^~~~ a.cc:12:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:41: error: 'endl' was not declared in this scope 12 | cout << "NO" << endl; | ^~~~ a.cc:12:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s715815843
p00003
C++
#include<iostream> using namespace std; int main(){ int n,a,b,c,i; cin>>n; for(i=0;i<n;i++){ cin>>a>>b>>c; if(a<b+c){ if(b<a+c){ if(c<a+b){ cout<<"YES"<<endl; } } } else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s507687602
p00003
C++
#include<iostream> using namespace std; int main(){ int n,a,b,c,i; cin>>n; for(i=0;i<n;i++){ cin>>a>>b>>c; if(a<b+c){ if(b<a+c){ if(c<a+b){ cout<<"YES"<<endl; } } }else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s396255991
p00003
C++
#include<iostream> using namespace std; int main(){ int n,a,b,c,i; cin>>n; for(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:8:5: error: lvalue required as left operand of assignment 8 | 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; | ~^~ a.cc:8:43: error: lvalue required as left operand of assignment 8 | 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; | ~^~ a.cc:8:81: error: lvalue required as left operand of assignment 8 | 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; | ~^~
s889592654
p00003
C++
#include <iostream.h> #include <algorithm> int main() { int n; int hen[3]; cin >> n; for (int i = 0; i < n; i++){ for (int j = 0; j < 3; j++){ cin >> hen[j]; hen[j] *= hen[j]; } sort(hen, hen + 3); if ((hen[0] + hen[1]) == hen[2]){ cout << "YES"; } else { cout << "NO"; } cout << endl; } return (0); }
a.cc:1:10: fatal error: iostream.h: No such file or directory 1 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s116506086
p00003
C++
#include <cstdio> int main(){ int n,a,b,c; scanf("%d",&n); while(n>0){ scanf("%d %d %d",&a,&b,&c); m=a>b?(a>c?a:c):(b>c?b:c); if (a*a+b*b+c*c==2*m*m) printf("YES\n") else printf("NO\n"); --n; }; return 0; };
a.cc: In function 'int main()': a.cc:7:3: error: 'm' was not declared in this scope 7 | m=a>b?(a>c?a:c):(b>c?b:c); | ^ a.cc:8:42: error: expected ';' before 'else' 8 | if (a*a+b*b+c*c==2*m*m) printf("YES\n") | ^ | ; 9 | else printf("NO\n"); | ~~~~
s618393539
p00003
C++
#include <cstdio> int main(){ int n,a,b,c,m; scanf("%d",&n); while(n>0){ scanf("%d %d %d",&a,&b,&c); m=a>b?(a>c?a:c):(b>c?b:c); if (a*a+b*b+c*c==2*m*m) printf("YES\n") else printf("NO\n"); --n; }; return 0; };
a.cc: In function 'int main()': a.cc:8:42: error: expected ';' before 'else' 8 | if (a*a+b*b+c*c==2*m*m) printf("YES\n") | ^ | ; 9 | else printf("NO\n"); | ~~~~
s642542665
p00003
C++
#include <iostream> using namespace std; int main(){ int a,b,c,d; while(cin >> a >> b???>>c){ 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:6:25: warning: trigraph ??> ignored, use -trigraphs to enable [-Wtrigraphs] 6 | while(cin >> a >> b???>>c){ a.cc: In function 'int main()': a.cc:6:25: error: expected primary-expression before '?' token 6 | while(cin >> a >> b???>>c){ | ^ a.cc:6:26: error: expected primary-expression before '?' token 6 | while(cin >> a >> b???>>c){ | ^ a.cc:6:27: error: expected primary-expression before '>>' token 6 | while(cin >> a >> b???>>c){ | ^~ a.cc:6:30: error: expected ':' before ')' token 6 | while(cin >> a >> b???>>c){ | ^ | : a.cc:6:30: error: expected primary-expression before ')' token a.cc:6:30: error: expected ':' before ')' token 6 | while(cin >> a >> b???>>c){ | ^ | : a.cc:6:30: error: expected primary-expression before ')' token a.cc:6:30: error: expected ':' before ')' token 6 | while(cin >> a >> b???>>c){ | ^ | : a.cc:6:30: error: expected primary-expression before ')' token
s245654947
p00003
C++
#include <cstdio> #include <iostream> using namespace std; int main(void){ int n,array[3],i,temp; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d%d",&array[0],&array[1],&array[2]); sort(array,array+3); if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2]) printf("Yes\n"); else printf("No\n"); } return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(array,array+3); | ^~~~ | short
s931901289
p00003
C++
#include <iostream> using namespade std; void swap(int& a, int& b) { int tmp = a; a = b; b = tmp; } int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int a, b, c; cin >> a >> b >> c; if (a > b) swap(a, b); if (a > c) swap(a, c); if (b > c) swap(b, c); if(a * a + b * b == c * c) cout << "Yes" << endl; else cout << "No" << endl; } return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namespade' 2 | using namespade std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:14:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 14 | 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:23:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 23 | 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:23:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 23 | 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:25:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 25 | 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:25:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 25 | cout << "No" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s404516970
p00003
C++
#include <iostream> using namespace std; int main() { int a = 0; int kazu = 0; int b = 0; int c = 0; for (int i = 0; i < kazu; i++) { cin >> a; cin >> b; cin >> c; if (a * a + b * b == c * c) { cout << "YES" << endl; return; } else if (a * a + c * c == b * b) { cout << "YES" << endl; return; } else if (c * c + b * b == a * a) { cout << "YES" << endl; return; } else { cout << "NO" << endl; return; } } return 0; }
a.cc: In function 'int main()': a.cc:17:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 17 | return; | ^~~~~~ a.cc:22:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 22 | return; | ^~~~~~ a.cc:27:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 27 | return; | ^~~~~~ a.cc:32:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 32 | return; | ^~~~~~
s903111719
p00003
C++
#include <iostream> using namespace std; int main() { int a = 0; int kazu = 0; int b = 0; int c = 0; cin >> kazu; for (int i = 0; i < kazu; i++) { cin >> a; cin >> b; cin >> c; if (a * a + b * b == c * c) { cout << "YES" << endl; return; } else if (a * a + c * c == b * b) { cout << "YES" << endl; return; } else if (c * c + b * b == a * a) { cout << "YES" << endl; return; } else { cout << "NO" << endl; return; } } return 0; }
a.cc: In function 'int main()': a.cc:18:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 18 | return; | ^~~~~~ a.cc:23:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 23 | return; | ^~~~~~ a.cc:28:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 28 | return; | ^~~~~~ a.cc:33:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 33 | return; | ^~~~~~
s893075940
p00003
C++
#include<iostream> using namespace std; int main() { int a,b,c; while(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:9:13: error: lvalue required as left operand of assignment 9 | if(a*a=b*b+c*c) | ~^~ a.cc:11:18: error: lvalue required as left operand of assignment 11 | else if(b*b=a*a+c*c) | ~^~ a.cc:13:18: error: lvalue required as left operand of assignment 13 | else if(c*c=a*a+b*b) | ~^~
s841973907
p00003
C++
inputArray = Array.new rows = gets.to_i i = 0 rows.times do temp = gets inputArray[i], inputArray[i+1], inputArray[i+2] = temp.split(" ").map(&:to_i) i += 3 end i = 0 inputArray.map!{|n| n ** 2} rows.times do if inputArray[i] + inputArray[i+1] == inputArray[i+2] puts "YES" else puts "NO" end end
a.cc:2:1: error: 'inputArray' does not name a type 2 | inputArray = Array.new | ^~~~~~~~~~ a.cc:12:1: error: 'rows' does not name a type 12 | rows.times do | ^~~~
s215404160
p00003
C++
using System; using System.Collections.Generic; namespace TriangleRight { class MainClass { public static void Main(string[] args) { string str; List<string> status = new List<string> (); while (!string.IsNullOrEmpty(str = Console.ReadLine())) { string[] input = str.Split(' '); int a, b, c; if (input.Length > 2 && input.Length <= 3) { a = input [0].Equals ("") ? 0 : int.Parse (input [0]); b = input [1].Equals ("") ? 0 : int.Parse (input [1]); c = input [2].Equals ("") ? 0 : int.Parse (input [2]); } else { a = input [0].Equals ("") ? 0 : int.Parse (input [0]); b = 0; c = 0; } if (a + b > c) { if (a + c > b) { if (b + c > a) { status.Add ("YES"); } else { status.Add ("NO"); } } else { status.Add ("NO"); } } else { status.Add ("NO"); } }; for (int i = 0; i < status.Count; i++) { Console.WriteLine (status[i]); } Console.Read (); } } }
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:8:23: error: expected ':' before 'static' 8 | public static void Main(string[] args) | ^~~~~~~ | : a.cc:8:41: error: 'string' has not been declared 8 | public static void Main(string[] args) | ^~~~~~ a.cc:8:50: error: expected ',' or '...' before 'args' 8 | public static void Main(string[] args) | ^~~~ a.cc:47:10: error: expected ';' after class definition 47 | } | ^ | ; a.cc: In static member function 'static void TriangleRight::MainClass::Main(int*)': a.cc:10:25: error: 'string' was not declared in this scope 10 | string str; | ^~~~~~ a.cc:11:25: error: 'List' was not declared in this scope 11 | List<string> status = new List<string> (); | ^~~~ a.cc:11:38: error: 'status' was not declared in this scope; did you mean 'static'? 11 | List<string> status = new List<string> (); | ^~~~~~ | static a.cc:11:51: error: 'List' does not name a type 11 | List<string> status = new List<string> (); | ^~~~ a.cc:11:65: error: expected primary-expression before ')' token 11 | List<string> status = new List<string> (); | ^ a.cc:12:54: error: 'str' was not declared in this scope; did you mean 'std'? 12 | while (!string.IsNullOrEmpty(str = Console.ReadLine())) { | ^~~ | std a.cc:12:60: error: 'Console' was not declared in this scope 12 | while (!string.IsNullOrEmpty(str = Console.ReadLine())) { | ^~~~~~~ a.cc:13:40: error: expected primary-expression before ']' token 13 | string[] input = str.Split(' '); | ^ a.cc:15:37: error: 'input' was not declared in this scope; did you mean 'int'? 15 | if (input.Length > 2 && input.Length <= 3) { | ^~~~~ | int a.cc:16:73: error: expected primary-expression before 'int' 16 | a = input [0].Equals ("") ? 0 : int.Parse (input [0]); | ^~~ a.cc:17:73: error: expected primary-expression before 'int' 17 | b = input [1].Equals ("") ? 0 : int.Parse (input [1]); | ^~~ a.cc:18:73: error: expected primary-expression before 'int' 18 | c = input [2].Equals ("") ? 0 : int.Parse (input [2]); | ^~~ a.cc:20:73: error: expected primary-expression before 'int' 20 | a = input [0].Equals ("") ? 0 : int.Parse (input [0]); | ^~~ a.cc:41:33: error: 'Console' was not declared in this scope 41 | Console.WriteLine (status[i]); | ^~~~~~~ a.cc:45:25: error: 'Console' was not declared in this scope 45 | Console.Read (); | ^~~~~~~
s802481819
p00003
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int i, m; cin >> m; for(i=0; i<m; i++){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a+3); 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:18:16: error: lvalue required as left operand of assignment 18 | if(a[2]*a[2] = a[0]*a[0] + a[1]*a[1]){ | ~~~~^~~~~
s886341931
p00003
C++
#include <stdio.h> int main() { int a,b,c,sum,i,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d",&a,&b,&c); a=a*a; b=b*b; c=c*c; sum=a+b+c; if(a=1&&b=1&&c=1){ printf("NO\n"); }else if(sum/2==a||sum/2==b||sum/2==c)printf("YES\n"); else printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:12:16: error: lvalue required as left operand of assignment 12 | if(a=1&&b=1&&c=1){ | ~^~~
s110604735
p00003
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,i; cin>>i; for(int n=0;<i;n++){ cin>>a>>b>>c; if(a<b){d=a,a=b,b=a;} else if(a<c){d=a,a=c,c=d;} if(a*a==b*b+c*c){cout<<"Yes"<<endl;} else {cout<<"No"<<endl;} } return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: expected primary-expression before '<' token 7 | for(int n=0;<i;n++){ | ^
s855769826
p00003
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,i; cin>>i; for(int n=0;<i;n++;){ cin>>a>>b>>c; if(a<b){d=a,a=b,b=a;} else if(a<c){d=a,a=c,c=d;} if(a*a==b*b+c*c){cout<<"Yes"<<endl;} else {cout<<"No"<<endl;} } return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: expected primary-expression before '<' token 7 | for(int n=0;<i;n++;){ | ^ a.cc:7:27: error: expected ')' before ';' token 7 | for(int n=0;<i;n++;){ | ~ ^ | ) a.cc:7:28: error: expected primary-expression before ')' token 7 | for(int n=0;<i;n++;){ | ^
s277997927
p00003
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,i; cin>>i; for(int n=0;n<i;n++;){ cin>>a>>b>>c; if(a<b){d=a,a=b,b=a;} else if(a<c){d=a,a=c,c=d;} if(a*a==b*b+c*c){cout<<"Yes"<<endl;} else {cout<<"No"<<endl;} } return 0; }
a.cc: In function 'int main()': a.cc:7:28: error: expected ')' before ';' token 7 | for(int n=0;n<i;n++;){ | ~ ^ | ) a.cc:7:29: error: expected primary-expression before ')' token 7 | for(int n=0;n<i;n++;){ | ^
s481609472
p00003
C++
#include <iostream> using namespace std; int main(){ int num,tmp; cin >> num >> endl; int a[num][3]; for(int i=0; i<num; ++i) cin >> a[i][0] >> a[i][1] >> a[i][2] >> endl; for(int i=0; i<num; ++i){ for(int j=0; j<3; ++j){ for(int k=j+1; k<3; ++k){ if(a[i][j] < a[i][k]){ tmp = a[i][j]; a[i][j] = a[i][k]; a[i][k] = tmp; } } } if(a[i][0]*a[i][0] == a[i][1]*a[i][1] + a[i][2]*a[i][2]){ cout << "YES\n"; }else{ cout << "NO\n"; } } }
a.cc: In function 'int main()': a.cc:8:14: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 8 | cin >> num >> endl; | ~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); |
s090647610
p00003
C++
#include <iostream> using namespace std; class Triangle{ public: Triangle(){ } void push(int num1,int num2,int num3){ if(num1>=num2){ if(num1>=num3){c=num1;a=num2;b=num3;} else{c=num3;a=num1;b=num2;} } else{ if(num2>=num3){c=num2;a=num1;b=num3;} else{c=num3;a=num1;b=num2;} } }; void checkRight(){ int cs=c*c; if(cs==a*a+b*b) ans=1; else ans=0; }; void print(){ if(ans==0) cout << "NO" << endl; if(ans==1) cout << "YES" << endl; } protected: int a,b,c,ans; };
/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
s037211401
p00003
C++
#include <iostream> using namespace std; class Triangle{ public: Triangle(){ } void push(int num1,int num2,int num3){ if(num1>=num2){ if(num1>=num3){c=num1;a=num2;b=num3;} else{c=num3;a=num1;b=num2;} } else{ if(num2>=num3){c=num2;a=num1;b=num3;} else{c=num3;a=num1;b=num2;} } }; void checkRight(){ int cs=c*c; if(cs==a*a+b*b) ans=1; else ans=0; }; void print(){ if(ans==0) cout << "NO" << endl; if(ans==1) cout << "YES" << endl; } protected: int a,b,c,ans; };
/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
s233570743
p00003
C++
#include <iostream> using namespace std; class Triangle{ public: Triangle(){ } void push(int num1,int num2,int num3){ if(num1>=num2){ if(num1>=num3){c=num1;a=num2;b=num3;} else{c=num3;a=num1;b=num2;} } else{ if(num2>=num3){c=num2;a=num1;b=num3;} else{c=num3;a=num1;b=num2;} } }; void checkRight(){ int cs=c*c; if(cs==a*a+b*b) ans=1; else ans=0; }; void print(){ if(ans==0) cout <<"NO"<< endl; if(ans==1) cout <<"YES"<< endl; } protected: int a,b,c; int ans=10; } int main(){ int num,a,b,c; Triangle *tri /* = Triangle[1000]*/; cin >> num; tri = new Triangle[num]/*(a,b,c)*/; for(int n=0;n<num;n++){ cin >> a; cin >> b; cin >> c; tri[n].push(a,b,c); } for(int n=0;n<num;n++){ tri[n].checkRight(); tri[n].print(); } return 0; }
a.cc:33:2: error: expected ';' after class definition 33 | } | ^ | ;
s957255984
p00003
C++
#include<iostream> #include<vector> using namespace std; void judgement(int a,int b,int c) { if (a == b && b == c || a <= 0 || b <= 0 || c <= 0) { cout << "NO" << endl; return; } else if ((a*a) == (b*b) + (c*c) || (b*b) == (a*a) + (c*c) || (c*c) == (a*a) + (b*b)) { cout << "YES" << endl; return; } else { cout << "NO" << endl; return; } } unsigned int main() { unsigned int n;//dataset cin >> n; vector<int> vector_a; vector<int> vector_b; vector<int> vector_c; for (int i = 0; i < n; i++) { int a, b, c; cin >> a >> b >> c; vector_a.push_back(a); vector_b.push_back(b); vector_c.push_back(c); } for (int i = 0; i < n; i++) { judgement(vector_a[i], vector_b[i], vector_c[i]); } return 0; }
a.cc:20:10: error: '::main' must return 'int' 20 | unsigned int main() { | ^~~
s007291714
p00003
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> #include<algorithm> using namespace std; int main(void) { int a[3]; int i; int n; cin>>n; for(i=0;i<n;i++) { cin>>a[0]>>a[1]>>c[2]; sort(a,a+3) 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:20:24: error: 'c' was not declared in this scope 20 | cin>>a[0]>>a[1]>>c[2]; | ^ a.cc:22:18: error: expected ';' before 'if' 22 | sort(a,a+3) | ^ | ; 23 | 24 | if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]) | ~~ a.cc:27:9: error: 'else' without a previous 'if' 27 | else | ^~~~
s166361839
p00003
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> #include<algorithm> using namespace std; int main(void) { int a[3]; int i; int n; cin>>n; for(i=0;i<n;i++) { cin>>a[0]>>a[1]>>c[2]; sort(a,a+3); 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:20:24: error: 'c' was not declared in this scope 20 | cin>>a[0]>>a[1]>>c[2]; | ^
s501338003
p00003
C++
include <iostream> #include <math.h> using namespace std; bool judge_triangle(double a,double b,double c){ double d=sqrt(pow(a)+pow(b)); if(d==c) return true; else return false; } int main(void){ int i,count; cin>>count; for(i=0;i<count<i++){ cin>>a>>b>>c; if(judge_triangle(a,b,c)) cout<<"YES"<<endl; else cout<<"NO"<<endl; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/cmath:45, from /usr/include/c++/14/math.h:36, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/stdlib.h:32, from /usr/include/c++/14/bits/std_abs.h:38, from /usr/include/c++/14/cmath:49: /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/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /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/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /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/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /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/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:65: /usr/include/c++/14/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type 125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' +++ |+#include <cstddef> 1 | // Types used in iterator implementation -*- C++ -*- /usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: error: 'ptrdiff_t' does not name a type 214 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: error: 'ptrdiff_t' does not name a type 225 | typedef ptrdiff_t difference_type; | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' In file included from /usr/include/c++/14/bits/stl_algobase.h:66: /usr/include/c++/14/bits/stl_iterator_base_funcs.h:112:5: error: 'ptrdiff_t' does not name a type 112 | ptrdiff_t | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:66:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 65 | #include <debug/assertions.h> +++ |+#include <cstddef> 66 | #include <bits/stl_iterator_base_types.h> /usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: error: 'ptrdiff_t' does not name a type 118 | ptrdiff_t | ^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' In file included from /usr/include/c++/14/bits/stl_iterator.h:67, from /usr/include/c
s805807740
p00003
C++
using System; using System.Linq; public class Program { public static void Main() { int n = int.Parse(Console.ReadLine()); for(int i = 0; i < n; i++) { string[] s = Console.ReadLine().Split(); int[] a = new int[3]; for(int j = 0; j < 3; j++) a[j] = int.Parse(s[j]); Array.Sort(a); Console.WriteLine(((a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) ? "YES" : "NO")); } } }
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.Linq; | ^~~~~~ a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Program { | ^~~~~~
s766744327
p00003
C++
#include <iostream> using namespace std; int main() { int a,b,c,n,index; index = 0; //???????????? cin >> n; //???????????°?????? while(1) //??????????????? { cin >> a >> b >> c; //????????????????????? ???????????????if( a*a + b*b == c*c) //?????????????????? ??? cout >> "Yes" >> endl; else cout >> "No" >> endl; if(index == n) break; //???????????±??? index++; } return 0; }
a.cc: In function 'int main()': a.cc:16:1: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:2: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:3: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:4: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:5: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:6: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:7: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:8: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:9: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:10: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:11: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:12: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:13: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:14: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:15: error: expected primary-expression before '?' token 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^ a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:16:16: error: expected ':' before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ | : a.cc:16:16: error: expected primary-expression before 'if' 16 | ???????????????if( a*a + b*b == c*c) //?????????????????? | ^~ a.cc:18:11: error: 'else' without a previous 'if' 18 | else | ^~~~ a.cc:19:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 19 | cout >> "No" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:19:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout >> "No" >> endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:19:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 19 | cout >> "No" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:19:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template
s153643077
p00003
C++
#include <iostream> using namespace std; int main() { int a,b,c,n,index; index = 0; cin >> n; while(1) { cin >> a >> b >> c; if( a*a + b*b == c*c) cout >> "Yes" >> endl; else cout >> "No" >> endl; if(index == n) break; index++; } return 0; }
a.cc: In function 'int main()': a.cc:15:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 15 | cout >> "Yes" >> endl; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:15:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 15 | cout >> "Yes" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:15:28: required from here 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:17:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 17 | cout >> "No" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:17:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argume
s685142000
p00003
C++
#include <iostream> using namespace std; int main() { int a,b,c,n,index; index = 0; cin >> n; while(1) { cin >> a >> b >> c; if( (a*a + b*b) == c*c) cout >> "Yes" >> endl; else cout >> "No" >> endl; if(index == n) break; index++; } return 0; }
a.cc: In function 'int main()': a.cc:15:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 15 | cout >> "Yes" >> endl; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:15:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 15 | cout >> "Yes" >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:15:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:15:28: required from here 15 | cout >> "Yes" >> endl; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:17:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 17 | cout >> "No" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:17:20: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:17:28: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 17 | cout >> "No" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argume
s914637261
p00003
C++
#include<iostream> bool right_triangle(int a,int b,int c) { if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) { return true; }else{ return false; } } int main() { int x,y,z,N; std::cin >> N; for (int i = 0; i < N; i++) { std::cin >> x >> y >> z; if (right_triangle(x,y,z)) { std::cout << "Yes" << std::endl; }else if (right_triangle(x,y,z) == 0 ) { std::cout << "No" << std::endl; } } return 0; } 1,1 ??????
a.cc:26:61: error: expected unqualified-id before numeric constant 26 | 1,1 ?????? | ^
s945163108
p00003
C++
#include<iostream> bool right_triangle(int a,int b,int c) { if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) { return true; }else{ return false; } } int main() { int x,y,z,N; std::cin >> N; for (int i = 0; i < N; i++) { std::cin >> x >> y >> z; if (right_triangle(x,y,z)) { std::cout << "Yes" << std::endl; }else if (right_triangle(x,y,z) == 0 ) { std::cout << "No" << std::endl; } } 1,1 ??????
a.cc: In function 'int main()': a.cc:24:75: error: expected primary-expression before '?' token 24 | 1,1 ?????? | ^ a.cc:24:76: error: expected primary-expression before '?' token 24 | 1,1 ?????? | ^ a.cc:24:77: error: expected primary-expression before '?' token 24 | 1,1 ?????? | ^ a.cc:24:78: error: expected primary-expression before '?' token 24 | 1,1 ?????? | ^ a.cc:24:79: error: expected primary-expression before '?' token 24 | 1,1 ?????? | ^ a.cc:24:80: error: expected primary-expression at end of input 24 | 1,1 ?????? | ^ a.cc:24:80: error: expected ':' at end of input 24 | 1,1 ?????? | ^ | : a.cc:24:80: error: expected primary-expression at end of input a.cc:24:80: error: expected ':' at end of input 24 | 1,1 ?????? | ^ | : a.cc:24:80: error: expected primary-expression at end of input a.cc:24:80: error: expected ':' at end of input 24 | 1,1 ?????? | ^ | : a.cc:24:80: error: expected primary-expression at end of input a.cc:24:80: error: expected ':' at end of input 24 | 1,1 ?????? | ^ | : a.cc:24:80: error: expected primary-expression at end of input a.cc:24:80: error: expected ':' at end of input 24 | 1,1 ?????? | ^ | : a.cc:24:80: error: expected primary-expression at end of input a.cc:24:80: error: expected ':' at end of input 24 | 1,1 ?????? | ^ | : a.cc:24:80: error: expected primary-expression at end of input a.cc:24:80: error: expected '}' at end of input a.cc:13:1: note: to match this '{' 13 | { | ^
s109028388
p00003
C++
#include<iostream> bool right_triangle(int a,int b,int c) { if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) { return true; }else{ return false; } } int main() { int x,y,z,N; std::cin >> N; for (int i = 0; i < N; i++) { std::cin >> x >> y >> z; if (right_triangle(x,y,z)) { std::cout << "Yes" << std::endl; }else if (right_triangle(x,y,z) == 0 ) { std::cout << "No" << std::endl; } } return 0; } 1,1 ??????
a.cc:25:59: error: expected unqualified-id before numeric constant 25 | } 1,1 ?????? | ^
s802539633
p00003
C++
#include<iostream> #include<string> //0001 #include<cstddef> #include<queue> #include<vector> using namespace std; int main() { //0000 /* int i, j; for (i = 1; i < 10; i++) { for (j = 1; j < 10; j++) { cout << i << "x" << j << "=" << i*j << endl; } } */ //0001 /* int i; const size_t MNum = 10; int MHeight[MNum]; int MH1 = 0, MH2 = 0, MH3 = 0; for (i = 0; i < 10; i++) { cin >> MHeight[i]; if (MHeight[i] > MH1) { MH3 = MH2; MH2 = MH1; MH1 = MHeight[i]; } else if (MHeight[i] > MH2) { MH3 = MH2; MH2 = MHeight[i]; } else if (MHeight[i] > MH3) { MH3 = MHeight[i]; } } cout << MH1 << endl << MH2 << endl << MH3 << endl; */ /* priority_queue<int, vector<int>, less<int> > que; int MH; for (int i = 0; i < 10; i++) { cin >> MH; que.push(MH); } for (int j = 0; j < 3; j++) { cout << que.top() << endl; que.pop(); } */ //0002 /* int a, b; while (cin >> a >> b) { int sum = a + b; int count = 0; while (sum > 0) { sum = sum / 10; count++; } cout << count << endl; } */ //0003 int a[3]; int N; cin >> N; for (int i = 0; i < N; i++) { 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:76:17: error: 'sort' was not declared in this scope; did you mean 'short'? 76 | sort(a, a + 3); | ^~~~ | short