submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s707192989
p00003
C++
main(a,b,c){ for( scanf("%*d");~scanf("%d%d%d",&a,&b,&c); puts(((a+b-c)&&(a+c-b)&&(b+c-a))?"NO":"YES") ) a*=a,b*=b,c*=c; exit(0); }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){ | ^
s705028472
p00003
C++
main(a,b,c){ for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts(((a+b-c)&&(a+c-b)&&(b+c-a))?"NO":"YES")){a*=a,b*=b,c*=c;} exit(0); }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){ | ^
s090575062
p00003
C++
main(a,b,c){ for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts(((a+b-c)&&(b+c-a)&&(a+c-b))?"NO":"YES"))a*=a,b*=b,c*=c; exit(0); }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){ | ^
s319195075
p00003
C++
#include<stdio.h> #include<algorithm> int main(){ int n,a,b,c; int m=0; scanf("%d",&n); for(int i=0;i<n;i++){ int a[3]; for(int j=0;j<3;j++)scanf("%d",&a[j]); std::sort(a,a+3); m=max(a,b); m=max(m,c); if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES"); else{ if(m<100)puts("NO"); else puts("YES"); } } }
a.cc: In function 'int main()': a.cc:13:19: error: 'max' was not declared in this scope; did you mean 'std::max'? 13 | m=max(a,b); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~
s861793004
p00003
C++
main(a,b,c){for(;~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES")a*=a,b*=b,c*=c;}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){for(;~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES")a*=a,b*=b,c*=c;} | ^
s555760953
p00003
C++
main(a,b,c){for(;~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES"))a*=a,b*=b,c*=c;}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){for(;~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^
s789981774
p00003
C++
main(a,b,c){for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES"))a*=a,b*=b,c*=c;}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^
s907532612
p00003
C++
main(a,b,c){for(gets());scnaf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":YES"))a*=a,b*=b,c*=c;}
a.cc:1:85: warning: missing terminating " character 1 | main(a,b,c){for(gets());scnaf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":YES"))a*=a,b*=b,c*=c;} | ^ a.cc:1:85: error: missing terminating " character 1 | main(a,b,c){for(gets());scnaf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":YES"))a*=a,b*=b,c*=c;} | ^~~~~~~~~~~~~~~~~~~ a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){for(gets());scnaf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":YES"))a*=a,b*=b,c*=c;} | ^
s034414805
p00003
C++
main(a,b,c){for(scanf("%*d");scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":"YES"))a*=a,b*=b,c*=c;}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b,c){for(scanf("%*d");scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^
s380841592
p00003
C++
i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;}
a.cc:1:1: error: 'i' does not name a type 1 | i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token 1 | i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^
s435369995
p00003
C++
i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;}
a.cc:1:1: error: 'i' does not name a type 1 | i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token 1 | i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;} | ^
s146155943
p00003
C++
i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);}
a.cc:1:1: error: 'i' does not name a type 1 | i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);} | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token 1 | i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);} | ^
s610965263
p00003
C++
i;main(a,b,c){for(scanf("%*d"),i=10;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);}
a.cc:1:1: error: 'i' does not name a type 1 | i;main(a,b,c){for(scanf("%*d"),i=10;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);} | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token 1 | i;main(a,b,c){for(scanf("%*d"),i=10;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);} | ^
s072583619
p00003
C++
i;main(a,b,c){for(scanf("%*d"),i=400;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);}
a.cc:1:1: error: 'i' does not name a type 1 | i;main(a,b,c){for(scanf("%*d"),i=400;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);} | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token 1 | i;main(a,b,c){for(scanf("%*d"),i=400;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);} | ^
s549559569
p00003
C++
#include <ioatream> #include <algorithm> using namespace std; int main(){ int a[3]; while(cin >> a[0] >> a[1] >> a[2]){ sort(a, a+3); if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]) cout << "Yes" << endl; else cout << "No" << endl; } }
a.cc:1:10: fatal error: ioatream: No such file or directory 1 | #include <ioatream> | ^~~~~~~~~~ compilation terminated.
s514560535
p00003
C++
#include<iostream> using namespace std; int main(){ int n=0; cin>>n; int a,b,c; int x,y,z; for(int i=1;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)cout<<"YES"<<endl; else cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:10:45: error: lvalue required as left operand of assignment 10 | if(a*a==b*b+c*c||b*b=a*a+c*c||c*c=a*a+b*b)cout<<"YES"<<endl; | ~~~~~~~^~~~~
s333856199
p00003
C++
#include "StdAfx.h" #include "AOJ0003.h" #include <string> #include <sstream> #include <iostream> #include <stack> #include <queue> #include <vector> using namespace std; vector<string> exinputstring(){ vector<string> ss; string s; while(getline(cin,s) ){ ss.push_back(s); } return ss; } vector<int> exinputint(){ vector<int> ss; int d; while( !cin.eof() ) { cin >>d; ss.push_back(d); } return ss; } main(){ vector<int> inp=exinputint(); vector<int>::iterator it = inp.begin(); for (it++;it != inp.end();){ int a=*it;it++; int b=*it;it++; int c=*it;it++; if ((a>=b&&b>=c&&a*a==b*b+c*c)|| (b>=a&&b>=c&&b*b==a*a+c*c)|| (c>=a&&c>=b&&c*c==a*a+b*b)){ cout<<"YES";}else{cout<<"NO";} } }
a.cc:1:10: fatal error: StdAfx.h: No such file or directory 1 | #include "StdAfx.h" | ^~~~~~~~~~ compilation terminated.
s095497006
p00003
C++
#include <iostream> using namespace std; int main(){ 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]) puts("YES"); else puts("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a, a + 3); | ^~~~ | short
s477553551
p00003
C++
#include <iostream> using namespace std; int main(){ 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]) puts("YES"); else puts("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a, a + 3); | ^~~~ | short
s829101701
p00003
C++
#include <iostream> using namespace std; int main(){ 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]) puts("YES"); else puts("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a, a + 3); | ^~~~ | short
s915943592
p00003
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int T; scanf("%d",&T); for(int t=0;t<T;t++){ int edge[3]; printf("%d %d %d",edge,edge+1,edge+2); sort(edge,edge+3,greater<int>()); if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){ printf("%s\n","YES"); }else{ printf("%s\n","NO"); } } return 0; }
a.cc: In function 'int main()': a.cc:13:1: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(edge,edge+3,greater<int>()); | ^~~~ | short
s040931670
p00003
C++
#include "cstdio" int main() { int n,a,b,c; scanf("%d",&n); for(;n<0;n--){ scanf("%d%d%d",&a,&b,&c); if(a > b && a > c){ if( a^2 == b^2 + c^2){ printf("YES"); }else { printf("NO"); }} if(b > a && b > c){ if( b^2 == a^2 + c^2){ printf("YES"); }else { printf("NO"); }} if(c > a && c > b){ if( c^2 == a^2 + b^2){ printf("YES"); }else { printf("NO"); }}}} return 0; }
a.cc:34:9: error: expected unqualified-id before 'return' 34 | return 0; | ^~~~~~ a.cc:35:1: error: expected declaration before '}' token 35 | } | ^
s055843758
p00003
C++
#include <cstdio> imt main() { int a,b,c,n; scanf("%d",&n); for(int i = 0;i < n; i++){ scanf("%d%d%d",&a,&b,&c); if(a^2 + b^2 == c^2 || c^2 + a^2 == b^2 || b^2 + c^ == a^2){ printf("YES"); }else { printf("NO"); } return 0; }
a.cc:3:1: error: 'imt' does not name a type; did you mean 'int'? 3 | imt main() { | ^~~ | int
s333549954
p00003
C++
#include <cstdio> int main() { int a,b,c,n; scanf("%d",&n); for(int i = 0;i < n; i++){ scanf("%d%d%d",&a,&b,&c); if(a^2 + b^2 == c^2 || c^2 + a^2 == b^2 || b^2 + c^ == a^2){ printf("YES"); }else { printf("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:9:69: error: expected primary-expression before '==' token 9 | if(a^2 + b^2 == c^2 || c^2 + a^2 == b^2 || b^2 + c^ == a^2){ | ^~ a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s145063046
p00003
C++
#include <iostream> using namespace std; int main() { int sankaku[3]; while (1) { cin >> sankaku[0] >> sankaku[1] >> sankaku[2]; sort (sankaku, sankaku + 3); if (sankaku[2] == (sankaku[0] * sankaku[0]) + (sankaku[1] * sankaku[1])) { cout << "YES" << endl; }else { cout << "NO" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort (sankaku, sankaku + 3); | ^~~~ | short
s010402454
p00003
C++
#include <iostream> using namespace std; int main() { int N = 3; int hen[3]; cout << N; cin >> hen[0] >> hen[1] >> hen[2]; sort(hen, hen + 3); if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { cout << "YES"; else cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(hen, hen + 3); | ^~~~ | short a.cc:21:8: error: expected '}' before 'else' 21 | else cout << "NO"; | ^~~~ a.cc:19:63: note: to match this '{' 19 | if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { | ^ a.cc: At global scope: a.cc:25:5: error: expected unqualified-id before 'return' 25 | return 0; | ^~~~~~ a.cc:26:1: error: expected declaration before '}' token 26 | } | ^
s073996832
p00003
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; //cout << N; int hen[3]; while (N --> 0) { cin >> hen[0] >> hen[1] >> hen[2]; sort(hen, hen + 3); if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { cout << "YES"; } else { cout << "NO"; } } return 0; } if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { cout << "YES"; else cout << "NO"; } return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(hen, hen + 3); | ^~~~ | short a.cc: At global scope: a.cc:26:5: error: expected unqualified-id before 'if' 26 | if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { | ^~ a.cc:32:5: error: expected unqualified-id before 'return' 32 | return 0; | ^~~~~~ a.cc:33:1: error: expected declaration before '}' token 33 | } | ^
s745293645
p00003
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; int hen[3]; while (N --> 0) { cin >> hen[0] >> hen[1] >> hen[2]; sort(hen, hen + 3); if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { cout << "YES"; } else { cout << "NO"; } } return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(hen, hen + 3); | ^~~~ | short
s011039558
p00003
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; int hen[3]; while (N --> 0) { cin >> hen[0] >> hen[1] >> hen[2]; sort(hen, hen + 3); if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) { cout << "YES"; } else { cout << "NO"; } } return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(hen, hen + 3); | ^~~~ | short
s885066664
p00003
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include <queue> using namespace std; typedef long long ll; typedef vector<int> vint; typedef pair<int, int> pint; #define MOD 1000000007 //10^9+7 #define INF 1000000000 //10^9 char m[500][500]; int main () { int H,W; cin>>H>>W; for (int i=0; i<H; i++) { for (int j=0; j<W; j++) { cin>>m[i][j]; } } queue<pint < pint > >; return 0; }
a.cc: In function 'int main()': a.cc:39:11: error: 'pint' {aka 'std::pair<int, int>'} is not a template 39 | queue<pint < pint > >; | ^~~~ a.cc:39:5: error: declaration does not declare anything [-fpermissive] 39 | queue<pint < pint > >; | ^~~~~~~~~~~~~~~~~~~~~
s713847622
p00003
C++
print "\n".join(s for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))]))
a.cc:1:61: warning: multi-character character constant [-Wmultichar] 1 | print "\n".join(s for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])) | ^~~~~ a.cc:1:70: warning: multi-character character constant [-Wmultichar] 1 | print "\n".join(s for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])) | ^~~~ a.cc:1:1: error: 'print' does not name a type; did you mean 'int'? 1 | print "\n".join(s for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])) | ^~~~~ | int
s237160861
p00003
C++
a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])]
a.cc:1:55: warning: multi-character character constant [-Wmultichar] 1 | a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])] | ^~~~~ a.cc:1:64: warning: multi-character character constant [-Wmultichar] 1 | a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])] | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])] | ^
s129479817
p00003
C++
#include <iostream> #include <vector> using namespace std; int main(int argc, char** argv) { int num; cin >> num; for (int i = 0; i < num; i++) { vector<int> v = vector<int>(3); cin >> v[0] >> v[1] >> v[2]; sort(v.begin(), v.end()); if (v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) { cout << "YES\n"; } else { cout << "NO\n"; } } return 0; }
a.cc: In function 'int main(int, char**)': a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(v.begin(), v.end()); | ^~~~ | short
s091443206
p00003
C++
3 4 3 5 4 3 6 8 8 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s882669484
p00003
C++
int main() { int a,b,c; int x=0; int n; cin >> n; for(int i=0 ;i<n ;i++){ cin >> a >> b >> c; if(a<b && c<b){ x=a; a=b; b=x; } else if(a<c && b<c){ x=a; a=c; c=x; } if((b*b)+(c*c) == (a*a)) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin >> n; | ^~~ a.cc:21:25: error: 'cout' was not declared in this scope 21 | cout << "YES" << endl; | ^~~~ a.cc:21:42: error: 'endl' was not declared in this scope 21 | cout << "YES" << endl; | ^~~~ a.cc:23:25: error: 'cout' was not declared in this scope 23 | cout << "NO" << endl; | ^~~~ a.cc:23:41: error: 'endl' was not declared in this scope 23 | cout << "NO" << endl; | ^~~~
s606818834
p00003
C++
#include <iostream> using namespace std; int main() { int a,b,c,n; while (cin>>n) for(int i=0;i<=n;i++) { while(cin>>a,b,c) { int asq=a*a,bsq=b*b,csq=c*c; if(asq+bsq==csq||bsq+csq==asq||
a.cc: In function 'int main()': a.cc:13:32: error: expected primary-expression at end of input 13 | if(asq+bsq==csq||bsq+csq==asq|| | ^ a.cc:13:32: error: expected ')' at end of input 13 | if(asq+bsq==csq||bsq+csq==asq|| | ~ ^ | ) a.cc:13:32: error: expected statement at end of input a.cc:13:32: error: expected '}' at end of input a.cc:11:1: note: to match this '{' 11 | { | ^ a.cc:13:32: error: expected '}' at end of input 13 | if(asq+bsq==csq||bsq+csq==asq|| | ^ a.cc:9:3: note: to match this '{' 9 | { | ^ a.cc:13:32: error: expected '}' at end of input 13 | if(asq+bsq==csq||bsq+csq==asq|| | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s490886842
p00003
C++
import sys N = int(sys.stdin.readline()) def check(num_list): largest = max(num_list) largest_idx = num_list.index(largest) tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx]) if tmp == pow(largest, 2): return "YES" else: return "NO" for i in xrange(N): line = sys.stdin.readline() num_list = map(int, line.strip().split()) print "{0}".format(check(num_list))
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'
s154776780
p00003
C++
#include<iostream> #include<algorithm> using namespace std; int main(void){ int x[3]; cin >> x[1]; string n = "NO", y = "YES"; while(cin >> x[0] >> x[1] >> x[2]){ sort(x,x + 3); if(x[2] * x[2] == x[1] * x[1] + x[0] * x[0]) cout << y << endl; else cout << n << endl; i++; } return 0; }
a.cc: In function 'int main()': a.cc:15:17: error: 'i' was not declared in this scope 15 | i++; | ^
s265198031
p00003
C++
3 4 3 5 4 3 6 8 8 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s271807575
p00003
C++
#include<stdio.h> #include<algorithm.h> #include<math.h> int main(){ int a[3]; int n; scanf("%d",&n); while(n>0){ scanf("%d %d %d",&a[0],&a[1],&a[2]); sort(a,a+3); if(a[0]*a[0] +a[1]*a[1]==a[2]*a[2]){ printf("YES\n"); }else{ printf("NO\n"); } n--; } }
a.cc:2:9: fatal error: algorithm.h: No such file or directory 2 | #include<algorithm.h> | ^~~~~~~~~~~~~ compilation terminated.
s817875174
p00003
C++
#include <iostream> int main(){ int n; int sd[3]; int max,m=-1; bool isRect=false; bool isTri=true; cin>>n; for(int i=0;i<n;++i){ cin>>sd[0]>>sd[1]>>sd[2]; //長辺の判定 max=0; for(int i=0;i<3;++i){ if(sd[i]==0){isTri=false;} if(sd[i]>max){m=i;max=sd[i]} } //直角三角形の判定 if(isTri){ switch(m){ case 0: if(sd[0]*sd[0] == (sd[1]*sd[1] + sd[2]*sd[2])){isRect=true;}else{isRect=false;} break; case 1: if(sd[1]*sd[1] == (sd[0]*sd[0] + sd[2]*sd[2])){isRect=true;}else{isRect=false;} break; case 2: if(sd[2]*sd[2] == (sd[1]*sd[1] + sd[0]*sd[0])){isRect=true;}else{isRect=false;} break; } } if(isRect){cout<<"YES\n";}else{cout<<"NO\n";} } }
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | 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:18:52: error: expected ';' before '}' token 18 | if(sd[i]>max){m=i;max=sd[i]} | ^ | ; a.cc:36:28: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 36 | if(isRect){cout<<"YES\n";}else{cout<<"NO\n";} | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:36:48: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 36 | if(isRect){cout<<"YES\n";}else{cout<<"NO\n";} | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s207661557
p00003
C++
#include <iostream> using namespace std; int main(){ int n; int sd[3]; int max,m=-1; bool isRect=false; bool isTri=true; cin>>n; for(int i=0;i<n;++i){ cin>>sd[0]>>sd[1]>>sd[2]; //長辺の判定 max=0; for(int i=0;i<3;++i){ if(sd[i]==0){isTri=false;} if(sd[i]>max){m=i;max=sd[i]} } //直角三角形の判定 if(isTri){ switch(m){ case 0: if(sd[0]*sd[0] == (sd[1]*sd[1] + sd[2]*sd[2])){isRect=true;}else{isRect=false;} break; case 1: if(sd[1]*sd[1] == (sd[0]*sd[0] + sd[2]*sd[2])){isRect=true;}else{isRect=false;} break; case 2: if(sd[2]*sd[2] == (sd[1]*sd[1] + sd[0]*sd[0])){isRect=true;}else{isRect=false;} break; } } if(isRect){cout<<"YES\n";}else{cout<<"NO\n";} } }
a.cc: In function 'int main()': a.cc:19:52: error: expected ';' before '}' token 19 | if(sd[i]>max){m=i;max=sd[i]} | ^ | ;
s564162604
p00003
C++
#include<stdio.h> #include<math.h> int main(void) { int k[1000][3],ct; int mem; scanf("%d",&ct); for(int f1=0;f1<ct;f1++){ scanf("%d %d %d",&k[f1][0],&k[f1][1],&k[f1][2]); } for(int f=0;f<ct;f++){ for(int f1=0;f1<3;f1++){ for(int f2=0;f2<3;f2++){ if(k[f][f1]>k[f][f2]){ mem=k[f][f1]; k[f][f1]=k[f][f2]; k[f][f2]=mem; } } } } for(int f1=0;f1<ct;f1++){ if(pow((double)k[f1][0],2)==pow((double)k[f1][1],2)+pow((double)k[f1][2],2)){ printf("YES\n"); } else{ printf("NO\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:5:15: error: unable to find numeric literal operator 'operator""\U0000ff100' 5 | int k[1000][3],ct; | ^~~~~ a.cc:9:35: error: 'k' was not declared in this scope 9 | scanf("%d %d %d",&k[f1][0],&k[f1][1],&k[f1][2]); | ^ a.cc:14:36: error: 'k' was not declared in this scope 14 | if(k[f][f1]>k[f][f2]){ | ^ a.cc:23:32: error: 'k' was not declared in this scope 23 | if(pow((double)k[f1][0],2)==pow((double)k[f1][1],2)+pow((double)k[f1][2],2)){ | ^
s029084077
p00003
C++
(function(undefined){ 'use strict'; (function init() { this.output = function() { console.log.apply( console, arguments ); }; this.stdin = process.openStdin(); stdin.setEncoding('utf8'); this.input_list = []; stdin.on('data', function(chunk){ var result = chunk.match(/\d+/g); input_list = input_list.concat(result); }); this.input_number = function() { return parseInt( input_list.splice(0,1)[0] ); }; }).call( this ); (function solver(){ function sq(x) { return x * x; } function check(v) { return sq(v.a)+sq(v.b)===sq(v.c) || sq(v.b)+sq(v.c)===sq(v.a) || sq(v.c)+sq(v.a)===sq(v.b); } setTimeout( function solve() { var n = input_number(); var vertexes = []; while ( n -- ) vertexes.push({ a: input_number(), b: input_number(), c: input_number() }); vertexes.forEach(function(vertex){ output( check(vertex) ? 'YES' : 'NO' ); }); }, 0 ); })(); }).call(global);
a.cc:2:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 2 | 'use strict'; | ^~~~~~~~~~~~ a.cc:8:35: warning: multi-character character constant [-Wmultichar] 8 | stdin.setEncoding('utf8'); | ^~~~~~ a.cc:10:26: warning: multi-character character constant [-Wmultichar] 10 | stdin.on('data', function(chunk){ | ^~~~~~ a.cc:11:51: error: stray '\' in program 11 | var result = chunk.match(/\d+/g); | ^ a.cc:37:57: warning: multi-character character constant [-Wmultichar] 37 | output( check(vertex) ? 'YES' : 'NO' ); | ^~~~~ a.cc:37:65: warning: multi-character character constant [-Wmultichar] 37 | output( check(vertex) ? 'YES' : 'NO' ); | ^~~~ a.cc:1:10: error: expected ')' before '(' token 1 | (function(undefined){ | ~ ^ | ) a.cc:41:2: error: expected unqualified-id before ')' token 41 | }).call(global); | ^
s187027907
p00003
C++
#include <stdio.h> int main() { int n,a,b,c,sum=0,i; while(scanf("%d",&n)==1) for(i=0;i<n;i++) { scanf("%d%d%d",&a,&b,&c); sum=sqrt((a*a)+(b*b)); if(c==sum) { printf("YES\n"); } else printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:11:13: error: 'sqrt' was not declared in this scope 11 | sum=sqrt((a*a)+(b*b)); | ^~~~
s913310875
p00003
C++
using System; class Program { static bool checking(int[] a) { return (a[0] + a[1] == a[2] || a[1] + a[2] == a[0] || a[2] + a[0] == a[1]); } static int Main() { int[] a = new int[3]; int inp,n; string[] str; string result; n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { str = (Console.ReadLine()).Split(' '); for (int j = 0; j < 3; j++) { inp = int.Parse(str[j]); a[j] = inp * inp; } if (checking(a)) result = "YES"; else result = "NO"; Console.WriteLine("{0}", result); } return 0; } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:5:32: error: expected ',' or '...' before 'a' 5 | static bool checking(int[] a) | ^ a.cc:43:2: error: expected ';' after class definition 43 | } | ^ | ; a.cc: In static member function 'static bool Program::checking(int*)': a.cc:7:17: error: 'a' was not declared in this scope 7 | return (a[0] + a[1] == a[2] || a[1] + a[2] == a[0] || a[2] + a[0] == a[1]); | ^ a.cc: In static member function 'static int Program::Main()': a.cc:12:12: error: structured binding declaration cannot have type 'int' 12 | int[] a = new int[3]; | ^~ a.cc:12:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:12:12: error: empty structured binding declaration a.cc:12:15: error: expected initializer before 'a' 12 | int[] a = new int[3]; | ^ a.cc:14:9: error: 'string' was not declared in this scope 14 | string[] str; | ^~~~~~ a.cc:14:16: error: expected primary-expression before ']' token 14 | string[] str; | ^ a.cc:15:16: error: expected ';' before 'result' 15 | string result; | ^~~~~~ a.cc:17:13: error: expected primary-expression before 'int' 17 | n = int.Parse(Console.ReadLine()); | ^~~ a.cc:20:13: error: 'str' was not declared in this scope; did you mean 'std'? 20 | str = (Console.ReadLine()).Split(' '); | ^~~ | std a.cc:20:20: error: 'Console' was not declared in this scope 20 | str = (Console.ReadLine()).Split(' '); | ^~~~~~~ a.cc:24:23: error: expected primary-expression before 'int' 24 | inp = int.Parse(str[j]); | ^~~ a.cc:25:17: error: 'a' was not declared in this scope 25 | a[j] = inp * inp; | ^ a.cc:28:26: error: 'a' was not declared in this scope 28 | if (checking(a)) | ^ a.cc:29:17: error: 'result' was not declared in this scope 29 | result = "YES"; | ^~~~~~ a.cc:31:17: error: 'result' was not declared in this scope 31 | result = "NO"; | ^~~~~~ a.cc:33:38: error: 'result' was not declared in this scope 33 | Console.WriteLine("{0}", result); | ^~~~~~
s665241324
p00003
C++
#include <cstdio> int main(){ int n; int a[3]; scanf("%d",&n); for (int i=0;i<n;++i){ for (int j=0;j<3;++j) scanf("%d",a+j); bool z=false; for (int k=0;k<3;++k) if (a[k]*a[k]+a[(k+1)%3]*a[(k+1)%3]==a[(k+2)%3]*a[(k+2)%3]) z=true; if (z) print("YES\n"); else print("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:14:24: error: 'print' was not declared in this scope; did you mean 'printf'? 14 | if (z) print("YES\n"); | ^~~~~ | printf a.cc:15:22: error: 'print' was not declared in this scope; did you mean 'printf'? 15 | else print("NO\n"); | ^~~~~ | printf
s461151415
p00003
C++
#include <iostream> using namespace std; int right_triangle(int a,int b,int c) { if ( a == sqrt(pow(b,2)+pow(c,2)) || b == sqrt(pow(c,2)+pow(a,2)) || c == sqrt(pow(a,2)+pow(b,2))) return 1; else return 0; } int main() { int a[3],n; cin >> n; for(int j=0;j<=n-1;j++){ for(int i=0;i<=2;i++) cin >> a[i]; switch (right_triangle(a[0],a[1],a[2])) { case 0: cout << "NO" << endl; break; case 1: cout << "YES" << endl; break; default: cout << "error" << endl; break; } } return 0; }
a.cc: In function 'int right_triangle(int, int, int)': a.cc:6:26: error: 'pow' was not declared in this scope 6 | if ( a == sqrt(pow(b,2)+pow(c,2)) | ^~~ a.cc:6:21: error: 'sqrt' was not declared in this scope 6 | if ( a == sqrt(pow(b,2)+pow(c,2)) | ^~~~ a.cc:12:1: warning: control reaches end of non-void function [-Wreturn-type] 12 | } | ^
s703020350
p00003
C++
int main(void) { int a,b,c,i,k; int sort[3]; int num; int max,mid,min; int d=1,n=3; num<=1000; scanf("%d",&num); while(d<=num){ scanf("%d %d %d",&sort[0],&sort[1],&sort[2]); for(n=3;n<=1;n--){ for(i=0;i<=n-1;i++){ if(sort[i]>sort[i+1]){ k=sort[i]; sort[i]=sort[i+1]; sort[i+1]=k; } } } max=sort[2]; mid=sort[1]; min=sort[0]; if(max*max==mid*mid+min*min){ printf("YES\n"); }else{ printf("NO\n"); } d++; } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'scanf' was not declared in this scope 10 | scanf("%d",&num); | ^~~~~ a.cc:28:25: error: 'printf' was not declared in this scope 28 | printf("YES\n"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main(void) a.cc:30:25: error: 'printf' was not declared in this scope 30 | printf("NO\n"); | ^~~~~~ a.cc:30:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
s278797729
p00003
C++
#include <iostream> using namespace std; int main(){ int t, n[3]; cin >> t; while(t--){ cin >> n[0] >> n[1] >> n[2]; sort( n, n+2); for(int i=0;i<3;i++) n[i]*=n[i]; if(n[2]-n[0]-n[1]) cout << "NO" <<endl; else cout << "YES" <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort( n, n+2); | ^~~~ | short
s198619392
p00003
C++
#Include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> #include <numeric> #include <cmath> using namespace std; typedef vector<int> VI; #define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i ) int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); vector<vector<int>> triangles; int n; cin >> n; REP(i, 0, n) { vector<int> tmp; int a, b, c; cin >> a >> b >> c; tmp.push_back(a); tmp.push_back(b); tmp.push_back(c); sort(tmp.begin(), tmp.end()); triangles.push_back(tmp); } for(auto sides : triangles) { if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) { cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:13:10: error: 'std::ios' has not been declared 13 | std::ios::sync_with_stdio(false); | ^~~ a.cc:14:10: error: 'cin' is not a member of 'std' 14 | std::cin.tie(0); | ^~~ a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 7 | #include <cmath> +++ |+#include <iostream> 8 | using namespace std; a.cc:19:5: error: 'cin' was not declared in this scope 19 | cin >> n; | ^~~ a.cc:19:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:13: error: 'cout' was not declared in this scope 35 | cout << "YES" << endl; | ^~~~ a.cc:35:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:30: error: 'endl' was not declared in this scope 35 | cout << "YES" << endl; | ^~~~ a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 7 | #include <cmath> +++ |+#include <ostream> 8 | using namespace std; a.cc:37:13: error: 'cout' was not declared in this scope 37 | cout << "NO" << endl; | ^~~~ a.cc:37:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:37:29: error: 'endl' was not declared in this scope 37 | cout << "NO" << endl; | ^~~~ a.cc:37:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s682148989
p00003
C++
#Include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> #include <numeric> #include <cmath> using namespace std; typedef vector<int> VI; #define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i ) int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); vector<vector<int>> triangles; int n; cin >> n; REP(i, 0, n) { vector<int> tmp; int a, b, c; cin >> a >> b >> c; tmp.push_back(a); tmp.push_back(b); tmp.push_back(c); sort(tmp.begin(), tmp.end()); triangles.push_back(tmp); } for(auto sides : triangles) { if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) { cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:13:10: error: 'std::ios' has not been declared 13 | std::ios::sync_with_stdio(false); | ^~~ a.cc:14:10: error: 'cin' is not a member of 'std' 14 | std::cin.tie(0); | ^~~ a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 7 | #include <cmath> +++ |+#include <iostream> 8 | using namespace std; a.cc:19:5: error: 'cin' was not declared in this scope 19 | cin >> n; | ^~~ a.cc:19:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:13: error: 'cout' was not declared in this scope 35 | cout << "YES" << endl; | ^~~~ a.cc:35:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:30: error: 'endl' was not declared in this scope 35 | cout << "YES" << endl; | ^~~~ a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 7 | #include <cmath> +++ |+#include <ostream> 8 | using namespace std; a.cc:37:13: error: 'cout' was not declared in this scope 37 | cout << "NO" << endl; | ^~~~ a.cc:37:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:37:29: error: 'endl' was not declared in this scope 37 | cout << "NO" << endl; | ^~~~ a.cc:37:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s942516731
p00003
C++
#Include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> #include <numeric> #include <cmath> using namespace std; typedef vector<int> VI; #define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i ) int main() { ios::sync_with_stdio(false); cin.tie(0); vector<vector<int>> triangles; int n; cin >> n; REP(i, 0, n) { vector<int> tmp; int a, b, c; cin >> a >> b >> c; tmp.push_back(a); tmp.push_back(b); tmp.push_back(c); sort(tmp.begin(), tmp.end()); triangles.push_back(tmp); } for(auto sides : triangles) { if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) { cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include <iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:13:5: error: 'ios' has not been declared 13 | ios::sync_with_stdio(false); | ^~~ a.cc:14:5: error: 'cin' was not declared in this scope 14 | cin.tie(0); | ^~~ a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 7 | #include <cmath> +++ |+#include <iostream> 8 | using namespace std; a.cc:35:13: error: 'cout' was not declared in this scope 35 | cout << "YES" << endl; | ^~~~ a.cc:35:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:30: error: 'endl' was not declared in this scope 35 | cout << "YES" << endl; | ^~~~ a.cc:8:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 7 | #include <cmath> +++ |+#include <ostream> 8 | using namespace std; a.cc:37:13: error: 'cout' was not declared in this scope 37 | cout << "NO" << endl; | ^~~~ a.cc:37:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:37:29: error: 'endl' was not declared in this scope 37 | cout << "NO" << endl; | ^~~~ a.cc:37:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s067280720
p00003
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool check_triangle(int a, int b, int c); int main() { int n; int a,b,c; cin >> n; for(int i=0;i<n;i++) { cin >> a >> b >> c; if (check_triangle(a,b,c)) cout << "YES" << endl; else cout << "NO" << endl; } return 0; } bool check_triangle(int a, int b, int c) { vector<int> edges; edges.push_back(a); edges.push_back(b); edges.push_back(c); sort(edges.begin(),edges.end()); if (edges[0]*edges[0] + edges[1]*edges[1] == edges[2]*edges[2]) return true; else return false; }
a.cc:33:50: error: extended character   is not valid in an identifier 33 | if (edges[0]*edges[0] + edges[1]*edges[1] == edges[2]*edges[2]) | ^ a.cc: In function 'bool check_triangle(int, int, int)': a.cc:33:50: error: expected ')' before '\U00003000' 33 | if (edges[0]*edges[0] + edges[1]*edges[1] == edges[2]*edges[2]) | ~ ^~ | )
s732418072
p00003
C++
#include <stdio.h> #include <algorithm.h> int main() { int n[3],t; scanf("%d", &t); while(t!=0){ scanf("%d %d %d", &n[0],&n[1], &n[2]); sort(n,n+3); if((n[0]*n[0] + n[1]*n[1]) == n[2]*n[2]) printf("YES\n"); else printf("NO\n"); t--; } return 0; }
a.cc:2:10: fatal error: algorithm.h: No such file or directory 2 | #include <algorithm.h> | ^~~~~~~~~~~~~ compilation terminated.
s701110171
p00003
C++
include <iostream> #include <cmath> #include <vector> #include <algorithm> #define upper 1000 #define lower 1 #define eN 1000 using namespace std; bool check(int e1, int e2, int e3){ if (((e1*e1)+(e2*e2)) == (e3*e3)){ return true; } else{ false; } } int main(void){ int N; cin >> N; vector<bool> result; for (int i=0; i<N; ++i){ if (N == eN){ break; } int e1, e2, e3; vector<int> len; cin >> e1 >> e2 >> e3; len.push_back(e1); len.push_back(e2); len.push_back(e3); sort(len.begin(), len.end()); result.push_back(check(len[0],len[1],len[2])); } for (int i=0; i<N; ++i){ if (result[i] == true){ 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 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++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bit
s359037466
p00003
C++
#include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; ++i) { int a, b, c; std::cin >> a >> b >> c; if (a * a + b * b == c * c || a * a + c * c == b * b || b * b + c * c = a * a) std::cout << "YES" << std::endl; else std::cout << "NO" << std::endl; } }
a.cc: In function 'int main()': a.cc:13:17: error: lvalue required as left operand of assignment 11 | if (a * a + b * b == c * c | ~~~~~~~~~~~~~~~~~~~~~~ 12 | || a * a + c * c == b * b | ~~~~~~~~~~~~~~~~~~~~~~~~~ 13 | || b * b + c * c = a * a) | ^~~~~~~~~~~~~~~~
s669099324
p00003
C++
nt main(){scanf("%*d");for(int a,b,c;~scanf("%d%d%d",&a,&b,&c);puts(b+c-a?a+c-b?a+b-c?"NO":"YES":"YES":"YES")){a*=a;b*=b;c*=c;}}
a.cc:1:1: error: 'nt' does not name a type; did you mean 'int'? 1 | nt main(){scanf("%*d");for(int a,b,c;~scanf("%d%d%d",&a,&b,&c);puts(b+c-a?a+c-b?a+b-c?"NO":"YES":"YES":"YES")){a*=a;b*=b;c*=c;}} | ^~ | int
s677555092
p00003
C++
#include <stdio.h> void main(){ int a, b, c, N, i; scanf("%d",&N); for(i = 0; i < N; i++){ scanf("%d %d %d",&a, &b, &c); if(chk(a, b, c)) printf("YES\n"); else printf("NO\n"); } } int chk(int a, int b, int c){ int x; if(a >= b){ x = a; a = b; b = x; } if(b >= c){ x = b; b = c; c = x; } if(a >= b){ x = a; a = b; b = x; } if(c*c == a*a + b*b) return 1; else return 0; }
a.cc:3:1: error: '::main' must return 'int' 3 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:20: error: 'chk' was not declared in this scope 9 | if(chk(a, b, c)) printf("YES\n"); | ^~~
s494991420
p00003
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int N,i,a,b,c; scanf("%d",&N); for(i = 0;i<N;i++){ cin >> a >> b >> c; a*=a; b*=b; c*=c; if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl; else cout << "NO" << endl;
a.cc: In function 'int main()': a.cc:15:31: error: expected '}' at end of input 15 | else cout << "NO" << endl; | ^ a.cc:9:21: note: to match this '{' 9 | for(i = 0;i<N;i++){ | ^ a.cc:15:31: error: expected '}' at end of input 15 | else cout << "NO" << endl; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s924419482
p00003
C++
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main(){ int a,b,c; while(scanf("%d %d %d",&a,&b,&c)!=EOF){ a*=a; b*=b; c*=c; if(a==(b+c)||b==(a+c)||c==(a+b))cout << "YES" <<endl; else cout << "NO" <<endl; } return 0;
a.cc: In function 'int main()': a.cc:15:12: error: expected '}' at end of input 15 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s835545429
p00003
C++
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main(){ int a,b,c; while(scanf("%d %d %d",&a,&b,&c)){ a*=a; b*=b; c*=c; if(a==(b+c)||b==(a+c)||c==(a+b))cout << "YES" <<endl; else cout << "NO" <<endl; } return 0;
a.cc: In function 'int main()': a.cc:15:12: error: expected '}' at end of input 15 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s889365563
p00003
C++
#include <cstdio> using namespace std; int main(){ int N,i,a,b,c; scanf("%d",&N); for(i = 0;i<N;i++){ cin >> a >> b >> c; a*=a; b*=b; c*=c; if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'cin' was not declared in this scope 9 | cin >> a >> b >> c; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <cstdio> +++ |+#include <iostream> 2 | using namespace std; a.cc:13:31: error: 'cout' was not declared in this scope 13 | if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl; | ^~~~ a.cc:13:31: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:48: error: 'endl' was not declared in this scope 13 | if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include <cstdio> +++ |+#include <ostream> 2 | using namespace std; a.cc:14:10: error: 'cout' was not declared in this scope 14 | else cout << "NO" << endl; | ^~~~ a.cc:14:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:26: error: 'endl' was not declared in this scope 14 | else cout << "NO" << endl; | ^~~~ a.cc:14:26: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s322897128
p00003
C++
#include <iostream> #include <cmath> #define REP(i,n) for(int i=0;i<n;i++) using namespace std; int main() { int a,b,c; int N; cin >> N; REP(i,N) { cin >> a >> b >> c; if (a*a+b*b=c*c) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:16: error: lvalue required as left operand of assignment 13 | if (a*a+b*b=c*c) cout << "YES" << endl; | ~~~^~~~
s429535829
p00003
C++
#include <iostream> #include <cmath> #define REP(i,n) for(int i=0;i<n;i++) using namespace std; int main() { int a,b,c,N; priority_queue< double, vector<double>, greater<double> > que; cin >> N; REP(i,N) { cin >> a >> b >> c; que.push(a);que.push(b);que.push(c); c=que.top(); que.pop(); b=que.top(); que.pop(); a=que.top(); que.pop(); if (a*a+b*b==c*c) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'priority_queue' was not declared in this scope 9 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~~~~~~~~~ a.cc:3:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 2 | #include <cmath> +++ |+#include <queue> 3 | #define REP(i,n) for(int i=0;i<n;i++) a.cc:9:21: error: expected primary-expression before 'double' 9 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~ a.cc:13:9: error: 'que' was not declared in this scope 13 | que.push(a);que.push(b);que.push(c); | ^~~
s477842126
p00003
C++
#include <iostream> #include <cmath> #define REP(i,n) for(int i=0;i<n;i++) using namespace std; int main() { int a,b,c,N; priority_queue< int, vector<int>, greater<int> > que; cin >> N; REP(i,N) { cin >> a >> b >> c; que.push(a);que.push(b);que.push(c); c=que.top(); que.pop(); b=que.top(); que.pop(); a=que.top(); que.pop(); if (a*a+b*b==c*c) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'priority_queue' was not declared in this scope 9 | priority_queue< int, vector<int>, greater<int> > que; | ^~~~~~~~~~~~~~ a.cc:3:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 2 | #include <cmath> +++ |+#include <queue> 3 | #define REP(i,n) for(int i=0;i<n;i++) a.cc:9:21: error: expected primary-expression before 'int' 9 | priority_queue< int, vector<int>, greater<int> > que; | ^~~ a.cc:13:9: error: 'que' was not declared in this scope 13 | que.push(a);que.push(b);que.push(c); | ^~~
s048023483
p00003
C++
#include <iostream> #include <cmath> #define REP(i,n) for(int i=0;i<n;i++) using namespace std; int main() { double a,b,c,N; priority_queue< double, vector<double>, greater<double> > que; cin >> N; REP(i,N) { cin >> a >> b >> c; que.push(a);que.push(b);que.push(c); c=que.top(); que.pop(); b=que.top(); que.pop(); a=que.top(); que.pop(); if (a*a+b*b==c*c) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'priority_queue' was not declared in this scope 9 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~~~~~~~~~ a.cc:3:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 2 | #include <cmath> +++ |+#include <queue> 3 | #define REP(i,n) for(int i=0;i<n;i++) a.cc:9:21: error: expected primary-expression before 'double' 9 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~ a.cc:13:9: error: 'que' was not declared in this scope 13 | que.push(a);que.push(b);que.push(c); | ^~~
s335700982
p00003
C++
#include <iostream> #include <cmath> #define REP(i,n) for(int i=0;i<n;i++) using namespace std; int main() { double a,b,c,N; priority_queue< double, vector<double>, greater<double> > que; cin >> N; REP(i,N) { cin >> a >> b >> c; que.push(a);que.push(b);que.push(c); a=que.top(); que.pop(); b=que.top(); que.pop(); c=que.top(); que.pop(); if (a*a+b*b==c*c) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'priority_queue' was not declared in this scope 9 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~~~~~~~~~ a.cc:3:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 2 | #include <cmath> +++ |+#include <queue> 3 | #define REP(i,n) for(int i=0;i<n;i++) a.cc:9:21: error: expected primary-expression before 'double' 9 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~ a.cc:13:9: error: 'que' was not declared in this scope 13 | que.push(a);que.push(b);que.push(c); | ^~~
s654954267
p00003
C++
#include <iostream> #include <cmath> using namespace std; int main() { double a,b,c,N; priority_queue< double, vector<double>, greater<double> > que; cin >> N; for(int i=0;i<N;i++) { cin >> a >> b >> c; que.push(a); que.push(b); que.push(c); a=que.top(); que.pop(); b=que.top(); que.pop(); c=que.top(); que.pop(); if (a*a+b*b==c*c) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'priority_queue' was not declared in this scope 8 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~~~~~~~~~ a.cc:3:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 2 | #include <cmath> +++ |+#include <queue> 3 | using namespace std; a.cc:8:21: error: expected primary-expression before 'double' 8 | priority_queue< double, vector<double>, greater<double> > que; | ^~~~~~ a.cc:12:9: error: 'que' was not declared in this scope 12 | que.push(a); | ^~~
s192975777
p00003
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace P0003_Is_it_a_Right_Triangle { class Program { static void Main(string[] args) { List<string> lines = new List<string>(); int cntLine = int.Parse(Console.ReadLine()); for(int i = 1; i <= cntLine; i++) { lines.Add(Console.ReadLine()); } foreach (string line in lines) { List<string> sidesStr = line.Split(' ').ToList<string>(); List<int> sides = new List<int>(); foreach (string sideStr in sidesStr) { sides.Add(int.Parse(sideStr)); } sides.Sort(); if (Math.Pow(sides[2], 2) == Math.Pow(sides[0], 2) + Math.Pow(sides[1], 2)) { Console.WriteLine("YES"); } else { Console.WriteLine("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:10:26: error: 'string' has not been declared 10 | static void Main(string[] args) | ^~~~~~ a.cc:10:35: error: expected ',' or '...' before 'args' 10 | static void Main(string[] args) | ^~~~ a.cc:47:6: error: expected ';' after class definition 47 | } | ^ | ; a.cc: In static member function 'static void P0003_Is_it_a_Right_Triangle::Program::Main(int*)': a.cc:13:13: error: 'List' was not declared in this scope 13 | List<string> lines = new List<string>(); | ^~~~ a.cc:13:18: error: 'string' was not declared in this scope 13 | List<string> lines = new List<string>(); | ^~~~~~ a.cc:13:26: error: 'lines' was not declared in this scope 13 | List<string> lines = new List<string>(); | ^~~~~ a.cc:13:38: error: 'List' does not name a type 13 | List<string> lines = new List<string>(); | ^~~~ a.cc:13:51: error: expected primary-expression before ')' token 13 | List<string> lines = new List<string>(); | ^ a.cc:15:27: error: expected primary-expression before 'int' 15 | int cntLine = int.Parse(Console.ReadLine()); | ^~~ a.cc:19:27: error: 'Console' was not declared in this scope 19 | lines.Add(Console.ReadLine()); | ^~~~~~~ a.cc:22:29: error: expected ')' before 'line' 22 | foreach (string line in lines) | ^~~~ a.cc:22:21: note: to match this '(' 22 | foreach (string line in lines) | ^ a.cc:22:13: error: 'foreach' was not declared in this scope 22 | foreach (string line in lines) | ^~~~~~~
s266180620
p00003
C++
#include <stdio.h> #include <math.h> int main(void){ int a,b,c; scanf("%d",&a) while(scanf("%d%d%d",&a,&b,&c)>0)printf(a*a+b*b==c*c?"YES\n":"NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:5:19: error: expected ';' before 'while' 5 | scanf("%d",&a) | ^ | ; 6 | while(scanf("%d%d%d",&a,&b,&c)>0)printf(a*a+b*b==c*c?"YES\n":"NO\n"); | ~~~~~
s005093628
p00003
C++
#include <stdio.h> int main(){ int i,j; int a,b,c; int tmp; scanf("%d\n",&j); for(i=0;i<j;i++){ scanf("%d %d %d\n",&a,&b,&c); if(a>b){ tmp = a; a=b; b=tmp; } if(b>c){ tmp=b; b=c; c=tmp; } if(c*c=a*a+b*b){ printf("YES\n"); } else{ printf("NO\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:22:21: error: lvalue required as left operand of assignment 22 | if(c*c=a*a+b*b){ | ~^~
s332872503
p00003
C++
#include <iostream> using namespace std; int main(void){ int n; int triangle[3]; cin >> n; while(n--){ for( int i = 0 ; i < 3 ; i++ ){ cin >> triangle[i]; } sort( triangle , triangle + 3 ); if( triangle[2] * triangle[2] == triangle[1] * triangle[1] + triangle[0] * triangle[0] ) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort( triangle , triangle + 3 ); | ^~~~ | short
s870501592
p00003
C++
#include"iostream" using namespace std; int main() { int n; cin>>n; while(n--) { int a,b,c; 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"<<endl; else cou<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:22: error: 'cou' was not declared in this scope 12 | else cou<<"NO"<<endl; | ^~~
s390608545
p00003
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main() { int n; cin >> n; vector <int>a; for(int i=0;i<n;i++){ for(int j=0,j<3,j++){ int temp; cin >> temp; a.push_back(temp); sort(a.begin(),a.end()); } if(a[1]*a[1]+a[2]*a[2]>=a[3]*a[3]){ cout<< "YES" << endl; }else{ cout<< "NO" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:13:30: error: expected ';' before '<' token 13 | for(int j=0,j<3,j++){ | ^ | ; a.cc:13:30: error: expected primary-expression before '<' token a.cc:13:36: error: expected ';' before ')' token 13 | for(int j=0,j<3,j++){ | ^ | ;
s422749590
p00003
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int n; cin >> n; for(int i=0;i<n;i++){ int a,b,c,max,min,mid; cin >> a >> b >> c; max(a,b,c)=max; min(a,b,c)=min; if(a!=max&&a!=min){ a=mid; }if(b!=max&&b!=min){ b=mid; }if(c!=max&&c!=min){ c=mid; } if(min*min+mid*mid>=max*max){ cout<< "YES" << endl; }else{ cout<< "NO" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:13:28: error: 'max' cannot be used as a function 13 | max(a,b,c)=max; | ~~~^~~~~~~ a.cc:14:28: error: 'min' cannot be used as a function 14 | min(a,b,c)=min; | ~~~^~~~~~~
s810966393
p00003
C++
#include <cstdio> #include <iostream> #include <cmath> #define ll long long using namespace std; int mian() { ll T,t,num,a,b,c,A,B,C; cin>>T; for( t=1; t<=T; t++) { cin>>a>>b>>c; A=(ll)pow(a,2); B=(ll)pow(b,2); C=(ll)pow(c,2); if( ((a+b)>c) && ((b+c)>a) && ((c+a)>b)) printf("NO\n"); else if( (A+B)==C ) printf("YES\n"); else if((B+C)== A) printf("YES\n"); else if((A+C) == B) printf("YES\n"); else printf("NO\n"); } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s593901666
p00003
C++
#include <iostream> using namespace std; int main(){ int a,b,c,n,t; cin>>n; for(int i=0;i<n;i++){ cin>>a>>b>>c; if(a<b){ t=a; a=b; b=t; } if(a<c){ t=a; a=c; c=t; } cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; } return 0; }
a.cc: In function 'int main()': a.cc:19:26: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ~~~~~~~~~^~~~~~~~~ | | | | | int | std::basic_ostream<char> a.cc:19:26: note: candidate: 'operator==(int, int)' (built-in) 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ~~~~~~~~~^~~~~~~~~ a.cc:19:26: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:19:34: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:19:34: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:19:34: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 19 | cout<<a*a==b*b+c*c ? "YES\n" : "NO\n"; | ^ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator=
s641187553
p00003
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; while( n-- ){ int a,b,c; cin >> a >> b >> c; if(a == b && b == c)cout << "YES"; else cout << "NO"; cout << endl; } return 0;
a.cc: In function 'int main()': a.cc:14:12: error: expected '}' at end of input 14 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s710929047
p00003
C++
#include <iostream> using namespace std; int main(){ int a,b,c,d; cin>>a; for(int i=0;i<a;i++){ cin>>b>>c>>d; if(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:7: error: 'YES' was not declared in this scope 9 | cout<<YES<<endl;} | ^~~ a.cc:11:7: error: 'YES' was not declared in this scope 11 | cout<<YES<<endl;} | ^~~ a.cc:13:7: error: 'YES' was not declared in this scope 13 | cout<<YES<<endl;} | ^~~ a.cc:15:7: error: 'NO' was not declared in this scope 15 | cout<<NO<<endl;} | ^~ a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s118402481
p00003
C++
YES = "YES" NO = "NO" def sq(x) return x * x end gets.to_i.times do puts ->(l){ if sq(l[0]) + sq(l[1]) == sq(l[2]) return YES elsif sq(l[1]) + sq(l[2]) == sq(l[0]) return YES elsif sq(l[2]) + sq(l[0]) == sq(l[1]) return YES end return NO }.call gets.split(' ').map(&:to_i) end
a.cc:1:1: error: 'YES' does not name a type 1 | YES = "YES" | ^~~ a.cc:18:10: error: expected unqualified-id before '.' token 18 | }.call gets.split(' ').map(&:to_i) | ^
s673429933
p00003
C++
#include <iostream> using namespace std; int main(){ int ans=0; int N,a,b,c; cin>>N; for(int i=0;i<N;i++){ cin>>a>>b>>c; if(a*a==b*b+c*c){ ans+=ans;} else if(b*b==a*a+c*c){ ans+=ans;} else if(c*c==a*a+b*b){ ans+=ans;} if(ans>0){ cout<"<YES"<<endl;} else{ cout<<"NO"<<endl;} } return 0; }
a.cc: In function 'int main()': a.cc:16:12: error: invalid operands of types 'const char [5]' and '<unresolved overloaded function type>' to binary 'operator<<' 16 | cout<"<YES"<<endl;} | ~~~~~~^~~~~~
s705874069
p00003
C++
#incude <iostream> using namespace std; int N,a,b,c; int main(){ cin >> N; for(int i = 0; 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" << endl; }else{ cout << "NO" << endl; } } }
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include? 1 | #incude <iostream> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope 7 | 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 | #incude <iostream> a.cc:11:7: error: 'cout' was not declared in this scope 11 | cout << "YES" << endl; | ^~~~ a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:24: error: 'endl' was not declared in this scope 11 | 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 | #incude <iostream> a.cc:13:7: error: 'cout' was not declared in this scope 13 | cout << "NO" << endl; | ^~~~ a.cc:13:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:23: error: 'endl' was not declared in this scope 13 | cout << "NO" << endl; | ^~~~ a.cc:13:23: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s233242315
p00003
C++
timel = int(raw_input()) for gomi in xrange(timel): a,b,c = map(lambda x: int(x)**2, raw_input().split()) if a+b==c or b+c==a or c+a==b: print "YES" else: print "NO"
a.cc:1:1: error: 'timel' does not name a type 1 | timel = int(raw_input()) | ^~~~~
s228585953
p00003
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin >> n; for(int i = 0; i < 3; i++){ vector<int> vec; int a, b, c; cin >> a >> b >> c; vec.push_back(a); vec.push_back(b); vec.push_back(c); sort( vec.begin(), vec.end() ); if(vec[0] + vec[1] >vec[2]){ cout << "YES" << endl; } else{ cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:22:18: error: expected '}' at end of input 22 | } | ^ a.cc:9:35: note: to match this '{' 9 | for(int i = 0; i < 3; i++){ | ^ a.cc:22:18: error: expected '}' at end of input 22 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s681549383
p00003
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin >> n; for(int i = 0; i < 3; i++){ vector<int> vec; int a, b, c; cin >> a >> b >> c; vec.push_back(a); vec.push_back(b); vec.push_back(c); sort( vec.begin(), vec.end() ); if(vec[0] + vec[1] >vec[2]){ cout << "YES" << endl; } else{ cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:22:18: error: expected '}' at end of input 22 | } | ^ a.cc:9:35: note: to match this '{' 9 | for(int i = 0; i < 3; i++){ | ^ a.cc:22:18: error: expected '}' at end of input 22 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s967811589
p00003
C++
#include <iostream> int main(void){ int n,a,b,c; std::cin>>n; for (;n--;){ std::cin>>a>>b>>c; if (a>b) swap(a,b); if (b>c) swap(b,c); if (a*a+b*b==c*c) std::cout<<"YES\n"; else std::cout<<"NO\n"; } }
a.cc: In function 'int main()': a.cc:7:26: error: 'swap' was not declared in this scope 7 | if (a>b) swap(a,b); | ^~~~ a.cc:7:26: note: suggested alternatives: In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68, 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/tuple:2823:5: note: 'std::swap' 2823 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; | ^~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' 226 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' /usr/include/c++/14/bits/exception_ptr.h:229:5: note: 'std::__exception_ptr::swap' 229 | swap(exception_ptr& __lhs, exception_ptr& __rhs) | ^~~~ a.cc:8:26: error: 'swap' was not declared in this scope 8 | if (b>c) swap(b,c); | ^~~~ a.cc:8:26: note: suggested alternatives: /usr/include/c++/14/tuple:2823:5: note: 'std::swap' 2823 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; | ^~~~ /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' 226 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' /usr/include/c++/14/bits/exception_ptr.h:229:5: note: 'std::__exception_ptr::swap' 229 | swap(exception_ptr& __lhs, exception_ptr& __rhs) | ^~~~
s263994689
p00003
C++
#include <iostream> #include <conio.h> using namespace std ; bool solve(int x,int y,int z) ; bool ans = false ; int main() { int N ; cin >> N ; bool ans = false ; for( int i = 0 ; i < N ; i ++ ) { int a,b,c ; cin >> a >> b >> c ; if( a > b ) { if( a > c ) // 最大値はa { ans = solve(a,b,c) ; } else if( a < c ) // 最大値はc { ans = solve(c,a,b) ; } } else if( a < b ) { if( b > c ) // 最大値はb { ans = solve(b,a,c) ; } else if( b < c ) // 最大値はc { ans = solve(c,a,b) ; } } if( ans == true ){ cout << "YES" << "\n" ; } else{ cout << "NO" << "\n" ; } } _getch() ; return 0 ; } bool solve(int x,int y, int z) { if( x*x == (y*y + z*z) ) { return true ; } else { return false ; } }
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s260305417
p00003
C++
#include <iostream> #include <conio.h> using namespace std ; int N ; int a,b,c,x,y,z ; int main() { cin >> N ; while( N > 0 ) { cin >> a >> b >> c ; x = max( a, max( b, c ) ) ; y = min( a, max( b, c ) ) ; z = min( a, min( b, c ) ) ; if( (x*x) == ((y*y) + (z*z) ) ) { cout << "YES" << endl ; } else { cout << "NO" << endl ; } N -- ; } _getch() ; return 0 ; }
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s528638764
p00003
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include<iostream> using namespace std; int main(){ int a,b,c,i; cin >> i; for(int n = 0;n < i;n++){ cin >> a >> b >> c; if(a*a == b * b + c * c){ cout << "YES" << endl; } else if(b*b == a * a + c * c){ cout << "YES" << endl; } else if(c*c == b * b + a * a){ cout << "YES" << endl; } else {cout <<"NO" << endl;} } }
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 1 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:18: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_NODI
s818326738
p00003
C++
#include <iostream> #include <string> #include <cstdlib> using namespace std; int stoi( const std::string& str, size_t *pos = 0, int base = 10 ) { return std::strtol(str.c_str(), pos, base); } struct triangle { triangle() { leg1 = leg2 = leg3 = 0; } bool isHyp() { if (leg1*leg1 + leg2*leg2 == leg3*leg3 || leg2*leg2 + leg3*leg3 == leg1*leg1 || leg3*leg3 + leg1*leg1 == leg2*leg2) return true; return false; } int leg1; int leg2; int leg3; }; int main() { int j; cin >> j; triangle* triData = new triangle[j]; bool* results = new bool[j]; string s; for (int i = 0; i < j; i++) { getline(cin, s, ' '); triData[i].leg1 = stoi(s); s.clear(); getline(cin, s, ' '); triData[i].leg2 = stoi(s); s.clear(); getline(cin, s); triData[i].leg3 = stoi(s); results[i] = triData[i].isHyp(); } for (int i = 0; i < j; i++) { cout << (results[i] ? "YES" : "NO") << endl; } delete [] results; delete [] triData; }
a.cc: In function 'int stoi(const std::string&, size_t*, int)': a.cc:7:37: error: cannot convert 'size_t*' {aka 'long unsigned int*'} to 'char**' 7 | return std::strtol(str.c_str(), pos, base); | ^~~ | | | size_t* {aka long unsigned int*} In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, from /usr/include/c++/14/bits/basic_string.h:4154, 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/stdlib.h:178:43: note: initializing argument 2 of 'long int strtol(const char*, char**, int)' 178 | char **__restrict __endptr, int __base) | ~~~~~~~~~~~~~~~~~~^~~~~~~~ a.cc: In function 'int main()': a.cc:32:31: error: call of overloaded 'stoi(std::string&)' is ambiguous 32 | triData[i].leg1 = stoi(s); | ~~~~^~~ a.cc:5:11: note: candidate: 'int stoi(const std::string&, size_t*, int)' 5 | int stoi( const std::string& str, size_t *pos = 0, int base = 10 ) | ^~~~ /usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)' 4164 | stoi(const string& __str, size_t* __idx = 0, int __base = 10) | ^~~~ a.cc:35:31: error: call of overloaded 'stoi(std::string&)' is ambiguous 35 | triData[i].leg2 = stoi(s); | ~~~~^~~ a.cc:5:11: note: candidate: 'int stoi(const std::string&, size_t*, int)' 5 | int stoi( const std::string& str, size_t *pos = 0, int base = 10 ) | ^~~~ /usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)' 4164 | stoi(const string& __str, size_t* __idx = 0, int __base = 10) | ^~~~ a.cc:38:31: error: call of overloaded 'stoi(std::string&)' is ambiguous 38 | triData[i].leg3 = stoi(s); | ~~~~^~~ a.cc:5:11: note: candidate: 'int stoi(const std::string&, size_t*, int)' 5 | int stoi( const std::string& str, size_t *pos = 0, int base = 10 ) | ^~~~ /usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)' 4164 | stoi(const string& __str, size_t* __idx = 0, int __base = 10) | ^~~~
s963955712
p00003
C++
#include<iostream> #include<queue> using namespace std; int main() { priority_queue<int> que; int n; cin>>n; fot(int i=0;i<n;i++) { int a,b,c; for(int j=0;j<3;j++) { cin>>a; que.push(a); } a=que.top(); que.pop(); b=que.top() que.pop(); c=que.top() que.pop(); if(a-b<c) cout<<"YES"<<endl; else cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: expected primary-expression before 'int' 10 | fot(int i=0;i<n;i++) | ^~~ a.cc:10:13: error: 'i' was not declared in this scope 10 | fot(int i=0;i<n;i++) | ^
s864528091
p00003
C++
#include <stdio.h> #include <string.h> typedef struct{ int m[3]; }triangle; int main( void ){ triangle *tri; int e; scanf( "%d",&e ); if(( tri = ( triangle * ) malloc( sizeof( triangle ) * e )) == NULL ) return -1; for( int i = 0;i < e;i++ )scanf( "%d %d %d", &tri[i].m[0],&tri[i].m[1],&tri[i].m[2] ); for( int i = 0;i < e;i++ ){ for( int k = 0;k < 2;k++ ){ for( int j = 0;j < 2;j++ ){ if( tri[i].m[j] => tri[i].m[j+1] ){ int buf = tri[i].m[j]; tri[i].m[j] = tri[i].m[j+1]; tri[i].m[j+1] = buf; } } } if( tri[i].m[0] * tri[i].m[0] + tri[i].m[1] * tri[i].m[1] == tri[i].m[2] * tri[i].m[2] ) printf( "YES\n" ); else printf( "NO\n" ); } return 0; }
a.cc: In function 'int main()': a.cc:13:31: error: 'malloc' was not declared in this scope 13 | if(( tri = ( triangle * ) malloc( sizeof( triangle ) * e )) == NULL ) return -1; | ^~~~~~ a.cc:3:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>' 2 | #include <string.h> +++ |+#include <cstdlib> 3 | a.cc:20:34: error: expected primary-expression before '>' token 20 | if( tri[i].m[j] => tri[i].m[j+1] ){ | ^
s825481011
p00003
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ int m[3]; }triangle; int main( void ){ triangle *tri; int e; scanf( "%d",&e ); if(( tri = ( triangle * ) malloc( sizeof( triangle ) * e )) == NULL ) return -1; for( int i = 0;i < e;i++ )scanf( "%d %d %d", &tri[i].m[0],&tri[i].m[1],&tri[i].m[2] ); for( int i = 0;i < e;i++ ){ for( int k = 0;k < 2;k++ ){ for( int j = 0;j < 2;j++ ){ if( tri[i].m[j] => tri[i].m[j+1] ){ int buf = tri[i].m[j]; tri[i].m[j] = tri[i].m[j+1]; tri[i].m[j+1] = buf; } } } if( tri[i].m[0] * tri[i].m[0] + tri[i].m[1] * tri[i].m[1] == tri[i].m[2] * tri[i].m[2] ) printf( "YES\n" ); else printf( "NO\n" ); } return 0; }
a.cc: In function 'int main()': a.cc:21:34: error: expected primary-expression before '>' token 21 | if( tri[i].m[j] => tri[i].m[j+1] ){ | ^
s106913498
p00003
C++
include <iostream> using namespace std; int main() { int a, b, c, d, e; int ans; cin >> d; for(int i = 0; i < d; i++) { cin >> a >> b >> c; if(a > b && a > c) { e = c; c = a ; ans = c * c - e * e - b * b; if(ans == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } } else if (b > c && b > a) { e = c; c = b; ans = c * c - e * e - a * a; if(ans == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } } else { ans = c * c - a * a - b * b; if(ans == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } } } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'cin' was not declared in this scope 9 | cin >> d; | ^~~ a.cc:22:41: error: 'cout' was not declared in this scope 22 | cout << "YES" << endl; | ^~~~ a.cc:22:58: error: 'endl' was not declared in this scope 22 | cout << "YES" << endl; | ^~~~ a.cc:26:41: error: 'cout' was not declared in this scope 26 | cout << "NO" << endl; | ^~~~ a.cc:26:57: error: 'endl' was not declared in this scope 26 | cout << "NO" << endl; | ^~~~ a.cc:38:49: error: 'cout' was not declared in this scope 38 | cout << "YES" << endl; | ^~~~ a.cc:38:66: error: 'endl' was not declared in this scope 38 | cout << "YES" << endl; | ^~~~ a.cc:42:49: error: 'cout' was not declared in this scope 42 | cout << "NO" << endl; | ^~~~ a.cc:42:65: error: 'endl' was not declared in this scope 42 | cout << "NO" << endl; | ^~~~ a.cc:50:41: error: 'cout' was not declared in this scope 50 | cout << "YES" << endl; | ^~~~ a.cc:50:58: error: 'endl' was not declared in this scope 50 | cout << "YES" << endl; | ^~~~ a.cc:54:41: error: 'cout' was not declared in this scope 54 | cout << "NO" << endl; | ^~~~ a.cc:54:57: error: 'endl' was not declared in this scope 54 | cout << "NO" << endl; | ^~~~
s099528255
p00003
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int main(){ int abc[3], N; cin << N; for(int i = 0; i < N; i++){ cin >> abc[0] >> abc[1] >> abc[2]; while(!(((abc[0] >= 1)&&(abc[0] <= 1000))&& ((abc[1] >= 1)&&(abc[1] <= 1000))&& ((abc[2] >= 1)&&(abc[2] <= 1000)))){ cout << "wrong value\n"; cin >> abc[0] >> abc[1] >> abc[2]; } sort(abc, abc+3); if((pow(abc[0], 2) + pow(abc[1], 2)) == pow(abc[2], 2)){ cout << "YES\n"; }else{ cout << "NO\n"; } } return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin << N; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:8:13: note: candidate: 'operator<<(int, int)' (built-in) 8 | cin << N; | ~~~~^~~~ a.cc:8:13: 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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ 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:8:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 8 | cin << N; | ^~~ 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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ 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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin << N; | ^ /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:8:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin << N; | ^ /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:8:9: required from here 8 | cin << N; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s806657174
p00003
C++
#include <iostream> #include <vector> bool check_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() { const int max_num_of_data = 1000; const int min = 1; const int max = 1000; int num_of_data; //std::cout << "データ数の入力" << std::endl; std::cin >> num_of_data; if(num_of_data > max_num_of_data){ std::cout << "データ数<=" << max_num_of_data << std::endl; return 1; } int a, b, c; //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl; for(int i = 0; i < num_of_data; ++i){ std::cin >> a >> b >> c; if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max){ if(check_right_triangle(a, b, c) std::cout << "Yes" << std::endl; else std::cout << "No" << std::endl; }else{ --i; std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl; } } return 0; }
a.cc: In function 'int main()': a.cc:30:45: error: expected ';' before 'std' 30 | if(check_right_triangle(a, b, c) | ^ | ; 31 | std::cout << "Yes" << std::endl; | ~~~ a.cc:32:13: error: expected primary-expression before 'else' 32 | else | ^~~~ a.cc:31:49: error: expected ')' before 'else' 31 | std::cout << "Yes" << std::endl; | ^ | ) 32 | else | ~~~~ a.cc:30:15: note: to match this '(' 30 | if(check_right_triangle(a, b, c) | ^
s910731205
p00003
C++
int main(){ int n; cin>>n; int hen1,hen2,hen3,saidai; for(int i=0;i<n;i++){ cin>>hen1>>hen2>>hen3; saidai=hen1; if(saidai<hen2){ saidai=hen2; hen2=0; } else if(saidai<hen3){ saidai=hen3; hen3=0; } else if(saidai==hen1) hen1=0; if(saidai*saidai==hen1*hen1+hen2*hen2+hen3*hen3) cout<<"YES"<<"\n"; else{ cout<<"NO"<<"\n"; } } return 0; }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin>>n; | ^~~ a.cc:21:17: error: 'cout' was not declared in this scope 21 | cout<<"YES"<<"\n"; | ^~~~ a.cc:23:17: error: 'cout' was not declared in this scope 23 | cout<<"NO"<<"\n"; | ^~~~
s112440630
p00003
C++
#include<iostream> using namespace std; int main() { int a,b,c,n,t; cin >> n; for(i=0;i<n,i++) { cin >> a >> b >> c; if(a>b) { t = a; a = b; b = t; } if(a>c) { t = a; a = c; c = t; } if(b>c) { t = b; b = c; c = t; } 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:7: error: 'i' was not declared in this scope 7 | for(i=0;i<n,i++) | ^ a.cc:7:18: error: expected ';' before ')' token 7 | for(i=0;i<n,i++) | ^ | ;
s700807279
p00004
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (scan.hasNextInt()) { double a = scan.nextDouble(); double b = scan.nextDouble(); double c = scan.nextDouble(); double d = scan.nextDouble(); double e = scan.nextDouble(); double f = scan.nextDouble(); double db; double ae; double x; double y; double j; double g; db = d * b; ae = a * e; ///yを求める j = db - ae;               ///(db-ae)yという形 y = ((d * c) - (a * f)) / j; g = y * b; x = (-1 * (g) + c) / a; System.out.printf("%.3f %.3f\n", x, y); } } }
Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ Main.java:25: error: illegal character: '\u3000' ??????????????///?db-ae)y???? ^ 14 errors