submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s682714400
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; } return 0; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:3: error: expected primary-expression before 'int' 4 | int a,b,c; | ^~~ a.cc:4:3: error: expected '}' before 'int' a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:5:3: error: 'cin' does not name a type 5 | cin >> a >> b >> c; | ^~~ a.cc:6:3: error: expected unqualified-id before 'if' 6 | if((a=5&&b=5&&c=7)||(a=5&&b=7&&c=5)||(a=7&&b=5&&c=5)){ | ^~ a.cc:8:4: error: expected unqualified-id before 'else' 8 | }else{ | ^~~~ a.cc:11:3: error: expected unqualified-id before 'return' 11 | return 0; | ^~~~~~ a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
s707782036
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:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:3: error: expected primary-expression before 'int' 4 | int a,b,c; | ^~~ a.cc:4:3: error: expected '}' before 'int' a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:5:3: error: 'cin' does not name a type 5 | cin >> a >> b >> c; | ^~~ a.cc:6:3: error: expected unqualified-id before 'if' 6 | if((a=5&&b=5&&c=7)||(a=5&&b=7&&c=5)||(a=7&&b=5&&c=5)){ | ^~ a.cc:8:4: error: expected unqualified-id before 'else' 8 | }else{ | ^~~~ a.cc:11:1: error: expected declaration before '}' token 11 | } | ^
s759385048
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:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:5:3: error: expected primary-expression before 'int' 5 | int a,b,c; | ^~~ a.cc:5:3: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc:6:3: error: 'cin' does not name a type 6 | cin >> a >> b >> c; | ^~~ a.cc:7:3: error: expected unqualified-id before 'if' 7 | if((a=5&&b=5&&c=7)||(a=5&&b=7&&c=5)||(a=7&&b=5&&c=5)){ | ^~ a.cc:9:4: error: expected unqualified-id before 'else' 9 | }else{ | ^~~~ a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
s544310945
p04043
C++
A = int(input()) B = int(input()) C = int(input()) print("YES" if A+B+C == 17 else "NO")
a.cc:1:1: error: 'A' does not name a type 1 | A = int(input()) | ^
s092743235
p04043
C++
#include <bits/stdc++.h> using namespace std; int count5 = 0; int count7 = 0; int a = 0; for(int i= 0; i < 3; i++){ cin >> a; if(a == 5){ count5++; } else if (a == 7) { count7++; } } if(count5 == 2 && count7 == 1) { cout << "YES" << endl; } else { cout << "NO" << endl; }
a.cc:7:1: error: expected unqualified-id before 'for' 7 | for(int i= 0; i < 3; i++){ | ^~~ a.cc:7:15: error: 'i' does not name a type 7 | for(int i= 0; i < 3; i++){ | ^ a.cc:7:22: error: 'i' does not name a type 7 | for(int i= 0; i < 3; i++){ | ^ a.cc:15:1: error: expected unqualified-id before 'if' 15 | if(count5 == 2 && count7 == 1) { | ^~ a.cc:17:3: error: expected unqualified-id before 'else' 17 | } else { | ^~~~
s332674694
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; vector<string>N(A); for(int i=0;i<A;i++){ cin >> N.at(i); } sort(N.begin(),N.end()) string ans; for (int i = 0; i < N; i++){ ans += N.at(i); } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:26: error: expected ';' before 'string' 11 | sort(N.begin(),N.end()) | ^ | ; 12 | string ans; | ~~~~~~ a.cc:13:23: error: no match for 'operator<' (operand types are 'int' and 'std::vector<std::__cxx11::basic_string<char> >') 13 | for (int i = 0; i < N; i++){ | ~ ^ ~ | | | | int std::vector<std::__cxx11::basic_string<char> > In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:13:25: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:13:25: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::pair<_T1, _T2>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ 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:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:13:25: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::basic_string_view<_CharT, _Traits>' 13 | for (int i = 0; i < N; i++){ | ^ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:13:25: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocat
s697632722
p04043
C++
#include<bits/stdc++.h> using namepace std; int main(){ int x,y,z; cin>>x>>y>>z; int tt = 0; int co = 0; if(x == 5) co++; else if (x == 7) tt++; if(y == 5) co++; else if (y == 7) tt++; if(z == 5) co++; else if (z == 7) tt++; if(co == 2 && tt == 1) cout<<"YES"<<"\n"; else cout<<"NO"<<"\n"; }
a.cc:2:7: error: expected nested-name-specifier before 'namepace' 2 | using namepace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:4:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | int x,y,z; cin>>x>>y>>z; int tt = 0; int co = 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:11:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | if(co == 2 && tt == 1) 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:12:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | else cout<<"NO"<<"\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s630302746
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A >> B >> C; cin >> A >> B >> C; if (A == 5 && B == 7 && C == 5){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:9: error: expected initializer before '>>' token 6 | int A >> B >> C; | ^~ a.cc:7:10: error: 'A' was not declared in this scope 7 | cin >> A >> B >> C; | ^ a.cc:7:15: error: 'B' was not declared in this scope 7 | cin >> A >> B >> C; | ^ a.cc:7:20: error: 'C' was not declared in this scope 7 | cin >> A >> B >> C; | ^
s595341490
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> a >> b >> c; if (A == 5 && B == 5 && C == 7) { cout << "Yes" << endl; } else if (A == 5 && B == 7 && C == 5) { cout << "Yes" << endl; } else if (A == 7 && B == 5 && C == 5) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:6:10: error: 'a' was not declared in this scope 6 | cin >> a >> b >> c; | ^ a.cc:6:15: error: 'b' was not declared in this scope 6 | cin >> a >> b >> c; | ^ a.cc:6:20: error: 'c' was not declared in this scope 6 | cin >> a >> b >> c; | ^
s715281569
p04043
C++
a,b,c = sorted(map(int, input().split())) print("YES" if a==b==5 and c ==7 else "NO")
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c = sorted(map(int, input().split())) | ^
s552338759
p04043
Java
import java.util.ArrayList; import java.util.Scanner; public class Atc { public static void main(String[] args) { Integer x = 5; Integer y = 7; boolean b = false; Scanner sc = new Scanner(System.in); ArrayList<Integer> inputs = new ArrayList<>() { { add(sc.nextInt()); add(sc.nextInt()); add(sc.nextInt()); } }; if (inputs.remove(x) && inputs.size() == 2) { if (inputs.remove(x) && inputs.size() == 1) { if (inputs.remove(y) && inputs.size() == 0) { b = true; } } } if(b) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:4: error: class Atc is public, should be declared in a file named Atc.java public class Atc { ^ 1 error
s632809577
p04043
Java
import java.util.ArrayList; import java.util.Scanner; public class Atc { public static void main(String[] args) { Integer x = 5; Integer y = 7; boolean isOk = false; Scanner sc = new Scanner(System.in); ArrayList<Integer> inputs = new ArrayList<>() { { add(sc.nextInt()); add(sc.nextInt()); add(sc.nextInt()); } }; if (inputs.remove(x) && inputs.size() == 2) { if (inputs.remove(x) && inputs.size() == 1) { if (inputs.remove(y) && inputs.size() == 0) { isOk = true; } } } if(isOk) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:4: error: class Atc is public, should be declared in a file named Atc.java public class Atc { ^ 1 error
s023657433
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int arr[3]; for(int i=0; i<3; i++) cin >> arr[i]; sort(arr, arr+3); if(arr[0] == 5 && arr[1] == 5 && arr[2] == 7) cout << "YES" << endl; else cout << "NO" << endl;
a.cc: In function 'int main()': a.cc:9:29: error: expected '}' at end of input 9 | else cout << "NO" << endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s790066187
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a[3]; int se=0;,go=0; for(int i=0;i<3;i++){ cin >> a[i]; if(a[i]==7) se++; else if(a[i]==5) go++; } cout << (se==1&&go==2?"YES":"NO") << endl; }
a.cc: In function 'int main()': a.cc:5:12: error: expected primary-expression before ',' token 5 | int se=0;,go=0; | ^ a.cc:5:13: error: 'go' was not declared in this scope 5 | int se=0;,go=0; | ^~
s537590368
p04043
C++
#include<iostream> int main(){ cin.tie(0); ios::sync_with_stdio(false); int A, B, C; cin >> A >> B >> C; if(A*B*C == 5*7*5) cout << "YES"; else cout << "NO"; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 3 | cin.tie(0); | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:4:9: error: 'ios' has not been declared 4 | ios::sync_with_stdio(false); | ^~~ a.cc:6:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if(A*B*C == 5*7*5) cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | else cout << "NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s120423534
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, l; cin >> n >> l; string a[l]; vector<string> s; for (int i = 0; i < n; i++) { cin >> s.at(i); } //ソート bool isEnd = false; while (!isEnd) { isEnd = true; for (i = 0; i < n-1; i++) { if (string(s.at(i)).compare(s.at(i+1)) > 0) { a = s.at(i); s.at(i) = s.at(i+1); s.at(i+1) = a; isEnd = false; } } for (i = n-1; i > 0; i--) { if (string(s.at(i)).compare(s.at(i-1)) < 0) { a = s.at(i); s.at(i) = s.at(i-1); s.at(i-1) = a; isEnd =false; } } } //出力 for (i = 0; i < n; i++) { cout << s.at(i); } cout << endl; }
a.cc: In function 'int main()': a.cc:19:10: error: 'i' was not declared in this scope 19 | for (i = 0; i < n-1; i++) { | ^ a.cc:27:10: error: 'i' was not declared in this scope 27 | for (i = n-1; i > 0; i--) { | ^ a.cc:38:8: error: 'i' was not declared in this scope 38 | for (i = 0; i < n; i++) { | ^
s341560401
p04043
C++
#include <iostream> using namespace std; int s[7]; int main() { int a, b, c; cin >> a >> b >> c; s[a]++; s[b]++; s[c]++; if(s[5]==2 && s[7]==1) cout << "YES; else cout << "NO" << endl; return 0; }
a.cc:19:34: warning: missing terminating " character 19 | if(s[5]==2 && s[7]==1) cout << "YES; | ^ a.cc:19:34: error: missing terminating " character 19 | if(s[5]==2 && s[7]==1) cout << "YES; | ^~~~~ a.cc: In function 'int main()': a.cc:21:3: error: expected primary-expression before 'else' 21 | else cout << "NO" << endl; | ^~~~
s809476006
p04043
C++
#include<iostream> int main() { int a, b, c; cin >> a >> b >> c; if (a == 5) { if ((b == 5 && c == 7) || (b == 7 && c == 5)) { cout << "YES" << endl; } } else if (a == 7) { if (b == c == 5) { cout << "YES" << endl; } } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | 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:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:14:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 14 | 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:14:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 14 | cout << "YES" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | 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:17:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 17 | cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s949040701
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a==7&&b==5&&c==5){ cout <<"YES"<<endl; } else if(b==7&&a==5&&c==5){ cout <<"YES"<<endl; } else if(c==7&&b==5&&a==5){ cout <<"YES"<<endl; } else{ cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:17:4: error: expected '}' at end of input 17 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s409222073
p04043
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int n, l; cin >> n >> l; vector<string> strlist(n); int i; for(i=0;i<n;i++){ cin >> strlist[i]; } sort(strlist.begin(), strlist.end()); string gattai=""; for(i=0;i<n;i++){ gattai = gattai + strlist[i]; } cout << gattai; return 0; }
a.cc: In function 'int main()': a.cc:17:1: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(strlist.begin(), strlist.end()); | ^~~~ | short
s946787312
p04043
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int n, l; cin >> n >> l; vector<string> strlist(n); int i; for(i=0;i<n;i++){ cin >> strlist[i]; } sort(strlist); string gattai=""; for(i=0;i<n;i++){ gattai = gattai + strlist[i]; } cout << gattai; return 0; }
a.cc: In function 'int main()': a.cc:17:1: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(strlist); | ^~~~ | short
s408183977
p04043
C++
#include <iostream> #include <string> using namespace std; int main(){ // cout int a,b,c,d; // string s; cin >> a >> b >> c; d = a*b*c if(d == 25*7){ cout << "yes"; }else{ cout << "no"; } // cin >> b >> c; // cin >>s; // cout << (a+b+c) <<" "<< s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:10: error: expected ';' before 'if' 11 | d = a*b*c | ^ | ; 12 | if(d == 25*7){ | ~~ a.cc:14:2: error: 'else' without a previous 'if' 14 | }else{ | ^~~~
s869141052
p04043
C++
#include <iostream> #include <string> using namespace std; int main(){ // cout int a,b,c; // string s; cin >> a >> b >> c; d = a*b*c if(d == 25*7){ cout << "yes"; }else{ cout << "no"; } // cin >> b >> c; // cin >>s; // cout << (a+b+c) <<" "<< s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:1: error: 'd' was not declared in this scope 11 | d = a*b*c | ^ a.cc:14:2: error: 'else' without a previous 'if' 14 | }else{ | ^~~~
s580274909
p04043
C++
#include <iostream> #include <string> using namespace std; int main(){ // cout int a,b,c; // string s; cin >> a >> b >> c; d = a*b*c if(d == 25*7){ cout << "yes" }else{ cout << "no" } // cin >> b >> c; // cin >>s; // cout << (a+b+c) <<" "<< s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:1: error: 'd' was not declared in this scope 11 | d = a*b*c | ^ a.cc:14:2: error: 'else' without a previous 'if' 14 | }else{ | ^~~~ a.cc:15:21: error: expected ';' before '}' token 15 | cout << "no" | ^ | ; 16 | } | ~
s643110884
p04043
C++
#include <stdio.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: 'cin' was not declared in this scope 8 | cin>>a>>b>>c; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout<<"YES"<<endl; | ^~~~ a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:22: error: 'endl' was not declared in this scope 11 | cout<<"YES"<<endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include <stdio.h> +++ |+#include <ostream> 2 | a.cc:13:9: error: 'cout' was not declared in this scope 13 | cout<<"NO"<<endl; | ^~~~ a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:21: error: 'endl' was not declared in this scope 13 | cout<<"NO"<<endl; | ^~~~ a.cc:13:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s342664754
p04043
C++
#import <stdio.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:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import <stdio.h> | ^~~~~~ a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not declared in this scope 8 | cin>>a>>b>>c; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #import <stdio.h> +++ |+#include <iostream> 2 | a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout<<"YES"<<endl; | ^~~~ a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:22: error: 'endl' was not declared in this scope 11 | cout<<"YES"<<endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #import <stdio.h> +++ |+#include <ostream> 2 | a.cc:13:9: error: 'cout' was not declared in this scope 13 | cout<<"NO"<<endl; | ^~~~ a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:21: error: 'endl' was not declared in this scope 13 | cout<<"NO"<<endl; | ^~~~ a.cc:13:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s716709495
p04043
C
#include<stdio.h> int main(){ int a,b,c; int s; scanf("%d %d %d",&a,&b,&c); s=100*a+10*b+c; if(s==557||s==575||s==755){ printf("YES") }else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:8:18: error: expected ';' before '}' token 8 | printf("YES") | ^ | ; 9 | }else{ | ~
s250066340
p04043
C++
#include <iostream> int main() { int a, b, c; cin >> a >> b >> c; if((a==5&&b==5&&c==7)||(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:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> a >> b >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:68: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==5&&b==5&&c==7)) 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:6:85: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==5&&b==5&&c==7)) cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | else 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:7:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | else cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s075356195
p04043
C++
#inclide<bits/stdc++.h> using namespace std; main(){ int a[4] = {0}; scanf("%d %d %d" , &a[0] , &a[1] , &a[2]); sort(a , a + 3); if((a[0] == a[1]) && (a[0] == 5) && (a[2] == 7)){ cout << "YES\n"; } else { cout << "NO\n"; } return 0; }
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include? 1 | #inclide<bits/stdc++.h> | ^~~~~~~ | include a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'scanf' was not declared in this scope 8 | scanf("%d %d %d" , &a[0] , &a[1] , &a[2]); | ^~~~~ a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(a , a + 3); | ^~~~ | short a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout << "YES\n"; | ^~~~ a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #inclide<bits/stdc++.h> a.cc:14:9: error: 'cout' was not declared in this scope 14 | cout << "NO\n"; | ^~~~ a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s003886806
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c,x; cin>>a>>b>>c; x=a+b+c; if (x == 17){ cout<<"YES"<<endl; } else if(x != 17){ cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s964819800
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c,x; cin>>a>>b>>c; x=a+b+c; if (a) else if (x == 17){ cout<<"YES"<<endl; } else if(x != 17){ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:13:1: error: expected primary-expression before 'else' 13 | else if (x == 17){ | ^~~~
s758762866
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c,x; cin>>a>>b>>c; x=a+b+c; if (a) else if (x == 17){ cout<<"YES"<<endl; } else if(x != 17){ cout<<"NO"<<endl; } else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:13:1: error: expected primary-expression before 'else' 13 | else if (x == 17){ | ^~~~
s034823945
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { vector<int> value(3); for(int i=0; i<3; i++) cin >> value.at(i); int five=0,seven=0; for(int i=0; i<3; i++){ if(value.at(i)==7) seven++; else if(value.at(i)==5) five+; } if(five==2 && seven==1) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:13:12: error: expected primary-expression before ';' token 13 | five+; | ^
s620180714
p04043
Java
package score100; 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 == b && b== 5 && c == 7 || b == c && c== 5 && a == 7|| c == a && a== 5 && b == 7){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:5: error: class IrohaAndHaiku is public, should be declared in a file named IrohaAndHaiku.java public class IrohaAndHaiku { ^ 1 error
s762470580
p04043
Java
package score100; import java.util.Sca入れ替えnner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (a == b && b== 5 && c == 7 || b == c && c== 5 && a == 7|| c == a && a== 5 && b == 7){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:3: error: cannot find symbol import java.util.Sca????nner; ^ symbol: class Sca????nner location: package java.util Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 3 errors
s616127962
p04043
Java
package score100; 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 == b && b== 5 && c == 7 || b == c && c== 5 && a == 7|| c == a && a== 5 && b == 7){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:5: error: class IrohaAndHaiku is public, should be declared in a file named IrohaAndHaiku.java public class IrohaAndHaiku { ^ 1 error
s688685991
p04043
C++
package score100; 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 == b && b== 5 && c == 7 || b == c && c== 5 && a == 7|| c == a && a== 5 && b == 7){ System.out.println("YES"); } else { System.out.println("NO"); } } }
a.cc:1:1: error: 'package' does not name a type 1 | package score100; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 | public class IrohaAndHaiku { | ^~~~~~
s178853192
p04043
C++
#include <iostream> #include <string> int main() { int A, B, C; if ( A + B == 10 ){ if ( C == 7 ){ cout << "YES" << endl; } } if ( A + C == 10 ){ if ( B == 7 ){ cout << "YES" << endl; } } if ( B + C == 10 ){ if ( A == 7 ){ cout << "YES" << endl; } } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:8:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout << "YES" << endl; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 13 | 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:13:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 13 | cout << "YES" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:18:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | 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:18:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout << "YES" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:22:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 22 | 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:22:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 22 | cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s030411842
p04043
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >>c; if(a == 5){ if(b == 5){ if(c == 7){ cout << "YES"; return 0; } }if(b == 7){ if(c == 5){ cout << "YES"; return 0; } }if(a == 7){ if(b == 5){ if(c == 5){ cout << "YES"; return 0; } } } cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s946381038
p04043
C++
#include <iostream> useing namespace std; int main(){ int a,b,c; cin >> a >> b >>c; if(a == 5){ if(b == 5){ if(c == 7){ cout << "YES"; return 0; } }if(b == 7){ if(c == 5){ cout << "YES"; return 0; } }if(a == 7){ if(b == 5){ if(c == 5){ cout << "YES"; return 0; } } } cout << "NO"; return 0; }
a.cc:3:1: error: 'useing' does not name a type 3 | useing namespace std; | ^~~~~~ a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a >> b >>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:12:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:23:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 23 | cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:28:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 28 | cout << "NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s856619368
p04043
C++
#include <iostream> use namespace std; int main(){ int a,b,c; cin >> a >> b >>c; if(a == 5){ if(b == 5){ if(c == 7){ cout << "YES"; return 0; } }if(b == 7){ if(c == 5){ cout << "YES"; return 0; } }if(a == 7){ if(b == 5){ if(c == 5){ cout << "YES"; return 0; } } } cout << "NO"; return 0; }
a.cc:3:1: error: 'use' does not name a type 3 | use namespace std; | ^~~ a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a >> b >>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:12:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:23:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 23 | cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:28:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 28 | cout << "NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s188815039
p04043
C++
a, b, c = map( int, input() ) if a+b+c != 17: print( "NO" ) iCountFive = 0 if a = 5: iCountFive += 1 if b = 5: iCountFive += 1 if c = 5: iCountFive += 1 iCountSeven = 0 if a = 7: iCountSeven += 1 if b = 7: iCountSeven += 1 if c = 7: iCountSeven += 1 if iCountFive == 2 and iCountSeven == 1: print( "YES" ) else : print( "NO" )
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = map( int, input() ) | ^
s322696975
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> line1(3); vector<int> p(3) = {5, 5, 7}; for(int i = 0; i < 3; i++){ cin >> line1.at(i); } sort(line1.begin(), line1.end()); if(line1 == p){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:5:20: error: expected ',' or ';' before '=' token 5 | vector<int> p(3) = {5, 5, 7}; | ^
s222166966
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> line1(3); for(int i = 0; i < 3; i++){ cin >> line1.at(i); } sort(line1.begin(), line1.end()); vector<int> p(3) = {5, 5, 7}; if(line1 == p){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:20: error: expected ',' or ';' before '=' token 9 | vector<int> p(3) = {5, 5, 7}; | ^
s270725134
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> line1(3); for(int i = 0; i < 3; i++){ cin >> line1.at(i); } sort(line1.begin(), line1.end()); vector<int> p(3) = {5, 5, 7} if(line1 == p){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:20: error: expected ',' or ';' before '=' token 9 | vector<int> p(3) = {5, 5, 7} | ^
s140297649
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> line1(3); for(int i = 0; i < 3; i++){ cin >> line1.at(i); } sort(line1.begin(), line1.end()); if(line1 == {5, 5, 7}){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:15: error: expected primary-expression before '{' token 9 | if(line1 == {5, 5, 7}){ | ^ a.cc:9:14: error: expected ')' before '{' token 9 | if(line1 == {5, 5, 7}){ | ~ ^~ | )
s804265751
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> line1(3); for(int i = 0; i < 3; i++){ cin >> line1(i); } sort(line1.begin(), line1.end()); if(line1 == {5, 5, 7}){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:6:17: error: no match for call to '(std::vector<int>) (int&)' 6 | cin >> line1(i); | ~~~~~^~~ a.cc:9:15: error: expected primary-expression before '{' token 9 | if(line1 == {5, 5, 7}){ | ^ a.cc:9:14: error: expected ')' before '{' token 9 | if(line1 == {5, 5, 7}){ | ~ ^~ | )
s234391595
p04043
C++
#include <oistream> using namespace std; int main(){ vector<int> line1(3); for(int i = 0; i < 3; i++){ cin >> line1(i); } sort(line1.begin(), line1.end()); if(line1 == {5, 5, 7}){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc:1:10: fatal error: oistream: No such file or directory 1 | #include <oistream> | ^~~~~~~~~~ compilation terminated.
s494798624
p04043
C++
#include<iostream> using namespace std; int main(){ int A, B, C; cin>>A >> B >> C; if(A==5 && B==5 && C==7) cout<<"YES"; 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:11:11: warning: missing terminating " character 11 | cout<<"YES'; | ^ a.cc:11:11: error: missing terminating " character 11 | cout<<"YES'; | ^~~~~~ a.cc: In function 'int main()': a.cc:12:3: error: expected primary-expression before 'else' 12 | else if(A==7 && B==5 && C==5) | ^~~~
s743586973
p04043
C++
#include<iostream> using namespace std; int main(){ int a, b, c; cin>> a >> b >> c; if(a==5 && b==5 && c==7) cout<<"YES"; 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:11:11: warning: missing terminating " character 11 | cout<<"YES'; | ^ a.cc:11:11: error: missing terminating " character 11 | cout<<"YES'; | ^~~~~~ a.cc: In function 'int main()': a.cc:12:3: error: expected primary-expression before 'else' 12 | else if(a==7 && b==5 && c==5) | ^~~~
s734352574
p04043
C++
// Created by liszt on 2019/08/01. #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; } return 0; }
a.cc:7:46: error: extended character ¥ is not valid in an identifier 7 | if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)¥¥(a==7&&b==5&&c==5)){ | ^ a.cc:7:46: error: extended character ¥ is not valid in an identifier a.cc: In function 'int main()': a.cc:7:46: error: expected ')' before '\U000000a5\U000000a5' 7 | if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)¥¥(a==7&&b==5&&c==5)){ | ~ ^~ | )
s306849131
p04043
C++
#include <iostream> #include <string> using namespace std; int main(){ int a,b,c; int f_num=0,s_num=0; cin>>a>>b>>c; if(a==5){ f_num++ } if(b==5){ f_num++ } if(c==5){ f_num++ } if(a==7){ f_num++ } if(b==7){ f_num++ } if(c==7){ f_num++ } if(f_num==2&&s_num=1){ cout>>YES>>endl; }else{ count>>NO>>endl; } }
a.cc: In function 'int main()': a.cc:10:12: error: expected ';' before '}' token 10 | f_num++ | ^ | ; 11 | } | ~ a.cc:13:12: error: expected ';' before '}' token 13 | f_num++ | ^ | ; 14 | } | ~ a.cc:16:12: error: expected ';' before '}' token 16 | f_num++ | ^ | ; 17 | } | ~ a.cc:20:12: error: expected ';' before '}' token 20 | f_num++ | ^ | ; 21 | } | ~ a.cc:23:12: error: expected ';' before '}' token 23 | f_num++ | ^ | ; 24 | } | ~ a.cc:26:12: error: expected ';' before '}' token 26 | f_num++ | ^ | ; 27 | } | ~ a.cc:29:14: error: lvalue required as left operand of assignment 29 | if(f_num==2&&s_num=1){ | ~~~~~~~~^~~~~~~ a.cc:30:11: error: 'YES' was not declared in this scope 30 | cout>>YES>>endl; | ^~~ a.cc:32:5: error: 'count' was not declared in this scope 32 | count>>NO>>endl; | ^~~~~ a.cc:32:12: error: 'NO' was not declared in this scope 32 | count>>NO>>endl; | ^~
s699548262
p04043
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a, b, c ; if (a == 5, b == 5, c == 7) { cout << "YES"; }else if (a == 5, b == 7, c == 5) { cout << "YES"; }else if (a == 7, b == 5, c == 5) { cout << "YES"; } else { cout << "NO"; }
a.cc: In function 'int main()': a.cc:16:10: error: expected '}' at end of input 16 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s170399046
p04043
C
//set many funcs template //Ver.20190714 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int ceil(int a,int b){if(a%b==0){return a/b;}return (a/b)+1;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} int nHr(int a,int b){return nCr(a+b-1,b);} int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} int sankaku(int x){return ((1+x)*x)/2;} void swap(int *a,int *b){int c;c=(*a);(*a)=(*b);(*b)=c;} long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} void llswap(long long *a,long long *b){long long c;c=(*a);(*a)=(*b);(*b)=c;} double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} void dbswap(double *a,double *b){double c;c=(*a);(*a)=(*b);(*b)=c;} void chswap(char *a,char *b){char c;c=(*a);(*a)=(*b);(*b)=c;} int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int strsortfncsj(const void *a,const void *b){return strcmp((char *)a,(char *)b);} int strsortfnckj(const void *a,const void *b){return strcmp((char *)b,(char *)a);} int chsortfncsj(const void *a,const void *b){if(*(char *)a>*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} int chsortfnckj(const void *a,const void *b){if(*(char *)a<*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} void shuffledget(int x[],int n){ srand(time(0)); int i,b[524288],p,c; for(i=0;i<n;i++){ b[i]=i; } for(i=n;i>=1;i--){ p=rand()%i; c=b[i-1];b[i-1]=b[p];b[p]=c; } for(i=0;i<n;i++){ scanf("%d",&x[b[i]]); } } int dx4[4]={1,-1,0,0}; int dy4[4]={0,0,1,-1}; int dx8[8]={-1,-1,-1,0,0,1,1,1}; int dy8[8]={-1,0,1,-1,1,-1,0,1}; int search(int x,int a[],int n){ int st=0,fi=n-1,te; while(st<=fi){ te=(st+fi)/2; if(a[te]<x){st=te+1;}else{fi=te-1;} } return st; } void prarr(int arr[],int n){ int i; for(i=0;i<n;i++){ if(i){printf(" ");} printf("%d",arr[i]); } printf("\n"); return; } typedef struct{ int val; int node; }sd; int sdsortfnc(const void *a,const void *b){ if(((sd*)a)->val < ((sd*)b)->val){return -1;} if(((sd*)a)->val > ((sd*)b)->val){return 1;} return 0; } void coordinate_comp(int a[],int n){ int i,c=0; sd dat[524288]; for(i=0;i<n;i++){ dat[i].val=a[i]; dat[i].node=i; } qsort(dat,n,sizeof(dat[0]),sdsortfnc); a[dat[0].node]=c; for(i=1;i<n;i++){ if(dat[i-1].val!=dat[i].val){c++;} a[dat[i].node]=c; } } int main(void){ int i,j,n,m,k,a[524288],b,c,h,w,r=0,l,t; double d; char s[524288]; for(i=0;i<3;i++){scanf("%d",&a[i]);} qsort(a,3,izeof(int),sortfncsj); if(a[0]==5 && a[1]==5 && a[2]==7){ printf("YES\n"); } else{ printf("NO\n"); } return 0; }
main.c:16:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch] 16 | int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} | ^~~~~ main.c:8:1: note: 'round' is declared in header '<math.h>' 7 | #include<time.h> +++ |+#include <math.h> 8 | #define inf 1072114514 main.c:17:5: warning: conflicting types for built-in function 'ceil'; expected 'double(double)' [-Wbuiltin-declaration-mismatch] 17 | int ceil(int a,int b){if(a%b==0){return a/b;}return (a/b)+1;} | ^~~~ main.c:17:5: note: 'ceil' is declared in header '<math.h>' main.c:23:5: warning: conflicting types for built-in function 'pow'; expected 'double(double, double)' [-Wbuiltin-declaration-mismatch] 23 | int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} | ^~~ main.c:23:5: note: 'pow' is declared in header '<math.h>' main.c:31:11: warning: conflicting types for built-in function 'llround'; expected 'long long int(double)' [-Wbuiltin-declaration-mismatch] 31 | long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} | ^~~~~~~ main.c:31:11: note: 'llround' is declared in header '<math.h>' main.c: In function 'main': main.c:129:13: error: implicit declaration of function 'izeof' [-Wimplicit-function-declaration] 129 | qsort(a,3,izeof(int),sortfncsj); | ^~~~~ main.c:129:19: error: expected expression before 'int' 129 | qsort(a,3,izeof(int),sortfncsj); | ^~~
s714118119
p04043
Java
package atCoder; import java.util.Scanner; public class Atcoder { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int a = sc.nextInt(),b = sc.nextInt(),c = sc.nextInt(); if(a+b+c==17) { System.out.println("YES"); }else { System.out.println("NO"); } } }
Main.java:5: error: class Atcoder is public, should be declared in a file named Atcoder.java public class Atcoder { ^ 1 error
s156466640
p04043
C++
#include "Test.h" #include <iostream> using namespace std; int main() { char a; char b; char c; cin >> a >> b >> c; int sum = atoi(&a)+ atoi(&b) + atoi(&c) ; if (sum == 17 && (a == '5' || a == '7') && (b == '5' || b == '7') && (c == '5' || c == '7')) { cout << "YES"; } else { cout << "NO"; } return 0; }
a.cc:1:10: fatal error: Test.h: No such file or directory 1 | #include "Test.h" | ^~~~~~~~ compilation terminated.
s276132984
p04043
Java
import java.util.*; public calss 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(); boolean isAB5C7 = (a==5 && b==5 && c==7); boolean isBC5A7 = (a==7 && b==5 && c==5); boolean isCA5B7 = (a==5 && b==7 && c==5); if(isCA5B7||isBC5A7||isAB5C7){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:3: error: class, interface, enum, or record expected public calss Main{ ^ Main.java:4: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args){ ^ (use --enable-preview to enable unnamed classes) Main.java:20: error: class, interface, enum, or record expected } ^ 3 errors
s813178830
p04043
Java
import java.util.*; calss 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(); boolean isAB5C7 = (a==5 && b==5 && c==7); boolean isBC5A7 = (a==7 && b==5 && c==5); boolean isCA5B7 = (a==5 && b==7 && c==5); if(isCA5B7||isBC5A7||isAB5C7){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:3: error: class, interface, enum, or record expected calss Main{ ^ Main.java:4: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args){ ^ (use --enable-preview to enable unnamed classes) Main.java:20: error: class, interface, enum, or record expected } ^ 3 errors
s947006140
p04043
C++
#include<bits/stdc++.h> int main(){ int a,b,c cin>>a>>b>>c; if(1=<a&&c>=10){ if((a==5&&b==5&&a==7)||(a==5&&c==5&&b==7)||(b==5&&c==5&&a==7)){ cout<<YES<<endl; } else{ cout<<NO<<endl; } else{ cout<<no<<endl; } }
a.cc: In function 'int main()': a.cc:4:5: error: expected initializer before 'cin' 4 | cin>>a>>b>>c; | ^~~ a.cc:5:8: error: expected primary-expression before '<' token 5 | if(1=<a&&c>=10){ | ^ a.cc:5:12: error: 'c' was not declared in this scope 5 | if(1=<a&&c>=10){ | ^ a.cc:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<YES<<endl; | ^~~~ | std::cout 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:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:13: error: 'YES' was not declared in this scope 7 | cout<<YES<<endl; | ^~~ a.cc:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | 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:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | 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:10:13: error: 'NO' was not declared in this scope 10 | cout<<NO<<endl; | ^~ a.cc:10:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout<<NO<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:12:5: error: expected '}' before 'else' 12 | else{ | ^~~~ a.cc:5:18: note: to match this '{' 5 | if(1=<a&&c>=10){ | ^ a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 13 | 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:13:13: error: 'no' was not declared in this scope 13 | cout<<no<<endl; | ^~ a.cc:13:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 13 | cout<<no<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s098063343
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)||(b==5&&c==7&&a==5)||(c==5&&a==7&&b==5)){ printf("YES\n"); } else{ printf("NO\n"); } }
main.c: In function 'main': main.c:5:19: error: 'C' undeclared (first use in this function) 5 | if((a==5&&b==7&&C==5)||(b==5&&c==7&&a==5)||(c==5&&a==7&&b==5)){ | ^ main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
s446007616
p04043
C++
#include <iostream> #include <vector> using namespace std; int main(){ int l, i=0; vector<int> a; vector<int> b = {5, 5, 7}; while(i<3){ cin >> l; a.push_back(l); i++; } sort(a.begin(), a.end()); if(a==b) cout << "YES"; else cout << "NO"; }
a.cc: In function 'int main()': a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(a.begin(), a.end()); | ^~~~ | short
s076373278
p04043
C
#include <stdio.h> int main(){ int a[3]; scanf("%d %d %d",&a[0],&a[1],&a[2]); int five=0,sevne=0; int i; for(i=0;i<3;i++){ if(a[i]==5){ five++; }else if(a[i]==7){ sevne++;} } if(five==2 && sevne==1){ printf("YES\n"); }else{ printf("NO\n") } return(0); }
main.c: In function 'main': main.c:17:17: error: expected ';' before '}' token 17 | printf("NO\n") | ^ | ; 18 | } | ~
s416808783
p04043
C
#include <stdio.h> int main(){ int a[3]; scanf("%d %d %d",a); int five=0,sevne=0; int i; for(i=0;i<3;i++){ if(a[i]==5){ five++; }else if(a[i]==7){ sevne++;} } if(five==2 && sevne==1){ printf("YES\n"); }else{ printf("NO\n") } return(0); }
main.c: In function 'main': main.c:17:17: error: expected ';' before '}' token 17 | printf("NO\n") | ^ | ; 18 | } | ~
s523638675
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,ans=0; cin>>a>>b>>c; vextor<int>v={a,b,c}; for(int i = 0;i<3;i++) if(v.at(i)=='5')ans++; if(ans==2)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'vextor' was not declared in this scope 6 | vextor<int>v={a,b,c}; | ^~~~~~ a.cc:6:10: error: expected primary-expression before 'int' 6 | vextor<int>v={a,b,c}; | ^~~ a.cc:8:8: error: 'v' was not declared in this scope 8 | if(v.at(i)=='5')ans++; | ^
s808695056
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int temp; int l1,l2; l1=0; l2=0; for(int i=0;i<3;i++) { cin >> temp; if(temp==5) l1++; else if(temp==7) l2++; } if((l1==2)&&(l2==1))) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:23: error: expected primary-expression before ')' token 17 | if((l1==2)&&(l2==1))) | ^
s132588272
p04043
C++
A=list(map(int,input().split())) a,b,c,d,e=A[0],A[1],A[2],0,0 if a==5: d+=1 if b==5: d+=1 if c==5: d+=1 if a==7: e+=1 if b==7: e+=1 if c==7: e+=1 if d==2 and e==1: print('YES') else: print('NO')
a.cc:16:11: warning: multi-character character constant [-Wmultichar] 16 | print('YES') | ^~~~~ a.cc:18:11: warning: multi-character character constant [-Wmultichar] 18 | print('NO') | ^~~~ a.cc:1:1: error: 'A' does not name a type 1 | A=list(map(int,input().split())) | ^
s767909098
p04043
C
#include <stdio.h> int main(){ int i,L,n,max=0; char s[101][101]; scanf("%d%d",&n,&L); for(i=0;i<n;i++){ for(int j = 0; j < L; j++){ scanf("%c",s[i][j]); } } sort(s,s+n); for(int i = 0; i < n; i++){ for(int j = 0; j < l; j++){ printf("%s",s[i][j]); } } printf("\n"); return 0; }
main.c: In function 'main': main.c:14:1: error: implicit declaration of function 'sort' [-Wimplicit-function-declaration] 14 | sort(s,s+n); | ^~~~ main.c:16:22: error: 'l' undeclared (first use in this function) 16 | for(int j = 0; j < l; j++){ | ^ main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
s679584893
p04043
C
#include <stdio.h> int main(void){ int A,B,C,; scanf("%d",&A); scanf("%d",&B); scanf("%d",&C); if(A+B+C==17&&A==7||B==7||C==7&&A==B||B==C||C==A) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:5:13: error: expected identifier or '(' before ';' token 5 | int A,B,C,; | ^
s706328275
p04043
Java
import java.util.Scanner; public class IrohaAndHaiku{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int fiv = 0; int sev = 0; //初期値設定 for(int i = 0; i < 3; i++) { int num = sc.nextInt();//入力値 switch(num){ // case 5: fiv++; break; case 7: sev++; break; } } if(fiv == 2 && sev == 1) { System.out.println("YES"); } else{ System.out.println("no"); } } }
Main.java:4: error: class IrohaAndHaiku is public, should be declared in a file named IrohaAndHaiku.java public class IrohaAndHaiku{ ^ 1 error
s422108290
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c, sum; cin >> a >> b >> c; sum = a+b+c; if sum == 17{ cout << "YES" << "\n"; }else{ cout << "NO" << "\n"; } return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: expected '(' before 'sum' 10 | if sum == 17{ | ^~~ | ( a.cc:12:6: error: 'else' without a previous 'if' 12 | }else{ | ^~~~
s981938835
p04043
C
#include<iostream> #include<stdio.h> #include<math.h> #include<algorithm> #include<vector> #include<string> #include<cstdlib> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a*b*c==175) cout << "YES" << endl; else cout << "NO" << endl; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s696979428
p04043
Java
public static void main (String[] args) { int A; int B; int C; int i = A * B * C; if (i == 175) { System.out.println ("Yes"); } else { System.out.println ("No"); } }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main (String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s840528925
p04043
Java
public class at_iroha { public static void main (String[] args) { int A; int B; int C; int i = A * B * C; if (i == 175) { System.out.println ("Yes"); } else { System.out.println ("No"); } } }
Main.java:1: error: class at_iroha is public, should be declared in a file named at_iroha.java public class at_iroha { ^ 1 error
s367145958
p04043
C++
#include <iostream> #include <string> #include <vector> #include <regex> using namespace std; int main(){ string a, b, c; cin >> a >> b >> c; int f, s; if(a == 7)s++; if(a == 5)f++; if(b == 7)s++; if(b == 5)f++; if(c == 7)s++; if(c == 5)f++; if ( f == 2 && s == 1)cout << "YES"; else cout << "NO"; }
a.cc: In function 'int main()': a.cc:12:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 12 | if(a == 7)s++; | ~ ^~ ~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from a.cc:4: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:12:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:12:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:12:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 12 | if(a == 7)s++; | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 12 | if(a == 7)s++; | ^ In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 12 | if(a == 7)s++; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 12 | if(a == 7)s++; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 12 | if(a == 7)s++; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:12:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | if(a == 7)s++; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_s
s166215235
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int vector<int> num(3); cin<<num[0]<<num[1]<<num[2]; sort(num.begin(),num.end()); if(num[0]==5 && num[1]==5 && num[2]==7){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:19: error: invalid declarator before 'num' 4 | int vector<int> num(3); | ^~~ a.cc:5:8: error: 'num' was not declared in this scope; did you mean 'enum'? 5 | cin<<num[0]<<num[1]<<num[2]; | ^~~ | enum
s602510862
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> num(3); num<<cin; sort(num.begin(),num.end()); if(num[0]==5 && num[1]==5 && num[2]==7){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:6: error: no match for 'operator<<' (operand types are 'std::vector<int>' and 'std::istream' {aka 'std::basic_istream<char>'}) 5 | num<<cin; | ~~~^~~~~ | | | | | std::istream {aka std::basic_istream<char>} | std::vector<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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ 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 'num' (type 'std::vector<int>') to type 'std::byte' 5 | num<<cin; | ^~~ 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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ 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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ 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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ 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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ 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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | num<<cin; | ^~~ /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:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>' 5 | num<<cin; | ^~~ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:5:8: note: 'std::vector<int>' is not derived from 'std::basic_ostream<char, _Traits>' 5 | num<<cin; | ^~~ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5:
s199264372
p04043
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define f first #define s second #define all(container) container.begin(),container.end() #define fast ios::sync_with_stdio(0); cin.tie(0) int32_t main(){ fast; int a,b,c; cin >> a >> b >> c; int ar[11]={0}; ar[a]++; ar[b]++ ar[c]++; if(ar[5]==2&&ar[7]==1) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int32_t main()': a.cc:16:41: error: expected ';' before 'ar' 16 | int ar[11]={0}; ar[a]++; ar[b]++ ar[c]++; | ^~~ | ;
s492748467
p04043
C++
l = list(map(int, input().split())) if(l.count(5)==2 and l.count(7)==1): print("YES") else: print("NO")
a.cc:1:1: error: 'l' does not name a type 1 | l = list(map(int, input().split())) | ^
s623940215
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> p[3]; for (int i=0;i<3;++i) cin >> p[i]; sort(p.begin(), p.end()); bool ans = false; if (p[0] == 5 && p[1] == 5 && p[2] == 7) ans = true; if (ans) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:6:29: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 6 | for (int i=0;i<3;++i) cin >> p[i]; | ~~~ ^~ ~~~~ | | | | | std::vector<int> | std::istream {aka std::basic_istream<char>} In file included 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, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~
s210501160
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ vecotr<int> p[3]; for (int i=0;i<3;++i) cin >> p[i]; sort(p.begin(), p.end()); bool ans = false; if (p[0] == 5 && p[1] == 5 && p[2] == 7) ans = true; if (ans) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:5:3: error: 'vecotr' was not declared in this scope 5 | vecotr<int> p[3]; | ^~~~~~ a.cc:5:10: error: expected primary-expression before 'int' 5 | vecotr<int> p[3]; | ^~~ a.cc:6:32: error: 'p' was not declared in this scope 6 | for (int i=0;i<3;++i) cin >> p[i]; | ^ a.cc:7:8: error: 'p' was not declared in this scope 7 | sort(p.begin(), p.end()); | ^
s381923059
p04043
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> vec(3); for(i = 0;i < 3; i++){ cin >> vec[i]; } sort(vec.begin(),vec.end()); if(vec[0] == 5 && vec[1] == 5 && vec[2] == 7){ cout << "YES" <<endl; } else { cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: 'i' was not declared in this scope 9 | for(i = 0;i < 3; i++){ | ^
s293943260
p04043
Java
import java.util.*; public class Main{ public void main(String[] args){ Scanner stdIn = new Scanner(System.in); int[] a = new int[3]; count5 = 0; count7 = 0; for(int i = 0;i < 3;i++){ a[i] = stdIn.nextInt(); if(a[i] == 5) count5 += 1; else if(a[i] ==7) count7 += 1; } if(count5 ==2 && count7 == 1) System.out.println("Yes"); else System.out.println("No"); } }
Main.java:7: error: cannot find symbol count5 = 0; ^ symbol: variable count5 location: class Main Main.java:8: error: cannot find symbol count7 = 0; ^ symbol: variable count7 location: class Main Main.java:12: error: cannot find symbol count5 += 1; ^ symbol: variable count5 location: class Main Main.java:14: error: cannot find symbol count7 += 1; ^ symbol: variable count7 location: class Main Main.java:16: error: cannot find symbol if(count5 ==2 && count7 == 1) ^ symbol: variable count5 location: class Main Main.java:16: error: cannot find symbol if(count5 ==2 && count7 == 1) ^ symbol: variable count7 location: class Main 6 errors
s330140287
p04043
Java
import java.util.*; public class Main{ public void main(String[] args){ Scanner stdIn = new Scanner(System.in); int[] a = new int[]; count5 = 0; count7 = 0; for(int i = 0;i < 3;i++){ a[i] = stdIn.nextInt(); if(a[i] == 5) count5 += 1; else if(a[i] ==7) count7 += 1; } if(count5 ==2 && count7 == 1) System.out.println("Yes"); else System.out.println("No"); } }
Main.java:6: error: array dimension missing int[] a = new int[]; ^ 1 error
s901523192
p04043
Java
import java.util.Scanner; public class Haiku { public static void main(String[] args) { int five = 0; int seven = 0; Scanner sc = new Scanner(System.in); for(int i = 0; i < 3; i++) { int num = Integer.parseInt(sc.next()); switch(num) { case 5: five++; break; case 7: seven++; break; } } if(five == 2 && seven == 1) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:3: error: class Haiku is public, should be declared in a file named Haiku.java public class Haiku { ^ 1 error
s091121062
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int S ; cin S; for ( char c = 'a';c <= 'z' ; c++){ bool found = false; for (int i=0; i < S.length();i++){ if(S[i]==c){ found= true; } } if (! found){ cout << c << endl; return 0; } } cout << "None" << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'S' 6 | cin S; | ^~ | ; a.cc:11:25: error: request for member 'length' in 'S', which is of non-class type 'int' 11 | for (int i=0; i < S.length();i++){ | ^~~~~~ a.cc:12:11: error: invalid types 'int[int]' for array subscript 12 | if(S[i]==c){ | ^
s557387215
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int S ; cin S; for ( char c = 'a';c <= 'z' ; c++){ bool found = false; for (int i=0; i < S.size();i++){ if(S[i]==c){ found= true; } } if (! found){ cout << c << endl; return 0; } } cout << "None" << endl; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'S' 6 | cin S; | ^~ | ; a.cc:11:25: error: request for member 'size' in 'S', which is of non-class type 'int' 11 | for (int i=0; i < S.size();i++){ | ^~~~ a.cc:12:11: error: invalid types 'int[int]' for array subscript 12 | if(S[i]==c){ | ^
s684295094
p04043
C
#include <stdio.h> int main(){ int a; for(int i=0;i<3;i++){ scanf("%d",&a); switch(a){ case 5: b++; break; case 7: c++; break; default: puts("NO"); return 0; break; } if(b==2&&c==1)puts("YES"); } return 0; }
main.c: In function 'main': main.c:8:9: error: 'b' undeclared (first use in this function) 8 | b++; | ^ main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in main.c:11:9: error: 'c' undeclared (first use in this function) 11 | c++; | ^
s003119600
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { string L; cin >> L; vector<int> S(i) for (int i = 0; i < L; i++) { cin >> Si; } vector<int> vec = {for(int i=0; i <L; i++)}; sort (vec.begin(), vec.end()); for (int i = 0; i < L; i++) { cout << Si << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: 'i' was not declared in this scope 7 | vector<int> S(i) | ^ a.cc:8:6: error: expected ',' or ';' before 'for' 8 | for (int i = 0; i < L; i++) { | ^~~ a.cc:12:22: error: expected primary-expression before 'for' 12 | vector<int> vec = {for(int i=0; i <L; i++)}; | ^~~ a.cc:12:22: error: expected '}' before 'for' 12 | vector<int> vec = {for(int i=0; i <L; i++)}; | ~^~~ a.cc:12:22: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>' 12 | vector<int> vec = {for(int i=0; i <L; i++)}; | ^~~ | | | <brace-enclosed initializer list> a.cc:12:22: error: expected ',' or ';' before 'for' a.cc: At global scope: a.cc:13:10: error: expected constructor, destructor, or type conversion before '(' token 13 | sort (vec.begin(), vec.end()); | ^ a.cc:15:5: error: expected unqualified-id before 'for' 15 | for (int i = 0; i < L; i++) { | ^~~ a.cc:15:21: error: 'i' does not name a type 15 | for (int i = 0; i < L; i++) { | ^ a.cc:15:28: error: 'i' does not name a type 15 | for (int i = 0; i < L; i++) { | ^ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s846452008
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { string L; cin >> L; vector<int> Si for (int i = 0; i < L; i++) { cin >> Si; } vector<int> vec = {for(int i=0; i <L; i++)}; sort (vec.begin(), vec.end()); for (int i = 0; i < L; i++) { cout << Si << endl; } }
a.cc: In function 'int main()': a.cc:8:6: error: expected initializer before 'for' 8 | for (int i = 0; i < L; i++) { | ^~~ a.cc:8:22: error: 'i' was not declared in this scope 8 | for (int i = 0; i < L; i++) { | ^ a.cc:12:22: error: expected primary-expression before 'for' 12 | vector<int> vec = {for(int i=0; i <L; i++)}; | ^~~ a.cc:12:22: error: expected '}' before 'for' 12 | vector<int> vec = {for(int i=0; i <L; i++)}; | ~^~~ a.cc:12:22: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>' 12 | vector<int> vec = {for(int i=0; i <L; i++)}; | ^~~ | | | <brace-enclosed initializer list> a.cc:12:22: error: expected ',' or ';' before 'for' a.cc: At global scope: a.cc:13:10: error: expected constructor, destructor, or type conversion before '(' token 13 | sort (vec.begin(), vec.end()); | ^ a.cc:15:5: error: expected unqualified-id before 'for' 15 | for (int i = 0; i < L; i++) { | ^~~ a.cc:15:21: error: 'i' does not name a type 15 | for (int i = 0; i < L; i++) { | ^ a.cc:15:28: error: 'i' does not name a type 15 | for (int i = 0; i < L; i++) { | ^ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s274081701
p04043
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> using namespace std; #define vel vector<long long> #define vvel vector<vel> #define int long long #define rep(i,n) for(long long i=0;i<n;i++) #define rp(i,n) for(long long i=1;i<n;i++) #define sor(v) sort(v.begin(),v.end()) #define mmax(a,b) a=max(a,b) #define mmin(a,b) a=min(a,b) #define mkp make_pair #define pin pair<int,int> #define V vector long long p = 1000000007; vel rui(19, 1); vel par; int ru(int a,int r) { if (r == 0) { return 1; } int ans = ru(a, r / 2); ans *= ans; ans %= p; if (r % 2 == 1) { ans *= a; ans %= p; } return ans; } int inv(int a) { return ru(a, p - 2); } int dig(int n) { for (int i = 0; i < 18; i++) { if (rui[i] <= n and n < rui[i + 1]) { return i+1; } } } int ret1(int diff, int dg) { if (diff == 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans1 = ret1(hl,dg); ans1 *= (ru(ru(10, dg),hl) + 1); ans1 %= p; if (diff % 2 == 1) { ans1 += ru(ru(10, dg),(diff - 1)); } return ans1 % p; } int ret2(int diff, int dg) { if (diff <= 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans2 = ret2(hl, dg); ans2 *= (ru(ru(10, dg),hl) + 1); ans2 %= p; ans2 += ret1(hl, dg)*hl; ans2 %= p; if (diff % 2 == 1) { ans2 += ret1(diff, dg); } return ans2 % p; } signed main() { int a,b,c;cin >> a>>b>>c; vel v={a,b,c}; sor(v); if(v=={5,5,7}){cout << "YES"<<endl;} else{cout <<"NO"<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:65:7: error: expected primary-expression before '{' token 65 | if(v=={5,5,7}){cout << "YES"<<endl;} | ^ a.cc:65:7: error: expected ')' before '{' token 65 | if(v=={5,5,7}){cout << "YES"<<endl;} | ~ ^ | ) a.cc: In function 'long long int dig(long long int)': a.cc:37:1: warning: control reaches end of non-void function [-Wreturn-type] 37 | } | ^
s088774699
p04043
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> using namespace std; #define vel vector<long long> #define vvel vector<vel> #define int long long #define rep(i,n) for(long long i=0;i<n;i++) #define rp(i,n) for(long long i=1;i<n;i++) #define sor(v) sort(v.begin(),v.end()) #define mmax(a,b) a=max(a,b) #define mmin(a,b) a=min(a,b) #define mkp make_pair #define pin pair<int,int> #define V vector long long p = 1000000007; vel rui(19, 1); vel par; int ru(int a,int r) { if (r == 0) { return 1; } int ans = ru(a, r / 2); ans *= ans; ans %= p; if (r % 2 == 1) { ans *= a; ans %= p; } return ans; } int inv(int a) { return ru(a, p - 2); } int dig(int n) { for (int i = 0; i < 18; i++) { if (rui[i] <= n and n < rui[i + 1]) { return i+1; } } } int ret1(int diff, int dg) { if (diff == 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans1 = ret1(hl,dg); ans1 *= (ru(ru(10, dg),hl) + 1); ans1 %= p; if (diff % 2 == 1) { ans1 += ru(ru(10, dg),(diff - 1)); } return ans1 % p; } int ret2(int diff, int dg) { if (diff <= 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans2 = ret2(hl, dg); ans2 *= (ru(ru(10, dg),hl) + 1); ans2 %= p; ans2 += ret1(hl, dg)*hl; ans2 %= p; if (diff % 2 == 1) { ans2 += ret1(diff, dg); } return ans2 % p; } signed main() { int a,b,c;cin >> a>>b>>c; vel v={a,b,c}; sor(v); if(v=={5,5,7}){cout << "YES"<<endl;} else{cout <<"NO"<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:65:7: error: expected primary-expression before '{' token 65 | if(v=={5,5,7}){cout << "YES"<<endl;} | ^ a.cc:65:7: error: expected ')' before '{' token 65 | if(v=={5,5,7}){cout << "YES"<<endl;} | ~ ^ | ) a.cc: In function 'long long int dig(long long int)': a.cc:37:1: warning: control reaches end of non-void function [-Wreturn-type] 37 | } | ^
s733889240
p04043
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> using namespace std; #define vel vector<long long> #define vvel vector<vel> #define int long long #define rep(i,n) for(long long i=0;i<n;i++) #define rp(i,n) for(long long i=1;i<n;i++) #define sor(v) sort(v.begin(),v.end()) #define mmax(a,b) a=max(a,b) #define mmin(a,b) a=min(a,b) #define mkp make_pair #define pin pair<int,int> #define V vector long long p = 1000000007; vel rui(19, 1); vel par; int ru(int a,int r) { if (r == 0) { return 1; } int ans = ru(a, r / 2); ans *= ans; ans %= p; if (r % 2 == 1) { ans *= a; ans %= p; } return ans; } int inv(int a) { return ru(a, p - 2); } int dig(int n) { for (int i = 0; i < 18; i++) { if (rui[i] <= n and n < rui[i + 1]) { return i+1; } } } int ret1(int diff, int dg) { if (diff == 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans1 = ret1(hl,dg); ans1 *= (ru(ru(10, dg),hl) + 1); ans1 %= p; if (diff % 2 == 1) { ans1 += ru(ru(10, dg),(diff - 1)); } return ans1 % p; } int ret2(int diff, int dg) { if (diff <= 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans2 = ret2(hl, dg); ans2 *= (ru(ru(10, dg),hl) + 1); ans2 %= p; ans2 += ret1(hl, dg)*hl; ans2 %= p; if (diff % 2 == 1) { ans2 += ret1(diff, dg); } return ans2 % p; } signed main() { int a,b,c;cin >> a>>b>>c; vel v={a,b,c}; sor(v); if(v=={5,5,7}){cout << "YES"<<endl;} else{cout <<"NO"<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:65:7: error: expected primary-expression before '{' token 65 | if(v=={5,5,7}){cout << "YES"<<endl;} | ^ a.cc:65:7: error: expected ')' before '{' token 65 | if(v=={5,5,7}){cout << "YES"<<endl;} | ~ ^ | ) a.cc: In function 'long long int dig(long long int)': a.cc:37:1: warning: control reaches end of non-void function [-Wreturn-type] 37 | } | ^
s420623497
p04043
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> using namespace std; #define vel vector<long long> #define vvel vector<vel> #define int long long #define rep(i,n) for(long long i=0;i<n;i++) #define rp(i,n) for(long long i=1;i<n;i++) #define sor(v) sort(v.begin(),v.end()) #define mmax(a,b) a=max(a,b) #define mmin(a,b) a=min(a,b) #define mkp make_pair #define pin pair<int,int> #define V vector long long p = 1000000007; vel rui(19, 1); vel par; int ru(int a,int r) { if (r == 0) { return 1; } int ans = ru(a, r / 2); ans *= ans; ans %= p; if (r % 2 == 1) { ans *= a; ans %= p; } return ans; } int inv(int a) { return ru(a, p - 2); } int dig(int n) { for (int i = 0; i < 18; i++) { if (rui[i] <= n and n < rui[i + 1]) { return i+1; } } } int ret1(int diff, int dg) { if (diff == 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans1 = ret1(hl,dg); ans1 *= (ru(ru(10, dg),hl) + 1); ans1 %= p; if (diff % 2 == 1) { ans1 += ru(ru(10, dg),(diff - 1)); } return ans1 % p; } int ret2(int diff, int dg) { if (diff <= 0) { return 0; } else if (diff == 1) { return 1; } int hl = diff / 2; int ans2 = ret2(hl, dg); ans2 *= (ru(ru(10, dg),hl) + 1); ans2 %= p; ans2 += ret1(hl, dg)*hl; ans2 %= p; if (diff % 2 == 1) { ans2 += ret1(diff, dg); } return ans2 % p; } signed main() { int a,b,c;cin >> a>>b>>c; vel v={a,b,c}; sor(v); if(v=={5,5,7}){cout << YES<<endl;} else{cout << NO<<else;} return 0; }
a.cc: In function 'int main()': a.cc:65:7: error: expected primary-expression before '{' token 65 | if(v=={5,5,7}){cout << YES<<endl;} | ^ a.cc:65:7: error: expected ')' before '{' token 65 | if(v=={5,5,7}){cout << YES<<endl;} | ~ ^ | ) a.cc:65:24: error: 'YES' was not declared in this scope 65 | if(v=={5,5,7}){cout << YES<<endl;} | ^~~ a.cc:66:14: error: 'NO' was not declared in this scope 66 | else{cout << NO<<else;} | ^~ a.cc:66:18: error: expected primary-expression before 'else' 66 | else{cout << NO<<else;} | ^~~~ a.cc: In function 'long long int dig(long long int)': a.cc:37:1: warning: control reaches end of non-void function [-Wreturn-type] 37 | } | ^
s041225345
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; int anko = max({a,b,c}); int maojini == a+b+c; if(maojini == 17 && anko == 7 && (maojini-anko)/2==5 ) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: expected initializer before '==' token 8 | int maojini == a+b+c; | ^~ a.cc:9:6: error: 'maojini' was not declared in this scope; did you mean 'main'? 9 | if(maojini == 17 && anko == 7 && (maojini-anko)/2==5 ) cout << "YES"; | ^~~~~~~ | main
s876963255
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int d = 0; vector<int> s(3); for (int i = 0; i < 3; i++) { cin >> s[i]; sort(s.begin(), s.end()); } } if (s[0]==5 & s[1]==5 & s[2]==7) { d=1; if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:11:1: error: expected unqualified-id before 'if' 11 | if (s[0]==5 & s[1]==5 & s[2]==7) { | ^~
s428049999
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> s(3); for (int i = 0; i < 3; i++) { cin >> s[i]; sort(s.begin(), s.end()); } } int d = 0 if (s[0]==5 & s[1]==5 & s[2]==7) { d=1; if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:11:1: error: expected ',' or ';' before 'if' 11 | if (s[0]==5 & s[1]==5 & s[2]==7) { | ^~
s246179294
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> s(3); for (int i = 0; i < 3; i++) { cin >> s[i]; sort(s.begin(), s.end()); } } int d = 0; if (s[0]==5 & s[1]==5 & s[2]==7) { d=1; if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:11:1: error: expected unqualified-id before 'if' 11 | if (s[0]==5 & s[1]==5 & s[2]==7) { | ^~
s061589383
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> s(3); for (int i = 0; i < 3; i++) { cin >> s[i]; sort(s.begin(), s.end()); } } int d=0; if (s[0]==5 & s[1]==5 & s[2]==7) { d=1; if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc:11:3: error: expected unqualified-id before 'if' 11 | if (s[0]==5 & s[1]==5 & s[2]==7) { | ^~
s656087636
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> s(3); for (int i = 0; i < 3; i++) { cin >> s[i]; sort(s.begin(), s.end()); } d=0 if (s[0]==5 & s[1]==5 & s[2]==7) { d=1; if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:9:3: error: 'd' was not declared in this scope 9 | d=0 | ^ a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s350096005
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> s(3); for (int i = 0; i < 3; i++) { cin >> s[i]; sort(s.begin(), v.end()); } d=0 if (s[0]==5 & s[1]==5 & s[2]==7) { d=1; if (d==1) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:19: error: 'v' was not declared in this scope 7 | sort(s.begin(), v.end()); | ^ a.cc:9:3: error: 'd' was not declared in this scope 9 | d=0 | ^ a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^