submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s538140889
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if(a==b&&b==c){cout<<1<<endl;} else if!(a==b||b==C||c==a){cout<<3<<endl;} else {cout<<2<<endl;} } //表
a.cc: In function 'int main()': a.cc:9:8: error: expected '(' before '!' token 9 | else if!(a==b||b==C||c==a){cout<<3<<endl;} | ^ | ( a.cc:10:1: error: 'else' without a previous 'if' 10 | else {cout<<2<<endl;} | ^~~~
s212643055
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if(a=b&&b=c){cout<<1<<endl;} }
a.cc: In function 'int main()': a.cc:8:7: error: lvalue required as left operand of assignment 8 | if(a=b&&b=c){cout<<1<<endl;} | ~^~~
s872554503
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if(a=b&&b=c){cout<<1<<endl;} if!(a=b||b=c||c=a){cout<<3<<endl;} cout << 2<<endl; }
a.cc: In function 'int main()': a.cc:8:7: error: lvalue required as left operand of assignment 8 | if(a=b&&b=c){cout<<1<<endl;} | ~^~~ a.cc:9:3: error: expected '(' before '!' token 9 | if!(a=b||b=c||c=a){cout<<3<<endl;} | ^ | (
s379054820
p03962
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1e16; const ll mod = 1000000007; #define rep(i, n) for (int i = 0; i < (ll)(n); i++) int main() { vector <ll> v(3); rep(i, 3) cin >> v.at(i); sort(v.begin(), v.end()) ll res = 1; rep(i, 2) { if (v.at(i) != v.at(i+1)) res++; } cout << res << endl; }
a.cc: In function 'int main()': a.cc:11:29: error: expected ';' before 'll' 11 | sort(v.begin(), v.end()) | ^ | ; 12 | ll res = 1; | ~~ a.cc:14:35: error: 'res' was not declared in this scope; did you mean 'rep'? 14 | if (v.at(i) != v.at(i+1)) res++; | ^~~ | rep a.cc:16:13: error: 'res' was not declared in this scope; did you mean 'rep'? 16 | cout << res << endl; | ^~~ | rep
s935335362
p03962
C++
#include <iostream> #include <set> using namespace std; int main () { set<int> s; for (int i=0;i<3;i++) { int a; cin >> a; s.insert(a); } cout << s.count() << endl; }
a.cc: In function 'int main()': a.cc:13:18: error: no matching function for call to 'std::set<int>::count()' 13 | cout << s.count() << endl; | ~~~~~~~^~ In file included from /usr/include/c++/14/set:63, from a.cc:2: /usr/include/c++/14/bits/stl_set.h:756:9: note: candidate: 'template<class _Kt> decltype (((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::set<_Key, _Compare, _Alloc>::count(const _Kt&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]' 756 | count(const _Kt& __x) const | ^~~~~ /usr/include/c++/14/bits/stl_set.h:756:9: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/stl_set.h:750:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; size_type = long unsigned int; key_type = int]' 750 | count(const key_type& __x) const | ^~~~~ /usr/include/c++/14/bits/stl_set.h:750:7: note: candidate expects 1 argument, 0 provided
s000084028
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin << a << b << c; if(a != b && b != c){ cout << 3 << endl; } else if(a == b && b == c){ cout << 1 << endl; } else{ cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin << a << b << c; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:9: note: candidate: 'operator<<(int, int)' (built-in) 6 | cin << a << b << c; | ~~~~^~~~ a.cc:6:9: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:6:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | cin << a << b << c; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << a << b << c; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Trai
s601790294
p03962
C++
/* Author : tarang */ #include<bits/stdc++.h> #define ll long long #define fastio ios_base::sync_with(false); cin.tie(0);cout.tie(0); const int MOD = 1000000007; #define PI = acos(-1) using namespace std ; int main(){ set<int s ; int a , b , c; cin >> a >> b >> c ; s.insert(a); s.insert(b); s.insert(c); cout << s.size() << endl; }
a.cc: In function 'int main()': a.cc:11:17: error: template argument 1 is invalid 11 | set<int s ; | ^ a.cc:11:17: error: template argument 2 is invalid a.cc:11:17: error: template argument 3 is invalid a.cc:14:4: error: 's' was not declared in this scope 14 | s.insert(a); | ^
s128268583
p03962
C
#includde<stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b){ if(b==c){ printf("1\n"); }else{ printf("2\n"); } }else{ if(a==c||b==c){ printf("2\n"); }else{ printf("3\n"); } } return 0; }
main.c:1:2: error: invalid preprocessing directive #includde; did you mean #include? 1 | #includde<stdio.h> | ^~~~~~~~ | include main.c: In function 'main': main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 5 | scanf("%d%d%d",&a,&b,&c); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #includde<stdio.h> main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 5 | scanf("%d%d%d",&a,&b,&c); | ^~~~~ main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:9:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 9 | printf("1\n"); | ^~~~~~ main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:9:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 11 | printf("2\n"); | ^~~~~~ main.c:11:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:15:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 15 | printf("2\n"); | ^~~~~~ main.c:15:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:17:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 17 | printf("3\n"); | ^~~~~~ main.c:17:7: note: include '<stdio.h>' or provide a declaration of 'printf'
s605126851
p03962
C
#include<stdio.h> int main(){ int arr[3]; int i; for(i=0;i<3;i++){ scanf("%d ",&arr[i]); } int j,flag=1;count=1; for(i=1;i<3;i++){ for(j=0;j<i;j++){ if(arr[i]==arr[j]){ flag=0; break; } } if(flag==1) count++; } printf("%d\n",count); return 0; }
main.c: In function 'main': main.c:8:16: error: 'count' undeclared (first use in this function) 8 | int j,flag=1;count=1; | ^~~~~ main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
s930151811
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define rep2(i,a,n) for(int i=(a); i<(n); i++) #define all(vec) vec.begin(),vec.end() using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; int main() { int a, b, c; cin a >> b >> c; if (a == b && b == c) cout << 1 << endl; else if (a != b && b != c && a != c) cout << 3 << endl; else cout << 2 << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:19: error: expected ';' before 'a' 11 | int a, b, c; cin a >> b >> c; | ^~ | ;
s792273702
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[101]; for (int i=0 ; i<101 ;I++){ A[i]=0 ; } int a ,b , c ; cin >> a >> b >> c ; A[a] = 1; A[b] =1 ; A[c]=1; int count =0; for (int i=0 ; i<101 ;i++){ if ( A[i]==1){ count++; } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'I' was not declared in this scope 6 | for (int i=0 ; i<101 ;I++){ | ^
s255453383
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[101]; for (int i=0 ; i<101 ;I++){ A[i]=0 ; } int a ,b , c ; cin >> a >> b >> c ; A[a] = 1; A[b] =1 ; A[c]=1; int count =0; for (int i=0 ; i<101 ;i++){ if ( A[i]==1){ count++ } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'I' was not declared in this scope 6 | for (int i=0 ; i<101 ;I++){ | ^ a.cc:17:14: error: expected ';' before '}' token 17 | count++ | ^ | ; 18 | } | ~
s500262282
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[101]; for (int i=0 ; i<101 ;I++){ A[i]=0 ; } int a ,b , c ; cin >> a >> b >> c ; A[a] = 1; A[b] =1 ; A[c]=1; int count =0; for (int i=0 ; i<101 ;i++){ if ( A[i]==1){ count++ } cout << count << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'I' was not declared in this scope 6 | for (int i=0 ; i<101 ;I++){ | ^ a.cc:17:14: error: expected ';' before '}' token 17 | count++ | ^ | ; 18 | } | ~ a.cc:20:4: error: expected '}' at end of input 20 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s864673833
p03962
C
include <stdio.h> int main(void){ int a, b, c; scanf("%d %d %d",&a,&b,&c); if(a==b||a==c||b==c){ if(a==b&&b==c){ printf("1\n"); }else{ printf("2\n"); } }else{ printf("3\n"); } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s558207298
p03962
C
#include <stdio.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b && b==c) printf("1\n"); else if(a==b && b!=c || b==c a!=b)printf("2\n"); else printf("3\n"); return 0; }
main.c: In function 'main': main.c:8:37: error: expected ')' before 'a' 8 | else if(a==b && b!=c || b==c a!=b)printf("2\n"); | ~ ^~ | )
s818452040
p03962
C++
#include <cstdio> int main() { int a,b,c; scanf("%d %d %d", &a, &b, &c); if (a == b and a == c) { printf("3") } else if (a == b or a == c or b == c) { printf("2") } else { printf("1") } }
a.cc: In function 'int main()': a.cc:9:20: error: expected ';' before '}' token 9 | printf("3") | ^ | ; 10 | } | ~ a.cc:14:20: error: expected ';' before '}' token 14 | printf("2") | ^ | ; 15 | } | ~ a.cc:19:20: error: expected ';' before '}' token 19 | printf("1") | ^ | ; 20 | } | ~
s063561717
p03962
C++
#include <cstdio> int main() { int a,b,c; scanf("%d %d %d", &a, &b, &c); if (a == b and a == c) { printf("3") } else if (a == b or a == c or b == c) { printf("2") } }
a.cc: In function 'int main()': a.cc:9:20: error: expected ';' before '}' token 9 | printf("3") | ^ | ; 10 | } | ~ a.cc:14:20: error: expected ';' before '}' token 14 | printf("2") | ^ | ; 15 | } | ~
s168495383
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String[] in = sc.nextString().split(" "); List<Integer> list = new ArrayList<>(); for(String s : in){ int i = Integer.parseInt(s); if(!list.contains(i)) list.add(i); } System.out.println(list.length()); } }
Main.java:6: error: cannot find symbol String[] in = sc.nextString().split(" "); ^ symbol: method nextString() location: variable sc of type Scanner Main.java:13: error: cannot find symbol System.out.println(list.length()); ^ symbol: method length() location: variable list of type List<Integer> 2 errors
s342776713
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println(Arrays.stream(scanner.nextLine().split(" ")).collect(Collectors.toSet()).size()); } }
Main.java:6: error: cannot find symbol System.out.println(Arrays.stream(scanner.nextLine().split(" ")).collect(Collectors.toSet()).size()); ^ symbol: variable Collectors location: class Main 1 error
s715884471
p03962
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // 標準入力から整数a,b,cの数値を取得 int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); // 3つの数値を比較し、色が全てが同じ場合1を出力 if(a == b && a == c) { System.out.println(1); // 3つの数値を比較し、色が1つでも同じ場合2を出力 } else if(a == b || b == c || c == a) { System.out.println(2); // 3つの数値を比較し、すべて違う場合3を出力 } else { System.out.println(3); } }
Main.java:24: error: reached end of file while parsing } ^ 1 error
s274182753
p03962
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<set> #include<iomanip> #define rep(i, a, n) for(int i = a; i < n; i++) using namespace std; int main(){ int a[3], c = 3; cin >> a[0]; rep(i, 1, 2){ cin >> a[i]; if(a[i] == a[i - 1]){ c--; } } if(c == 3){ if(a[1] == a[2]){ cout << 2 << "\n"; } } else{ cout << c << "\n"; }
a.cc: In function 'int main()': a.cc:26:4: error: expected '}' at end of input 26 | } | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s449201019
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i) int main() { set<int> s; rep(i,3) { int a; cin >> a; s.insert(a); } cout << a.size() << endl; }
a.cc: In function 'int main()': a.cc:12:17: error: 'a' was not declared in this scope 12 | cout << a.size() << endl; | ^
s332574738
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i) int main() { set<int> s; rep(i,3) { int a; cin >> a; s.insert(a); } cout << s.seze() << endl; }
a.cc: In function 'int main()': a.cc:12:19: error: 'class std::set<int>' has no member named 'seze'; did you mean 'size'? 12 | cout << s.seze() << endl; | ^~~~ | size
s962789162
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i) int main() { set<int> s; rep(i,3) { int a; cin >> a; s.insert(a); } cout << a.seze() << endl; }
a.cc: In function 'int main()': a.cc:12:17: error: 'a' was not declared in this scope 12 | cout << a.seze() << endl; | ^
s913115644
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == b && a == c) { cout << 1 << endl; } else if (a == b || b == c || a == c) { cout << 2 << endl; } else { cout << 3 endl; } }
a.cc: In function 'int main()': a.cc:14:14: error: expected ';' before 'endl' 14 | cout << 3 endl; | ^~~~~ | ;
s691468714
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if ((a == b) && (b == c)) cout << 1; else if ((a == b) || (b == c)) || (a == c)) cout << 2; else cout << 3; return 0; }
a.cc:8:36: error: extended character   is not valid in an identifier 8 | else if ((a == b) || (b == c)) || (a == c)) | ^ a.cc: In function 'int main()': a.cc:8:34: error: expected primary-expression before '||' token 8 | else if ((a == b) || (b == c)) || (a == c)) | ^~ a.cc:8:36: error: '\U000000a0' was not declared in this scope 8 | else if ((a == b) || (b == c)) || (a == c)) | ^
s103573825
p03962
C++
#include <bits/stdc++.h> using namespace std; signed main(){ int a, b, c, ans = 0, i; scnaf("%d%d%d", &a, &b, &c); vector<int> count(101, 0); count[a] = 1; count[b] = 1; count[c] = 1; for(i = 0; i <= 100; i++){ ans += count[i]; } printf("%d\n", ans); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 6 | scnaf("%d%d%d", &a, &b, &c); | ^~~~~ | scanf
s562224132
p03962
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i=0;i<(n);i++) using namespace std; using ll = long long; using P = pair<int,int>; int main() { vector<int> a(3); rep(i,3)cin >> a.at(i); sort(a.begin(),a.end()); int ans=3; rep(i,n-1){ if(a.at(i)==a.at(i+1))ans--; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:13:11: error: 'n' was not declared in this scope 13 | rep(i,n-1){ | ^ a.cc:2:34: note: in definition of macro 'rep' 2 | #define rep(i,n) for (int i=0;i<(n);i++) | ^
s879354683
p03962
C++
#include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<string> #include<queue> #include<utility> #include<cmath> #include<sstream> #include<istream> #include<numeric> #include<stdlib.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int cnt = 0; if(a != b){ cnt++; } if(a != c){ cnt++; } if(b != c){ cnt++; } if(ans == 0){ cnt = 1; } cout << cnt << endl; return 0; }
a.cc: In function 'int main()': a.cc:33:6: error: 'ans' was not declared in this scope; did you mean 'abs'? 33 | if(ans == 0){ | ^~~ | abs
s575219192
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if (a=b && a!=c ){ cout<<2<<"\n"<<"Two different color: "<<a<<" , "<<c<<endl; } else if (b=c && a!=b ){ cout<<2<<"\n"<<"Two different colors: "<<a<<" , "<<b<<endl; } else if (b=c && a!=c ){ cout<<2<<"\n"<<"Two different colors: "<<a<<" , "<<c<<endl; } else if (a=c && a!=b ){ cout<<2<<"\n"<<"Two different colors: "<<a<<" , "<<b<<endl; } else if (a!=b && b!=c ){ cout<<3<<"\n"<<"three different colors: "<<a<<" , "<<b<<" , "<<c<<endl; } else { cout<<1<<"\n"<<"only one color: "<<a<<endl; } return 0; } return 0; }
a.cc:41:5: error: expected unqualified-id before 'return' 41 | return 0; | ^~~~~~ a.cc:42:1: error: expected declaration before '}' token 42 | } | ^
s554250697
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { vector<int> a; for (int i = 0; i < N; i++) { cin >> a.at(i); } sort(a.begin(), a.end()); a.erase(unique(a.begin(), a.end()), a.end()); cout << a.size(); return 0; }
a.cc: In function 'int main()': a.cc:6:25: error: 'N' was not declared in this scope 6 | for (int i = 0; i < N; i++) { | ^
s485243980
p03962
C++
#inlcude<bits/stdc++.h> using namespace std; int main() { set<int> s; int n = 3,num; while(n-- && cin >> num) { s.insert(num); } cout << s.size() << endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? 1 | #inlcude<bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:3: error: 'set' was not declared in this scope 6 | set<int> s; | ^~~ a.cc:1:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' +++ |+#include <set> 1 | #inlcude<bits/stdc++.h> a.cc:6:7: error: expected primary-expression before 'int' 6 | set<int> s; | ^~~ a.cc:8:16: error: 'cin' was not declared in this scope 8 | while(n-- && cin >> num) { | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #inlcude<bits/stdc++.h> a.cc:9:5: error: 's' was not declared in this scope 9 | s.insert(num); | ^ a.cc:11:3: error: 'cout' was not declared in this scope 11 | cout << s.size() << endl; | ^~~~ a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:11: error: 's' was not declared in this scope 11 | cout << s.size() << endl; | ^ a.cc:11:23: error: 'endl' was not declared in this scope 11 | cout << s.size() << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #inlcude<bits/stdc++.h>
s878696131
p03962
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if((a==b)&&(b==c))printf("1\n"); else if(((a==b)&&(b==c))||((a==c)&&(c!=b))||((b==c)&&(c!=a))i)printf("2\n"); else printf("3\n"); return 0; }
main.c: In function 'main': main.c:10:62: error: expected ')' before 'i' 10 | else if(((a==b)&&(b==c))||((a==c)&&(c!=b))||((b==c)&&(c!=a))i)printf("2\n"); | ~ ^ | )
s844985552
p03962
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if((a==b)&&(b==c))printf("1\n"); else if(((a==b)&&(b!=c))||((a!=b)&&(a==c))||((a!=c)&&(b==c))i)printf("2\n"); else printf("3\n"); return 0; }
main.c: In function 'main': main.c:10:62: error: expected ')' before 'i' 10 | else if(((a==b)&&(b!=c))||((a!=b)&&(a==c))||((a!=c)&&(b==c))i)printf("2\n"); | ~ ^ | )
s697359269
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int a[3],count=1; for(int i = 0;i<3;i++) { cin>>a[i]; } for(int i=0;i<2;i++) { if(a[i]!=a[i+1]) { count++; } } cout<<count<<endl; return 0;
a.cc: In function 'int main()': a.cc:20:12: error: expected '}' at end of input 20 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s429471233
p03962
C++
#include<bits//stdc++.h>> using namespace std; int main(){ set<int> st;int n; for(int i = 0; i <3;i++){ cin >> n;st.insert(n); }cout <<st.dize()<<endl; }
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<bits//stdc++.h>> | ^ a.cc: In function 'int main()': a.cc:7:14: error: 'class std::set<int>' has no member named 'dize'; did you mean 'size'? 7 | }cout <<st.dize()<<endl; | ^~~~ | size
s667194129
p03962
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s.insert(c); cout<<s.size(); }
a.cc: In function 'int main()': a.cc:7:3: error: 'set' was not declared in this scope 7 | set<int> s; | ^~~ a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 1 | #include<iostream> +++ |+#include <set> 2 | using namespace std; a.cc:7:7: error: expected primary-expression before 'int' 7 | set<int> s; | ^~~ a.cc:8:3: error: 's' was not declared in this scope 8 | s.insert(a); | ^
s479038274
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int a,b,d; std::cin >> a>>b>>c; if (a==b || b==c || a==c){ cout << "2" << endl; } else if (a==b==c) { /* code */cout << "2" << endl; } else{ cout << "3" << endl; } return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:6:21: error: 'c' was not declared in this scope 6 | std::cin >> a>>b>>c; | ^
s397810040
p03962
C
#include<stdio.h> int main(void) { int a,b,c; scanf("%d%d%d"&a,&b,&c); if((a==b)&&(a==c)) printf("1\n"); if((a==b)&&(a!=c)) printf("2\n"); if((a!=b)&&(a==c)) printf("2\n"); if((a!=b)&&(a!=c)) printf("3\n"); return 0; }
main.c: In function 'main': main.c:6:20: error: invalid operands to binary & (have 'char *' and 'int') 6 | scanf("%d%d%d"&a,&b,&c); | ~~~~~~~~^ | | | char *
s555201681
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(); // 整数の入力 int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); // 条件分岐と出力 if (a==b && a==c) { System.out.println(1); } else if (a==b) { System.out.println(2); } else if (b==c) { System.out.println(2); } else { System.out.println(3); } } }
Main.java:4: error: no suitable constructor found for Scanner(no arguments) Scanner sc = new Scanner(); ^ constructor Scanner.Scanner(Readable,Pattern) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Readable) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(InputStream) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(InputStream,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(InputStream,Charset) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File,Charset) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(File,CharsetDecoder) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Path) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Path,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Path,Charset) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(ReadableByteChannel) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable (actual and formal argument lists differ in length) 1 error
s559052630
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ set <int> S; int a, b, c; cin >> S.insert(a); cin >> S.insert(b); cin >> S.insert(c); cout << S.size() << endl; }
a.cc: In function 'int main()': a.cc:7:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::pair<std::_Rb_tree_const_iterator<int>, bool>') 7 | cin >> S.insert(a); | ~~~ ^~ ~~~~~~~~~~~ | | | | | std::pair<std::_Rb_tree_const_iterator<int>, bool> | 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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::pair<std::_Rb_tree_const_iterator<int>, bool>' 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, _
s481091497
p03962
C++
#include <iostream> #include <string> using namespace std; int main{ int a , b , c; cin a >> b >> c; if(a == b == c){ cout << 1 << end1; else if(a == b || a == c){ cout << 2 << end1; else{ count << 3 << end1; } } //3 1 4 //3 3 33
a.cc:6:5: error: cannot declare '::main' to be a global variable 6 | int main{ | ^~~~ a.cc:7:9: error: expected primary-expression before 'int' 7 | int a , b , c; | ^~~ a.cc:7:9: error: expected '}' before 'int' a.cc:6:9: note: to match this '{' 6 | int main{ | ^ a.cc:8:3: error: 'cin' does not name a type 8 | cin a >> b >> c; | ^~~ a.cc:9:3: error: expected unqualified-id before 'if' 9 | if(a == b == c){ | ^~
s968249362
p03962
C
#include<stdio.h> int main(void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a = b = c)printf("1"); if(a =! b = c)printf("2"); if(a =! b =! c)printf("3"); return 0; }
main.c: In function 'main': main.c:8:13: error: lvalue required as left operand of assignment 8 | if(a =! b = c)printf("2"); | ^ main.c:9:13: error: lvalue required as left operand of assignment 9 | if(a =! b =! c)printf("3"); | ^
s531365022
p03962
C++
#include <bits/std++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a!=b && b!=c && a!=c){ cout << 3 << endl; } else if((a==b && b!=c) || (b==c && b!=a) || (a==c && b!=c)){ cout << 2 << endl; } else{ cout << 1 << endl; } }
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s560956208
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if ( a == b == c ){ cout << 1 << endl; } else if ( (a == b && a != c) || (a == c && a != b) || (b == c && b != a) ){ cout << 2 << endl; } else if { cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:21:12: error: expected '(' before '{' token 21 | else if { | ^ | (
s378730757
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == b && B == c) { cout << 1 << endl; } else if (a != b && b != c && a != c) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:8:17: error: 'B' was not declared in this scope 8 | if (a == b && B == c) { | ^
s375943594
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if ( a = b = c ){ cout << 1 << endl; } else if ( a = b != c || a = c != b || b = c != a ){ cout << 2 << endl; } else { cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:15:39: error: lvalue required as left operand of assignment 15 | else if ( a = b != c || a = c != b || b = c != a ){ | ~~~~~~~^~~~
s333250555
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if ( a != b != c ){ cout << 1 << endl; } else if ( a = b != c || a = c != b || b = c != a ){ cout << 2 << endl; } else { cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:15:39: error: lvalue required as left operand of assignment 15 | else if ( a = b != c || a = c != b || b = c != a ){ | ~~~~~~~^~~~
s236965360
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if ( a != b != c ){ cout << 1 << endl; } else if ( a = b != c || a =c != b || b = c != a ){ cout << 2 << endl; } else { cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:15:38: error: lvalue required as left operand of assignment 15 | else if ( a = b != c || a =c != b || b = c != a ){ | ~~~~~~~^~~~
s241891182
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); } if(a==b && b==c) { System.out.println(1); } else if(a==b || b==c || c==a) { System.out.println(2); } else { System.out.println(3); } }
Main.java:11: error: illegal start of type if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:13: error: illegal start of type } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:15: error: illegal start of type } else { ^ 13 errors
s537782048
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); } if(a==b && b==c) { System.out.println(1); } else if(a==b || b==c || c==a) { System.out.println(2); } else { System.out.println(3); } }
Main.java:5: error: ';' expected Scanner sc new Scanner(System.in); ^ Main.java:11: error: illegal start of type if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:13: error: illegal start of type } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:13: error: <identifier> expected } else if(a==b || b==c || c==a) { ^ Main.java:15: error: illegal start of type } else { ^ 14 errors
s275744829
p03962
C++
#include <iostream> #include <map> using namespace std; int main(){ map<int,num> s; int a; for(int i=0;i<3;i++){ cin>>a; s[a]=1; } cout<<s.size(); }
a.cc: In function 'int main()': a.cc:6:11: error: 'num' was not declared in this scope; did you mean 'enum'? 6 | map<int,num> s; | ^~~ | enum a.cc:6:14: error: template argument 2 is invalid 6 | map<int,num> s; | ^ a.cc:6:14: error: template argument 4 is invalid a.cc:10:6: error: invalid types 'int[int]' for array subscript 10 | s[a]=1; | ^ a.cc:12:11: error: request for member 'size' in 's', which is of non-class type 'int' 12 | cout<<s.size(); | ^~~~
s676344410
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a==b==c){ cout << 1 << endl; } else if(a==b||b==c||c==a){ cout << 2 << endl; } else if(a=!b&&b=!c&&c=!a){ cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:14:21: error: lvalue required as left operand of assignment 14 | else if(a=!b&&b=!c&&c=!a){ | ~~^~~
s231710536
p03962
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); }
main.c: In function 'main': main.c:15:3: error: expected declaration or statement at end of input 15 | } | ^
s410520999
p03962
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); }
main.c: In function 'main': main.c:15:3: error: expected declaration or statement at end of input 15 | } | ^
s421719959
p03962
C
/* AtCoder Problems in C #A - AtCoDeerくんとペンキ https://atcoder.jp/contests/abc046/tasks/abc046_a 提出コードの解答例 https://neguse-atama.hatenablog.com */ #include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); }
main.c: In function 'main': main.c:22:3: error: expected declaration or statement at end of input 22 | } | ^
s422345407
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == b == c) cout << 3 << endl; else if (a == b != c || a == c != b || b == C != a) cout << 2 << endl; else cout << 1 << endl; }
a.cc: In function 'int main()': a.cc:8:47: error: 'C' was not declared in this scope 8 | else if (a == b != c || a == c != b || b == C != a) cout << 2 << endl; | ^
s497896957
p03962
Java
import java.util.Scanner; import java.util.HashSet; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> colors = new HashSet<Integer>(); colors.add(sc.nextInt()); colors.add(sc.nextInt()); colors.add(sc.nextInt()); sc.close(); int result = colors.size(); System.out.println(result); }
Main.java:17: error: reached end of file while parsing } ^ 1 error
s337900390
p03962
Java
import java.util.Scanner; import java.util.HashSet; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> colors = new HashSet<Integer>(); colors.add(sc.nextInt()); colors.add(sc.nextInt()); colors.add(sc.nextInt()); sc.close(); int result = colors.size(); System.out.println(result); }
Main.java:17: error: reached end of file while parsing } ^ 1 error
s935123552
p03962
Java
import java.util.Scanner; import java.util.HashSet; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> colors = new HashSet<Integer>(3); colors.add(sc.nextInt()); colors.add(sc.nextInt()); colors.add(sc.nextInt()); sc.close(); int result = colors.size(); System.out.println(result); }
Main.java:16: error: reached end of file while parsing } ^ 1 error
s609746360
p03962
Java
import java.util.Scanner; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); int res = rockpaper(sc); sc.close(); System.out.println(res); } public static int rockpaper(Scanner sc) { String tcdSequence = sc.next(); int tcdLength = tcdSequence.length(); char[] acdSequence = new char[tcdLength]; for (int i = 0; i < acdSequence.length; i++) { if (i % 2 == 0) { acdSequence[i] = 'g'; } else { acdSequence[i] = 'p'; } } int acdScore = 0; for (int k = 0; k < tcdSequence.length(); k++) { if ((tcdSequence.charAt(k) == 'g') && (acdSequence[k] == 'p')) { acdScore++; } else if ((tcdSequence.charAt(k) == 'p') && (acdSequence[k] == 'g')) { acdScore--; } return acdScore; } } }
Main.java:34: error: missing return statement } ^ 1 error
s334397099
p03962
C++
#include <iostream>d #include <map> #include <algorithm> #include <vector> #include <iomanip> #include <sstream> #include <cmath> #include <math.h> #include <string> using namespace std; int main() { int a[3] , b = 1; cin >> a[0] >> a[1] >> a[2]; sort( a , a + 3 ); if ( a[0] != a[1] ) b++; if ( a[1] != a[2] ) b++; cout << b; }
a.cc:1:10: fatal error: iostream>: No such file or directory 1 | #include <iostream>d | ^~~~~~~~~~~ compilation terminated.
s286068543
p03962
C++
#include <iostream>d #include <map> #include <algorithm> #include <vector> #include <iomanip> #include <sstream> #include <cmath> #include <math.h> #include <string> using namespace std; int main() { int a[3] , b = 1; cin >> a[0] >> a[1] >> a[2]; sort( a , a + 3 ); if ( a[0] != a[1] ) b++; if ( a[1] != a[2] ) b++; cout << b; }
a.cc:1:10: fatal error: iostream>: No such file or directory 1 | #include <iostream>d | ^~~~~~~~~~~ compilation terminated.
s262627626
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; typedef vector<ll> vel; typedef vector<str> ves; #define REP(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) #define rep(i, b) REP(i, 0, b) int main() { ll a, b, c; cin >> a >> b >> c; ll count = 0; if (a != b) { count ++; } if (b != c) { count ++; } if (c != a) { count ++ } cout << count << endl; }
a.cc: In function 'int main()': a.cc:21:17: error: expected ';' before '}' token 21 | count ++ | ^ | ; 22 | } | ~
s209550241
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (int i = 0; i < (int)(n); i++) int main( void ) { int a,b,c; cin >> a >> b >> c; int ans = 3; if ( a == b && b == c) else { if ( a == b) ans--; if ( a == c) ans--; if ( c == b) ans--; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:15:5: error: expected primary-expression before 'else' 15 | else | ^~~~
s964761569
p03962
C++
#include <bits/stdc++.h> using ll = long long; #define FOR(i, k, n) for(ll i = (k); i < (n); i++) #define FORe(i, k, n) for(ll i = (k); i <= (n); i++) #define FORr(i, k, n) for(ll i = (k)-1; i > (n); i--) #define FORre(i, k, n) for(ll i = (k)-1; i >= (n); i--) #define REP(i, n) FOR(i, 0, n) #define REPr(i, n) FORre(i, n, 0) #define ALL(x) (x).begin(), (x).end() #define ALLr(x) (x).rbegin(), (x).rend() #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) using namespace std; const int INF = 1001001001; int main(void){ int a, b, c; cin >> a >> b >> c; map<int, int> mp; mp[a]++; mp[b]++; mp[c]++; cout << mp.size(); << endl; return 0; }
a.cc: In function 'int main()': a.cc:24:22: error: expected primary-expression before '<<' token 24 | cout << mp.size(); << endl; | ^~
s776453953
p03962
C++
#include <iostream> using namespace std; int main() { int a,b,c,d; cin >> a >> b >> c; if (a!=b) d++; if (a!=c) d++; if (b!=c) d++; cout << d }
a.cc: In function 'int main()': a.cc:10:12: error: expected ';' before '}' token 10 | cout << d | ^ | ; 11 | } | ~
s787740671
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ cin >> a >> b >> c; if (a=b && a!= c && b!=c ){ cout<<"2"<<endl; } else if (a=c && a!= b && c!=b ){ cout<<"2"<<endl; } else if (b=c && b!= a && c!=a ){ cout<<"2"<<endl; } else if (a!=b && b!= c && a!=c ){ cout<<"3"<<endl; } else if (a = b =c ){ cout<<"1"<<endl; } }
a.cc: In function 'int main()': a.cc:4:10: error: 'a' was not declared in this scope 4 | cin >> a >> b >> c; | ^ a.cc:4:15: error: 'b' was not declared in this scope 4 | cin >> a >> b >> c; | ^ a.cc:4:20: error: 'c' was not declared in this scope 4 | cin >> a >> b >> c; | ^
s839019934
p03962
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int an[3];rep(i,3)cin>>an[i]; an.sort(an, an+3); int c=3; if (an[0]==an[1])c--; if (an[1]==an[2])c--; cout << c; }
a.cc: In function 'int main()': a.cc:8:6: error: request for member 'sort' in 'an', which is of non-class type 'int [3]' 8 | an.sort(an, an+3); | ^~~~
s029820033
p03962
Java
class Main { public static void main(String[] args)throws Exception{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); int a = Integer.parseInt(br.readLine()); int b = Integer.parseInt(br.readLine()); int c = Integer.parseInt(br.readLine()); if((a < b)&&(b < c)){ System.out.print(3); } else if((a == b)&&(b == c)) { System.out.print(1); } else{ System.out.print(2); } } }
Main.java:3: error: cannot find symbol InputStreamReader isr = new InputStreamReader(System.in); ^ symbol: class InputStreamReader location: class Main Main.java:3: error: cannot find symbol InputStreamReader isr = new InputStreamReader(System.in); ^ symbol: class InputStreamReader location: class Main Main.java:4: error: cannot find symbol BufferedReader br = new BufferedReader(isr); ^ symbol: class BufferedReader location: class Main Main.java:4: error: cannot find symbol BufferedReader br = new BufferedReader(isr); ^ symbol: class BufferedReader location: class Main 4 errors
s321961568
p03962
C
#include<Stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); } printf("\n"); return 0; }
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s406933198
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int a,b,c; cin >> a >> b >> c; if(a==b&&b=c){ cout << 1 << endl; } else if(a!=b&&b!=c&&c!=a){ cout << 3 << endl; }else{ cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:8:10: error: lvalue required as left operand of assignment 8 | if(a==b&&b=c){ | ~~~~^~~
s665513423
p03962
C++
#include<bits/stdc++.h> #deifne fast ios::sync_with_stdio(false), cin.tie(0); #define ll long long #define endl '\n' using namespace std; main() { fast; int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s.insert(c); cout<<s.size()<<endl; }
a.cc:2:2: error: invalid preprocessing directive #deifne; did you mean #define? 2 | #deifne fast ios::sync_with_stdio(false), cin.tie(0); | ^~~~~~ | define a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 8 | main() | ^~~~ a.cc: In function 'int main()': a.cc:10:3: error: 'fast' was not declared in this scope 10 | fast; | ^~~~
s819133758
p03962
C++
l=list(map(int,input().split())) tmp = [] count=0 for i in l: if not i in tmp: count+=1 tmp.append(i) print(count)
a.cc:1:1: error: 'l' does not name a type 1 | l=list(map(int,input().split())) | ^
s229881865
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int i,a,b,c,count=0; cin>>a>>b>>c; if(a!=b) count++; if(b!=c) count++; if(c!=a) count++; if(a==b && b==c) count=1 cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:16: error: expected ';' before 'cout' 14 | count=1 | ^ | ; 15 | cout<<count<<endl; | ~~~~
s631543865
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b&&b==c) cout<<"1"<<endl; else if(a==b||b==c||c==a) cout<<"2"<<endl; else cout<<"3"<,endl; }
a.cc: In function 'int main()': a.cc:9:18: error: expected primary-expression before ',' token 9 | else cout<<"3"<,endl; | ^
s078144972
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; ll lastT = 1, lastA = 1; for (int i = 0; i < n; i++) { ll t, a; cin >> t >> a; ll factor=max(a/x,b/y); while(true){ if(factor * t >= lastT && percent * a >= lastA) break; factor++; } lastT = t * factor; lastA = a * factor; } //cout << "ans: " << lastT << " " << lastA << '\n'; cout << (lastT + lastA) << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:33: error: 'x' was not declared in this scope 19 | ll factor=max(a/x,b/y); | ^ a.cc:19:35: error: 'b' was not declared in this scope 19 | ll factor=max(a/x,b/y); | ^ a.cc:19:37: error: 'y' was not declared in this scope 19 | ll factor=max(a/x,b/y); | ^ a.cc:21:39: error: 'percent' was not declared in this scope 21 | if(factor * t >= lastT && percent * a >= lastA) | ^~~~~~~
s488082835
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a==b==c){ cout<<"1"<<endl; } else if(a==b||b==c||c==a){ cout<<"2"<<endl; } else{ cout<<"3"<<endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator==' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if(a==b==c){ | ~~~~^~~ | | | | bool std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and 'bool' 7 | if(a==b==c){ | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::pair<_T1, _T2>' and 'bool' 7 | if(a==b==c){ | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'bool' 7 | if(a==b==c){ | ^ /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:7:12: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'bool' 7 | if(a==b==c){ | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::fpos<_StateT>' and 'bool' 7 | if(a==b==c){ | ^ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::allocator<_CharT>' and 'bool' 7 | if(a==b==c){ | ^ 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:7:12: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'bool' 7 | if(a==b==c){ | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'bool' 7 | if(a==b==c){ | ^ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Tra
s005921725
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int(i) = 0;(i) < (n); (i)++) typedef long long ll; int main(){ int a,b,c,ans = 3; cin >> a >> b >> c; if(a == b == c){ cout << 1 << endl; }else if(a == b != c||a != c == b||a != b == c){ cout << 2 << endl; }else{ cout << 3 << endl; }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:6:12: note: to match this '{' 6 | int main(){ | ^
s363972539
p03962
Java
import java.util.HashMap; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); HashMap<Integer, Integer> hmap = new HashMap<Integer, Integer>(); hmap.put(sc.nextInt(), 1); hmap.put(sc.nextInt(), 1); hmap.put(sc.nextInt(), 1); System.out.println(hmap.size()); } }
Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s945665165
p03962
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if (a == b == c) { System.out.println(1); } else if (a == b || b == c || a == c) { System.out.println(2); } else { System.out.println(3); } } }
Main.java:10: error: incomparable types: boolean and int if (a == b == c) { ^ 1 error
s986333551
p03962
C++
using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if( (a == b) && (a == c)) cout << 1; else if((a == b) || (b == c)) cout << 2; else cout << 3; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not declared in this scope 8 | cin >> a >> b >> c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout << 1; | ^~~~ a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout << 2; | ^~~~ a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:5: error: 'cout' was not declared in this scope 14 | cout << 3; | ^~~~ a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s533040873
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s,insert(c); cout<<s.size(); return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'insert' was not declared in this scope; did you mean 'assert'? 11 | s,insert(c); | ^~~~~~ | assert
s883199263
p03962
C++
#include<bits.stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s,insert(c); cout<<s.size(); return 0; }
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory 1 | #include<bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s800154176
p03962
C++
#include <iostream> #include <vector> #include <map> #include <cmath> #include <algorithm> #define endl "\n" using namespace std; int main() { map <int, int> mp; cin >> a >> b >> c; mp[a] ++; mp[b] ++; mp[c] ++; cout << mp.size(); }
a.cc: In function 'int main()': a.cc:12:12: error: 'a' was not declared in this scope 12 | cin >> a >> b >> c; | ^ a.cc:12:17: error: 'b' was not declared in this scope 12 | cin >> a >> b >> c; | ^ a.cc:12:22: error: 'c' was not declared in this scope 12 | cin >> a >> b >> c; | ^
s163681347
p03962
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a, b, c; cin >> a >> b >> c; if(a == b || b == c || a == c){ cout << 2 << endl; } else if(a == b == c){ cout << 1 << endl; } else(a != b != c){ cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before '{' token 14 | else(a != b != c){ | ^ | ;
s095287775
p03962
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a, b, c; cin a >> b >> c; if(a == b || b == c || a == c){ cout << 2 << endl; } else if(a == b == c){ cout << 3 << endl; } else { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'a' 6 | cin a >> b >> c; | ^~ | ;
s638749016
p03962
C++
#include<bita/stdc++.h> using namespace std; int main (){ int a, b, c; cin a >> b >> c; if(a == b || b == c || a == c){ cout << 2 << endl; } else if(a == b == c){ cout << 3 << endl; } else { cout << 1 << endl; } }
a.cc:1:9: fatal error: bita/stdc++.h: No such file or directory 1 | #include<bita/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s223498542
p03962
C
#include <iostream> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; if ( (a==c && a != b ) || (a==b && a != c ) ) cout << "2"; else if ( a == b && b == c ) cout <<"1"; else //if (a!=b && a!=c && b != c ) cout <<"3"; return 0; }
main.c:1:11: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s761233144
p03962
C
#include <iostream> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; if ( (a==c && a != b ) || (a==b && a != c ) ) cout << "2"; else if ( a == b && b == c ) cout <<"1"; else //if (a!=b && a!=c && b != c ) cout <<"3"; return 0; }
main.c:2:17: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s299794929
p03962
C
int main() { int a , b , c ; cin >> a >> b >> c ; if ( (a==c && a != b ) || (a==b && a != c ) ) cout << "2"; else if ( a == b && b == c ) cout <<"1"; else //if (a!=b && a!=c && b != c ) cout <<"3"; return 0; }
main.c: In function 'main': main.c:4:4: error: 'cin' undeclared (first use in this function) 4 | cin >> a >> b >> c ; | ^~~ main.c:4:4: note: each undeclared identifier is reported only once for each function it appears in main.c:7:4: error: 'cout' undeclared (first use in this function) 7 | cout << "2"; | ^~~~
s870537972
p03962
C++
#include<iostram> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; if(a==b and b==c)cout<<1<<endl; else if(a!=b and b!=c and a!=c)cout<<3<<endl; else cout<<2<<endl; }
a.cc:1:9: fatal error: iostram: No such file or directory 1 | #include<iostram> | ^~~~~~~~~ compilation terminated.
s592311770
p03962
C++
using namespace std; int main() { int a , b , c; cin >> a >> b >> c; if (1<=a && a<=100 && 1<=b && b<=100 && 1<=c && c<=100 ) { if (a!=b && a!=c && b!=c) cout << 3; else if (a==b && a!=c && b!=c) cout << 2; else if (a!=b && a==c && b!=c) cout << 2; else if (a!=b && a!=c && b==c) cout << 2; else if (a==b && a==c && b==c) cout << 0; } return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> a >> b >> c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:10:9: error: 'cout' was not declared in this scope 10 | cout << 3; | ^~~~ a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout << 2; | ^~~~ a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:9: error: 'cout' was not declared in this scope 14 | cout << 2; | ^~~~ a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:16:9: error: 'cout' was not declared in this scope 16 | cout << 2; | ^~~~ a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:18:9: error: 'cout' was not declared in this scope 18 | cout << 0; | ^~~~ a.cc:18:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s742790265
p03962
C++
#include <iostream> using namespace std; int main() { int a , b , c; cin >> a >> b >> c; if (1<= a, b , c <=100) { if (a!=b && a!=c && b!=c) cout << 3; else if (a==b && a!=c && b!=c) cout << 2; else if (a!=b && a==c && b!=c) cout << 2; else if (a!=b && a!=c && b==c) cout << 2; else if (a==b && a==c && b!=c) cout << 2; else if (a!=b && a==c && b==c) cout << 2; else if (a==b && a!=c && b==c) cout << 2; else if (a==b && a==c && b==c) cout << 0; } else cout <<"incorrect";
a.cc: In function 'int main()': a.cc:29:28: error: expected '}' at end of input 29 | cout <<"incorrect"; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s302267149
p03962
C++
#include <iostream> using namespace std; int main() { int color_11 = (cin >> (color_11), color_11), color_2=(cin >> (color_2), color_2), color_3=(cin >> (color_3), color_3); if ((color_11 == color_2) || (color_11 == color_3) ){ cout << "1" ;} else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ cout << "2";} else{ cout << "3";} return 0 ; }
a.cc: In function 'int main()': a.cc:14:84: error: expected ';' before '{' token 14 | else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ | ^ | ; a.cc:16:5: error: expected primary-expression before 'else' 16 | else{ | ^~~~ a.cc:15:30: error: expected ')' before 'else' 15 | cout << "2";} | ^ | ) 16 | else{ | ~~~~ a.cc:14:13: note: to match this '(' 14 | else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ | ^
s942815140
p03962
C++
#include <iostream> using namespace std; int main() { int color_11 = (cin >> (color_11), color_11), color_2=(cin >> (color_2), color_2), color_3=(cin >> (color_3), color_3); if ((color_11 == color_2) || (color_11 == color_3) ){ cout << "1" ;} else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ cout << "2";} else{ cout << "3";} system("pause"); return 0 ; }
a.cc: In function 'int main()': a.cc:14:84: error: expected ';' before '{' token 14 | else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ | ^ | ; a.cc:16:5: error: expected primary-expression before 'else' 16 | else{ | ^~~~ a.cc:15:30: error: expected ')' before 'else' 15 | cout << "2";} | ^ | ) 16 | else{ | ~~~~ a.cc:14:13: note: to match this '(' 14 | else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ | ^
s695000600
p03962
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b&&b==c) printf("1"); else if(a==b||a==c||b==c) print("2"); else { printf("3"); } return 0; }
main.c: In function 'main': main.c:8:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 8 | print("2"); | ^~~~~ | printf
s713028912
p03962
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int count = 1; if (b != a) { count += 1; } if (c != a && c != b) { count += 1; } System.out.println(count); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s779353178
p03962
C
#include <stdio.h> int main(void) { int a, b, c, count; scanf("%d%d%d", &a, &b, &c); if((a == b && a == c) && b == c) { count = 1; } else if((a == b && a != c) { count = 2; } else if(a != b && a == c) { count = 2; } else { count = 3; } printf("%d", count); return 0; }
main.c: In function 'main': main.c:12:35: error: expected ')' before '{' token 12 | else if((a == b && a != c) { | ~ ^~ | ) main.c:23:1: error: expected expression before '}' token 23 | } | ^
s420262330
p03962
C
#include <stdio.h> int main(void) { int a, b, c, count; scanf("%d%d%d", &a, &b, &c); if((a == b && a == c) && b == c) { count = 1; } else if(a == b && a != c && ) { count = 2; } else if(a != b && a == c) { count = 2; } else if((a != b && a != c) && b != c) { count = 3; } printf("%d", count); return 0; }
main.c: In function 'main': main.c:12:37: error: expected expression before ')' token 12 | else if(a == b && a != c && ) { | ^