submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s750110588
p04043
C++
import java.util.Scanner; class Main { 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 * b * c == 175) System.out.print("YES"); else System.out.print("NO"); scan.close(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:5:33: error: 'String' has not been declared 5 | public static void main(String[] args) { | ^~~~~~ a.cc:5:42: error: expected ',' or '...' before 'args' 5 | public static void main(String[] args) { | ^~~~ a.cc:23:2: error: expected ';' after class definition 23 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:7:17: error: 'Scanner' was not declared in this scope 7 | Scanner scan = new Scanner(System.in); | ^~~~~~~ a.cc:8:17: error: 'scan' was not declared in this scope 8 | int a = scan.nextInt(); | ^~~~ a.cc:13:9: error: 'System' was not declared in this scope 13 | System.out.print("YES"); | ^~~~~~ a.cc:17:9: error: 'System' was not declared in this scope 17 | System.out.print("NO"); | ^~~~~~
s672128331
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,n,m,x=0,y=0; int a[4]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); for(i=0;i<3;i++) { if(a[i]==5) { x++; } if(a[i]==7) { y++; } } if(x==2 && y==1) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:6:7: error: conflicting declaration 'int a [4]' 6 | int a[4]; | ^ a.cc:5:7: note: previous declaration as 'int a' 5 | int a,b,c,n,m,x=0,y=0; | ^ a.cc:7:9: error: invalid types 'int[int]' for array subscript 7 | cin>>a[0]>>a[1]>>a[2]; | ^ a.cc:7:15: error: invalid types 'int[int]' for array subscript 7 | cin>>a[0]>>a[1]>>a[2]; | ^ a.cc:7:21: error: invalid types 'int[int]' for array subscript 7 | cin>>a[0]>>a[1]>>a[2]; | ^ a.cc:9:7: error: 'i' was not declared in this scope 9 | for(i=0;i<3;i++) | ^ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:61, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:7: required from here 8 | sort(a,a+3); | ~~~~^~~~~~~ /usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 258 | _ValueType; | ^~~~~~~~~~ /usr
s712976007
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { #ifdef DEBUG ifstream in("input.txt"); cin.rdbuf(in.rdbuf()); #endif // for local. int a, b, c; cin >> a >> b >> c; if (a * b * c == 5 * 7 * 5) { ans = "YES"; } else { ans = "NO"; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | ans = "YES"; | ^~~ | abs a.cc:16:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans = "NO"; | ^~~ | abs a.cc:19:11: error: 'ans' was not declared in this scope; did you mean 'abs'? 19 | cout << ans << endl; | ^~~ | abs
s074190260
p04043
C++
in_ = input().split() if in_.count('5') is 2 and in_.count('7') is 1: print('YES') else: print('NO')
a.cc:4:11: warning: multi-character character constant [-Wmultichar] 4 | print('YES') | ^~~~~ a.cc:6:11: warning: multi-character character constant [-Wmultichar] 6 | print('NO') | ^~~~ a.cc:1:1: error: 'in_' does not name a type; did you mean 'int'? 1 | in_ = input().split() | ^~~ | int
s741001930
p04043
C++
#include<iosatream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if((a == 7 && b == 5 && c == 5)||(a == 5 && b == 7 && c == 5)||(a == 5 && b == 5 && c == 7)){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc:1:9: fatal error: iosatream: No such file or directory 1 | #include<iosatream> | ^~~~~~~~~~~ compilation terminated.
s777409287
p04043
C++
#include<iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if((a == 7 && b == 5 && c == 5)||(a == 5 && b == 7 && c == 5)||(a == 5 && b == 5 && c == 7)){ cout << "YES" << endl; }else{ cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:6: error: expected '}' at end of input 13 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s633810370
p04043
C++
#include<iosatream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if((a == 7 && b == 5 && c == 5)||(a == 5 && b == 7 && c == 5)||(a == 5 && b == 5 && c == 7)){ cout << "YES" << endl; }else{ cout << "NO" << endl; return 0; }
a.cc:1:9: fatal error: iosatream: No such file or directory 1 | #include<iosatream> | ^~~~~~~~~~~ compilation terminated.
s158313340
p04043
C++
#include<#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a==5&&b==5&&c==7) { cout<<"YES"; } else if(a==5&&b==7&&c==5) { cout<<"YES"; } else if(a==7&&b==5&&c==5) { cout<<"YES"; } else { cout<<"NO"; } return 0; }
a.cc:1:9: fatal error: #include<bits/stdc++.h: No such file or directory 1 | #include<#include<bits/stdc++.h> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s585134827
p04043
C++
#include <stdio.h> int main(void) { int moji1,moji2,moji3; scanf("%d %d %d",moji1,moji2,moji3);
a.cc: In function 'int main()': a.cc:6:39: error: expected '}' at end of input 6 | scanf("%d %d %d",moji1,moji2,moji3); | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s183308365
p04043
C++
A = int(input()).split() if A.count.("5") == 2 and a.count("7")==1: print("YSE") else: print("NO")
a.cc:1:1: error: 'A' does not name a type 1 | A = int(input()).split() | ^
s758872016
p04043
Java
Scanner sn = new Scanner(System.in); int A = sn.nextInt(); int B = sn.nextInt(); int C = sn.nextInt(); int sum = A + B + C; if(sum == 17){ System.out.print("YES"); } else { System.out.print("NO"); }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. Scanner sn = new Scanner(System.in); ^ (use --enable-preview to enable unnamed classes) Main.java:7: error: class, interface, enum, or record expected if(sum == 17){ ^ Main.java:9: error: class, interface, enum, or record expected } else { ^ Main.java:11: error: class, interface, enum, or record expected } ^ 4 errors
s199083101
p04043
Java
public class IrohaAndHaiku { public static void main(String[] args) { Scanner sn = new Scanner(System.in); int A = sn.nextInt(); int B = sn.nextInt(); int C = sn.nextInt(); int sum = A + B + C; if(sum == 17){ System.out.print("YES"); } else { System.out.print("NO"); } } }
Main.java:1: error: class IrohaAndHaiku is public, should be declared in a file named IrohaAndHaiku.java public class IrohaAndHaiku { ^ Main.java:3: error: cannot find symbol Scanner sn = new Scanner(System.in); ^ symbol: class Scanner location: class IrohaAndHaiku Main.java:3: error: cannot find symbol Scanner sn = new Scanner(System.in); ^ symbol: class Scanner location: class IrohaAndHaiku 3 errors
s785128845
p04043
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <bitset> #include <algorithm> #include <complex> #include <array> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) #define FORR(i,a,b) for (int i=a; i>=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector<int> VI; typedef vector<ll> VL; typedef vector<double> VD; typedef vector<VI> VVI; typedef vector<VL> VVL; typedef vector<VD> VVD; typedef pair<int,int> P; typedef pair<ll,ll> PL; using Graph=vector<vector<int>>; template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;} template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;} int main() { int A,B,C; cin>>A>>B>>C; if(A+B+C!=17) { cout<<"No"<<endl; return 0; } if(A+B+C==17) { if(A*B*C=175) { cout<<"YES"<<endl; return 0; } else { cout<<"NO"<<endl; } } }
a.cc: In function 'int main()': a.cc:49:11: error: lvalue required as left operand of assignment 49 | if(A*B*C=175) | ~~~^~
s467055307
p04043
C++
#include <iostream> #include <vector> #include<algorithm> #include<math.h> #include<iomanip> #define ff(i,m,n) for(int i=m;i<n;i++) #define i64 int64_t using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a + b + c != 12) { cout << "NO" << endl; return 0; } if (a != 5 && a != 7) { cout << "NO" << endl; return 0; } if (c != 5 && c != 7) { cout << "NO" << endl; return 0; } if (b != 5 && b != 7) { cout << "NO" << endl; return 0; } cout << "YES" << endl;
a.cc: In function 'int main()': a.cc:31:31: error: expected '}' at end of input 31 | cout << "YES" << endl; | ^ a.cc:11:12: note: to match this '{' 11 | int main() { | ^
s427175568
p04043
C++
#include <vector> #include <iostream> #include <algorithm> #include <functional> #include <string> #include <limits.h> #include <cmath> #include <queue> #include <map> #include <iomanip> #include <random> #include <fstream> #define rep(i, n) for (int i = 0; i < n; i++) #define PI 3.14159265358979323846 #define MOD 1000000007 using namespace std; using ll = long long; const int MAX = 1000000; ll fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k){ if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } ll gcd(ll a, ll b) { ll r; while ((r = a % b)) { a = b; b = r; } return b; } template <class T> struct cord{ T x,y; }; template <class T> double dist(cord<T> a, cord<T> b){ T dx=a.x-b.x; T dy=a.y-b.y; return sqrt(dx*dx+dy*dy); } int main() { //cout << fixed << setprecision(10); int n[3]; cin >> n[0] >> n[1] >> n[2]; sort(n.begin(),n.end()); if (n[0]==5&&n[1]==7&&n[2]==7){cout << "YES";} else {cout << "NO";} return 0; }
a.cc: In function 'int main()': a.cc:69:10: error: request for member 'begin' in 'n', which is of non-class type 'int [3]' 69 | sort(n.begin(),n.end()); | ^~~~~ a.cc:69:20: error: request for member 'end' in 'n', which is of non-class type 'int [3]' 69 | sort(n.begin(),n.end()); | ^~~
s614936922
p04043
C++
#include <vector> #include <iostream> #include <algorithm> #include <functional> #include <string> #include <limits.h> #include <cmath> #include <queue> #include <map> #include <iomanip> #include <random> #include <fstream> #define rep(i, n) for (int i = 0; i < n; i++) #define PI 3.14159265358979323846 #define MOD 1000000007 using namespace std; using ll = long long; const int MAX = 1000000; ll fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k){ if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } ll gcd(ll a, ll b) { ll r; while ((r = a % b)) { a = b; b = r; } return b; } template <class T> struct cord{ T x,y; }; template <class T> double dist(cord<T> a, cord<T> b){ T dx=a.x-b.x; T dy=a.y-b.y; return sqrt(dx*dx+dy*dy); } int main() { //cout << fixed << setprecision(10); int n[3]; cin >> c[0] >> c[1] >> c[2]; sort(n.begin(),n.end()); if (c[0]==5&&c[1]==7&&c[2]==7){cout << "YES";} else {cout << "NO";} return 0; }
a.cc: In function 'int main()': a.cc:68:20: error: 'c' was not declared in this scope 68 | int n[3]; cin >> c[0] >> c[1] >> c[2]; | ^ a.cc:69:10: error: request for member 'begin' in 'n', which is of non-class type 'int [3]' 69 | sort(n.begin(),n.end()); | ^~~~~ a.cc:69:20: error: request for member 'end' in 'n', which is of non-class type 'int [3]' 69 | sort(n.begin(),n.end()); | ^~~
s707416256
p04043
C++
#include<iostream> using namespace std; int main(){ int n=3; int N[n]; int r[n]={5,7,5}; int t[n]; for(int i=0;i<n;i++){ cin>>N[i]; } int five=0; int seven=0; for(int i=0;i<n;i++){ if(N[i]==5){ five++; } if(N[i]==7){ seven++; } } if(five==2&&sezen==1) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:22:15: error: 'sezen' was not declared in this scope; did you mean 'seven'? 22 | if(five==2&&sezen==1) cout<<"YES"<<endl; | ^~~~~ | seven
s744835478
p04043
Java
public class ABC042 { public static void main(String[] args) { int seven = 0; int five = 0; String[] num = new String[3]; for (int i = 0; i < 3; i++) { num[i] = new java.util.Scanner(System.in).nextLine(); } for (int i = 0; i < 3; i++) { if (num[i].length() == 5) { five ++; } if (num[i].length() == 7) { seven ++; } } if(five == 2 && seven == 1) { System.out.println("Yes"); } else { System.out.println("No"); } } }
Main.java:2: error: class ABC042 is public, should be declared in a file named ABC042.java public class ABC042 { ^ 1 error
s720200756
p04043
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b+c==17 && (a=5||a=7) && (b=5||b=7)){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:23: error: lvalue required as left operand of assignment 9 | if(a+b+c==17 && (a=5||a=7) && (b=5||b=7)){ | ~^~~ a.cc:9:37: error: lvalue required as left operand of assignment 9 | if(a+b+c==17 && (a=5||a=7) && (b=5||b=7)){ | ~^~~
s319667559
p04043
C++
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b+c==17 && (a=5||a=7) && (b=5||b=7)){ cout<<"YES"<<endl; }else{ cou<<"NO"<<ensl; } return 0; }
a.cc: In function 'int main()': a.cc:9:23: error: lvalue required as left operand of assignment 9 | if(a+b+c==17 && (a=5||a=7) && (b=5||b=7)){ | ~^~~ a.cc:9:37: error: lvalue required as left operand of assignment 9 | if(a+b+c==17 && (a=5||a=7) && (b=5||b=7)){ | ~^~~ a.cc:12:5: error: 'cou' was not declared in this scope 12 | cou<<"NO"<<ensl; | ^~~ a.cc:12:16: error: 'ensl' was not declared in this scope 12 | cou<<"NO"<<ensl; | ^~~~
s799242922
p04043
Java
import java.util.Scanner; public class Mian { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); if ((a + b + c) == 17) { if ((a == 7) && (b == 5) && (c == 5)) { System.out.println("YES"); } else if ((a == 5) && (b == 7) && (c == 5)) { System.out.println("YES"); } else if ((a == 5) && (b == 5) && (c == 7)) { System.out.println("YES"); } else { System.out.println("NO"); } } else { System.out.println("NO"); } } }
Main.java:3: error: class Mian is public, should be declared in a file named Mian.java public class Mian { ^ 1 error
s281670832
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int countFive = 0; int countSeven = 0; if (a == 5) { countFive ++; } else { countSeven ++; } if (b == 5) { countFive ++; } else { countSeven ++; } if (c == 5) { countFive ++; } else { countSeven ++; } if (countFive = 5) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:28: error: incompatible types: int cannot be converted to boolean if (countFive = 5) { ^ 1 error
s289768582
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int countFive = 0; int countSeven = 0; if (a == 5) { countFive ++; } else { countSeven ++; } if (b == 5) { countFive ++; } else { countSeven ++; } if (c == 5) { countFive ++; } else { countSeven ++; } if (countFive = 5) { System.out.println("YES") } else { System.out.println("NO") } } }
Main.java:29: error: ';' expected System.out.println("YES") ^ Main.java:31: error: ';' expected System.out.println("NO") ^ 2 errors
s363793705
p04043
C++
a=list(map(int, input().split())) sorted(a) if a[0]== 5 and a[1] == 5 and a[2] == 7: print('YES') else: print('NO')
a.cc:4:9: warning: multi-character character constant [-Wmultichar] 4 | print('YES') | ^~~~~ a.cc:6:9: warning: multi-character character constant [-Wmultichar] 6 | print('NO') | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a=list(map(int, input().split())) | ^
s246043008
p04043
C
#include<stdio.h> int main(){ int A,B,C; scanf("%d %d %d",&A,&B,&C); if(A+B+C==17&&A*B*C==105){ printf("YES"); }else{ printf("NO"); } retun 0; }
main.c: In function 'main': main.c:10:3: error: 'retun' undeclared (first use in this function) 10 | retun 0; | ^~~~~ main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in main.c:10:8: error: expected ';' before numeric constant 10 | retun 0; | ^~ | ;
s592163312
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int A = s.nextInt(); int B = s.nextInt(); int C = s.nextInt(); int nana, go; if(A == 5){ go++;} else if(A == 7) {nana++;} if(B == 5){ go++;} else if(B == 7) {nana++;} if(C == 5){ go++;} else if(C == 7) {nana++;} if(go == 2 && nana == 1){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:11: error: variable go might not have been initialized if(A == 5){ go++;} else if(A == 7) {nana++;} ^ Main.java:11: error: variable nana might not have been initialized if(A == 5){ go++;} else if(A == 7) {nana++;} ^ Main.java:12: error: variable go might not have been initialized if(B == 5){ go++;} else if(B == 7) {nana++;} ^ Main.java:12: error: variable nana might not have been initialized if(B == 5){ go++;} else if(B == 7) {nana++;} ^ Main.java:13: error: variable go might not have been initialized if(C == 5){ go++;} else if(C == 7) {nana++;} ^ Main.java:13: error: variable nana might not have been initialized if(C == 5){ go++;} else if(C == 7) {nana++;} ^ Main.java:15: error: variable go might not have been initialized if(go == 2 && nana == 1){ ^ Main.java:15: error: variable nana might not have been initialized if(go == 2 && nana == 1){ ^ 8 errors
s867344800
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in()); int A = s.nextInt(); int B = s.nextInt(); int C = s.nextInt(); int nana, go; if(A == 5){ go++;} else if(A == 7) {nana++;} if(B == 5){ go++;} else if(B == 7) {nana++;} if(C == 5){ go++;} else if(C == 7) {nana++;} if(go == 2 && nana == 1){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:5: error: cannot find symbol Scanner s = new Scanner(System.in()); ^ symbol: method in() location: class System 1 error
s777571236
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in()); int A = s.nextInt(); int B = s.nextInt(); int C = s.nextInt(); int nana, go; if(A == 5){ go++;} else(A == 7) {nana++;} if(B == 5){ go++;} else(B == 7) {nana++;} if(C == 5){ go++;} else(C == 7) {nana++;} if(go == 2 && nana == 1){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:11: error: not a statement if(A == 5){ go++;} else(A == 7) {nana++;} ^ Main.java:11: error: ';' expected if(A == 5){ go++;} else(A == 7) {nana++;} ^ Main.java:12: error: not a statement if(B == 5){ go++;} else(B == 7) {nana++;} ^ Main.java:12: error: ';' expected if(B == 5){ go++;} else(B == 7) {nana++;} ^ Main.java:13: error: not a statement if(C == 5){ go++;} else(C == 7) {nana++;} ^ Main.java:13: error: ';' expected if(C == 5){ go++;} else(C == 7) {nana++;} ^ 6 errors
s978836266
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in()); int A = s.nextInt(); int B = s.nextInt(); int C = s.nextInt(); int nana, go; if(A == 5) go++; else(A == 7) nana++; if(B == 5) go++; else(B == 7) nana++; if(C == 5) go++; else(C == 7) nana++; if(go == 2 && nana == 1){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:11: error: not a statement if(A == 5) go++; else(A == 7) nana++; ^ Main.java:11: error: ';' expected if(A == 5) go++; else(A == 7) nana++; ^ Main.java:12: error: not a statement if(B == 5) go++; else(B == 7) nana++; ^ Main.java:12: error: ';' expected if(B == 5) go++; else(B == 7) nana++; ^ Main.java:13: error: not a statement if(C == 5) go++; else(C == 7) nana++; ^ Main.java:13: error: ';' expected if(C == 5) go++; else(C == 7) nana++; ^ 6 errors
s777051082
p04043
C
#include<stdio.h> void main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a=5,b=7,c=5) print("YES"); else print("NO"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 7 | print("YES"); | ^~~~~ | printf main.c:10:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch] 10 | return 0; | ^ main.c:2:6: note: declared here 2 | void main() | ^~~~
s565651560
p04043
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a=5,b=7,c=5) print("YES"); else print("NO"); return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 7 | print("YES"); | ^~~~~ | printf
s956755860
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||A==5,B==7,C==5||A==7,B==5,C==5) { printf("YES\n"); printf("Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); } else printf("NO"); return 0; }
main.c: In function 'main': main.c:9:108: error: 'a' undeclared (first use in this function) 9 | printf("Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); | ^ main.c:9:108: note: each undeclared identifier is reported only once for each function it appears in main.c:9:110: error: 'b' undeclared (first use in this function) 9 | printf("Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); | ^ main.c:9:112: error: 'c' undeclared (first use in this function) 9 | printf("Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); | ^
s009600115
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||A==5,B==7,C==5||A==7,B==5,C==5) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:4:25: error: 'a' undeclared (first use in this function) 4 | scanf("%d%d%d",&a,&b,&c); | ^ main.c:4:25: note: each undeclared identifier is reported only once for each function it appears in main.c:4:28: error: 'b' undeclared (first use in this function) 4 | scanf("%d%d%d",&a,&b,&c); | ^ main.c:4:31: error: 'c' undeclared (first use in this function) 4 | scanf("%d%d%d",&a,&b,&c); | ^
s766695754
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||a==5,b==7,c==5||a==7,b==5,c==5) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:5:12: error: 'a' undeclared (first use in this function) 5 | if(a==5,b==5,c==7||a==5,b==7,c==5||a==7,b==5,c==5) | ^ main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in main.c:5:17: error: 'b' undeclared (first use in this function) 5 | if(a==5,b==5,c==7||a==5,b==7,c==5||a==7,b==5,c==5) | ^ main.c:5:22: error: 'c' undeclared (first use in this function) 5 | if(a==5,b==5,c==7||a==5,b==7,c==5||a==7,b==5,c==5) | ^
s420303594
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >>c; if(a+b+c == 17){ if( (a==5 && b ==5) || (b==5 && c==5) || (c==5 && a ==5)){ cout << "Yes" <<endl; } else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:11:4: error: expected '}' at end of input 11 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s052752639
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if (a+b+c == 17){ cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:8:3: error: expected '}' before 'else' 8 | else cout << "NO" << endl; | ^~~~ a.cc:6:19: note: to match this '{' 6 | if (a+b+c == 17){ | ^
s178970944
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin << a << b << c; if (a+b+c == 17){ cout >> "YES" >> endl;} else {cout >> "NO" >> endl;} }
a.cc: In function 'int main()': a.cc:5:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | cin << a << b << c; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:5:7: note: candidate: 'operator<<(int, int)' (built-in) 5 | cin << a << b << c; | ~~~~^~~~ a.cc:5:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:5:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 5 | cin << a << b << c; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++
s292770632
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin << a << b << c; if (a+b+c == 17) cout >> "YES" >> endl; else cout >> "NO" >> endl; }
a.cc: In function 'int main()': a.cc:5:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | cin << a << b << c; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:5:7: note: candidate: 'operator<<(int, int)' (built-in) 5 | cin << a << b << c; | ~~~~^~~~ a.cc:5:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:5:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 5 | cin << a << b << c; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << a << b << c; | ^ /usr/include/c++
s256684528
p04043
C++
#include<stdio.h> main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a=5&&b=7&&c=7) { printf("YES"); } else if(a=5&&b=7&&c=7) { printf("YES"); } else if(b=5&&a=7&&c=7) { printf("YES"); } else if(c=5&&a=7&&b=7) { printf("YES"); } else { printf("NO"); } }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main() | ^~~~ a.cc: In function 'int main()': a.cc:7:20: error: lvalue required as left operand of assignment 7 | if(a=5&&b=7&&c=7) | ~^~~ a.cc:11:17: error: lvalue required as left operand of assignment 11 | else if(a=5&&b=7&&c=7) | ~^~~ a.cc:15:17: error: lvalue required as left operand of assignment 15 | else if(b=5&&a=7&&c=7) | ~^~~ a.cc:19:17: error: lvalue required as left operand of assignment 19 | else if(c=5&&a=7&&b=7) | ~^~~
s183923394
p04043
C++
#include<stdio.h> #include<algorithm> int main(){ int a[3]; scanf("%d%d%d",&a[0],&a[1],&a[2]); sort(a,a+3); if(a[0]==5 && a[1]==5 && a[2] == 7) printf("YES"); else printf("NO"); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 6 | 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); | ^~~~
s963739570
p04043
C++
#inlclude<stdio.h> #include<algorithm> int main(){ int a[3]; scanf("%d%d%d",&a[0],&a[1],&a[2]); sort(a,a+3); if(a[0]==5 && a[1]==5 && a[2] == 7) printf("YES"); else printf("NO"); return 0; }
a.cc:1:2: error: invalid preprocessing directive #inlclude; did you mean #include? 1 | #inlclude<stdio.h> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:5:9: error: 'scanf' was not declared in this scope 5 | scanf("%d%d%d",&a[0],&a[1],&a[2]); | ^~~~~ a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 6 | 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); | ^~~~ a.cc:7:45: error: 'printf' was not declared in this scope 7 | if(a[0]==5 && a[1]==5 && a[2] == 7) printf("YES"); | ^~~~~~ a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 2 | #include<algorithm> +++ |+#include <cstdio> 3 | int main(){ a.cc:8:9: error: 'printf' was not declared in this scope 8 | else printf("NO"); | ^~~~~~ a.cc:8:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
s407321419
p04043
C++
#inlclude<stdio.h> #include<algorihtm> int main(){ int a[3]; scanf("%d%d%d",&a[0],&a[1],&a[2]); sort(a,a+3); if(a[0]==5 && a[1]==5 && a[2] == 7) printf("YES"); else printf("NO"); return 0; }
a.cc:1:2: error: invalid preprocessing directive #inlclude; did you mean #include? 1 | #inlclude<stdio.h> | ^~~~~~~~ | include a.cc:2:9: fatal error: algorihtm: No such file or directory 2 | #include<algorihtm> | ^~~~~~~~~~~ compilation terminated.
s578457218
p04043
C
#include <cstdio> int main(){ double a,b,c; while(~scanf("%lf %lf %lf", &a, &b, &c)){ if(a + b + c == 17){ printf("YES\n"); }else{ printf("NO\n"); } } return 0; }
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s969596166
p04043
C
#include<stdio.h> main(){ int A,B,C; scanf("%d%d%d",&A&B&C); if(A==5||B==5||C==7) printf("Yes Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); if(A==5||B==7||C==5) printf("Yes Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); if(A==7||B==5||C==5) printf("Yes Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); else printf("No"); }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:26: error: invalid operands to binary & (have 'int *' and 'int') 4 | scanf("%d%d%d",&A&B&C); | ~~^ | | | int * main.c:6:112: error: 'a' undeclared (first use in this function) 6 | printf("Yes Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); | ^ main.c:6:112: note: each undeclared identifier is reported only once for each function it appears in main.c:6:114: error: 'b' undeclared (first use in this function) 6 | printf("Yes Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); | ^ main.c:6:116: error: 'c' undeclared (first use in this function) 6 | printf("Yes Using three phrases of length %d, %d and %d, it is possible to construct a Haiku.",a,b,c); | ^
s731365332
p04043
C
#include<stdio.h> main(){ int A,B,C; scanf("%d%d%d",&A&B&C); if(A==5||B==5||C==7) printf("Yes"); if(A==5||B==7||C==5) printf("Yes"); if(A==7||B==5||C==5) printf("Yes"); else printf("No"); }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:26: error: invalid operands to binary & (have 'int *' and 'int') 4 | scanf("%d%d%d",&A&B&C); | ~~^ | | | int *
s226681795
p04043
C
#include <stdio.h> int main(void) { int a; int five = 2, seven = 1; int i; for (i = 0; i < 3; i+) { scanf("%d", &a); if (a == 5) five--; else if(a == 7) seven--; } if (!five && !seven) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:8:24: error: expected expression before ')' token 8 | for (i = 0; i < 3; i+) | ^
s608459112
p04043
C
#include<stdio.h> int main(){ int a, b, c; scanf(%d %d %d,&a,&b,&c); if(a = 5 ){ printf("YES"); } reeturn 0; }
main.c: In function 'main': main.c:7:9: error: expected expression before '%' token 7 | scanf(%d %d %d,&a,&b,&c); | ^ main.c:12:3: error: 'reeturn' undeclared (first use in this function) 12 | reeturn 0; | ^~~~~~~ main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in main.c:12:10: error: expected ';' before numeric constant 12 | reeturn 0; | ^~ | ;
s188713044
p04043
C++
#include<iostream> #include<vector> using namespace std; int main() { int num=0,flag1=0,flag2=0; vector<int> a; for(int i=0;i<3<i++) { cin>>num; a.push_back(num); } for(auto it=a.begin();it<a.end();it++) { if(*it==5) flag1++; else if(*it==7) flag2++; } return 0; }
a.cc: In function 'int main()': a.cc:9:22: error: expected ';' before ')' token 9 | for(int i=0;i<3<i++) | ^ | ;
s762924868
p04043
C
#include <stdio.h> int main() {
main.c: In function 'main': main.c:4:1: error: expected declaration or statement at end of input 4 | { | ^
s107652085
p04043
C
s
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | s | ^
s306648463
p04043
Java
import java.util.*; public class Main{ Scanner s=new Scanner(System.in); public static void main(String [] args){ int a,b,c; a=s.nextInt(); b=s.nextInt(); c=s.nextInt(); int fiv=0,sev=0; if(a==5)fiv++; if(a==7)sev++; if(b==5)fiv++; if(b==7)sev++; if(c==5)fiv++; if(c==7)sev++; if(fiv==2&&sev==1)System.out.println("YES"); else System.out.println("NO"); } }
Main.java:7: error: non-static variable s cannot be referenced from a static context a=s.nextInt(); ^ Main.java:8: error: non-static variable s cannot be referenced from a static context b=s.nextInt(); ^ Main.java:9: error: non-static variable s cannot be referenced from a static context c=s.nextInt(); ^ 3 errors
s117920849
p04043
Java
import java.util.*; public class Main{ Scanner s=new Scanner(System.in); public static void main(String [] args){ int a,b,c; a=s.nextInt(),b=s.nextInt(),c=s.nextInt(); int fiv=0,sev=0; if(a==5)fiv++; if(a==7)sev++; if(b==5)fiv++; if(b==7)sev++; if(c==5)fiv++; if(c==7)sev++; if(fiv==2&&sev==1)System.out.println("YES"); else System.out.println("NO"); } }
Main.java:7: error: ';' expected a=s.nextInt(),b=s.nextInt(),c=s.nextInt(); ^ Main.java:7: error: ';' expected a=s.nextInt(),b=s.nextInt(),c=s.nextInt(); ^ 2 errors
s522177541
p04043
Java
import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc=new Scanner(System.in); int A=sc.nextInt(); int B=sc.nextInt(); int C=sc.nextInt(); if(A==5&&B==5&&C==7||A==5&&B=7&&C==5||A==7&&B==5&&C==5){ System.out.println("Yes"); }else{ System.out.println("No"); } } }
Main.java:9: error: bad operand types for binary operator '&&' if(A==5&&B==5&&C==7||A==5&&B=7&&C==5||A==7&&B==5&&C==5){ ^ first type: boolean second type: int Main.java:9: error: bad operand types for binary operator '&&' if(A==5&&B==5&&C==7||A==5&&B=7&&C==5||A==7&&B==5&&C==5){ ^ first type: int second type: boolean 2 errors
s685311371
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int A,B,C; cin>>A>>B>>C; if(A==5&&B==5&&c==7) { cout<<"YES"; } else if(A==5&&B==7&&c==5) { cout<<"YES";} else if(A==7&&B==5&&C==5) { cout<<"YES"; } else { cout<<"NO"; } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: 'c' was not declared in this scope 7 | if(A==5&&B==5&&c==7) | ^
s582981740
p04043
C++
#include<stdio.h> main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a*b*c = 175) printf("YES"); else printf("NO"); return 0; }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main() | ^~~~ a.cc: In function 'int main()': a.cc:6:15: error: lvalue required as left operand of assignment 6 | if(a*b*c = 175) | ~~~^~
s920635305
p04043
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int32_t main() { ll i,j,k,l,n,m,q,t,five=0,seven=0; cin>>a>>b>>c; if(a==5||b==5||c==5) { five++; } if(c==5) { five++; } if(b==5) { five++; } seven=3-five; if(five==2&&seven==1){ cout<<"YES"; } else { cout<< "NO"; } return 0; }
a.cc: In function 'int32_t main()': a.cc:9:14: error: 'a' was not declared in this scope 9 | cin>>a>>b>>c; | ^ a.cc:9:17: error: 'b' was not declared in this scope 9 | cin>>a>>b>>c; | ^ a.cc:9:20: error: 'c' was not declared in this scope 9 | cin>>a>>b>>c; | ^
s591350033
p04043
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int32_t main() { ll i,j,k,l,n,m,q,t,five=0,seven=0; cin>>a>>b>>c; if(a==5||b==5||c==5) { five++; } if(a==7||b==7||c==7) { seven++; } if(five==2&&seven==1){ cout<<"YES"; } else { cout<< "NO"; } return 0; }
a.cc: In function 'int32_t main()': a.cc:9:14: error: 'a' was not declared in this scope 9 | cin>>a>>b>>c; | ^ a.cc:9:17: error: 'b' was not declared in this scope 9 | cin>>a>>b>>c; | ^ a.cc:9:20: error: 'c' was not declared in this scope 9 | cin>>a>>b>>c; | ^
s694281042
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin>>A>>B>>C; int cincos=0,siete=0; if(A==5) cincos++ if(A==7) siete++; if(B==5) cincos++; if(B==7) siete++; if(C==5) cincos++; if(C==7) siete++; if(cincos==2&&siete==1) cout<<"YES\n"; else cout<<"NO\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: expected ';' before 'if' 8 | if(A==5) cincos++ | ^ | ; 9 | if(A==7) siete++; | ~~
s942253950
p04043
C++
#include<bits/stdc++.h> #define int long long int #define fi first #define se second #define pb push_back #define mp make_pair #define pii pair<int,int> #define vii vector<int> #define mii map<int,int> #define mod 1000000007 #define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); #define endl "\n" #define pqmin priority_queue<int,vector<int>,greater<int>> #define pqmax priority_queue<int> using namespace std; int32_t main() { IOS; 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"<<endl; } else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int32_t main()': a.cc:21:14: error: 'n' was not declared in this scope 21 | sort(a,a+n); | ^
s606432118
p04043
C++
#include<bits/stdc++.h> #define int long long int #define fi first #define se second #define pb push_back #define mp make_pair #define pii pair<int,int> #define vii vector<int> #define mii map<int,int> #define mod 1000000007 #define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); #define endl "\n" #define pqmin priority_queue<int,vector<int>,greater<int>> #define pqmax priority_queue<int> using namespace std; int32_t main() { IOS; 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"<<endl; } else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int32_t main()': a.cc:21:14: error: 'n' was not declared in this scope 21 | sort(a,a+n); | ^
s523327218
p04043
C++
#include <iostream> using namespace std; int main (){ int a[3]; cin>>a[0]>>a[1]>>a[2]; int i,c5,c7; for(i=0;i<3;i++){ if(a[i]==5) c5++; if(a[i]==7) c7++; } if(c5==2&&c7==1) cout<<YES<<endl; else cout<<NO<<endl; return 0; }
a.cc: In function 'int main()': a.cc:15:11: error: 'YES' was not declared in this scope 15 | cout<<YES<<endl; | ^~~ a.cc:16:14: error: 'NO' was not declared in this scope 16 | else cout<<NO<<endl; | ^~
s908996993
p04043
C
#include<stdio.h> int main(){ int a,b,c,max; scanf("a b c",&a,&b,&c); if(a>b&&a>c) max=a; if(b>a&&b>c) max=b; if(c>a&&c>b) max=c; if(max==7) { if(a*b*c==175&&a+b+c=17) printf("yes"); else printf("no"); } else printf("no"); }
main.c: In function 'main': main.c:13:37: error: lvalue required as left operand of assignment 13 | if(a*b*c==175&&a+b+c=17) | ^
s164916096
p04043
C
#include<stdio.h> int main(){ int a,b,c; scanf("a b c",&a,&b,&c); if(a>b&&a>c) max=a; if(b>a&&b>c) max=b; if(c>a&&c>b) max=c; if(max==7) { if(a*b*c==175&&a+b+c=17) printf("yes"); else printf("no"); } else printf("no"); }
main.c: In function 'main': main.c:6:17: error: 'max' undeclared (first use in this function) 6 | max=a; | ^~~ main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in main.c:13:37: error: lvalue required as left operand of assignment 13 | if(a*b*c==175&&a+b+c=17) | ^
s849647563
p04043
C++
//AC #include<stdio.h> #include<string.h> int main() { char a[10]={}; int c,i,cnt=0,leap=0; while(gets(a)){ c=strlen(a); for(i=0;i<c;i++){ if(a[i]==' '){ continue; }else if(a[i]=='5'){ cnt++; }else if(a[i]=='7'){ leap++; } }if(cnt==2&&leap==1){ printf("YES\n"); }else{ printf("NO\n"); }cnt=0;leap=0; } }
a.cc: In function 'int main()': a.cc:9:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | while(gets(a)){ | ^~~~ | getw
s757415285
p04043
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==5 && b==5 && c==7) cout<<"YES"; else if(a==5 && b==7 && c==5) cout<<"YES"; else if(a==7 && ==5 && c==5) cout<<"YES"; else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: expected primary-expression before '==' token 12 | else if(a==7 && ==5 && c==5) cout<<"YES"; | ^~
s803734513
p04043
C++
#include<stdio.h> #include<string.h> int main() { char a[10]={}; int c,i,cnt=0,leap=0; while(gets(a)){ c=strlen(a); for(i=0;i<c;i++){ if(a[i]==' '){ continue; }else if(a[i]=='5'){ cnt++; }else if(a[i]=='7'){ leap++; } }if(cnt==2&&leap==1){ printf("YES\n"); }else{ printf("NO\n"); }cnt=0;leap=0; } }
a.cc: In function 'int main()': a.cc:7:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | while(gets(a)){ | ^~~~ | getw
s404247271
p04043
C++
#include<stdio.h> int main(void) { int A,B,C; if(A==5 & B==5 & C==7) puts("YES"); else if(A==5 & B==7 & C==5) puts("YES"); else if(A==7 & B==5 & C==5) puts("YES"); else puts("NO); return 0; }
a.cc:14:10: warning: missing terminating " character 14 | puts("NO); | ^ a.cc:14:10: error: missing terminating " character 14 | puts("NO); | ^~~~~ a.cc: In function 'int main()': a.cc:16:3: error: expected primary-expression before 'return' 16 | return 0; | ^~~~~~
s176722368
p04043
C
#include<stdio.h> int main(void) { int A,B,C; if(A==5 & B==5 & C==7) puts("YES"); else if(A==5 & B==7 & C==5) puts("YES"); else if(A==7 & B==5 & C==5) puts("YES"); else puts("NO); return 0; }
main.c: In function 'main': main.c:14:10: warning: missing terminating " character 14 | puts("NO); | ^ main.c:14:10: error: missing terminating " character 14 | puts("NO); | ^~~~~ main.c:16:3: error: expected expression before 'return' 16 | return 0; | ^~~~~~ main.c:16:12: error: expected ';' before '}' token 16 | return 0; | ^ | ; 17 | } | ~
s878349860
p04043
C
#include<stdio.h> int main(void) { int A,B,C; if(A==5 & B==5 & C==7) puts("YES"); else if(A==5 & B==7 & C==5) puts("YES"); else if(A==7 & B==5 & C==5) puts("YES; else puts("NO); return 0; }
main.c: In function 'main': main.c:12:10: warning: missing terminating " character 12 | puts("YES; | ^ main.c:12:10: error: missing terminating " character 12 | puts("YES; | ^~~~~ main.c:13:3: error: expected expression before 'else' 13 | else | ^~~~ main.c:14:10: warning: missing terminating " character 14 | puts("NO); | ^ main.c:14:10: error: missing terminating " character 14 | puts("NO); | ^~~~~ main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s937445030
p04043
C++
#include<iostream> using namespace std; int soat3(int& a,int& b,int& c){ if(a<b)swap(a,b); if(a<c)swap(a,c); if(b<c)swap(b,c); } int main(){ int a,b,c; cin >> a >> b >> c; soat3(a,b,c); if(a == 7 && b == 5 && c == 5){ cou << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int soat3(int&, int&, int&)': a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type] 9 | } | ^ a.cc: In function 'int main()': a.cc:18:5: error: 'cou' was not declared in this scope 18 | cou << "YES" << endl; | ^~~
s089510235
p04043
Java
import java.util.Scanner; public class IrohaandHaiku{ public static void main(String[] args){ Scanner sc =new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); if(a==5||b==5||c==5){ if(a==7||b==7||c==7){ if(a+b+c==17){ System.out.println("Yes"); }else{ System.out.println("No"); } }else{ System.out.println("No"); } }else{ System.out.println("No"); } } }
Main.java:2: error: class IrohaandHaiku is public, should be declared in a file named IrohaandHaiku.java public class IrohaandHaiku{ ^ 1 error
s023588982
p04043
C++
#include <algorithm> #include <array> #include <assert.h> #include <chrono> #include <bitset> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <random> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<double> vd; typedef vector<bool> vb; typedef vector<string> vs; typedef vector<ld> vld; typedef vector<vector<int>> vvi; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; typedef vector<vector<ld>> vvld; typedef pair <int, int> pii; typedef pair <ll, ll> pll; typedef vector<pll> vpll; #ifdef OLBOEB mt19937 rnd(228 + 1488 + 238 + 24111997 % 322); #else mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); #endif void print_time() { #ifdef OLBOEB cout.flush(); cerr << "\ntime: " << clock() * 1.0 / CLOCKS_PER_SEC << endl; #endif } #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define sz(x) ((ll)(x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() template<class T1, class T2> ostream& operator<< (ostream &out, pair<T1, T2> pair) { return out << "(" << pair.first << ", " << pair.second << ")";} template<class T> ostream& operator<<(ostream& out, vector<T> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; } template<class T> ostream& operator<<(ostream& out, set<T> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; } template<class L, class R> ostream& operator<<(ostream& out, map<L, R> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; } int main() { cout << fixed << setprecision(20); ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); vl a(3); for (ll i = 0; i < 3; ++i) { cin >> a[i]; } sort(all(a)); cout << (a == {5, 5, 7} ? "YES" : "NO") << endl; print_time(); return 0; }
a.cc: In function 'int main()': a.cc:76:19: error: expected primary-expression before '{' token 76 | cout << (a == {5, 5, 7} ? "YES" : "NO") << endl; | ^ a.cc:76:18: error: expected ')' before '{' token 76 | cout << (a == {5, 5, 7} ? "YES" : "NO") << endl; | ~ ^~ | )
s333727679
p04043
C++
#include <bits/stdc++.h> using namespace std; /* https://beta.atcoder.jp/contests/abc103/tasks/abc103_b */ #define li long long int #define rep(i, to) for (li i = 0; i < ((li)(to)); i++) #define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++) #define pb push_back #define sz(v) ((li)(v).size()) #define bgn(v) ((v).begin()) #define eend(v) ((v).end()) #define allof(v) (v).begin(), (v).end() #define dodp(v, n) memset(v, (li)n, sizeof(v)) #define bit(n) (1ll << (li)(n)) #define mp(a, b) make_pair(a, b) #define rin rep(i, n) #define EPS 1e-12 #define ETOL 1e-8 #define MOD 1000000007 typedef pair<li, li> PI; #define INF bit(60) #define DBGP 1 #define idp if (DBGP) #define F first #define S second #define p2(a, b) idp cout << a << "\t" << b << endl #define p3(a, b, c) idp cout << a << "\t" << b << "\t" << c << endl #define p4(a, b, c, d) idp cout << a << "\t" << b << "\t" << c << "\t" << d << endl #define p5(a, b, c, d, e) idp cout << a << "\t" << b << "\t" << c << "\t" << d << "\t" << e << endl #define p6(a, b, c, d, e, f) idp cout << a << "\t" << b << "\t" << c << "\t" << d << "\t" << e << "\t" << f << endl #define p7(a, b, c, d, e, f, g) idp cout << a << "\t" << b << "\t" << c << "\t" << d << "\t" << e << "\t" << f << "\t" << g << endl #define p8(a, b, c, d, e, f, g, h) idp cout << a << "\t" << b << "\t" << c << "\t" << d << "\t" << e << "\t" << f << "\t" << g << "\t" << h << endl #define p9(a, b, c, d, e, f, g, h, i) idp cout << a << "\t" << b << "\t" << c << "\t" << d << "\t" << e << "\t" << f << "\t" << g << "\t" << h << "\t" << i << endl #define p10(a, b, c, d, e, f, g, h, i, j) idp cout << a << "\t" << b << "\t" << c << "\t" << d << "\t" << e << "\t" << f << "\t" << g << "\t" << h << "\t" << i << "\t" << j << endl #define foreach(it, v) for (__typeof((v).begin()) it = (v).begin(); it != (v).end(); ++it) #define p2p(x) idp p2((x).F, (x).S) #define dump(x, n) \ idp \ { \ rep(i, n) { cout << x[i] << " "; } \ puts(""); \ } #define dump2(x, n) \ idp \ { \ rep(i, n) { cout << "[" << x[i].F << " , " << x[i].S << "] "; } \ puts(""); \ } #define dumpi(x) \ idp \ { \ foreach (it, x) \ { \ cout << (*it) << " "; \ } \ puts(""); \ } #define dumpi2(x) \ idp \ { \ foreach (it, x) \ { \ cout << "[" << (it)->F << " , " << (it)->S << "] "; \ } \ puts(""); \ } #define read2d(a, w, h) rep(i, h) rep(j, w) cin >> a[i][j] #define dump2d(a, w, h) \ rep(i, h) \ { \ rep(j, w) cout << a[i][j] << " "; \ puts(""); \ } typedef pair<li, li> PI; li v[100100]; li x[100100]; PI dp1[100100]; PI dp2[100100]; li a, b, c, d, n, m; string s, t; inline string solve() { sort(v.begin(), v.end()) return v[0] == 5 && v[1] == 5 && v[2] == 7 ? "YES" : "NO"; } int main(void) { cin >> v[0] >> v[1]>> v[2]; cout << solve() << endl; return 0; }
a.cc: In function 'std::string solve()': a.cc:94:12: error: request for member 'begin' in 'v', which is of non-class type 'long long int [100100]' 94 | sort(v.begin(), v.end()) | ^~~~~ a.cc:94:23: error: request for member 'end' in 'v', which is of non-class type 'long long int [100100]' 94 | sort(v.begin(), v.end()) | ^~~ a.cc:96:1: warning: no return statement in function returning non-void [-Wreturn-type] 96 | } | ^
s254666938
p04043
Java
package ABC_B; import java.util.Arrays; import java.util.Scanner; public class IrohaLovesStrings { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int l = sc.nextInt(); String[] array = new String[n]; for(int i =0; i < n; i++) { array[i] = sc.next(); } Arrays.sort(array); for(int i = 0; i < n; i++) { System.out.print(array[i]); } } }
Main.java:6: error: class IrohaLovesStrings is public, should be declared in a file named IrohaLovesStrings.java public class IrohaLovesStrings { ^ 1 error
s769980915
p04043
C
#include<stdio.h> int main(){ int i,n[4],m; for(i=0;i<3;i++){ scanf("%d",&n[i]); if(n[i]!==7||5)m++; } if(m==0&&n[0]+n[1]+n[2]==19)printf("Yes"); else printf("No"); return 0; }
main.c: In function 'main': main.c:6:18: error: expected expression before '=' token 6 | if(n[i]!==7||5)m++; | ^
s312145156
p04043
C
#include<stdio.h> int main(){ int i,a[],n; for(i=0;i<3;i++){ scanf("%d",&a[i]); if(a[i]!=7||5)n++; } if(n==0&&a[0]+a[1]+a[2]==19)printf("Yes"); else printf("No"); return 0; }
main.c: In function 'main': main.c:3:11: error: array size missing in 'a' 3 | int i,a[],n; | ^
s257746610
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { stirng s; cin >> s; int a=0,b=0; for(int i=0;i<3;i++){ if(s.at(i) == '5'){ a++; } if(s.at(i) == '7'){ b++; } } if(a == 2 && b == 1){ cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'stirng' was not declared in this scope 5 | stirng s; | ^~~~~~ a.cc:6:10: error: 's' was not declared in this scope 6 | cin >> s; | ^
s803921218
p04043
Java
import java.util.*; public class atcoder002{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == 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:3: error: class atcoder002 is public, should be declared in a file named atcoder002.java public class atcoder002{ ^ 1 error
s262997100
p04043
C++
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int orde(const void* a, const void* b){ //const char *x = a, *y = b; return strcmp(a,b); /*if (x[0] < y[0]) return -1; if (x[0] > y[0]) return 1; return 0; */ } int main(){ int n, l; scanf("%d %d", &n, &l ); char s[n][l+1]; for (int i = 0; i < n; i++) scanf(" %s", s[i]); qsort(s,n,sizeof(s[0]), orde); for (int i = 0; i < n; i++) printf("%s", s[i]); printf("\n"); return 0; }
a.cc: In function 'int orde(const void*, const void*)': a.cc:9:19: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 9 | return strcmp(a,b); | ^ | | | const void* In file included from a.cc:4: /usr/include/string.h:156:32: note: initializing argument 1 of 'int strcmp(const char*, const char*)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~ a.cc:9:21: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 9 | return strcmp(a,b); | ^ | | | const void* /usr/include/string.h:156:50: note: initializing argument 2 of 'int strcmp(const char*, const char*)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~
s102882694
p04043
C++
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int orde(const void* a, const void* b){ //const char *x = a, *y = b; return strcmp(a,b); /*if (x[0] < y[0]) return -1; if (x[0] > y[0]) return 1; return 0; */ } int main(){ int n, l; scanf("%d %d", &n, &l ); char s[n][l+1]; for (int i = 0; i < n; i++) scanf(" %s", s[i]); qsort(s,n,sizeof(s[0]), orde); for (int i = 0; i < n; i++) printf("%s", s[i]); printf("\n"); return 0; }
a.cc: In function 'int orde(const void*, const void*)': a.cc:9:19: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 9 | return strcmp(a,b); | ^ | | | const void* In file included from a.cc:4: /usr/include/string.h:156:32: note: initializing argument 1 of 'int strcmp(const char*, const char*)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~ a.cc:9:21: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 9 | return strcmp(a,b); | ^ | | | const void* /usr/include/string.h:156:50: note: initializing argument 2 of 'int strcmp(const char*, const char*)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~
s420754770
p04043
C++
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int orde(const void* a, const void* b){ //const char *x = a, *y = b; return strcmp(a,b); /*if (x[0] < y[0]) return -1; if (x[0] > y[0]) return 1; return 0; */ } int main(){ int n, l; scanf("%d %d", &n, &l ); char s[n][l+1]; for (int i = 0; i < n; i++) scanf(" %s", s[i]); qsort(s,n,sizeof(s[0]), orde); for (int i = 0; i < n; i++) printf("%s", s[i]); printf("\n"); return 0; }
a.cc: In function 'int orde(const void*, const void*)': a.cc:9:19: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 9 | return strcmp(a,b); | ^ | | | const void* In file included from a.cc:4: /usr/include/string.h:156:32: note: initializing argument 1 of 'int strcmp(const char*, const char*)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~ a.cc:9:21: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 9 | return strcmp(a,b); | ^ | | | const void* /usr/include/string.h:156:50: note: initializing argument 2 of 'int strcmp(const char*, const char*)' 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~
s790861249
p04043
C
#include <stdio.h> int main(){ int cin = 0, set = 0, readed; if(int i = 0; i < 3; ++i){ scanf("%d", &readed); if(readed == 5) cin++; if(readed == 7) set++; } if(cin == 2 && set == 1){ printf("YES"); }else printf("NO"); }
main.c: In function 'main': main.c:4:12: error: expected expression before 'int' 4 | if(int i = 0; i < 3; ++i){ | ^~~
s905876484
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:6:14: error: expected primary-expression before '>' token 6 | cin>>A>>B>>>C; | ^
s985172498
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> a; for(int i = 0; i < 3; i+=1){ cin>>a[i]; } a=a.sort(a.begin( ),a.end( )); if(a[1]=5 && a[2]=5 && a[3]=7){ cout<<"YES"<<endl; } else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:9:7: error: 'class std::vector<int>' has no member named 'sort' 9 | a=a.sort(a.begin( ),a.end( )); | ^~~~ a.cc:10:23: error: lvalue required as left operand of assignment 10 | if(a[1]=5 && a[2]=5 && a[3]=7){
s492049433
p04043
Java
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner (System.in); String input = scanner.nextLine(); Main solver = new Main(); System.out.println(solver.solve(input)); } public String solve(String input) { String answer; String abc[] = input.split(" "); int five = 0; int seven = 0; int other = 0; for(String n :abc) { Integer i = new Integer(n); if( i== 5) { five++; } else if(i == 7) { seven++; } else { other++; } } if(five == 2 && seven == 1) { answer = "YES"; } else { answer = "NO"; } return answer; } }
Main.java:4: error: cannot find symbol Scanner scanner = new Scanner (System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scanner = new Scanner (System.in); ^ symbol: class Scanner location: class Main Main.java:23: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal Integer i = new Integer(n); ^ 2 errors 1 warning
s251640352
p04043
C++
#include <bits/stdc++.h> typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); vector<int> abc(3); for (int i = 0; i < 3; ++i) cin >> abc[i]; sort(abc.begin(),abc.end()); if (abc[0] == 5 && abc[1] == 5 && abc[2] == 7) cout << "YES\n"; else cout << "NO\n"; return0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin.tie(0); | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:5: error: 'ios' has not been declared 7 | ios::sync_with_stdio(false); | ^~~ a.cc:9:5: error: 'vector' was not declared in this scope 9 | vector<int> abc(3); | ^~~~~~ a.cc:9:5: 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: /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:9:12: error: expected primary-expression before 'int' 9 | vector<int> abc(3); | ^~~ a.cc:11:16: error: 'abc' was not declared in this scope; did you mean 'abs'? 11 | cin >> abc[i]; | ^~~ | abs a.cc:12:10: error: 'abc' was not declared in this scope; did you mean 'abs'? 12 | sort(abc.begin(),abc.end()); | ^~~ | abs a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 12 | sort(abc.begin(),abc.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); | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "YES\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 21 | cout << "NO\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:24:5: error: 'return0' was not declared in this scope 24 | return0; | ^~~~~~~
s452064822
p04043
C++
#include <bits/stdc++.h> typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); vector<int> abc(3); for (int i = 0; i < 3; ++i) cin >> abc[i]; sort(abc.begin(),abc.end()); if (abc[0] == 5 && abc[1] == 5 && abc[2] == 7) { cout << "YES\n"; } else { cout << "NO\n"; } return0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin.tie(0); | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:5: error: 'ios' has not been declared 7 | ios::sync_with_stdio(false); | ^~~ a.cc:9:5: error: 'vector' was not declared in this scope 9 | vector<int> abc(3); | ^~~~~~ a.cc:9:5: 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: /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:9:12: error: expected primary-expression before 'int' 9 | vector<int> abc(3); | ^~~ a.cc:11:16: error: 'abc' was not declared in this scope; did you mean 'abs'? 11 | cin >> abc[i]; | ^~~ | abs a.cc:12:10: error: 'abc' was not declared in this scope; did you mean 'abs'? 12 | sort(abc.begin(),abc.end()); | ^~~ | abs a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 12 | sort(abc.begin(),abc.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); | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "YES\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 21 | cout << "NO\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:26:5: error: 'return0' was not declared in this scope 26 | return0; | ^~~~~~~
s356326589
p04043
C++
#include <bits/stdc++.h> int main() { cin.tie(0); ios::sync_with_stdio(false); vector<int> abc(3); for (int i = 0; i < 3; ++i) cin >> abc[i]; sort(abc.begin(),abc.end()); if (abc[0] == 5 && abc[1] == 5 && abc[2] == 7) { cout << "YES\n"; } else { cout << "NO\n"; } return0; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin.tie(0); | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:5: error: 'ios' has not been declared 5 | ios::sync_with_stdio(false); | ^~~ a.cc:7:5: error: 'vector' was not declared in this scope 7 | vector<int> abc(3); | ^~~~~~ a.cc:7:5: 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: /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:7:12: error: expected primary-expression before 'int' 7 | vector<int> abc(3); | ^~~ a.cc:9:16: error: 'abc' was not declared in this scope; did you mean 'abs'? 9 | cin >> abc[i]; | ^~~ | abs a.cc:10:10: error: 'abc' was not declared in this scope; did you mean 'abs'? 10 | sort(abc.begin(),abc.end()); | ^~~ | abs a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 10 | sort(abc.begin(),abc.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); | ^~~~ a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout << "YES\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 19 | cout << "NO\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:24:5: error: 'return0' was not declared in this scope 24 | return0; | ^~~~~~~
s567708990
p04043
C++
#include <bits/stdc++.h> int main() { cin.tie(0); ios::sync_with_stdio(false); vector<int> abc(3); for (int i = 0; i < 3; ++i) cin >> abc[i]; sort(abc.begin(),abc.end()); if (abc[0] == 5 && abc[1] == 5 && abc[2] == 7) cout << "YES\n"; else cout << "NO\n"; return0; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin.tie(0); | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:5: error: 'ios' has not been declared 5 | ios::sync_with_stdio(false); | ^~~ a.cc:7:5: error: 'vector' was not declared in this scope 7 | vector<int> abc(3); | ^~~~~~ a.cc:7:5: 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: /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:7:12: error: expected primary-expression before 'int' 7 | vector<int> abc(3); | ^~~ a.cc:9:16: error: 'abc' was not declared in this scope; did you mean 'abs'? 9 | cin >> abc[i]; | ^~~ | abs a.cc:10:10: error: 'abc' was not declared in this scope; did you mean 'abs'? 10 | sort(abc.begin(),abc.end()); | ^~~ | abs a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'? 10 | sort(abc.begin(),abc.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); | ^~~~ a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 14 | cout << "YES\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "NO\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:19:5: error: 'return0' was not declared in this scope 19 | return0; | ^~~~~~~
s731748759
p04043
C++
int main() { int A,B,C; cin >> A >> B >> C; if(A == 5 && B == 5 && C == 7){ cout << "YES" << endl; }else if(A == 5 && B == 7 && C == 5){ cout << "YES" << endl; }else if(A == 7 && B == 5 && C == 5){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope 4 | cin >> A >> B >> C; | ^~~ a.cc:6:9: error: 'cout' was not declared in this scope 6 | cout << "YES" << endl; | ^~~~ a.cc:6:26: error: 'endl' was not declared in this scope 6 | cout << "YES" << endl; | ^~~~ a.cc:8:9: error: 'cout' was not declared in this scope 8 | cout << "YES" << endl; | ^~~~ a.cc:8:26: error: 'endl' was not declared in this scope 8 | cout << "YES" << endl; | ^~~~ a.cc:10:9: error: 'cout' was not declared in this scope 10 | cout << "YES" << endl; | ^~~~ a.cc:10:26: error: 'endl' was not declared in this scope 10 | cout << "YES" << endl; | ^~~~ a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout << "NO" << endl; | ^~~~ a.cc:12:25: error: 'endl' was not declared in this scope 12 | cout << "NO" << endl; | ^~~~
s900137770
p04043
Java
import java.util.*; public class Main{ public static void main{String[] args){ Scanner sc=new Scanner(System.in); int[] ABC=new int[3]; for(int i=0;i<3;i++){ ABC[i]=sc.nextInt(); } Arrays.sort(ABC); boolean flg=false; if(ABC[0]==5){ if(ABC[1]==5){ if(ABC[2]==7){ flg=true; } } } if(flg){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:4: error: '(' expected public static void main{String[] args){ ^ Main.java:4: error: ';' expected public static void main{String[] args){ ^ Main.java:25: error: reached end of file while parsing } ^ 3 errors
s555631785
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ 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){ cout<<"YES"<<endl;} else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: request for member 'begin' in 'a', which is of non-class type 'int [3]' 7 | sort(a.begin(),a.end()); | ^~~~~ a.cc:7:20: error: request for member 'end' in 'a', which is of non-class type 'int [3]' 7 | sort(a.begin(),a.end()); | ^~~
s325943581
p04043
C
#include<stdio.h> int main(void) { int A, B, C; int max, min,minn; scanf("%d %d %d", &A, &B, &C); if(A <= B&&C <= B) { max = B; min = A; minx = C; } else if(A <= C&&B <= C) { max = C; min = A; minx = B; } else { max = A; min = C; minx = B; } if(max == 7 && min == 5 && minn == 5) { puts("YES"); } else { puts("NO"); } return 0; }
main.c: In function 'main': main.c:12:5: error: 'minx' undeclared (first use in this function); did you mean 'minn'? 12 | minx = C; | ^~~~ | minn main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in
s133742013
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}; vec = sort(vec.begin(), vec.end()); if (vec == {5, 5, 7}) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:36: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'void') 9 | vec = sort(vec.begin(), vec.end()); | ^ In file included from /usr/include/c++/14/vector:72, 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/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 210 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'void' to 'const std::vector<int>&' 211 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66: /usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'void' to 'std::vector<int>&&' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' 788 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'void' to 'std::initializer_list<int>' 788 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ a.cc:11:14: error: expected primary-expression before '{' token 11 | if (vec == {5, 5, 7}) { | ^ a.cc:11:13: error: expected ')' before '{' token 11 | if (vec == {5, 5, 7}) { | ~ ^~ | )
s329580934
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}; vec = vec.sort(begin(), end()); if (vec == {5, 5, 7}) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:13: error: 'class std::vector<int>' has no member named 'sort' 9 | vec = vec.sort(begin(), end()); | ^~~~ a.cc:9:23: error: no matching function for call to 'begin()' 9 | vec = vec.sort(begin(), end()); | ~~~~~^~ In file included from /usr/include/c++/14/bits/algorithmfwd.h:39, from /usr/include/c++/14/bits/stl_algo.h:59, from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)' 88 | begin(initializer_list<_Tp> __ils) noexcept | ^~~~~ /usr/include/c++/14/initializer_list:88:5: note: candidate expects 1 argument, 0 provided In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)' 52 | begin(_Container& __cont) -> decltype(__cont.begin()) | ^~~~~ /usr/include/c++/14/bits/range_access.h:52:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)' 63 | begin(const _Container& __cont) -> decltype(__cont.begin()) | ^~~~~ /usr/include/c++/14/bits/range_access.h:63:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])' 95 | begin(_Tp (&__arr)[_Nm]) noexcept | ^~~~~ /usr/include/c++/14/bits/range_access.h:95:5: note: candidate expects 1 argument, 0 provided In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/valarray:1227:5: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)' 1227 | begin(valarray<_Tp>& __va) noexcept | ^~~~~ /usr/include/c++/14/valarray:1227:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/valarray:1238:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)' 1238 | begin(const valarray<_Tp>& __va) noexcept | ^~~~~ /usr/include/c++/14/valarray:1238:5: note: candidate expects 1 argument, 0 provided a.cc:9:30: error: no matching function for call to 'end()' 9 | vec = vec.sort(begin(), end()); | ~~~^~ /usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)' 99 | end(initializer_list<_Tp> __ils) noexcept | ^~~ /usr/include/c++/14/initializer_list:99:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)' 74 | end(_Container& __cont) -> decltype(__cont.end()) | ^~~ /usr/include/c++/14/bits/range_access.h:74:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)' 85 | end(const _Container& __cont) -> decltype(__cont.end()) | ^~~ /usr/include/c++/14/bits/range_access.h:85:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])' 106 | end(_Tp (&__arr)[_Nm]) noexcept | ^~~ /usr/include/c++/14/bits/range_access.h:106:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)' 1249 | end(valarray<_Tp>& __va) noexcept | ^~~ /usr/include/c++/14/valarray:1249:5: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)' 1265 | end(const valarray<_Tp>& __va) noexcept | ^~~ /usr/include/c++/14/valarray:1265:5: note: candidate expects 1 argument, 0 provided a.cc:11:14: error: expected primary-expression before '{' token 11 | if (vec == {5, 5, 7}) { | ^ a.cc:11:13: error: expected ')' before '{' token 11 | if (vec == {5, 5, 7}) { | ~ ^~ | )
s945490707
p04043
C++
#include <bits/stdc++.h> using nameplace std; int main() { int A, B, C; cin >> A >> B >> C; vector<int> vec ={A, B, C}; vec = vec.sort(begin(), end()); if (vec == {5, 5, 7}) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:2:7: error: expected nested-name-specifier before 'nameplace' 2 | using nameplace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> A >> B >> C; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:8:3: error: 'vector' was not declared in this scope 8 | vector<int> vec ={A, B, C}; | ^~~~~~ a.cc:8: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: /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:8:10: error: expected primary-expression before 'int' 8 | vector<int> vec ={A, B, C}; | ^~~ a.cc:9:3: error: 'vec' was not declared in this scope 9 | vec = vec.sort(begin(), end()); | ^~~ a.cc:9:18: error: 'begin' was not declared in this scope 9 | vec = vec.sort(begin(), end()); | ^~~~~ a.cc:9:18: note: suggested alternatives: In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/valarray:1238:5: note: 'std::begin' 1238 | begin(const valarray<_Tp>& __va) noexcept | ^~~~~ In file included from /usr/include/c++/14/filesystem:53, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200: /usr/include/c++/14/bits/fs_dir.h:608:3: note: 'std::filesystem::__cxx11::begin' 608 | begin(recursive_directory_iterator __iter) noexcept | ^~~~~ a.cc:9:27: error: 'end' was not declared in this scope 9 | vec = vec.sort(begin(), end()); | ^~~ a.cc:9:27: note: suggested alternatives: /usr/include/c++/14/valarray:1265:5: note: 'std::end' 1265 | end(const valarray<_Tp>& __va) noexcept | ^~~ /usr/include/c++/14/bits/fs_dir.h:613:3: note: 'std::filesystem::__cxx11::end' 613 | end(recursive_directory_iterator) noexcept | ^~~ a.cc:11:14: error: expected primary-expression before '{' token 11 | if (vec == {5, 5, 7}) { | ^ a.cc:11:13: error: expected ')' before '{' token 11 | if (vec == {5, 5, 7}) { | ~ ^~ | ) a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << "YES" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:12:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 12 | cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout << "NO" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s333703359
p04043
C
#include "sdtio.h"; int main() { int a = 0; int b = 0; int c = 0; scanf("%d%d%d", &a, &b, &c); if (a + b + c == 17) { printf("YES"); } else { printf("NO"); } }
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include "sdtio.h"; | ^ main.c:1:10: fatal error: sdtio.h: No such file or directory 1 | #include "sdtio.h"; | ^~~~~~~~~ compilation terminated.
s732545677
p04043
C
#include "sdtio.h" int main() { int a = 0; int b = 0; int c = 0; scanf("%d%d%d", &a, &b, &c); if (a + b + c == 17) { printf("YES"); } else { printf("NO"); } }
main.c:1:10: fatal error: sdtio.h: No such file or directory 1 | #include "sdtio.h" | ^~~~~~~~~ compilation terminated.
s188621199
p04043
C++
#include<iostream> using namespace std; int main(){ int num[3]; int j5 = 0, j7 = 0; cin >> num[0] >> num[1] >> num[2]; for(int i = 0; i < 3; i++){ if(num[i] == 5) j5++; else if(num[i] == 7) j7++ } if(j5 == 2 && j7 == 1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:34: error: expected ';' before '}' token 11 | else if(num[i] == 7) j7++ | ^ | ; 12 | } | ~
s214845842
p04043
C++
#include<iostream> using namespace std; int main(){ int num[3]; int j5 = 0, j7 = 0; cin >> num[0] >> num[1] >> num[2]; if(int i = 0; i < 3; i++){ if(num[i] == 5) j5++; else if(num[i] == 7) j7++ } if(j5 == 2 && j7 == 1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:28: error: expected ')' before ';' token 9 | if(int i = 0; i < 3; i++){ | ~ ^ | ) a.cc:9:30: error: 'i' was not declared in this scope 9 | if(int i = 0; i < 3; i++){ | ^