submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s521278079
p04043
C++
#include <bits/stdc++.h> using namespace std; int a; int b; int c; cin>>a; cin>>b; cin>>c; if(a==5||b==5||c==5 && a+b+c=17){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; }
a.cc:8:1: error: 'cin' does not name a type 8 | cin>>a; | ^~~ a.cc:9:1: error: 'cin' does not name a type 9 | cin>>b; | ^~~ a.cc:10:1: error: 'cin' does not name a type 10 | cin>>c; | ^~~ a.cc:12:1: error: expected unqualified-id before 'if' 12 | if(a==5||b==5||c==5 && a+b+c=17){ | ^~ a.cc:15:1: error: expected unqualified-id before 'else' 15 | else{ | ^~~~
s018584113
p04043
C++
// atc.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> using namespace std; int main() { int a, b, c; bool flg = false; cin >> a >> b >> c; switch (a) { case 5: switch (b) { case 5: if (c == 7) flg = true; break; case 7: if (c == 5) flg = true; break; default: break; } break; case 7: switch (b) { case 5: if (c == 5) flg = true; break; default: break; } break; default: break; } if (flg == true) { cout << "YES"; } else{ cout << "NO"; } return 0; }
a.cc:4:10: fatal error: pch.h: No such file or directory 4 | #include "pch.h" | ^~~~~~~ compilation terminated.
s907183093
p04043
C++
int main(){ int a,b,c; cin >> a >> b >> c; int s[3] = {a,b,c}; int fiveCount = 0; int sevenCount = 0; for(int i=0; i<sizeof(s); i++){ if(s[i] == 5){ fiveCount++; } if(s[i] == 7){ sevenCount++; } } if(fiveCount == 2 && sevenCount == 1){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> a >> b >> c; | ^~~ a.cc:22:9: error: 'cout' was not declared in this scope 22 | cout << "YES" << endl; | ^~~~ a.cc:22:26: error: 'endl' was not declared in this scope 22 | cout << "YES" << endl; | ^~~~ a.cc:24:9: error: 'cout' was not declared in this scope 24 | cout << "NO" << endl; | ^~~~ a.cc:24:25: error: 'endl' was not declared in this scope 24 | cout << "NO" << endl; | ^~~~
s556738701
p04043
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if ((A+B+C)!=17) { System.out.println("No"); } else if(A != 7 && B != 7 && C != 7) { System.out.println("No"); } else if(A != 5 && B != 5 && C != 5) { System.out.println("No"); } else { System.out.println("Yes"); }; };
Main.java:17: error: reached end of file while parsing }; ^ 1 error
s084823271
p04043
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if ((A+B+C)!=17) { System.out.println("No"); } else if(A != 7 && B != 7 && C != 7) { System.out.println("No"); } else if(A != 5 && B != 5 && C != 5) { System.out.println("No"); } else { System.out.println("Yes"); } }
Main.java:17: error: reached end of file while parsing } ^ 1 error
s876626977
p04043
Java
import java.util.*; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if ((A+B+C)!=17) { System.out.println("No"); } else if(A != 7 && B != 7 && C != 7) { System.out.println("No"); } else if(A != 5 && B != 5 && C != 5) { System.out.println("No"); } else { System.out.println("Yes"); }
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) Main.java:16: error: reached end of file while parsing } ^ 2 errors
s610527761
p04043
C
#include<stdio.h> #include<string.h> int main(){ int n,l; scanf("%s",&n); scanf("%s",&l); char str[n][l]; char tmp[l]; for(int i=0;i<n;i++){ scanf("%d",&str[i][l]); } for(int j=1;j<n;j++){ for(int k=1;k<n;j++){ if(strcmp(str[k-1],str[k])>0){ strcpy(tmp,str[k-1]); strcpy(str[k-1],str[k]); strcpy(str[k],tmp); } } } for(int m=0;m<n;m++){ printf("%s",s[m]); } return 0; }
main.c: In function 'main': main.c:23:17: error: 's' undeclared (first use in this function) 23 | printf("%s",s[m]); | ^ main.c:23:17: note: each undeclared identifier is reported only once for each function it appears in
s355652764
p04043
C
#include<stdio.h> #include<string.h> int main(){ int n,l; scanf("%d",&n); scanf("%d",&l); char str[n][l]; char tmp[l]; for(int i=0;i<n;i++){ scanf("%d",&str[i][l]); } for(int j=1;j<n;j++){ for(int k=1;k<n;j++){ if(strcmp(str[k-1],str[k])>0){ strcpy(tmp,str[k-1]); strcpy(str[k-1],str[k]); strcpy(str[k],tmp); } } } for(int m=0;m<n;m++){ printf("%s",s[m]); } return 0; }
main.c: In function 'main': main.c:23:17: error: 's' undeclared (first use in this function) 23 | printf("%s",s[m]); | ^ main.c:23:17: note: each undeclared identifier is reported only once for each function it appears in
s493702689
p04043
C
#include<stdio.h> int main(){ int a,count=0; for(i=0;i<3;i++){ scanf("%d",&a); if(a==5||a==7){ count+=a; }else{ break; } } if(count==17){printf("YES");}else{printf("NO");} return 0; }
main.c: In function 'main': main.c:5:13: error: 'i' undeclared (first use in this function) 5 | for(i=0;i<3;i++){ | ^ main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
s506189771
p04043
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b >>c; if(a==5&&b==5){ if(c==7) cout<<"YES"; else cout<<"NO"; } else if(b==5&&c==5){ if(a==7) cout<<"YES"; else cout<<"NO"; } else if(a==5&&c==5){ if(b==7) cout<<"YES"; else cout<<"NO"; } else cout<<"NO"; return 0;
a.cc: In function 'int main()': a.cc:21:14: error: expected '}' at end of input 21 | return 0; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s886145721
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> s(3); cin >> s[0]>> s[1] >> a[2]; sort(s.begin(),s.end()); int count_1=0,count_2=0; if(s[0]==5 && s[1]==5 && s[2]==7){ cout <<"YES"; }else{ cout << "NO"; } }
a.cc: In function 'int main()': a.cc:5:25: error: 'a' was not declared in this scope 5 | cin >> s[0]>> s[1] >> a[2]; | ^
s090359279
p04043
C
#include<stdio.h> #include<math.h> #include<stdlib.h> int main(){ int a, b, c; scanf("%d %d %d", &a, &b, &c); if((a==7 && b ==5 && c==5) || (a==5 && b== 7 && c==5) || (a==5 && b==5 && c== 7)) printf("YES\n"); else if else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:11:9: error: expected '(' before 'else' 11 | else | ^~~~ | (
s792199225
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> data(3); cin >> data.at(0) >> data.at(1) >> data.at(2); sort(data.begin(), data.end()); vector<int> answer = {5, 5, 7} if (data == answer) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:3: error: expected ',' or ';' before 'if' 9 | if (data == answer) { | ^~ a.cc:12:3: error: 'else' without a previous 'if' 12 | else { | ^~~~
s210264501
p04043
C++
A = list(map(int, input().split())) count = 0 for i in range(3): if A[i] == 5 or A[i] == 7: count += 1 if count == 3: print('YES') else: print('NO')
a.cc:9:11: warning: multi-character character constant [-Wmultichar] 9 | print('YES') | ^~~~~ a.cc:11:11: warning: multi-character character constant [-Wmultichar] 11 | print('NO') | ^~~~ a.cc:1:1: error: 'A' does not name a type 1 | A = list(map(int, input().split())) | ^
s358106179
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A , B , C ; cin >> A >> B >> C ; if (A==5 && B==5 && C==7) { cout << "YES" << endl; } else if (A==5 && B==7 && C==5) { cout << "YES" << endl; } else if (A==7 && B==5 && C==5) { cout << "YES" << endl; } else if { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:17:11: error: expected '(' before '{' token 17 | else if { | ^ | (
s293761482
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A , B , C ; cin >> A >> B >> C ; if (A==5 && B==5 && C==7) { cout << "YES" << endl; } if else (A==5 && B==7 && C==5) { cout << "YES" << endl; } if else (A==7 && B==5 && C==5) { cout << "YES" << endl; } if else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:11:8: error: expected '(' before 'else' 11 | if else (A==5 && B==7 && C==5) { | ^~~~ | ( a.cc:14:8: error: expected '(' before 'else' 14 | if else (A==7 && B==5 && C==5) { | ^~~~ | ( a.cc:17:6: error: expected '(' before 'else' 17 | if else { | ^~~~ | (
s909532466
p04043
C
#include <stdio.h> int main(){ int a,b,c,count_five,count_seven; scanf("%d%d%d",&a,&b,&c) if(a==5) count_five++; if(b==5) count_five++; if(c==5) count_five++; if(a==7) count_seven++; if(b==7) count_seven++; if(c==7) count_seven++; if(count_five==2&&count_seven==1) printf("Yes"); else printf("No"); return 0; }
main.c: In function 'main': main.c:4:29: error: expected ';' before 'if' 4 | scanf("%d%d%d",&a,&b,&c) | ^ | ; 5 | if(a==5) | ~~
s462029968
p04043
C
#include <stdio.h> int main(){ int a,b,c,count_five,count_seven; scanf("%d%d%d",&a,&b,&c) if(a=5) count_five++; if(b=5) count_five++; if(c=5) count_five++; if(a=7) count_seven++; if(b=7) count_seven++; if(c=7) count_seven++; if(count_five==2&&count_seven==1) printf("Yes"); else printf("No"); return 0; }
main.c: In function 'main': main.c:4:29: error: expected ';' before 'if' 4 | scanf("%d%d%d",&a,&b,&c) | ^ | ; 5 | if(a=5) | ~~
s635597207
p04043
C++
#include <iostream> using namesapce std; int main() { int a, b,c ; cin >> a >> b >> c; if(a * b * c == 5 * 5 * 7) { cout << "YES" << endl; }else { cout << "NO" << endl; } }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << "YES" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << "NO" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:12:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 12 | cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s047262427
p04043
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a; cin>>b; cin>>c; if(b>c){ int z; b=z; b=c; c=z; } if(a>b){ int z; a=z; a=b; a=z; } if(b>c){ int z; b=z; b=c; c=z; } if(a==5){ if(b==7&&c==7){ cout<<YES; }else{ cout<<NO; } }else{ cout<<NO; } return 0; } #include<iostream> using namespace std; int main(){ int a,b,c; cin>>a; cin>>b; cin>>c; if(b>c){ int z; b=z; b=c; c=z; } if(a>b){ int z; a=z; a=b; a=z; } if(b>c){ int z; b=z; b=c; c=z; } if(a==5){ if(b==5&&c==7){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } }else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:28:11: error: 'YES' was not declared in this scope 28 | cout<<YES; | ^~~ a.cc:30:11: error: 'NO' was not declared in this scope 30 | cout<<NO; | ^~ a.cc:33:9: error: 'NO' was not declared in this scope 33 | cout<<NO; | ^~ a.cc: At global scope: a.cc:39:5: error: redefinition of 'int main()' 39 | int main(){ | ^~~~ a.cc:3:5: note: 'int main()' previously defined here 3 | int main(){ | ^~~~
s276673506
p04043
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a; cin>>b; cin>>c; if(b>c){ int z; b=z; b=c; c=z; } if(a>b){ int z; a=z; a=b; a=z; } if(b>c){ int z; b=z; b=c; c=z; } if(a==5){ if(b==7&&c==7){ cout<<YES; }else{ cout<<NO; } }else{ cout<<NO; } return 0; }
a.cc: In function 'int main()': a.cc:28:11: error: 'YES' was not declared in this scope 28 | cout<<YES; | ^~~ a.cc:30:11: error: 'NO' was not declared in this scope 30 | cout<<NO; | ^~ a.cc:33:9: error: 'NO' was not declared in this scope 33 | cout<<NO; | ^~
s655922961
p04043
C++
#include <iostream> using namespace std; int main() { int fives = 0; int sevens = 0; int num; while (cin >> num) { if (num == 5) fives++; if (num == 7) sevens++; } cout << (fives == 2 && sevens == 1) ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:54: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 13 | cout << (fives == 2 && sevens == 1) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s371546046
p04043
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main( void ) { int a,b,c; cin >> a >> b >> c; int x[3] = {a,b,c}; if ( max(x) == 7 && min(x) == 5 && a + b + c == 17 ) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:11:13: error: no matching function for call to 'max(int [3])' 11 | if ( max(x) == 7 && min(x) == 5 && a + b + c == 17 ) | ~~~^~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: template argument deduction/substitution failed: a.cc:11:13: note: mismatched types 'std::initializer_list<_Tp>' and 'int*' 11 | if ( max(x) == 7 && min(x) == 5 && a + b + c == 17 ) | ~~~^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 1 provided a.cc:11:28: error: no matching function for call to 'min(int [3])' 11 | if ( max(x) == 7 && min(x) == 5 && a + b + c == 17 ) | ~~~^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: template argument deduction/substitution failed: a.cc:11:28: note: mismatched types 'std::initializer_list<_Tp>' and 'int*' 11 | if ( max(x) == 7 && min(x) == 5 && a + b + c == 17 ) | ~~~^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate expects 2 arguments, 1 provided
s866635125
p04043
C
#include <iostream> using namespace std; int main(){ int N, L; cin >> N >> L; string s[N+10]; string tmp; for(int i=0; i<N; i++){ cin >> s[i]; } for(int i=0; i<N; i++){ for(int j=i+1; j<N; j++){ if(s[i] > s[j]){ tmp = s[i]; s[i] = s[j]; s[j] = tmp; } } } for(int i=0; i<N; i++){ cout << s[i]; } cout << endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s070706639
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; sum=a+b+c; if(sum==17) {cout<<"YES"<<endl; } else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'sum' was not declared in this scope 7 | sum=a+b+c; | ^~~
s842760846
p04043
C++
#include <bits/stdc++.h> #define MAXN 100010 #define pii pair<int,int> #define ff first #define ss second #define ll long long #define in_range(x, y, n) (x >= 0 and x<n and y >=0 and y<n) using namespace std; const int mod = 1e9 + 7; int main(){ int a, b, c; cin >> a >> b >> c; if (max(a, b, c) == 7 and min(a, b, c) == 5 and a+b+c - max(a, b, c) - min(a, b, c) == 5){ cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:15:12: required from here 15 | if (max(a, b, c) == 7 and min(a, b, c) == 5 and a+b+c - max(a, b, c) - min(a, b, c) == 5){ | ~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function 306 | if (__comp(__a, __b)) | ~~~~~~^~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:15:34: required from here 15 | if (max(a, b, c) == 7 and min(a, b, c) == 5 and a+b+c - max(a, b, c) - min(a, b, c) == 5){ | ~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s014692869
p04043
C
#include<stdio.h> int main(void) { int A,B,C; printf("A,B,Cの文節の長さを入力:"); scanf("%d,%d,%d",&A,&B,&C); if(A+B+C!=17){ printf("NO"); }else{ if(max(A,B,C)==7){ if(min(A,B,C)==5){ printf("YES"); }else{printf("NO"); } } } return 0; }
main.c: In function 'main': main.c:11:8: error: implicit declaration of function 'max' [-Wimplicit-function-declaration] 11 | if(max(A,B,C)==7){ | ^~~ main.c:12:10: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 12 | if(min(A,B,C)==5){ | ^~~ | main
s003594747
p04043
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { vector<int> v(3); rep(i,3){ cin >> v[i]; } sort(v.begin(),v.end()); vector<int> h(3)={5,7,7}; if(v==h){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:11:19: error: expected ',' or ';' before '=' token 11 | vector<int> h(3)={5,7,7}; | ^
s429692303
p04043
C++
include<iostream> using namespace std; int main() { int A,B,C; cin>>A>>B>>C; if((A==5)&&(B==5)&&(C==7)) { cout<<"YES"<<"\n"; } else if((A==5)&&(C==5)&&(B==7)) { cout<<"YES"<<"\n"; } else if((A==7)&&(B==5)&&(C==5)) { cout<<"YES"<<"\n"; } else { cout<<"NO"<<"\n"; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin>>A>>B>>C; | ^~~ a.cc:9:17: error: 'cout' was not declared in this scope 9 | cout<<"YES"<<"\n"; | ^~~~ a.cc:13:17: error: 'cout' was not declared in this scope 13 | cout<<"YES"<<"\n"; | ^~~~ a.cc:17:17: error: 'cout' was not declared in this scope 17 | cout<<"YES"<<"\n"; | ^~~~ a.cc:21:17: error: 'cout' was not declared in this scope 21 | cout<<"NO"<<"\n"; | ^~~~
s367990944
p04043
C++
#include <iostream> #include <string> using namespace std; int main() { string A,B,C; int a,b,c; cin >> A >> B >> C; a = A.length(); b = B.length(); c = C.length(); if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) or (b == c === 7 and a == 5)){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:20: error: expected primary-expression before '=' token 13 | or (b == c === 7 and a == 5)){ | ^
s077133128
p04043
C++
#include <iostream> #include <string> using namespace std; int main() { string A,B,C; cin >> A >> B >> C; a = A.length(); b = B.length(); c = C.length(); if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) or (b == c === 7 and a == 5)){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'a' was not declared in this scope 8 | a = A.length(); | ^ a.cc:9:3: error: 'b' was not declared in this scope 9 | b = B.length(); | ^ a.cc:10:3: error: 'c' was not declared in this scope 10 | c = C.length(); | ^ a.cc:12:20: error: expected primary-expression before '=' token 12 | or (b == c === 7 and a == 5)){ | ^
s304340294
p04043
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) or (b == c === 7 and a == 5)){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: expected primary-expression before '=' token 8 | or (b == c === 7 and a == 5)){ | ^
s743365592
p04043
C++
#include <iostream> #include <string> using namespace std; int main() { string a,b,c; cin >> a >> b >> c; if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) or (b == c === 7 and a == 5)){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:25: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ~ ^~ ~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} 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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ 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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ 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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ 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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ 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:8:28: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: mismatched types 'const _CharT*' and 'int' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ /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:8:28: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ 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:8:28: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>' 8 | if((a == b == 7 and c == 5) or (a == c == 7 and b == 5) | ^ 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==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==
s688081814
p04043
C++
#include <iostream> #include <string> using namespace std; int main() { string a,b,c; cin << a << b << c; if((a == b and b != c) or (a == c and c != b) or (b == c and c != a)){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | cin << a << b << c; | ~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | std::istream {aka std::basic_istream<char>} 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:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:7:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 7 | cin << a << b << c; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = std::__cxx11::basic_string<char>]': a.cc:7:10: required from here 7 | cin << a << b << c; | ^ /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) | ^~~~~~~~
s338947892
p04043
C++
#include<bits/stdc++.h> using namespcae std; int main(){ int a,b,c; cin>>a>>b>>c; int occa = 0 , occb = 0; if(a == 5) occa++; if(b == 5) occa++; if(c == 5) occa++; if(a == 7) occb++; if(b == 7) occb++; if(c == 7) occb++; if(occa == 2 && occb == 7) cout<<"YES"; else cout<<"NO"; }
a.cc:2:7: error: expected nested-name-specifier before 'namespcae' 2 | using namespcae std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, 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:22:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 22 | cout<<"YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:24:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 24 | cout<<"NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s268761441
p04043
C++
#include<bis/stdc++.h> using namespcae std; int main(){ int a,b,c; cin>>a>>b>>c; int occa = 0 , occb = 0; if(a == 5) occa++; if(b == 5) occa++; if(c == 5) occa++; if(a == 7) occb++; if(b == 7) occb++; if(c == 7) occb++; if(occa == 2 && occb == 7) cout<<"YES"; else cout<<"NO"; }
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory 1 | #include<bis/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s511411850
p04043
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long i=0;i<(long long)(n);i++) #define REP(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() #define eb emplace_back #define lb(v,k) (lower_bound(all(v),k)-v.begin()) #define ub(v,k) (upper_bound(all(v),k)-v.begin()) #define fi first #define se second #define pi M_PI #define PQ(T) priority_queue<T> #define SPQ(T) priority_queue<T,vector<T>,greater<T>> using ll=long long; using P=pair<ll,ll>; using PP=tuple<ll,ll,ll>; using S=multiset<ll>; using vi=vector<ll>; using vvi=vector<vi>; using vvvi=vector<vvi>; const ll inf=1001001001001001; const int INF=1001001001; const int mod=1000000007; const double eps=1e-10; template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;} template<class T> void out(T a){cout<<a<<'\n';} template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';} template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';} template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';} template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);} template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);} template<class T> void YesNo(T b){if(b)out("Yes");else out("No");} void decimal(int x){cout<<fixed<<setprecision(x);} ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;} vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;} void solve() { //int a,b,c; vi v={a,b,c},v_={5,5,7}; sort(all(v)); if(v==v_) out("YES"); else out("NO"); } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
a.cc: In function 'void solve()': a.cc:41:15: error: 'a' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:17: error: 'b' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:19: error: 'c' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:20: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'vi' {aka 'std::vector<long long int>'} 41 | vi v={a,b,c},v_={5,5,7}; | ^ | | | <brace-enclosed initializer list>
s728235428
p04043
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long i=0;i<(long long)(n);i++) #define REP(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() #define eb emplace_back #define lb(v,k) (lower_bound(all(v),k)-v.begin()) #define ub(v,k) (upper_bound(all(v),k)-v.begin()) #define fi first #define se second #define pi M_PI #define PQ(T) priority_queue<T> #define SPQ(T) priority_queue<T,vector<T>,greater<T>> using ll=long long; using P=pair<ll,ll>; using PP=tuple<ll,ll,ll>; using S=multiset<ll>; using vi=vector<ll>; using vvi=vector<vi>; using vvvi=vector<vvi>; const ll inf=1001001001001001; const int INF=1001001001; const int mod=1000000007; const double eps=1e-10; template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;} template<class T> void out(T a){cout<<a<<'\n';} template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';} template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';} template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';} template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);} template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);} template<class T> void YesNo(T b){if(b)out("Yes");else out("No");} void decimal(int x){cout<<fixed<<setprecision(x);} ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;} vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;} void solve() { //int a,b,c; vi v={a,b,c},v_={5,5,7}; sort(all(v)); if(v==v_) out("YES"); else out("NO"); } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
a.cc: In function 'void solve()': a.cc:41:15: error: 'a' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:17: error: 'b' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:19: error: 'c' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:20: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'vi' {aka 'std::vector<long long int>'} 41 | vi v={a,b,c},v_={5,5,7}; | ^ | | | <brace-enclosed initializer list>
s463632478
p04043
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long i=0;i<(long long)(n);i++) #define REP(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() #define eb emplace_back #define lb(v,k) (lower_bound(all(v),k)-v.begin()) #define ub(v,k) (upper_bound(all(v),k)-v.begin()) #define fi first #define se second #define pi M_PI #define PQ(T) priority_queue<T> #define SPQ(T) priority_queue<T,vector<T>,greater<T>> using ll=long long; using P=pair<ll,ll>; using PP=tuple<ll,ll,ll>; using S=multiset<ll>; using vi=vector<ll>; using vvi=vector<vi>; using vvvi=vector<vvi>; const ll inf=1001001001001001; const int INF=1001001001; const int mod=1000000007; const double eps=1e-10; template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;} template<class T> void out(T a){cout<<a<<'\n';} template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';} template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';} template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';} template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);} template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);} template<class T> void YesNo(T b){if(b)out("Yes");else out("No");} void decimal(int x){cout<<fixed<<setprecision(x);} ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;} vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;} void solve() { //int a,b,c; vi v={a,b,c},v_={5,5,7}; sort(all(v)); if(v==v_) out("YES"); else out("NO"); } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
a.cc: In function 'void solve()': a.cc:41:15: error: 'a' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:17: error: 'b' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:19: error: 'c' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:20: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'vi' {aka 'std::vector<long long int>'} 41 | vi v={a,b,c},v_={5,5,7}; | ^ | | | <brace-enclosed initializer list>
s501908708
p04043
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long i=0;i<(long long)(n);i++) #define REP(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() #define eb emplace_back #define lb(v,k) (lower_bound(all(v),k)-v.begin()) #define ub(v,k) (upper_bound(all(v),k)-v.begin()) #define fi first #define se second #define pi M_PI #define PQ(T) priority_queue<T> #define SPQ(T) priority_queue<T,vector<T>,greater<T>> using ll=long long; using P=pair<ll,ll>; using PP=tuple<ll,ll,ll>; using S=multiset<ll>; using vi=vector<ll>; using vvi=vector<vi>; using vvvi=vector<vvi>; const ll inf=1001001001001001; const int INF=1001001001; const int mod=1000000007; const double eps=1e-10; template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;} template<class T> void out(T a){cout<<a<<'\n';} template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';} template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';} template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';} template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);} template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);} template<class T> void YesNo(T b){if(b)out("Yes");else out("No");} void decimal(int x){cout<<fixed<<setprecision(x);} ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;} vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;} void solve() { //int a,b,c; vi v={a,b,c},v_={5,5,7}; sort(all(v)); if(v==v_) out("YES"); else out("NO"); } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
a.cc: In function 'void solve()': a.cc:41:15: error: 'a' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:17: error: 'b' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:19: error: 'c' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:20: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'vi' {aka 'std::vector<long long int>'} 41 | vi v={a,b,c},v_={5,5,7}; | ^ | | | <brace-enclosed initializer list>
s866532501
p04043
C++
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long i=0;i<(long long)(n);i++) #define REP(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() #define eb emplace_back #define lb(v,k) (lower_bound(all(v),k)-v.begin()) #define ub(v,k) (upper_bound(all(v),k)-v.begin()) #define fi first #define se second #define pi M_PI #define PQ(T) priority_queue<T> #define SPQ(T) priority_queue<T,vector<T>,greater<T>> using ll=long long; using P=pair<ll,ll>; using PP=tuple<ll,ll,ll>; using S=multiset<ll>; using vi=vector<ll>; using vvi=vector<vi>; using vvvi=vector<vvi>; const ll inf=1001001001001001; const int INF=1001001001; const int mod=1000000007; const double eps=1e-10; template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;} template<class T> void out(T a){cout<<a<<'\n';} template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';} template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';} template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';} template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);} template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);} template<class T> void YesNo(T b){if(b)out("Yes");else out("No");} void decimal(int x){cout<<fixed<<setprecision(x);} ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;} vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;} void solve() { //int a,b,c; vi v={a,b,c},v_={5,5,7}; sort(all(v)); if(v==v_) out("YES"); else out("NO"); } signed main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }
a.cc: In function 'void solve()': a.cc:41:15: error: 'a' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:17: error: 'b' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:19: error: 'c' was not declared in this scope 41 | vi v={a,b,c},v_={5,5,7}; | ^ a.cc:41:20: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'vi' {aka 'std::vector<long long int>'} 41 | vi v={a,b,c},v_={5,5,7}; | ^ | | | <brace-enclosed initializer list>
s932920048
p04043
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if ((a * b) % 2 == 0) System.out.println("Even"); else System.out.println("Odd"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:4:29: error: 'String' has not been declared 4 | public static void main(String[] args) { | ^~~~~~ a.cc:4:38: error: expected ',' or '...' before 'args' 4 | public static void main(String[] args) { | ^~~~ a.cc:13:2: error: expected ';' after class definition 13 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:5:9: error: 'Scanner' was not declared in this scope 5 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:6:17: error: 'sc' was not declared in this scope 6 | int a = sc.nextInt(); | ^~ a.cc:9:13: error: 'System' was not declared in this scope 9 | System.out.println("Even"); | ^~~~~~ a.cc:11:13: error: 'System' was not declared in this scope 11 | System.out.println("Odd"); | ^~~~~~
s600201032
p04043
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); String s = sc.next(); System.out.println(a+b+c); System.out.println(s); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11: error: expected ':' before 'static' 5 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:5:29: error: 'String' has not been declared 5 | public static void main(String[] args) { | ^~~~~~ a.cc:5:38: error: expected ',' or '...' before 'args' 5 | public static void main(String[] args) { | ^~~~ a.cc:15:2: error: expected ';' after class definition 15 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:6:7: error: 'Scanner' was not declared in this scope 6 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:7:15: error: 'sc' was not declared in this scope 7 | int a = sc.nextInt(); | ^~ a.cc:10:7: error: 'String' was not declared in this scope 10 | String s = sc.next(); | ^~~~~~ a.cc:12:7: error: 'System' was not declared in this scope 12 | System.out.println(a+b+c); | ^~~~~~ a.cc:13:26: error: 's' was not declared in this scope 13 | System.out.println(s); | ^
s188229634
p04043
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int[] array = {a, b, c}; int[] anwer = {5, 5, 7}; Arrays.sort(array); if (Arrays.equals(array, anwer)) System.out.println("YES"); else System.out.println("NO"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11: error: expected ':' before 'static' 5 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:5:29: error: 'String' has not been declared 5 | public static void main(String[] args) { | ^~~~~~ a.cc:5:38: error: expected ',' or '...' before 'args' 5 | public static void main(String[] args) { | ^~~~ a.cc:21:2: error: expected ';' after class definition 21 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:6:7: error: 'Scanner' was not declared in this scope 6 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:7:15: error: 'sc' was not declared in this scope 7 | int a = sc.nextInt(); | ^~ a.cc:11:10: error: structured binding declaration cannot have type 'int' 11 | int[] array = {a, b, c}; | ^~ a.cc:11:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:11:10: error: empty structured binding declaration a.cc:11:13: error: expected initializer before 'array' 11 | int[] array = {a, b, c}; | ^~~~~ a.cc:12:10: error: structured binding declaration cannot have type 'int' 12 | int[] anwer = {5, 5, 7}; | ^~ a.cc:12:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:12:10: error: empty structured binding declaration a.cc:12:13: error: expected initializer before 'anwer' 12 | int[] anwer = {5, 5, 7}; | ^~~~~ a.cc:14:7: error: 'Arrays' was not declared in this scope 14 | Arrays.sort(array); | ^~~~~~ a.cc:14:19: error: 'array' was not declared in this scope 14 | Arrays.sort(array); | ^~~~~ a.cc:16:32: error: 'anwer' was not declared in this scope 16 | if (Arrays.equals(array, anwer)) | ^~~~~ a.cc:17:9: error: 'System' was not declared in this scope 17 | System.out.println("YES"); | ^~~~~~ a.cc:19:9: error: 'System' was not declared in this scope 19 | System.out.println("NO"); | ^~~~~~
s173065048
p04043
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int[] array = {a, b, c}; int[] anwer = {5, 5, 7}; Arrays.sort(array); if (array == anwer) System.out.println("YES"); else System.out.println("NO"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11: error: expected ':' before 'static' 5 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:5:29: error: 'String' has not been declared 5 | public static void main(String[] args) { | ^~~~~~ a.cc:5:38: error: expected ',' or '...' before 'args' 5 | public static void main(String[] args) { | ^~~~ a.cc:21:2: error: expected ';' after class definition 21 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:6:7: error: 'Scanner' was not declared in this scope 6 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:7:15: error: 'sc' was not declared in this scope 7 | int a = sc.nextInt(); | ^~ a.cc:11:10: error: structured binding declaration cannot have type 'int' 11 | int[] array = {a, b, c}; | ^~ a.cc:11:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:11:10: error: empty structured binding declaration a.cc:11:13: error: expected initializer before 'array' 11 | int[] array = {a, b, c}; | ^~~~~ a.cc:12:10: error: structured binding declaration cannot have type 'int' 12 | int[] anwer = {5, 5, 7}; | ^~ a.cc:12:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:12:10: error: empty structured binding declaration a.cc:12:13: error: expected initializer before 'anwer' 12 | int[] anwer = {5, 5, 7}; | ^~~~~ a.cc:14:7: error: 'Arrays' was not declared in this scope 14 | Arrays.sort(array); | ^~~~~~ a.cc:14:19: error: 'array' was not declared in this scope 14 | Arrays.sort(array); | ^~~~~ a.cc:16:20: error: 'anwer' was not declared in this scope 16 | if (array == anwer) | ^~~~~ a.cc:17:9: error: 'System' was not declared in this scope 17 | System.out.println("YES"); | ^~~~~~ a.cc:19:9: error: 'System' was not declared in this scope 19 | System.out.println("NO"); | ^~~~~~
s988624875
p04043
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int[] array = {a, b, c} Arrays.sort(array); if (array == [5, 5, 7]) System.out.println("YES"); else System.out.println("NO"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11: error: expected ':' before 'static' 5 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:5:29: error: 'String' has not been declared 5 | public static void main(String[] args) { | ^~~~~~ a.cc:5:38: error: expected ',' or '...' before 'args' 5 | public static void main(String[] args) { | ^~~~ a.cc:20:2: error: expected ';' after class definition 20 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:6:7: error: 'Scanner' was not declared in this scope 6 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:7:15: error: 'sc' was not declared in this scope 7 | int a = sc.nextInt(); | ^~ a.cc:11:10: error: structured binding declaration cannot have type 'int' 11 | int[] array = {a, b, c} | ^~ a.cc:11:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:11:10: error: empty structured binding declaration a.cc:11:13: error: expected initializer before 'array' 11 | int[] array = {a, b, c} | ^~~~~ a.cc:13:7: error: 'Arrays' was not declared in this scope 13 | Arrays.sort(array); | ^~~~~~ a.cc:13:19: error: 'array' was not declared in this scope 13 | Arrays.sort(array); | ^~~~~ a.cc:15:21: error: expected identifier before numeric constant 15 | if (array == [5, 5, 7]) | ^ a.cc:15:22: error: expected ']' before ',' token 15 | if (array == [5, 5, 7]) | ^ a.cc: In lambda function: a.cc:15:22: error: expected '{' before ',' token a.cc: In static member function 'static void Main::main(int*)': a.cc:15:28: error: expected ')' before ']' token 15 | if (array == [5, 5, 7]) | ^ a.cc:15:10: note: to match this '(' 15 | if (array == [5, 5, 7]) | ^ a.cc:15:28: error: expected primary-expression before ']' token 15 | if (array == [5, 5, 7]) | ^ a.cc:18:9: error: 'System' was not declared in this scope 18 | System.out.println("NO"); | ^~~~~~
s733426267
p04043
C++
#include <bits/stdc++> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; string output = "NO"; if (A == 5 && B == 5 && C == 7) { output = "YES"; } else if (A == 5 && B == 7 && C == 5) { output = "YES"; } else if (A == 7 && B == 5 && C == 5) { output = "YES"; } cout << output << endl; }
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s274362754
p04043
C++
A, B, C = [int(i) for i in input().split(' ')] if A == 7 or B == 7 or C == 7: if A == 5 and B == 5: print('YES') elif A == 5 and C == 5: print('YES') elif B == 5 and C == 5: print('YES') else: print('NO')
a.cc:5:15: warning: multi-character character constant [-Wmultichar] 5 | print('YES') | ^~~~~ a.cc:7:15: warning: multi-character character constant [-Wmultichar] 7 | print('YES') | ^~~~~ a.cc:9:15: warning: multi-character character constant [-Wmultichar] 9 | print('YES') | ^~~~~ a.cc:11:15: warning: multi-character character constant [-Wmultichar] 11 | print('NO') | ^~~~ a.cc:1:1: error: 'A' does not name a type 1 | A, B, C = [int(i) for i in input().split(' ')] | ^
s355626999
p04043
C++
abc=list(map(int,input().split())) if abc.count(5)=2 and abc.count(7)=1: print ("yes") else: print ("no")
a.cc:1:1: error: 'abc' does not name a type 1 | abc=list(map(int,input().split())) | ^~~
s456555152
p04043
C++
#include <bits/stdc++.h> using namespace std; int A,B,C int main() { if(A==5,B==5,C==7)printf("Yes") else if(A==5,B==7,C==5)printf("Yes") else if(A==7,B==5,C==5)printf("Yes") else printf("No") }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() { | ^~~
s699487844
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a[3]; for (int i = 0; i < 3; ++i) { cin >> a[i]; } int s1 = 0; int s2= 0; for (int i = 0; I < 3; ++i) { if (a[i] == 5) s1++; else if (a[i] == 7) s2++; } if (s1 == 2 && s2 == 1) { cout << "YES\n"; } else { cout << "NO\n"; } return 0; }
a.cc: In function 'int main()': a.cc:14:17: error: 'I' was not declared in this scope 14 | for (int i = 0; I < 3; ++i) { | ^
s021919268
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b > >c; if (a+b+c == 19) { cout << "YES\n"; } else { cout << "NO\n"; } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: expected primary-expression before '>' token 7 | cin >> a >> b > >c; | ^
s190046524
p04043
C++
#include<iostream> using namespace std; int main(){ int sum=17; int mul=175; int a=0; int sum1=0; int mul1=1; for(int i=0;i<3;i++) {cin>>a; sum1=sum1+a; mul1=mul1*a} if(sum==sum1&&mul==mul1) {cout<<"yes"; } else {cout<<"no";} return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: expected ';' before '}' token 12 | mul1=mul1*a} | ^ | ;
s336161946
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin>>A,B,C; int w5 =0; int w7 =0+ if(A==5){ w5++; } else if(A ==7){ w7++; } if(B==5){ w5++; } else if(B ==7){ w7++; } if(C==5){ w5++; } else if(C ==7){ w7++; } if(w5 ==2&&w7==1){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected primary-expression before 'if' 10 | if(A==5){ | ^~
s861689727
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ System.out.println("OK"); }else{ System.out.println("NG"); } } }
Main.java:10: error: ')' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ')' or ',' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ';' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ')' or ',' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ';' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ')' or ',' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ';' expected if ((a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:12: error: 'else' without 'if' }else{ ^ 8 errors
s490393482
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ System.out.println("OK"); }else{ System.out.println("NG"); } } }
Main.java:10: error: ')' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ')' or ',' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ';' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ')' or ',' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ';' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ')' or ',' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:10: error: ';' expected if (a + b + c == 17 and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)){ ^ Main.java:12: error: 'else' without 'if' }else{ ^ 8 errors
s146252709
p04043
C++
#include<bis/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==7 && b==7 && c==5 || a==7 && b==5 && c==7 || a==5 && b==7 && c==7){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory 1 | #include<bis/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s028038595
p04043
C++
/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
s763521203
p04043
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int (a==5&&b==7||b==5&&c==7 ) { cout<<"YES"; } else { cout<<"NO"; } }
a.cc: In function 'int main()': a.cc:7:32: error: expected ';' before '{' token 7 | int (a==5&&b==7||b==5&&c==7 ) | ^ | ; 8 | { | ~ a.cc:11:3: error: 'else' without a previous 'if' 11 | else | ^~~~
s176021349
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if (A == 5 && B == 5 && C == 7) cout << "YES" << endl; else if (A == 5 && B == 7 && C == 5) cout << "YES" << endl; else if (A == 7 %% B == 5 && C == 5) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:9:20: error: expected primary-expression before '%' token 9 | else if (A == 7 %% B == 5 && C == 5) cout << "YES" << endl; | ^
s138002464
p04043
C++
#include<iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if((a == 5 && b == 5 && c == 7) || (a == 5 && b == 7 && c == 5) || (a == 7 && b == 5 && c == 5)) cout << "YES"; else cout << "NO"; return 0 }
a.cc: In function 'int main()': a.cc:10:13: error: expected ';' before '}' token 10 | return 0 | ^ | ; 11 | } | ~
s725862076
p04043
C++
/** In the name of Allah, the Gracious, the Merciful. * Praise be to Allah, Lord of the Worlds. * ************************************** * * I have not failed, I have just found 1000 WAYS that won't work. * __________________________________ * Author : Abd El-Twab M. Fakhry * __________________________________ */ #include <ext/rope> #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #define print(arr, l, r) for(int i = (l); i < (r); cout << arr[i++] << " \n"[i == r]) #define read(arr, l, r) for(int i = (l); i < (r); cin >> arr[i++]) #define repr(i, r, l) for (int i = r; i > l; i--) #define rep(i, l, r) for (int i = l; i < r; i++) #define all(a) a.begin() , a.end() #define RT(n) return cout << (n) << endl, 0; #define sz(a) (int)a.size() #define endl '\n' #define D(x) cout << #x << " = " << (x) << '\n' #define F first #define S second #define PB push_back #define EB emplace_back #define lsb(x) (x & -x) #define get(n) find_by_order(n) #define sqrt(n) sqrtl(n) #define pow(a, b) powl(a, b) #define indexOf(n) order_of_key(n) #define isPowerOfTwo(x) (x && !(x & (x - 1))) using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; typedef long long ll; typedef unsigned long long ull; /**---------------------->> Constants <<-----------------------**/ const double Pi = 2 * acos(0.0), Euler = 2.71828182845904523536, Epsln = 1e-9, GoldenR = (1 + sqrtl(5.0)) / 2; const ll MgcPrim = 2305843009213693951; const int MxsZ = (int)1e5 + 9, oo = 0x3f3f3f3f, ModB2 = (1 << 30) + 7, ModBT7 = (int)1e9 + 7, ModBT = (int)1e9; /**---------------->> Functions & Shortcuts <<-----------------**/ template <class T> T Gcd(T a, T b) { return b ? Gcd(b, a % b) : a; } template <class T> T Unique(T v) { return v.erase(unique(all(v)), v.end()), v; } template <class T> T Lcm(T a, T b) { return a / Gcd(a, b) * 1ll * b; } template <class T> /** Phi(a * b) = Phi(a) * Phi(b) where a and b Prime Factors and k their power **/ T Phi(T a, T k) { return pow(a, k - 1) * (a - 1); } template <class T> using indexed_set = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update >; template <class T> using matrix = vector < vector <T> >; template <class T> using min_heap = priority_queue < T, vector <T>, greater <T> >; /** Watch **/ template <class T> string ToString(T x) { stringstream sout; sout << x; return sout.str(); } #ifdef BFS int dx8[8] = { 1, -1, 0, 0, 1, 1, -1, -1 }, dx4[4] = { 0, 0, 1,-1}; int dy8[8] = { 0, 0, 1, -1, 1, -1, 1, -1 }, dy4[4] = { 1,-1, 0, 0}; #endif // BFS /**------------------>> Fast input / output <<-----------------**/ void Fast() { cin.sync_with_stdio(0); cin.tie(0);cout.tie(0); } /**----------------->> input / output Files <<-----------------**/ void File() { #ifdef FIO freopen("input.in", "r", stdin); freopen("output.out", "w", stdout); #endif // FIO } /**------------------>> Initialization gap <<------------------**/ int n, a[4]; inline void Solve() { read(a, 0, 3); sort(a, a + 3); if(a[0] == a[1] && a[1] == 5 && a[2] == 7) cout << "YES" << endl; else cout << "NO" < endl; } /**------------------------->> Main <<-------------------------**/ int main() { Fast(); File(); Solve(); }
a.cc: In function 'void Solve()': a.cc:111:27: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'char') 111 | else cout << "NO" < endl; | ~~~~~~~~~~~~ ^ | | | std::basic_ostream<char> a.cc:111:27: note: candidate: 'operator<(int, int)' (built-in) 111 | else cout << "NO" < endl; | ^ a.cc:111:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:12: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:23:30: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:23:30: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/c++/14/ext/rope:50, from a.cc:11: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expansion of macro 'endl' 111 | else cout << "NO" < endl; | ^~~~ In file included from /usr/include/c++/14/functional:53, from /usr/include/c++/14/tr1/functional:36, from /usr/include/c++/14/ext/rope:59: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:23:30: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 23 | #define endl '\n' | ^~~~ a.cc:111:29: note: in expa
s837578329
p04043
C
int main(void){ int A,B,C; bool f = false; scanf("%d %d %d",&A,&B,&C); if(A+B+C==17){ if((A=7&&B==5)||(A=5&&B==7)||(A=5&&B==5)){ f=true; } } if(f){ printf("YES"); }else{ printf("NO"); } }
main.c: In function 'main': main.c:3:3: error: unknown type name 'bool' 3 | bool f = false; | ^~~~ main.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' +++ |+#include <stdbool.h> 1 | int main(void){ main.c:3:12: error: 'false' undeclared (first use in this function) 3 | bool f = false; | ^~~~~ main.c:3:12: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' main.c:3:12: note: each undeclared identifier is reported only once for each function it appears in main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d %d %d",&A,&B,&C); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | scanf("%d %d %d",&A,&B,&C); | ^~~~~ main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:7:11: error: 'true' undeclared (first use in this function) 7 | f=true; | ^~~~ main.c:7:11: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' main.c:11:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 11 | printf("YES"); | ^~~~~~ main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 13 | printf("NO"); | ^~~~~~ main.c:13:5: note: include '<stdio.h>' or provide a declaration of 'printf'
s191052275
p04043
C
#include <stdio.h> int main{ int A,B,C; bool f = false; scanf("%d %d %d",&A,&B,&C); if(A+B+C==17){ if((A=7&&B==5)||(A=5&&B==7)||(A=5&&B==5)){ f=true; } } if(f){ printf("YES"); }else{ printf("NO"); } }
main.c:2:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 2 | int main{ | ^
s582430981
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b+c==17) { cout<<"Yes"<<endl; } elif(a*b*c==175) { cout<<"Yes"<<endl; } else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:4: error: 'elif' was not declared in this scope 11 | elif(a*b*c==175) | ^~~~ a.cc:15:4: error: 'else' without a previous 'if' 15 | else | ^~~~
s377385826
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> vec={A,B,C} sort(vec.begin(),vec.end()); if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){ cout << "YES" << endl; } else{ cout << "NO" << ednl; } }
a.cc: In function 'int main()': a.cc:5:20: error: 'A' was not declared in this scope 5 | vector<int> vec={A,B,C} | ^ a.cc:5:22: error: 'B' was not declared in this scope 5 | vector<int> vec={A,B,C} | ^ a.cc:5:24: error: 'C' was not declared in this scope 5 | vector<int> vec={A,B,C} | ^ a.cc:5:25: error: could not convert '{<expression error>, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>' 5 | vector<int> vec={A,B,C} | ^ | | | <brace-enclosed initializer list> a.cc:7:3: error: expected ',' or ';' before 'sort' 7 | sort(vec.begin(),vec.end()); | ^~~~ a.cc:9:10: error: expected unqualified-id before '(' token 9 | if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){ | ^ a.cc:9:22: error: expected unqualified-id before '(' token 9 | if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){ | ^ a.cc:9:34: error: expected unqualified-id before '(' token 9 | if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){ | ^ a.cc:13:21: error: 'ednl' was not declared in this scope 13 | cout << "NO" << ednl; | ^~~~
s133115232
p04043
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a; int five = 0; int seven = 0; for(int i = 0; i < 3; i++) { a = sc.nextInt(); if(a == 5) { five++; } if(a == 7) { seven++; } } if(five == 2 && seven == 1) { System.out.println("YES"); } else { System.out.println("NO"); } sc.close(); } }
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s745966694
p04043
C++
int main() { vector<int> a(3); int a5=0; int a7=0; rep(i,3) cin>>a[i]; rep(i,3){ if(a[i]==5) a5++; else if(a[i]==7) a7++; } if(a5==2&&a7==1){ cout<<"YES"<<endl;} else{cout<<"NO"<<endl;} }
a.cc: In function 'int main()': a.cc:2:3: error: 'vector' was not declared in this scope 2 | vector<int> a(3); | ^~~~~~ a.cc:2:10: error: expected primary-expression before 'int' 2 | vector<int> a(3); | ^~~ a.cc:5:7: error: 'i' was not declared in this scope 5 | rep(i,3) cin>>a[i]; | ^ a.cc:5:3: error: 'rep' was not declared in this scope 5 | rep(i,3) cin>>a[i]; | ^~~ a.cc:11:21: error: 'cout' was not declared in this scope 11 | if(a5==2&&a7==1){ cout<<"YES"<<endl;} | ^~~~ a.cc:11:34: error: 'endl' was not declared in this scope 11 | if(a5==2&&a7==1){ cout<<"YES"<<endl;} | ^~~~ a.cc:12:8: error: 'cout' was not declared in this scope 12 | else{cout<<"NO"<<endl;} | ^~~~ a.cc:12:20: error: 'endl' was not declared in this scope 12 | else{cout<<"NO"<<endl;} | ^~~~
s842843364
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin>>A>>B>>C; if(A.size()==7&&B.size()==7&&C.size()==5){ cout<<"YES"<<endl; } else if(A.size()==5&&B.size()==7&&C.size()==7){ cout<<"YES"<<endl; } else if (A.size()==7&&B.size()==5&&C.size()==7){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } } #include <bits/stdc++.h> using namespace std; int main(){ string A,B,C; cin>>A>>B>>C; if(A.size()==7&&B.size()==5&&C.size()==5){ cout<<"YES"<<endl; } else if(A.size()==5&&B.size()==7&&C.size()==5){ cout<<"YES"<<endl; } else if (A.size()==5&&B.size()==5&&C.size()==7){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc:23:5: error: redefinition of 'int main()' 23 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s301859349
p04043
Java
import java.util.Scanner; class Main{ public static void main(String [] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int [] d = new int [3]; d[0] = a; d[1] = b; d[2] = c; Arrays.sort(d); if((d[0] == 5 && d[1] == 5) && d[2] == 7) System.out.println("YES"); else System.out.println("NO"); } }
Main.java:14: error: cannot find symbol Arrays.sort(d); ^ symbol: variable Arrays location: class Main 1 error
s581922296
p04043
Java
import java.util.*; class Solution{ public static void main(String [] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int [] d = new int [3]; d[0] = a; d[1] = b; d[2] = c; Arrays.sort(d); if((d[0] == 5 && d[1] == 5) && d[2] == 7) System.out.println("YES"); else System.out.println("NO"); } } ~
Main.java:22: error: class, interface, enum, or record expected ~ ^ 1 error
s280686411
p04043
C++
#include <iostream> using namespace std; int main() { int c[3]; for (int i=0; i < 2; i++) { cin >> c[i]; } if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:10:19: error: expected identifier before numeric constant 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ a.cc:10:20: error: expected ']' before ',' token 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ | ] a.cc: In lambda function: a.cc:10:20: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:10:15: error: no match for 'operator==' (operand types are 'int [3]' and 'main()::<lambda()>') 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ~ ^~ ~~ | | | | | main()::<lambda()> | int [3] a.cc:10:15: note: candidate: 'operator==(void (*)(), void (*)())' (built-in) 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ~~^~~~~ a.cc:10:15: note: no known conversion for argument 1 from 'int [3]' to 'void (*)()' a.cc:10:15: note: candidate: 'operator==(int*, int*)' (built-in) a.cc:10:15: note: no known conversion for argument 2 from 'main()::<lambda()>' 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:10:20: note: mismatched types 'const std::fpos<_StateT>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ 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:10:20: note: mismatched types 'const std::allocator<_CharT>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ 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:10:20: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ 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:10:20: note: mismatched types 'const std::pair<_T1, _T2>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ 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:10:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int*' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int*' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: 'main()::<lambda()>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int [3]' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ /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:10:20: note: 'main()::<lambda()>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 10 | if (c == [5, 7, 5] || c == [5, 5, 7] || c == [7, 5, 5]) { | ^ 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:10:20: note: mismatched types 'const std::tuple<_UTypes ...>' and 'int [3]' 10 | if (c == [5,
s109028447
p04043
Java
import java.util.Scanner; public class Haiku { public static void main(String[] args) { String result = "NO"; Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if((A == 5 && B == 7 && C == 5) || (A == 7 && B == 5 && C == 5) || (A == 5 && B == 5 && C == 7)) { result = "YES"; } System.out.println(result); } }
Main.java:3: error: class Haiku is public, should be declared in a file named Haiku.java public class Haiku { ^ 1 error
s505443755
p04043
Java
import java.util.Scanner; public class Haiku { public static void main(String[] args) { String result = "NO"; Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if((A == 5 && B == 7 && C == 5) || (A == 7 && B == 5 && C == 5) || (A == 5 && B == 5 && C == 7)) { result = "YES"; } System.out.println(result); } }
Main.java:3: error: class Haiku is public, should be declared in a file named Haiku.java public class Haiku { ^ 1 error
s726280062
p04043
C++
#include<bits/stdc++.h> using namespace std; typedef long long int lli; int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr); int a,b,c; cin>>a>>b>>c; if((a=='5'&&b=='5'&&c=='7')||(b=='5'&&c=='5'&&a=='7')||(c=='5'&&a=='5'&&b=='7')) cout<<"Yes" else cout<<"No"; return 0; }
a.cc: In function 'int main()': a.cc:12:20: error: expected ';' before 'else' 12 | cout<<"Yes" | ^ | ; 13 | else | ~~~~
s624612099
p04043
C++
#include<bits/stdc++.h> using namespace std; typedef long long int lli; int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr); int a,b,c; cin>>a>>b>>c; if((a=='5'&&b=='5'&&c=='7')||(b=='5'&&c=='5'&&a=='7')||(c=='5'&&a=='5'&&b=='7')) cout<<"Yes" else cout<<"No"; return 0; }
a.cc: In function 'int main()': a.cc:12:20: error: expected ';' before 'else' 12 | cout<<"Yes" | ^ | ; 13 | else | ~~~~
s627221240
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> ABC(3); for (int i = 0; i < 3; i++) { cin >> ABC.at(i); } int f = 0; int s = 0; for (int i = 0; i < 3; i++) { if (ABC.at(i) == 5) { f ++; }else if (ABC.at(i) == 7) { s ++; } } cout << ((f == 2) && (s == 7)) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:18:49: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 18 | cout << ((f == 2) && (s == 7)) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s454345359
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<string> ABC(3); for (int i = 0; i < 3; i++) { cin >> ABC.at(i); } int f = 0; int s = 0; for (int i = 0; i < 3; i++) { if (ABC.size() == 5) { f ++; }else if (ABC.size() == 7) { s ++; } } if ((f == 2) && (s == 1)) { cout << "YES" << endl; }else { cout << "NO" << endl; } } }
a.cc:24:1: error: expected declaration before '}' token 24 | } | ^
s780409718
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<string> ABC(3); for (int i = 0; i < 3; i++) { cin >> ABC.at(i); } int f = 0; int s = 0; for (int i = 0; i < 3; i++) { if (ABC.size() == 5) { f ++; }else if (ABC.size() == 7) { s ++; } } cout << (f == 2) && (s == 1) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:18:47: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 18 | cout << (f == 2) && (s == 1) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s148608555
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<string> ABC(3); for (int i = 0; i < 3; i++) { cin >> ABC.at(i); } int f = 0; int s = 0; for (int i = 0; i < 3; i++) { if (ABC.at(i) == 5) { f ++; }else if (ABC.at(i) == 7) { s ++; } } cout << (f == 2) && (s == 1) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:12:19: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'int') 12 | if (ABC.at(i) == 5) { | ~~~~~~~~~ ^~ ~ | | | | | int | __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:12:22: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:12:22: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:12:22: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if (ABC.at(i) == 5) { | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 12 | if (ABC.at(i) == 5) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h: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:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 12 | if (ABC.at(i) == 5) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /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:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if (ABC.at(i) == 5) { | ^ /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:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if (ABC.at(i) == 5) { | ^ /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:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 12 | if (ABC.at(i) == 5) { | ^ /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:12:22: note: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 12 | if (ABC.at(i) == 5) { | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /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:
s916767028
p04043
C++
include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin>>A>>B>>C; if(A==5%%B==7%%C==5){ cout<<"YES"<<endl; } if(A==7%%B==5%%C==5){ cout<<"YES"<<endl; } if(A==5%%B==5%%C==7){ cout<<"YES"<<endl; } else cout<<"NO"<<endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:2: error: 'cin' was not declared in this scope 6 | cin>>A>>B>>C; | ^~~ a.cc:7:10: error: expected primary-expression before '%' token 7 | if(A==5%%B==7%%C==5){ | ^ a.cc:7:16: error: expected primary-expression before '%' token 7 | if(A==5%%B==7%%C==5){ | ^ a.cc:8:9: error: 'cout' was not declared in this scope 8 | cout<<"YES"<<endl; | ^~~~ a.cc:8:22: error: 'endl' was not declared in this scope 8 | cout<<"YES"<<endl; | ^~~~ a.cc:10:10: error: expected primary-expression before '%' token 10 | if(A==7%%B==5%%C==5){ | ^ a.cc:10:16: error: expected primary-expression before '%' token 10 | if(A==7%%B==5%%C==5){ | ^ a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout<<"YES"<<endl; | ^~~~ a.cc:11:22: error: 'endl' was not declared in this scope 11 | cout<<"YES"<<endl; | ^~~~ a.cc:13:10: error: expected primary-expression before '%' token 13 | if(A==5%%B==5%%C==7){ | ^ a.cc:13:16: error: expected primary-expression before '%' token 13 | if(A==5%%B==5%%C==7){ | ^ a.cc:14:9: error: 'cout' was not declared in this scope 14 | cout<<"YES"<<endl; | ^~~~ a.cc:14:22: error: 'endl' was not declared in this scope 14 | cout<<"YES"<<endl; | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope 17 | cout<<"NO"<<endl; | ^~~~ a.cc:17:21: error: 'endl' was not declared in this scope 17 | cout<<"NO"<<endl; | ^~~~
s333946906
p04043
C++
// include // ------------------------------------------------ #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <math.h> using namespace std; // func // ------------------------------------------------ int CalcSumOfDigit(int n); // 各桁の和を計算する。 // define // ------------------------------------------------ #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define pb push_back #define sz(a) int((a).size()) #define rep(i,n) for(int(i)=0;(i)<(n);(i)++) #define repe(i,n) for(int(i)=0;(i)<=(n);(i)++) #define vsort(v) sort((v).begin(),(v).end()) #define rvsort(v) sort(rall((v))) #define vi vector<int> const int INF = 1e9; // code // ------------------------------------------------ int main() { int a = 0, b = 0; rep(i,3) { int i; cin >> i; if ( i == 5) { a++; } else if (i == 7) { b++; } } if(a == 2 && b == 1) cout << "YES" << endl; else { cout << "NO"<<endl; } return 0; } // funcの実体 // ------------------------------------------------ int CalcSumOfDigit(int n) { int s = 0; while(n) { s += n % 10; n = n / 10; } return s; }
a.cc: In function 'int main()': a.cc:36:9: error: redeclaration of 'int i' 36 | int i; | ^ a.cc:34:7: note: 'int i' previously declared here 34 | rep(i,3) | ^ a.cc:20:31: note: in definition of macro 'rep' 20 | #define rep(i,n) for(int(i)=0;(i)<(n);(i)++) | ^
s117481923
p04043
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==5&&b==5&&c==7){ cout<<"YES"; return 0; } if(a==7&&b==5&&c==5){ cout<<"YES"; return 0; } if(a==5&&b==7&&c==5){ cout<<"YES"; return 0; } cout<<"NO" return 0; }
a.cc: In function 'int main()': a.cc:21:19: error: expected ';' before 'return' 21 | cout<<"NO" | ^ | ; 22 | return 0; | ~~~~~~
s013425031
p04043
C++
using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if( (a == b) && (a == c)) cout << 1; else if((a == b) || (b == c)) cout << 2; else cout << 3; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not declared in this scope 8 | cin >> a >> b >> c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout << 1; | ^~~~ a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout << 2; | ^~~~ a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:5: error: 'cout' was not declared in this scope 14 | cout << 3; | ^~~~ a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s339477678
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin << A << B << C; if(A == 5 && B == 5 && C == 7){ cout >> "YES" >> endl; }else if(){ } }
a.cc: In function 'int main()': a.cc:6:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin << A << B << C; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:13: note: candidate: 'operator<<(int, int)' (built-in) 6 | cin << A << B << C; | ~~~~^~~~ a.cc:6: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/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /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:6:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin << A << B << C; | ^~~ 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/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B << C; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduct
s939559040
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> V(3); cin >> V.at(0) >> V.at(1) >> V.at(2); sort(V.begin,V.end); if(V.at(0) == 5 && V.at(1) == 5 && V.at(2) == 7 ){ cout << "YES" << endl; return 0; } cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)' 7 | sort(V.begin,V.end); | ~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)' 4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4762:5: note: template argument deduction/substitution failed: a.cc:7:7: note: couldn't deduce template parameter '_RAIter' 7 | sort(V.begin,V.end); | ~~~~^~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)' 4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)' 292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 2 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)' 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 2 provided
s549165545
p04043
C++
a = input().split() a.sort() if a==["5","5","7"]: print("YES") else: print("NO")
a.cc:1:1: error: 'a' does not name a type 1 | a = input().split() | ^
s487123792
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin >> A >> B >> C; vector<int> words = {A,B,C}; words.sort(); if((words.at(0) == 5) && (words.at(1) == 5) && (words.at(2) == 7)){ cout << "YES" << endl ; return 0; } cout << "NO" << endl ; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'class std::vector<int>' has no member named 'sort' 8 | words.sort(); | ^~~~
s184099770
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; if (A+B+C == 22 && A*B*C == 175){ cout << YES << endl; } else { cout << NO << endl; } }
a.cc: In function 'int main()': a.cc:9:13: error: 'YES' was not declared in this scope 9 | cout << YES << endl; | ^~~ a.cc:12:13: error: 'NO' was not declared in this scope 12 | cout << NO << endl; | ^~
s943054396
p04043
C++
#include <iostream> using namespace std; int f,s; int main(){ for(int i=0;i<3;i++){ cin>>x; f+=(x==5); s+=(x==7); } if(f==2&&s==1) cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:6:14: error: 'x' was not declared in this scope 6 | cin>>x; | ^
s305384951
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { string A B C; cin >> A B C; if (ABC == 5 5 7) { cout << "Yes" << endl; } if (ABC == 5 7 5) { cout << "Yes" << endl; } if (ABC == 7 5 5) { cout << "Yes" << endl; } else { cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:5:12: error: expected initializer before 'B' 5 | string A B C; | ^ a.cc:6:10: error: 'A' was not declared in this scope 6 | cin >> A B C; | ^ a.cc:8:7: error: 'ABC' was not declared in this scope 8 | if (ABC == 5 5 7) { | ^~~ a.cc:8:15: error: expected ')' before numeric constant 8 | if (ABC == 5 5 7) { | ~ ^~ | ) a.cc:12:7: error: 'ABC' was not declared in this scope 12 | if (ABC == 5 7 5) { | ^~~ a.cc:12:15: error: expected ')' before numeric constant 12 | if (ABC == 5 7 5) { | ~ ^~ | ) a.cc:16:7: error: 'ABC' was not declared in this scope 16 | if (ABC == 7 5 5) { | ^~~ a.cc:16:15: error: expected ')' before numeric constant 16 | if (ABC == 7 5 5) { | ~ ^~ | )
s617851572
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { string ABC; cin >> ABC; if (ABC == 557) { cout << "Yes" << endl; } if (ABC == 575) { cout << "Yes" << endl; } if (ABC == 755) { cout << "Yes" << endl; } else { cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:8:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 8 | if (ABC == 557) { | ~~~ ^~ ~~~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:8:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:8:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:8:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 8 | if (ABC == 557) { | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h: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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | if (ABC == 557) { | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if (ABC == 557) { | ^~~ /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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if (ABC == 557) { | ^~~ /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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if (ABC == 557) { | ^~~ /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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if (ABC == 557) { | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 8 | if (ABC == 557) { | ^~~ In file included from /usr/include/c++/14/string:43: /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:8:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 8 | if (ABC == 557) { | ^~~ 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:8:14: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if (ABC == 557) { | ^~~ /usr/include/c++/14/string_view:637:5: note:
s190403957
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { string ABC; cin >> ABC; if (ABC ==5 57) { cout << "Yes" << endl; } if (ABC == 575) { cout << "Yes" << endl; } if (ABC == 755) { cout << "Yes" << endl; } else { cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:8:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 8 | if (ABC ==5 57) { | ~~~ ^~~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:8:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:8:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:8:13: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 8 | if (ABC ==5 57) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h: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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | if (ABC ==5 57) { | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if (ABC ==5 57) { | ^ /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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if (ABC ==5 57) { | ^ /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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if (ABC ==5 57) { | ^ /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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if (ABC ==5 57) { | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 8 | if (ABC ==5 57) { | ^ In file included from /usr/include/c++/14/string:43: /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:8:13: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 8 | if (ABC ==5 57) { | ^ 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:8:13: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if (ABC ==5 57) { | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> con
s170342680
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { string ABC; cin >> ABC; if (ABC==557) { cout << "Yes" << endl; } if (ABC==575) { cout << "Yes" << endl; } if (ABC==755) { cout << "Yes" << endl; } else { cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:8:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 8 | if (ABC==557) { | ~~~^~~~~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:8:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:8:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:8:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 8 | if (ABC==557) { | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h: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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | if (ABC==557) { | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if (ABC==557) { | ^~~ /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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if (ABC==557) { | ^~~ /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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if (ABC==557) { | ^~~ /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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if (ABC==557) { | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 8 | if (ABC==557) { | ^~~ In file included from /usr/include/c++/14/string:43: /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:8:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 8 | if (ABC==557) { | ^~~ 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:8:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if (ABC==557) { | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::op
s584108798
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if (ABC==557) { cout << "Yes" << endl; } if (ABC==575) { cout << "Yes" << endl; } if (ABC==755) { cout << "Yes" << endl; } else { cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:8:7: error: 'ABC' was not declared in this scope 8 | if (ABC==557) { | ^~~ a.cc:12:7: error: 'ABC' was not declared in this scope 12 | if (ABC==575) { | ^~~ a.cc:16:7: error: 'ABC' was not declared in this scope 16 | if (ABC==755) { | ^~~
s295469582
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if (ABC==557) { cout << "Yes" << endl; } if (ABC==575) { cout << "Yes" << endl; } if (ABC==755) { cout << "Yes" << endl; } else { cout << "No" }
a.cc: In function 'int main()': a.cc:8:7: error: 'ABC' was not declared in this scope 8 | if (ABC==557) { | ^~~ a.cc:12:7: error: 'ABC' was not declared in this scope 12 | if (ABC==575) { | ^~~ a.cc:16:7: error: 'ABC' was not declared in this scope 16 | if (ABC==755) { | ^~~ a.cc:21:17: error: expected ';' before '}' token 21 | cout << "No" | ^ | ; 22 | } | ~ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s377465854
p04043
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { ios::sync_with_stdio(0); cin.tie(0); vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(a.begin(), a.end()) if(a[0] == 5 and a[1] == 5 and a[2] == 7){ cout << "YES" << endl; }else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:12:29: error: expected ';' before 'if' 12 | sort(a.begin(), a.end()) | ^ | ; 13 | if(a[0] == 5 and a[1] == 5 and a[2] == 7){ | ~~ a.cc:15:6: error: 'else' without a previous 'if' 15 | }else { | ^~~~
s773451123
p04043
C++
#include <iostream> using namespace std; int main(void){ int a,b,c; cin >> a >> b >> c; if(a==7){if(b==c==5) cout << "YES" else cout << "NO" << endl; } else if(b==7){if(a==c==5) cout << "YES" else cout << "NO" << endl; } else if(c==7){if(a==b==5) cout << "YES" else cout << "NO" << endl; } else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:39: error: expected ';' before 'else' 11 | if(a==7){if(b==c==5) cout << "YES" else cout << "NO" << endl; } | ^~~~~ | ; a.cc:13:44: error: expected ';' before 'else' 13 | else if(b==7){if(a==c==5) cout << "YES" else cout << "NO" << endl; } | ^~~~~ | ; a.cc:15:44: error: expected ';' before 'else' 15 | else if(c==7){if(a==b==5) cout << "YES" else cout << "NO" << endl; } | ^~~~~ | ;
s327174385
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a; map<int>mp; for(int i=0; i<3; i++){ cin>>a; mp[a]++; } if(mp[5]==2 && mp[7]==1){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: wrong number of template arguments (1, should be at least 2) 6 | map<int>mp; | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map' 102 | class map | ^~~ a.cc:9:11: error: invalid types 'int[int]' for array subscript 9 | mp[a]++; | ^ a.cc:11:10: error: invalid types 'int[int]' for array subscript 11 | if(mp[5]==2 && mp[7]==1){ | ^ a.cc:11:22: error: invalid types 'int[int]' for array subscript 11 | if(mp[5]==2 && mp[7]==1){ | ^
s089140405
p04043
C
#include<stdio.h> int main() { int a[8],i,j,N,k,p=0,m=0; scanf("%d %d",&N,&k); for(i=0;i<=k;i++) { scanf("%d",&a[i]); } for(j=N;j>=N;j++) { p=j; m=j%10; i=0; while(a[i]!=m) { i++; } j=j/10; } return p;
main.c: In function 'main': main.c:21:3: error: expected declaration or statement at end of input 21 | return p; | ^~~~~~