submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s597752904
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,d; cin >>a>>b>>c; d=0 if (a==7 & b==5 & c==5) { d=1; } else if (a==5 & b==7 & c==5) { d=1; } else if (a==5 & b==5 & c==7) { d=1; } if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:6: error: expected ';' before 'if' 7 | d=0 | ^ | ; 8 | if (a==7 & b==5 & c==5) { | ~~ a.cc:11:3: error: 'else' without a previous 'if' 11 | else if (a==5 & b==7 & c==5) { | ^~~~
s792823381
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(); { int a,b,c,d; cin >>a>>b>>c; d=0 if (a==7 & b==5 & c==5) { d=1; } else if (a==5 & b==7 & c==5) { d=1; } else if (a==5 & b==5 & c==7) { d=1; } if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:4:13: error: expected unqualified-id before '{' token 4 | int main(); { | ^
s542530521
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c ; cin >> a >> b >> c; vector<int> vec = {a, b, c}; sort(vec.begin(), vec.end()) if (vec.at(0)==5 && vec.at(1)==5 && vec.at(2)==7){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:8:33: error: expected ';' before 'if' 8 | sort(vec.begin(), vec.end()) | ^ | ; ...... 11 | if (vec.at(0)==5 && vec.at(1)==5 && vec.at(2)==7){ | ~~ a.cc:14:3: error: 'else' without a previous 'if' 14 | else { | ^~~~
s833959263
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c ; cin >> a >> b >> c; vector<int> vec = {a, b, c}; sort(vec.begin(), vec.end());  swap(vec.at(1) , vec.at(2)); for (int i = 0; i < vec.size(); i++) { cout << vec.at(i) << endl; } if (vec.at(0)==5 && vec.at(1)==7 && vec.at(2)==5){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:9:3: error: extended character   is not valid in an identifier 9 |  swap(vec.at(1) , vec.at(2)); | ^ a.cc: In function 'int main()': a.cc:9:3: error: '\U00003000swap' was not declared in this scope 9 |  swap(vec.at(1) , vec.at(2)); | ^~~~~~
s639937020
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c,; cin >> a >> b >> c; vector<int> vec = {a, b, c}; sort(vec.begin(), vec.end()); for (int i = 0; i < vec.size(); i++) { cout << vec.at(i) << endl; } swap (vec.at(1) ,vec.at(2)); if (vec.at(0)==5 && vec.at(1)==7 && vec.at(2)==5){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:5:15: error: expected unqualified-id before ';' token 5 | int a, b, c,; | ^
s180887152
p04043
C++
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=b=5 && c=7) { printf("%s,"yes"); } else if(a=c=5 && b=7) { printf("%s,"yes"); } else if(c=b=5 && a=7) { printf("%s,"yes"); } else if() { printf("%s,"yes"); } return 0; }
a.cc:8:22: warning: missing terminating " character 8 | printf("%s,"yes"); | ^ a.cc:8:22: error: missing terminating " character 8 | printf("%s,"yes"); | ^~~ a.cc:12:22: warning: missing terminating " character 12 | printf("%s,"yes"); | ^ a.cc:12:22: error: missing terminating " character 12 | printf("%s,"yes"); | ^~~ a.cc:16:22: warning: missing terminating " character 16 | printf("%s,"yes"); | ^ a.cc:16:22: error: missing terminating " character 16 | printf("%s,"yes"); | ^~~ a.cc:20:20: warning: missing terminating " character 20 | printf("%s,"yes"); | ^ a.cc:20:20: error: missing terminating " character 20 | printf("%s,"yes"); | ^~~ a.cc: In function 'int main()': a.cc:6:18: error: lvalue required as left operand of assignment 6 | if(a=b=5 && c=7) | ~~^~~~ a.cc:8:14: error: unable to find string literal operator 'operator""yes' with 'const char [4]', 'long unsigned int' arguments 8 | printf("%s,"yes"); | ^~~~~~~~ a.cc:10:19: error: lvalue required as left operand of assignment 10 | else if(a=c=5 && b=7) | ~~^~~~ a.cc:12:14: error: unable to find string literal operator 'operator""yes' with 'const char [4]', 'long unsigned int' arguments 12 | printf("%s,"yes"); | ^~~~~~~~ a.cc:14:19: error: lvalue required as left operand of assignment 14 | else if(c=b=5 && a=7) | ~~^~~~ a.cc:16:14: error: unable to find string literal operator 'operator""yes' with 'const char [4]', 'long unsigned int' arguments 16 | printf("%s,"yes"); | ^~~~~~~~ a.cc:18:13: error: expected primary-expression before ')' token 18 | else if() | ^ a.cc:20:12: error: unable to find string literal operator 'operator""yes' with 'const char [4]', 'long unsigned int' arguments 20 | printf("%s,"yes"); | ^~~~~~~~
s952484051
p04043
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int main(){ int N, L; scanf("%d %d", &N, &L); string str[100]; for(int i=0; i<N; i++){ char tmp[L]; scanf("%s", tmp); str[i] = tmp; } sort(str, str+N); for(int i = 0; i < N; i++){ char s; s = str[i]; printf("%s", s); } return 0; }
a.cc: In function 'int main()': a.cc:21:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in assignment 21 | s = str[i]; | ~~~~~^ | | | std::string {aka std::__cxx11::basic_string<char>}
s638865954
p04043
C++
#include<cstdio> int main(){ int a, b, c; scanf(%d %d %d, &a, &b, &c); printf(a*b*c==5*7*5?"YES":"NO"); }
a.cc: In function 'int main()': a.cc:5:9: error: expected primary-expression before '%' token 5 | scanf(%d %d %d, &a, &b, &c); | ^ a.cc:5:10: error: 'd' was not declared in this scope 5 | scanf(%d %d %d, &a, &b, &c); | ^
s824314894
p04043
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class BC042_IrohaAndHaiku { public static void main(String[] args) throws IOException { InputReader in = new InputReader(); int[] arr = new int[3]; for (int i=0; i<3; i++) arr[i] = in.nextInt(); Arrays.sort(arr); if (isHaiku(arr)) System.out.println("YES"); else System.out.println("NO"); } public static boolean isHaiku(int[] arr) { int[] haiku = {5, 5, 7}; for (int i=0; i<3; i++) if (arr[i] != haiku[i]) return false; return true; } static class InputReader { public BufferedReader br; public StringTokenizer st; public InputReader() { br = new BufferedReader(new InputStreamReader(System.in)); st = null; } public String next() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return st.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
Main.java:7: error: class BC042_IrohaAndHaiku is public, should be declared in a file named BC042_IrohaAndHaiku.java public class BC042_IrohaAndHaiku { ^ 1 error
s964440331
p04043
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class BC042_IrohaAndHaiku { public static void main(String[] args) throws IOException { InputReader in = new InputReader(); int[] arr = new int[3]; for (int i=0; i<3; i++) arr[i] = in.nextInt(); Arrays.sort(arr); if (isHaiku(arr)) System.out.println("YES"); else System.out.println("NO"); } public static boolean isHaiku(int[] arr) { int[] haiku = {5, 5, 7}; for (int i=0; i<3; i++) if (arr[i] != haiku[i]) return false; return true; } static class InputReader { public BufferedReader br; public StringTokenizer st; public InputReader() { br = new BufferedReader(new InputStreamReader(System.in)); st = null; } public String next() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return st.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStreamReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.util.Arrays; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.util.StringTokenizer; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:7:1: error: expected unqualified-id before 'public' 7 | public class BC042_IrohaAndHaiku { | ^~~~~~
s018819381
p04043
C++
import java.io.*; import java.util.*; public class BC042_IrohaAndHaiku { public static void main(String[] args) throws IOException { InputReader in = new InputReader(); int[] arr = new int[3]; for (int i=0; i<3; i++) arr[i] = in.nextInt(); Arrays.sort(arr); if (isHaiku(arr)) System.out.println("YES"); else System.out.println("NO"); } public static boolean isHaiku(int[] arr) { int[] haiku = {5, 5, 7}; for (int i=0; i<3; i++) if (arr[i] != haiku[i]) return false; return true; } static class InputReader { public BufferedReader br; public StringTokenizer st; public InputReader() { br = new BufferedReader(new InputStreamReader(System.in)); st = null; } public String next() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return st.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class BC042_IrohaAndHaiku { | ^~~~~~
s448483437
p04043
C++
#include <iostream> #include <algorithm> #include <stdio.h> #include <vector> #include <string> using namespace std; int main() { int a, b, c; bool tf; cin >> a >> b >> c; if(a == 5){ if(b == 7){ if(c == 5){ tf = true; } else { tf = false; } } else if(b == 5){ if (c == 7){ tf = true; } else { tf = false; } } else{ tf = false } } else if(a == 7){ if(b == 5 && c == 5){ tf = true; } else { tf = false; } } else { tf = false; } if(tf){ cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:27:23: error: expected ';' before '}' token 27 | tf = false | ^ | ; 28 | } | ~
s524158346
p04043
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; int main(){ int a; count5=0; count7=0; for(int i=0;i<3;i++){ cin>>a; if(a==5)count5++; else if(a==7)count7++; } if(count5==2&&count7==1) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'count5' was not declared in this scope 6 | count5=0; | ^~~~~~ a.cc:7:3: error: 'count7' was not declared in this scope 7 | count7=0; | ^~~~~~
s568512188
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" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: lvalue required as left operand of assignment 9 | if( (A=5 && B=5 && C=7) || (A=5 && B=7 && C=5) || (A=7 && B=5 && C=5) ) | ~~^~~~ a.cc:9:42: error: lvalue required as left operand of assignment 9 | if( (A=5 && B=5 && C=7) || (A=5 && B=7 && C=5) || (A=7 && B=5 && C=5) ) | ~~^~~~ a.cc:9:65: error: lvalue required as left operand of assignment 9 | if( (A=5 && B=5 && C=7) || (A=5 && B=7 && C=5) || (A=7 && B=5 && C=5) ) | ~~^~~~
s942252967
p04043
C++
#include<iostream> using namespace std; void 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" << endl; else cout << "NO" << endl; }
a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:9:19: error: lvalue required as left operand of assignment 9 | if( (A=5 && B=5 && C=7) && (A=5 && B=7 && C=5) && (A=7 && B=5 && C=5) ) | ~~^~~~ a.cc:9:42: error: lvalue required as left operand of assignment 9 | if( (A=5 && B=5 && C=7) && (A=5 && B=7 && C=5) && (A=7 && B=5 && C=5) ) | ~~^~~~ a.cc:9:65: error: lvalue required as left operand of assignment 9 | if( (A=5 && B=5 && C=7) && (A=5 && B=7 && C=5) && (A=7 && B=5 && C=5) ) | ~~^~~~
s701491438
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> X(3); for (int i=0; i<3; i++) cin >> X.at(i); X == {5,7,5} }
a.cc: In function 'int main()': a.cc:8:8: error: expected primary-expression before '{' token 8 | X == {5,7,5} | ^
s595254353
p04043
C++
package main import ( "fmt" ) func main() { var a, b, c int fmt.Scanf("%d %d %d", &a, &b, &c) if a == b { if a == 5 && c == 7 { fmt.Printf("YES\n") } else { fmt.Printf("NO\n") } } else if b == c { if b == 5 && a == 7 { fmt.Printf("YES\n") } else { fmt.Printf("NO\n") } } else { fmt.Printf("NO\n") } }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~
s877590198
p04043
C++
#include<iostream> using namespace std; void main(){ int a[3],f=0,s=0; for(int i=0;i<3;i++){ cin>>a[i]; } for(int i=0;i<3;i++){ if(a[i]==5) f++; else if(a[i]==7) s++; } if(f==2 && s==1) cout<<"YES"; else cout<<"NO"; }
a.cc:3:1: error: '::main' must return 'int' 3 | void main(){ | ^~~~
s402370229
p04043
C++
a = input().split(" ") if (a[0]=="5" and a[1]=="5" and a[2]=="7") or (a[0]=="5" and a[1]=="7" and a[2]=="5") or (a[0]=="7" and a[1]=="5" and a[2]=="4"): print("YES") else: print("NO")
a.cc:1:1: error: 'a' does not name a type 1 | a = input().split(" ") | ^
s857682186
p04043
C++
nums=map(int,input().split()) if sorted(nums) == [5,5,7]: print('YES') else: print('NO')
a.cc:3:11: warning: multi-character character constant [-Wmultichar] 3 | print('YES') | ^~~~~ a.cc:5:11: warning: multi-character character constant [-Wmultichar] 5 | print('NO') | ^~~~ a.cc:1:1: error: 'nums' does not name a type 1 | nums=map(int,input().split()) | ^~~~
s099428041
p04043
C++
#include <iostream> using namespace std; int main(){ int A[3]; cin >> A[0] >> A[1] >> A[2]; sort(A, A + 3); if((A[0] == 5) && (A[1] == 5) && (A[2] == 7)) { cout << "YES" << endl; } else { cout << "NO" <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'sort' was not declared in this scope; did you mean 'short'? 7 | sort(A, A + 3); | ^~~~ | short
s216088896
p04043
C++
typedef long long ll; #include <bits/stdc++.h> using namespace std; template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){ std::fill( (T*)array, (T*)(array+N), val ); } int main(){ ll a[3] cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); if(a[0] == 5 && a[1] == 5 && a[2] == 7){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:12:3: error: expected initializer before 'cin' 12 | cin>>a[0]>>a[1]>>a[2]; | ^~~ a.cc:13:8: error: 'a' was not declared in this scope 13 | sort(a,a+3); | ^
s463800188
p04043
C++
#include <bits/stdc++.h> using namespace std; int main (){ string A,B,C; cin >> A >> B >> C; int Q = 0; if(A.size() == 5 && B.size() == 5 && C.size() == 7 ) cout << "YES" << endl;Q++; if(A.size() == 7 && B.size() == 5 && C.size() == 5 ) cout << "YES" << endl;Q++; if(A.size() == 5 && B.size() == 7 && C.size() == 5 ) cout << "YES" << endl;Q++; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:13:3: error: 'else' without a previous 'if' 13 | else | ^~~~
s999756891
p04043
C++
#include <bits/stdc++.h> using namespace std; // int N が既に与えられているとする. int main(){ int n = 3 int flag_five = 0; int flag_seven = 0; int l, i = 0, a[n]; while (std::cin >> l) { a[i] = l; i++; if (i >= n) { break; } } for(int i=0; i<n; i++){ if (a[i] == 5) { flag_five++; } else if (a[i] == 7){ flag_seven++; } } if (flag_five == 2 && flag_seven ==1){ std::cout << "YES" << std::endl; } else{ std::cout << "NO" << std::endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: expected ',' or ';' before 'int' 6 | int flag_five = 0; | ^~~ a.cc:19:7: error: 'flag_five' was not declared in this scope; did you mean 'flag_seven'? 19 | flag_five++; | ^~~~~~~~~ | flag_seven a.cc:26:7: error: 'flag_five' was not declared in this scope; did you mean 'flag_seven'? 26 | if (flag_five == 2 && flag_seven ==1){ | ^~~~~~~~~ | flag_seven
s542207703
p04043
Java
public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ int[] oto = new int[3]; //入力を数値に変換 for(int i=0; i<args.length; i++) { oto[i] = Integer.parseInt(args[i]); } if(oto[0] != 5) { int toriaezu = oto[1]; oto[1] = oto[0]; oto[0] = toriaezu; } if(oto[2] != 5) { int toriaezu = oto[1]; oto[1] = oto[2]; oto[2] = toriaezu; } if(oto[0] == 5 && oto[1] == 7 && oto[2] == 5) { System.out.print("YES"); }else { System.out.print("NO"); } }
Main.java:1: 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) 1 error
s705258324
p04043
Java
package a042; public class Iroha { public static void Main(String[] args) { // TODO 自動生成されたメソッド・スタブ int[] oto = new int[3]; //入力を数値に変換 for(int i=0; i<args.length; i++) { oto[i] = Integer.parseInt(args[i]); } if(oto[0] != 5) { int toriaezu = oto[1]; oto[1] = oto[0]; oto[0] = toriaezu; } if(oto[2] != 5) { int toriaezu = oto[1]; oto[1] = oto[2]; oto[2] = toriaezu; } if(oto[0] == 5 && oto[1] == 7 && oto[2] == 5) { System.out.print("YES"); }else { System.out.print("NO"); } } }
Main.java:3: error: class Iroha is public, should be declared in a file named Iroha.java public class Iroha { ^ 1 error
s810717645
p04043
C++
#include<iostream> using namespace std; int main(){ int num[3]; cin>>num[0]>>num[1]>>num[2]; int num5,num7; num5=0; num7=0; for(int i=0;i<3;i++){ if(num[i]==5){ num5++; } else if(num[i]==7){ num7++; } } if(num5==2 && num7==1){ cout<<"YES"<<rndl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:20:14: error: 'rndl' was not declared in this scope 20 | cout<<"YES"<<rndl; | ^~~~
s228656971
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> A(3); cin >> A.at(0) >> A.at(1) >. A.at(2); sort(A.begin(),A.end()); if(A.at(0) == 5&&A.at(1) == 5&&A.at(2) == 7){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:30: error: expected primary-expression before '.' token 6 | cin >> A.at(0) >> A.at(1) >. A.at(2); | ^
s817877776
p04043
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] check = new int[3]; int A = scan.nextInt(); int B = scan.nextInt(); int C = scan.nextInt(); check[0] = A; check[1] = B; check[2] = C; int count_5 = 0; int count_7 = 0; for(int i=0; i<check.length; i++){ if(check[i] == 5){ count_5++; }else if(check[i] == 7){ count_7++; } check[i] } if(count_5 == 2 && count_7 == 1){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:23: error: not a statement check[i] ^ Main.java:23: error: ';' expected check[i] ^ 2 errors
s238643488
p04043
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] check = new int[3]; check[0] = int A = scan.nextInt(); check[1] = int B = scan.nextInt(); check[2] = int C = scan.nextInt(); int count_5 = 0; int count_7 = 0; for(int i=0; i<check.length; i++){ if(check[i] == 5){ count_5++; }else if(check[i] == 7){ count_7++; } check[i] } if(count_5 == 2 && count_7 == 1){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:7: error: '.class' expected check[0] = int A = scan.nextInt(); ^ Main.java:8: error: '.class' expected check[1] = int B = scan.nextInt(); ^ Main.java:9: error: '.class' expected check[2] = int C = scan.nextInt(); ^ Main.java:19: error: not a statement check[i] ^ Main.java:19: error: ';' expected check[i] ^ 5 errors
s866042923
p04043
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a[3]; for(int i=0;i<3;i++){ cin>>a[i]; } sort(a,a+3); if(a[0]==5 && a[1]==5 && a[2]==7){ cout << YES << endl; else{ cout << NO << endl; } }
a.cc: In function 'int main()': a.cc:15:13: error: 'YES' was not declared in this scope 15 | cout << YES << endl; | ^~~ a.cc:16:5: error: expected '}' before 'else' 16 | else{ | ^~~~ a.cc:14:36: note: to match this '{' 14 | if(a[0]==5 && a[1]==5 && a[2]==7){ | ^ a.cc:17:15: error: 'NO' was not declared in this scope 17 | cout << NO << endl; | ^~
s320506304
p04043
C++
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define OP ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define F first #define S second #define sz(x) (int)x.size() #define all(x) (x).begin(), (x).end() #define rep(i, n) for(int i = 0; i < n; ++i) #define repr(i,n) for(int i = n - 1; i >= 0; --i) #define Rep(i, a, n) for(int i = (a); i <=(n); ++i) #define repst(i, n) for(auto it = n.begin(); it != n.end(); ++it) #define Repr(i, a, n) for(int i = (n); i >= (a); --i) typedef long long ll; const int inf = int(1e9); const int mod = inf + 7; const double PI = acos(-1.0); using namespace std; const int N = 1e5 + 155; void solve(){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a + n); if (a[0] == 5 && a[1] == 5 && a[2] == 7) cout << "YES"; else cout << "NO"; } int main() { OP solve(); return 0; }
a.cc: In function 'void solve()': a.cc:25:17: error: 'n' was not declared in this scope 25 | sort(a, a + n); | ^
s194107220
p04043
C++
#include<iostream> using namespace std; int main() { int a[3]; int ans,sum; for(int i=0; i<3; i++) { cin >> a[i]; sum += a[i]; if(a[i] = 5 || a[i] = 7) { ans++; } } if(sum == 17 && ans == 3) { cout << "YES" <<endl; } else { cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:11:17: error: lvalue required as left operand of assignment 11 | if(a[i] = 5 || a[i] = 7) { | ~~^~~~~~~ a.cc:19:4: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s931138144
p04043
C
#include<stdio.h> int mian() { int a,b,c; scanf("%d %d %d ",&a,&b,&c); if (a==5 && b==5 && c==7) { printf("Yes\n"); return 0; } else if(a==5 && b==7 && c==5){ printf("YES\n"); return 0; } else if(a==7 && b==5&& c==5){ printf("Yes\n"); return 0; } else{ printf("NO\n"); } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s182585752
p04043
C
#include<stdio.h> include<stdlib.h> int main(int argc, char **argv){ int n1 = atoi(argv[1]); int n2 = atoi(argv[2]); int n3 = atoi(argv[3]); if(n1 == 5){ if(n2 == 5){ if(n3 == 7){ printf("YES"); } else{ printf("NO"); } } else if(n2 == 7 ){ if ( n3 == 5){ printf("YES"); } else{ printf("NO"); } } else{ printf("NO"); } } if (n1 == 7 ){ if(n2 == 5){ if(n3 == 5){ printf("YES"); } else{ printf("NO"); } } else{ printf("NO"); } } return 0; }
main.c:2:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 2 | include<stdlib.h> | ^
s093645843
p04043
C++
#include <cstdio> #include <algorithm> int main() { int a[3]; for(int i=0; i<3; ++i) { scanf("%d", a+i); } std:sort(a, a+3); printf("%s", a[0]==5&&a[1]==5&&a[2]==7?"YES":"NO"); }
a.cc: In function 'int main()': a.cc:9:7: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 9 | std:sort(a, a+3); | ^~~~ | std::sort In file included from /usr/include/c++/14/algorithm:86, from a.cc:2: /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~
s792211229
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a==5&&b==7&&c==5||a==5&&b==5&&c==7||a==7&&b==5&&c==5){ cout >> "YES" >> endl;} else{ cout >> "NO" >> endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 7 | cout >> "YES" >> endl;} | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:7:4: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 7 | cout >> "YES" >> endl;} | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:7:12: required from here 7 | cout >> "YES" >> endl;} | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:9:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 9 | cout >> "NO" >> endl; | ~~~~ ^~ ~~~~ | | | | | const char [3] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:9:8: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 9 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:9:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "NO" >> endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argum
s415165218
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a==5&&b==7&&C==5||a==5&&b==5&&c==7||a==7&&b==5&&c==5){ cout >> YES; >> endl;} else{ cout >> NO >> endl; } }
a.cc: In function 'int main()': a.cc:6:20: error: 'C' was not declared in this scope 6 | if(a==5&&b==7&&C==5||a==5&&b==5&&c==7||a==7&&b==5&&c==5){ | ^ a.cc:7:12: error: 'YES' was not declared in this scope 7 | cout >> YES; >> endl;} | ^~~ a.cc:7:17: error: expected primary-expression before '>>' token 7 | cout >> YES; >> endl;} | ^~ a.cc:9:16: error: 'NO' was not declared in this scope 9 | cout >> NO >> endl; | ^~
s412099770
p04043
C
#include<stdio.h> int main() { int A, B, C; scanf("%d %d %d", &A, &B, &C); if((A+B+C)/(5+7+5)=1) printf("YES\n"); else ( printf("NO\n")); return 0; }
main.c: In function 'main': main.c:6:21: error: lvalue required as left operand of assignment 6 | if((A+B+C)/(5+7+5)=1) | ^
s662398436
p04043
C
#include<stdio.h> int main() { int A,B,C; scanf("%d %d %d", &A, &B, &C); if (A==5 && B==5 && C==7); elseif(A==5 && B==7 && C==5); elseif ( A==7 && B==5 && C==7); printf("yes\n"); else; printf("no\n"); return 0; }
main.c: In function 'main': main.c:7:7: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration] 7 | elseif(A==5 && B==7 && C==5); | ^~~~~~ main.c:10:3: error: 'else' without a previous 'if' 10 | else; printf("no\n"); | ^~~~
s646441620
p04043
C
#include<stdio.h> int main() { int A,B,C; scanf("%d %d %d", &A, &B, &C); if (A==5 && B==5 && C==7); elseif(A==5 && B==7 && C==5); elseif ( A==7 && B==5 && C==7); printf("yes\n"); elseif printf("no\n"); return 0; }
main.c: In function 'main': main.c:7:7: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration] 7 | elseif(A==5 && B==7 && C==5); | ^~~~~~ main.c:10:9: error: expected ';' before 'printf' 10 | elseif printf("no\n"); | ^~~~~~~ | ;
s878985987
p04043
C
#include<stdio.h> int main() { int A,B,C; scanf("%d %d %d", &A, &B, &C); if (A==5 && B==5 && C==7); elseif(A==5 && B==7 && C==5); elseif ( A==7 && B==5 && C==7); printf("yes\n"); else printf("no\n"); return 0; }
main.c: In function 'main': main.c:7:7: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration] 7 | elseif(A==5 && B==7 && C==5); | ^~~~~~ main.c:10:3: error: 'else' without a previous 'if' 10 | else printf("no\n"); | ^~~~
s189146615
p04043
C
#include<stdio.h> int main() { int A,B,C; scanf("%d %d %d", &A, &B, &C); if A==5 && B==5 && C==7 if A==5 && B==7 && C==5 if A==7 && B==5 && C==7; printf("yes\n"); else printf("no\n"); return 0; }
main.c: In function 'main': main.c:6:6: error: expected '(' before 'A' 6 | if A==5 && B==5 && C==7 | ^ | ( main.c:10:3: error: 'else' without a previous 'if' 10 | else printf("no\n"); | ^~~~
s851782905
p04043
C++
#include <iostream> using namespace std; int main(void) { int a, b, c; cin >> a >> b >> c; if((a + b + c == 19) && ((a == 7 && b == 7) || (a==7 && c == 7) || (b==7 && c==7))) { cout << "YES" << endl; } else { count << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:16:5: error: 'count' was not declared in this scope 16 | count << "NO" << endl; | ^~~~~
s848458493
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; int b; int c; cin>> a >> b >> c ; int sum = a+b+c; string ans = "YES" if(sum -5 - 5 -7 != 0){ ans = "NO"; } cout << ans <<endl; }
a.cc: In function 'int main()': a.cc:11:3: error: expected ',' or ';' before 'if' 11 | if(sum -5 - 5 -7 != 0){ | ^~
s549951959
p04043
C++
using namespace std; int main(){ int a; int b; int c; cin>> a >> b >> c ; int sum = a+b+c; string ans = "YES"; if(sum -5 - 5 -7 != 0){ ans = "NO"; } cout << ans <<endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope 7 | 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 | using namespace std; a.cc:9:3: error: 'string' was not declared in this scope 9 | string ans = "YES"; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | using namespace std; a.cc:11:9: error: 'ans' was not declared in this scope 11 | ans = "NO"; | ^~~ a.cc:13:3: error: 'cout' was not declared in this scope 13 | cout << ans <<endl; | ^~~~ a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:11: error: 'ans' was not declared in this scope 13 | cout << ans <<endl; | ^~~ a.cc:13:17: error: 'endl' was not declared in this scope 13 | cout << ans <<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s091729618
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a; int b; int c; cin>> a >> b >> c ; int sum = a+b+c; string ans = "YES" if(sum -5 - 5 -7 != 0){ ans = "NO"; } cout << ans <<endl; }
a.cc: In function 'int main()': a.cc:11:3: error: expected ',' or ';' before 'if' 11 | if(sum -5 - 5 -7 != 0){ | ^~
s878160786
p04043
Java
public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); if((a == 5) && (b == 5) && (c == 7)){ System.out.println("yes"); }else if((a == 5)&&(b == 7)&&(c==5)){ System.out.println("yes"); }else if((a==7)&&(b==5)&&(c==5)){ System.out.println("yes"); }else{ System.out.println("No"); } }
Main.java:1: 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) 1 error
s291467368
p04043
C++
#include<bits/stdc++> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a+b+c==17) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s076526667
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)(a==5&&b==7&&c==5)(a==7&&b==5&&c==5)){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:24: error: expression cannot be used as a function 7 | if((a==5&&b==5&&c==7)(a==5&&b==7&&c==5)(a==7&&b==5&&c==5)){ | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
s414303913
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a == 7) { if(b == 5 && c ==5) cout<<"YES"; return 0; } if(a == 5) { if((b == 7 && c == 5) || (c == 5 && b == 7)) { cout<<"YES"; return 0; } } return 0; } }
a.cc:26:1: error: expected declaration before '}' token 26 | } | ^
s306149552
p04043
C++
include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if ((a == 5 || a == 7) && (b== 5 || b == 7) && (c == 5 || c == 7) && a+b+c == 17) { cout << "YES\n"; } else { cout << "NO\n"; } }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ 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:10:5: error: 'cout' was not declared in this scope 10 | cout << "YES\n"; | ^~~~ a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout << "NO\n"; | ^~~~
s170202641
p04043
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ vector<int>a; for(int i= 0; a > i; i++){ int tmp;cin>>tmp; a.push_back(tmp); } sort(a.begin(),a.end()); if(a[0]==5 && a[1]==5 && a[2]==7)cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:19: error: no match for 'operator>' (operand types are 'std::vector<int>' and 'int') 7 | for(int i= 0; a > i; i++){ | ~ ^ ~ | | | | | int | std::vector<int> In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | for(int i= 0; a > i; i++){ | ^ 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:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>' 7 | for(int i= 0; a > i; i++){ | ^ 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:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/string_view:702: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> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/string_view:710: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>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:7:21: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/bits/basic_string.h:3915: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>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | for(int i= 0; a > i; i++){ | ^ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:7:21: note: mismatched types 'const _CharT*' and 'std::vector<int>' 7 | for(int i= 0; a > i; i++){ | ^ 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:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:7:21: note: 'std::vector<int>' is not derived from 'const std::tuple<_UTypes ...>' 7 | for(int i= 0; a > i; i++){ | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:2102:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2102 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2102:5: note: template argument deduction/substitution failed: a.cc:7:21: note: mismatched types 'const std::vector<_Tp, _Alloc>' and 'int' 7 | for(int i= 0; a > i; i++){ | ^
s301981730
p04043
C++
test
a.cc:1:1: error: 'test' does not name a type 1 | test | ^~~~
s068668032
p04043
C++
#include <iostream> #include <stdio.h> using namespace std; int main() { int A[3]; for (int i = 0; i < 3; i++) { cin >> A[i]; } sort(A, A + 3); if (A[0]==A[1] && A[0]==5 && A[2]==7) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(A, A + 3); | ^~~~ | short
s964710699
p04043
C++
#include <cstdio> #include <string> using namespace std; int main(void){ 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"; cout<<endl; 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:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <string> +++ |+#include <iostream> 3 | a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout<<"YES"; | ^~~~ a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:8: error: 'cout' was not declared in this scope 11 | else cout<<"NO"; | ^~~~ a.cc:11:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:3: error: 'cout' was not declared in this scope 12 | cout<<endl; | ^~~~ a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:9: error: 'endl' was not declared in this scope 12 | cout<<endl; | ^~~~ a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 2 | #include <string> +++ |+#include <ostream> 3 |
s998185584
p04043
C++
#include <iostream> using namespace std; int main(void){ int a[3],n=0,m=0; for(int i = 0;i >0;i+){ if(a[i] == 5) n++; if(a[i] == 7) m++; } if(n == 2 && m == 7){ cout<<"YES"<<endl; return 0; }else{ cout<<"NO"<<endl; return 0; } }
a.cc: In function 'int main()': a.cc:6:26: error: expected primary-expression before ')' token 6 | for(int i = 0;i >0;i+){ | ^
s390575042
p04043
C++
#include <iostream> using namespace std; int main(void){ int a[i],n=0,m=0; for(int i = 0;i >0;i+;){ if(a[i] == 5) n++; if(a[i] == 7) m++; } if(n == 2 && m == 7){ cout<<"YES"<<endl; return 0; }else{ cout<<"NO"<<endl; return 0; } }
a.cc: In function 'int main()': a.cc:5:11: error: 'i' was not declared in this scope 5 | int a[i],n=0,m=0; | ^ a.cc:6:26: error: expected primary-expression before ';' token 6 | for(int i = 0;i >0;i+;){ | ^ a.cc:6:26: error: expected ')' before ';' token 6 | for(int i = 0;i >0;i+;){ | ~ ^ | ) a.cc:6:27: error: expected primary-expression before ')' token 6 | for(int i = 0;i >0;i+;){ | ^
s390966017
p04043
C++
#include <stdio.h> int main(void){ int a[3], count = 0; for(int i = 0; i > 0;i++){ cin>>a[i]; if(a[i] == 5 || a[i] == 7){ count++; }else{ cout<<"NO"<<endl; return 0; } } if(count == 3){ cout<<"YES"<<endl; return 0; }else{ cout<<"NO"<<endl; return 0; } }
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin>>a[i]; | ^~~ a.cc:11:13: error: 'cout' was not declared in this scope; did you mean 'count'? 11 | cout<<"NO"<<endl; | ^~~~ | count a.cc:11:25: error: 'endl' was not declared in this scope 11 | cout<<"NO"<<endl; | ^~~~ a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'count'? 16 | cout<<"YES"<<endl; | ^~~~ | count a.cc:16:22: error: 'endl' was not declared in this scope 16 | cout<<"YES"<<endl; | ^~~~ a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'count'? 19 | cout<<"NO"<<endl; | ^~~~ | count a.cc:19:21: error: 'endl' was not declared in this scope 19 | cout<<"NO"<<endl; | ^~~~
s366505216
p04043
C++
#include<stdio.h> int main(void){ int a[3],count = 0; for(int i = 0 ;i < 3; i++){ cin>>a[i]; if(a[i] == 5 || a[i] == 7){ count++; }else{ cout<<"NO"<<endl; return 0; } } if(count == 3){ cout<<"YES"<<endl; return 0; }else{ count<<"NO"<<endl; return 0; } }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>a[i]; | ^~~ a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'count'? 10 | cout<<"NO"<<endl; | ^~~~ | count a.cc:10:21: error: 'endl' was not declared in this scope 10 | cout<<"NO"<<endl; | ^~~~ a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'count'? 16 | cout<<"YES"<<endl; | ^~~~ | count a.cc:16:18: error: 'endl' was not declared in this scope 16 | cout<<"YES"<<endl; | ^~~~ a.cc:19:10: error: invalid operands of types 'int' and 'const char [3]' to binary 'operator<<' 19 | count<<"NO"<<endl; | ~~~~~^~~~~~ | | | | int const char [3] a.cc:19:18: error: 'endl' was not declared in this scope 19 | count<<"NO"<<endl; | ^~~~
s180773573
p04043
C++
#include<stdio.h> int main(void){ int a[3],count = 0; for(int i = 0 ;i < 3; i++){ cin>>a[i]; if(a[i] == 5 || a[i] == 7){ count++; }else{ cout<<"NO"<<endl; return 0; } } if(count == 3){ cout<<"YES"<<endl; return 0; }else{ count<<"NO"<<endl; return 0; } }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>a[i]; | ^~~ a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'count'? 10 | cout<<"NO"<<endl; | ^~~~ | count a.cc:10:21: error: 'endl' was not declared in this scope 10 | cout<<"NO"<<endl; | ^~~~ a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'count'? 16 | cout<<"YES"<<endl; | ^~~~ | count a.cc:16:18: error: 'endl' was not declared in this scope 16 | cout<<"YES"<<endl; | ^~~~ a.cc:19:10: error: invalid operands of types 'int' and 'const char [3]' to binary 'operator<<' 19 | count<<"NO"<<endl; | ~~~~~^~~~~~ | | | | int const char [3] a.cc:19:18: error: 'endl' was not declared in this scope 19 | count<<"NO"<<endl; | ^~~~
s477365536
p04043
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<cmath> #include<stack> #include<queue> #include<map> #include<set> using namespace std; typedef long long ll; typedef vector<int> VI; int main() { int a, b, c; cin >> a >> b >> c; int t[10] = { 0 }; t[a] ++ t[b]++; t[c] ++; if (t[5] == 2 && t[7] == 1) cout << "Yes" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:16: error: expected ';' before 't' 19 | t[a] ++ t[b]++; t[c] ++; | ^~ | ;
s502014087
p04043
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<cmath> #include<stack> #include<queue> #include<map> #include<set> using namespace std; typedef long long ll; typedef vector<int> VI; int main() { int a, b, c; cin >> a >> b >> c; int t[10] = { 0 }; t[a] + ; t[b]++; t[c] ++; if (t[5] == 2 && t[7] == 1) cout << "Yes" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:16: error: expected primary-expression before ';' token 19 | t[a] + ; t[b]++; t[c] ++; | ^
s273308992
p04043
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ int go = 0; int shiti = 0; string aa, b, c; cin>>aa>>b>>c; int a[3]; a[0] = aa.size(); a[1] = b.size(); a[2] = c.size(); for(i=0;i<3;i++){ if(a[i]==5){ go++; } else if(a[i]==7){ shiti++; } } if(go==2 ||shiti==1){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:9: error: 'i' was not declared in this scope 17 | for(i=0;i<3;i++){ | ^
s774411540
p04043
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ int go = 0; int shiti = 0; string a, b, c; cin>>a>>b>>c; int a[3]; a[0] = a.size(); a[1] = b.size(); a[2] = c.size(); for(i=0;i<3;i++){ if(a[i]==5){ go++; } else if(a[i]==7){ shiti++; } } if(go==2 ||shiti==1){ cout<<"YES"<<endl; } else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: conflicting declaration 'int a [3]' 12 | int a[3]; | ^ a.cc:10:12: note: previous declaration as 'std::string a' 10 | string a, b, c; | ^ a.cc:17:9: error: 'i' was not declared in this scope 17 | for(i=0;i<3;i++){ | ^
s800912804
p04043
C
include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==5&&b==5&&c==7){ printf("YES"); } else if(a==7&&b==5&&c==5){ printf("YES"); } else if(a==5&&b==7&&c==5){ printf("YES"); } else{ printf("NO"); return 0; } }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s543849255
p04043
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d"&a,&b,&c); if(a==5&&b==5&&c==7){ printf("YES"); } else if(a==7&&b==5&&c==5){ printf("YES"); } else if(a==5&&b==7&&c==5){ printf("YES"); } else{ printf("NO"); return 0; } }
main.c: In function 'main': main.c:4:17: error: invalid operands to binary & (have 'char *' and 'int') 4 | scanf("%d%d%d"&a,&b,&c); | ~~~~~~~~^ | | | char *
s347075494
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; vector<int> vec(3); vec = {A, B, C}; sort(vec.begin(),vec.end()); if (vec.at(0) == 5 && vec.at(1) == 5 && vec.at(2) == 7) { cout << "YES" << endl; } else { cout << NO << endl; } }
a.cc: In function 'int main()': a.cc:13:13: error: 'NO' was not declared in this scope 13 | cout << NO << endl; | ^~
s249463030
p04043
C++
#include <algorithm> #include <vector> #include <string> #include <cstring> #include <complex> #include <stack> #include <queue> #include <unordered_map> #include <map> using namespace std ; void main(){ int n, 1; vector<string> v; string s; cin >> n >> 1; int i = 0; for(i = 0; i < n; i++){ cin >> s; v.push_back(s); } sort(v.begin(), v.end()); for(i = 0; i < n; i++){ cout << v[i]; } cout << endl; }
a.cc:12:1: error: '::main' must return 'int' 12 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:13:16: error: expected unqualified-id before numeric constant 13 | int n, 1; | ^ a.cc:16:9: error: 'cin' was not declared in this scope 16 | cin >> n >> 1; | ^~~ a.cc:10:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 9 | #include <map> +++ |+#include <iostream> 10 | using namespace std ; a.cc:27:17: error: 'cout' was not declared in this scope 27 | cout << v[i]; | ^~~~ a.cc:27:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:30:9: error: 'cout' was not declared in this scope 30 | cout << endl; | ^~~~ a.cc:30:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s126383465
p04043
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <cstring> #include <complex> #include <stack> #include <queue> #include <unordered_map> #include <map> using namespace std ; int main(){ int n, 1; vector<string> v; string s; cin >> n >> 1; int i = 0; for(i = 0; i < n; i++){ cin >> s; v.push_back(s); } sort(v.begin(), v.end()); for(i = 0; i < n; i++){ cout << v[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:14:16: error: expected unqualified-id before numeric constant 14 | int n, 1; | ^ a.cc:17:18: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 17 | cin >> n >> 1; | ~~~~~~~~ ^~ ~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'int' 17 | cin >> n >> 1; | ^ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: invalid conversion from 'int' to 'void*' [-fpermissive] 17 | cin >> n >> 1; | ^ | | | int a.cc:17:21: error: cannot bind rvalue '(void*)1' to 'void*&' /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: invalid conversion from 'int' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive] 17 | cin >> n >> 1; | ^ | | | int /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match) 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed: a.cc:17:21: error: invalid conversion from 'int' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive] 17 | cin >> n >> 1; | ^ | | | int /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = st
s572941277
p04043
C
int main(){ int n, 1; vector<string> v; string s; cin >> n >> 1; int i = 0; for(i = 0; i < n; i++){ cin >> s; v.push_back(s); } sort(v.begin(), v.end()); for(i = 0; i < n; i++){ cout << v[i]; } cout << endl; }
main.c: In function 'main': main.c:2:16: error: expected identifier or '(' before numeric constant 2 | int n, 1; | ^ main.c:3:9: error: 'vector' undeclared (first use in this function) 3 | vector<string> v; | ^~~~~~ main.c:3:9: note: each undeclared identifier is reported only once for each function it appears in main.c:3:16: error: 'string' undeclared (first use in this function) 3 | vector<string> v; | ^~~~~~ main.c:3:24: error: 'v' undeclared (first use in this function) 3 | vector<string> v; | ^ main.c:4:15: error: expected ';' before 's' 4 | string s; | ^~ | ; main.c:5:9: error: 'cin' undeclared (first use in this function) 5 | cin >> n >> 1; | ^~~ main.c:9:24: error: 's' undeclared (first use in this function) 9 | cin >> s; | ^ main.c:13:9: error: implicit declaration of function 'sort' [-Wimplicit-function-declaration] 13 | sort(v.begin(), v.end()); | ^~~~ main.c:16:17: error: 'cout' undeclared (first use in this function) 16 | cout << v[i]; | ^~~~ main.c:19:17: error: 'endl' undeclared (first use in this function) 19 | cout << endl; | ^~~~
s695326203
p04043
C++
int main(){ int n, 1; vector<string> v; string s; cin >> n >> 1; int i = 0; for(i = 0; i < n; i++){ cin >> s; v.push_back(s); } sort(v.begin(), v.end()); for(i = 0; i < n; i++){ cout << v[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:2:16: error: expected unqualified-id before numeric constant 2 | int n, 1; | ^ a.cc:3:9: error: 'vector' was not declared in this scope 3 | vector<string> v; | ^~~~~~ a.cc:3:16: error: 'string' was not declared in this scope 3 | vector<string> v; | ^~~~~~ a.cc:3:24: error: 'v' was not declared in this scope 3 | vector<string> v; | ^ a.cc:4:15: error: expected ';' before 's' 4 | string s; | ^~ | ; a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin >> n >> 1; | ^~~ a.cc:9:24: error: 's' was not declared in this scope 9 | cin >> s; | ^ a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(v.begin(), v.end()); | ^~~~ | short a.cc:16:17: error: 'cout' was not declared in this scope 16 | cout << v[i]; | ^~~~ a.cc:19:9: error: 'cout' was not declared in this scope 19 | cout << endl; | ^~~~ a.cc:19:17: error: 'endl' was not declared in this scope 19 | cout << endl; | ^~~~
s843770680
p04043
C++
#include"bits/stdc++.h" using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if (max({a,b,c}==7 && min({a,b,c}==5 && a+b+c==17))) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:18: error: expected ')' before '==' token 7 | if (max({a,b,c}==7 && min({a,b,c}==5 && a+b+c==17))) cout << "YES" << endl; | ~ ^~ | )
s131500600
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; string ans; vector<int> vec = {a,b,c}; sort(vec.begin(),vec.end()); if (vec[0]==5 && vec[1]==7 && vec[2]==5) ans = "YES"; else ans = "NO"; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'vector' was not declared in this scope 7 | vector<int> vec = {a,b,c}; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | using namespace std; a.cc:7:10: error: expected primary-expression before 'int' 7 | vector<int> vec = {a,b,c}; | ^~~ a.cc:8:8: error: 'vec' was not declared in this scope 8 | sort(vec.begin(),vec.end()); | ^~~ a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(vec.begin(),vec.end()); | ^~~~ | short
s152193266
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c; string ans; vector<int> vec = {a,b,c}; sort(vec.begin(),vec.end()); if(vec[0]==5 && vec[1]==7 && vec[2]==5) ans = "YES"; else ans = "NO"; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<int> vec = {a,b,c}; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | using namespace std; a.cc:6:10: error: expected primary-expression before 'int' 6 | vector<int> vec = {a,b,c}; | ^~~ a.cc:7:8: error: 'vec' was not declared in this scope 7 | sort(vec.begin(),vec.end()); | ^~~ a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'? 7 | sort(vec.begin(),vec.end()); | ^~~~ | short
s212489131
p04043
C++
#include<bits/stdc++.h> #include<iostream> #include<vector> int main(){ vector<int> A(3); cin >> A[0] >> A[1] >> A[2]; sort(A.begin(), A.end()); if(A[0]==5 && A[1]==5 && A[2]==7){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<int> A(3); | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/14/vector:93:13: note: 'std::pmr::vector' 93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; | ^~~~~~ a.cc:6:10: error: expected primary-expression before 'int' 6 | vector<int> A(3); | ^~~ a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> A[0] >> A[1] >> A[2]; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:10: error: 'A' was not declared in this scope 7 | cin >> A[0] >> A[1] >> A[2]; | ^ a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 8 | sort(A.begin(), A.end()); | ^~~~ | std::sort In file included from /usr/include/c++/14/algorithm:86, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~
s179344983
p04043
C++
#include<bits/stdc++.h> int main(){ vector<int> A(3); cin >> A[0] >> A[1] >> A[2]; sort(A.begin(), A.end()); if(A[0]==5 && A[1]==5 && A[2]==7){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'vector' was not declared in this scope 4 | vector<int> A(3); | ^~~~~~ a.cc:4:3: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/14/vector:93:13: note: 'std::pmr::vector' 93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; | ^~~~~~ a.cc:4:10: error: expected primary-expression before 'int' 4 | vector<int> A(3); | ^~~ a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> A[0] >> A[1] >> A[2]; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:10: error: 'A' was not declared in this scope 5 | cin >> A[0] >> A[1] >> A[2]; | ^ a.cc:6:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 6 | sort(A.begin(), A.end()); | ^~~~ | std::sort In file included from /usr/include/c++/14/algorithm:86, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~
s013884686
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> vec(3); cin >> vec[0] >> vec[1] >> vec[2]; sort(vec.bigin(), vec.end()); if(vec[0] == 5 && vec[1] == 5 && vec[2] == 7) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:12: error: 'class std::vector<int>' has no member named 'bigin'; did you mean 'begin'? 8 | sort(vec.bigin(), vec.end()); | ^~~~~ | begin
s936665297
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; bool result; if(a==7 && b==5 && c==5 || b==7 && a==5 && c==5 || c==7 && a==5 && c=-5){ cout << "YES" << endl; }else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:8:53: error: lvalue required as left operand of assignment 8 | if(a==7 && b==5 && c==5 || b==7 && a==5 && c==5 || c==7 && a==5 && c=-5){ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
s644171151
p04043
C++
a = list(map(int, 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 = list(map(int, input().split())) | ^
s435557932
p04043
C++
#include <stdio.h> #include <algorithm> #include <math.h> using namespace std; int main() { int a[3]; scanf("%d %d %d",&a[0],&a[1],&a[2]); int x=0; int y=0; for(i=0;i<3;i++) { if(a[i]==5){x++;} if(a[i]==7){y++;} } if(x==2&&y==1){printf("YES\n");} else{printf("NO\n");} }
a.cc: In function 'int main()': a.cc:11:5: error: 'i' was not declared in this scope 11 | for(i=0;i<3;i++) | ^
s194303726
p04043
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #define REP(i,n) for(i=0;i<n;i++) int iin() { int i; scanf("%d", &i); return i; } long long llin() { long long i; scanf("%lld", &i); return i; } double din() { double i; scanf("%lf", &i); return i; } char cin() { char c; scanf("%c", &c); return c; } void stin(char *s) { scanf("%s", s); } void iout(int i) { printf("%d\n", i); } void llout(long long i) { printf("%lld\n", i); } void dout(double i) { printf("%lf\n", i); } void cout(char c) { printf("%c\n", c); } void stout(char *s) { printf("%s\n", s); } int main() { int f = 0, int n = 0; int m, i; REP(i, 3) { m = iin(); if (m == 5) f++; if (m == 7) n++; } (f == 2 && n == 1) ? stout("YES") : stout("NO"); return 0; }
main.c: In function 'main': main.c:58:20: error: expected identifier or '(' before 'int' 58 | int f = 0, int n = 0; | ^~~ main.c:63:29: error: 'n' undeclared (first use in this function) 63 | if (m == 7) n++; | ^ main.c:63:29: note: each undeclared identifier is reported only once for each function it appears in
s819599704
p04043
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if({a,b,c}=={5,5,7}||{a,b,c}=={5,7,5}||{a,b,c}=={7,5,5}) cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:7:6: error: expected primary-expression before '{' token 7 | if({a,b,c}=={5,5,7}||{a,b,c}=={5,7,5}||{a,b,c}=={7,5,5}) | ^ a.cc:7:6: error: expected ')' before '{' token 7 | if({a,b,c}=={5,5,7}||{a,b,c}=={5,7,5}||{a,b,c}=={7,5,5}) | ~^ | )
s931679438
p04043
C++
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); int a, b, c; cin >> a >> b >> c; if(a * b * c * == 5 * 7 * 5) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: expected primary-expression before '==' token 11 | if(a * b * c * == 5 * 7 * 5) | ^~
s892468615
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; string ans; cin >> a >> b >> c; vector<int> vec{a,b,c}; sort(vec.begin(),vec.end()); if(vec.(0)==5 && vec.(1)==5 && vec.(2) ==7){ ans ="YES"; } else{ ans="NO"; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:10: error: expected unqualified-id before '(' token 10 | if(vec.(0)==5 && vec.(1)==5 && vec.(2) ==7){ | ^ a.cc:10:24: error: expected unqualified-id before '(' token 10 | if(vec.(0)==5 && vec.(1)==5 && vec.(2) ==7){ | ^ a.cc:10:38: error: expected unqualified-id before '(' token 10 | if(vec.(0)==5 && vec.(1)==5 && vec.(2) ==7){ | ^
s450717831
p04043
C++
#include <iostream> #include <string> using namespace std; int Main(void){ int a; int b; int c; cin >> a >> b >> c >> endl; int fc; int sc; if(a == 5){ fc++; }else if(a == 7){ sc++; } if(b == 5){ fc++; }else if(b == 7){ sc++; } if(c == 5){ fc++; }else if(c == 7){ sc++; } if(fc == 2&&sc == 1){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int Main()': a.cc:8:22: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 8 | cin >> a >> b >> c >> endl; | ~~~~~~~~~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); |
s823086620
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; int prod; cin >> a >> b >> c; prod = a * b * c; if (prod == (5*7*5)) { cout << "YES" << endl; } else { cout << "NO" << endl } return 0; }
a.cc: In function 'int main()': a.cc:13:25: error: expected ';' before '}' token 13 | cout << "NO" << endl | ^ | ; 14 | } | ~
s065413372
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; int prod; cin >> a >> b >> c; prd = a * b * c; if (prd == (5*7*5)) { cout << "YES" << endl; } else { cout << "NO" << endl } return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'prd' was not declared in this scope; did you mean 'prod'? 9 | prd = a * b * c; | ^~~ | prod a.cc:13:25: error: expected ';' before '}' token 13 | cout << "NO" << endl | ^ | ; 14 | } | ~
s897373544
p04043
Java
package training1; import java.util.Scanner; public class Iroha { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); String[] sArray = s.split(" "); int five = 0; int seven = 0; for(int i=0; i<3; i++) { if(sArray[i].equals("5")) { five++; }else if(sArray[i].equals("7")){ seven++; } } //結果表示 if(five == 2 && seven == 1) { System.out.println("Yes"); } else { System.out.println("No"); } } }
Main.java:5: error: class Iroha is public, should be declared in a file named Iroha.java public class Iroha { ^ 1 error
s779380112
p04043
C++
#include<bits/stdc++.h> using namespace std; #define str string int main(){ int a,b,c; cin>>a>>b>>c; if(a==5||a==7){ else if(b==5||==7){ else if(c==5||c==7){ else if(a+b+c==17){ cout<<"YES"<<endl; } } } } else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:8:9: error: expected '}' before 'else' 8 | else if(b==5||==7){ | ^~~~ a.cc:7:19: note: to match this '{' 7 | if(a==5||a==7){ | ^ a.cc:8:23: error: expected primary-expression before '==' token 8 | else if(b==5||==7){ | ^~ a.cc:9:13: error: expected '}' before 'else' 9 | else if(c==5||c==7){ | ^~~~ a.cc:8:27: note: to match this '{' 8 | else if(b==5||==7){ | ^ a.cc:10:17: error: expected '}' before 'else' 10 | else if(a+b+c==17){ | ^~~~ a.cc:9:32: note: to match this '{' 9 | else if(c==5||c==7){ | ^ a.cc: At global scope: a.cc:14:9: error: expected declaration before '}' token 14 | } | ^ a.cc:15:5: error: expected declaration before '}' token 15 | } | ^ a.cc:16:5: error: expected unqualified-id before 'else' 16 | else cout<<"NO"<<endl; | ^~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s425934864
p04043
C++
#include<bits/stdc++.h> using namespace std; #define str string int main(){ int a,b,c; cin>>a>>b>>c; if(a==5||a==7){ if(b==5||==7){ if(c==5||c==7){ if(a+b+c==17){ cout<<"YES"<<endl; } } } } else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:8:18: error: expected primary-expression before '==' token 8 | if(b==5||==7){ | ^~
s850410729
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c>>endl; 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; return 0; }
a.cc: In function 'int main()': a.cc:6:21: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 6 | cin>>a>>b>>c>>endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); |
s717162643
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> haiku(3); int p=0, q=0; for (int i = 0; i < 3; i++){ cin >> haiku.at(i); } for (int i = 0; i < 3; i++){ if (haiku.at(i) == 5){ p++; } else if (haiku.at(i) == 7){ q++; } } if (p==2 || q==1){ cout << "YES" <<endl; } else if { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:23:13: error: expected '(' before '{' token 23 | else if { | ^ | (
s910237650
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector haiku(3); int p=0, q=0; for (int i = 0; i < 3; i++){ cin >> haiku.at(i); } for (int i = 0; i < 3; i++){ if (haiku.at(i) == 5){ p++; } else if (haiku.at(i) == 7){ q++; } } if (p==2 || q==1){ cout << "YES" <<endl; } else if { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:5:19: error: class template argument deduction failed: 5 | vector haiku(3); | ^ a.cc:5:19: error: no matching function for call to 'vector(int)' In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>' 707 | vector(_InputIterator __first, _InputIterator __last, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const _Alloc&)-> std::vector<_Tp, _Alloc>' 678 | vector(initializer_list<value_type> __l, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:678:7: note: template argument deduction/substitution failed: a.cc:5:19: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 5 | vector haiku(3); | ^ /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>' 659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::false_type)-> std::vector<_Tp, _Alloc>' 640 | vector(vector&& __rv, const allocator_type& __m, false_type) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::true_type)-> std::vector<_Tp, _Alloc>' 635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>' 624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>' 620 | vector(vector&&) noexcept = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:620:7: note: template argument deduction/substitution failed: a.cc:5:19: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'int' 5 | vector haiku(3); | ^ /usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>' 601 | vector(const vector& __x) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:601:7: note: template argument deduction/substitution failed: a.cc:5:19: note: mismatched types 'const std::vector<_Tp, _Alloc>' and 'int' 5 | vector haiku(3); | ^ /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Tp&, const _Alloc&)-> std::vector<_Tp, _Alloc>' 569 | vector(size_type __n, const value_type& __value, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Alloc&)-> std::vector<_Tp, _Alloc>' 556 | vector(size_type __n, const allocator_type& __a = allocator_type()) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:556:7: note: template argument deduction/substitution failed: a.cc:5:19: note: couldn't deduce template parameter '_Tp' 5 | vector haiku(3); | ^ /usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const _Alloc&)-> std::vector<_Tp, _Alloc>' 542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:542:7: note: template argument deduction/substitution failed: a.cc:5:19: note: couldn't deduce template parameter '_Tp' 5 | vector haiku(3); | ^ /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>' 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:428:11: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>)-> std::vector<_Tp, _Alloc>' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:428:11: note: template argument deduction/substitution failed: a.cc:5:19: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'int' 5 | vector haiku(3); | ^ /usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate: 'template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> vector<_ValT, _Allocator>' 2033 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator()) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate expects 2 arguments, 1 provided a.cc:23:13: error: expected '(' before '{' token 23 | else if { | ^ | (
s351337240
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> vec (3); sort(vec.begin(), vec.end()); if(vec.at(0)==5&&vec.at(1)==7&&vec.at(2)==7){ cout << Yes << endl; } else{ cout << No<< endl; } }
a.cc: In function 'int main()': a.cc:9:15: 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; | ^~
s082124712
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin >> A>>B>>C; if(A*B*C==175){ cout << "YES" << endl; } else{ cout < "NO" << endl; } }
a.cc: In function 'int main()': a.cc:12:29: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 12 | cout < "NO" << endl; | ~~~~~^~~~~~~
s062157110
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin >> A>>B>>C; if(A*B*C==175){ cout << "YES" << endl; } else{ cout < "NO" <<endl; } }
a.cc: In function 'int main()': a.cc:12:29: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 12 | cout < "NO" <<endl; | ~~~~~^~~~~~
s302995125
p04043
C
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <string> #include <queue> #include <stack> #include <math.h> #include <set> #define ALL(obj) (obj).begin(),(obj).end() #define RALL(obj) (obj).rbegin(),(obj).rend() #define P pair<int,int> #define MOD 1000000007 #define INF 2147483647 #define NINF (-2147483647-1) #define LLINF 9223372036854775807 using ll = long long; using namespace std; int main() { int a[3]; cin >> a[0] >> a[1] >> a[2]; int d, e; d = e = 0; for (int i = 0; i < 3; i++) { if (a[i] == 5) { d++; } else if (a[i] == 7) { e++; } } if (d == 2 && e == 1) { cout << "YES" << endl; } else { cout << "NO" << endl; } getchar(); getchar(); return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s620131719
p04043
C++
#include<iostream> #include<string> #include<vector> #include<cstdint> using namespace std; int main() { // 整数の入力 uint64_t N, L; cin >> N >> L; vector<string> s; s.resize(L); for (uint64_t i = 0; i < L; ++i) { cin >> s[i]; } sort(s.begin(), s.end()); for (uint64_t i = 0; i < L; ++i) { cout << s[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(s.begin(), s.end()); | ^~~~ | short
s644480996
p04043
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { // 整数の入力 uint64_t N, L; cin >> N >> L; vector<string> s(L); for (uint64_t i = 0; i < L; ++i) { cin >> s[i]; } sort(s.begin(), s.end()); for (uint64_t i = 0; i < L; ++i) { cout << s[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'uint64_t' was not declared in this scope 8 | uint64_t N, L; | ^~~~~~~~ a.cc:4:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 3 | #include<vector> +++ |+#include <cstdint> 4 | using namespace std; a.cc:9:10: error: 'N' was not declared in this scope 9 | cin >> N >> L; | ^ a.cc:9:15: error: 'L' was not declared in this scope 9 | cin >> N >> L; | ^ a.cc:11:16: error: expected ';' before 'i' 11 | for (uint64_t i = 0; i < L; ++i) { | ^~ | ; a.cc:11:24: error: 'i' was not declared in this scope 11 | for (uint64_t i = 0; i < L; ++i) { | ^ a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s.begin(), s.end()); | ^~~~ | short a.cc:15:16: error: expected ';' before 'i' 15 | for (uint64_t i = 0; i < L; ++i) { | ^~ | ; a.cc:15:24: error: 'i' was not declared in this scope 15 | for (uint64_t i = 0; i < L; ++i) { | ^