submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s815483803
p03962
C++
#include<iostream> using namespace std; int main(){ int a[3]; cin >> a: int ans = a.size(); for(int i=0; i<a.size(); i++){ for (int j=i+1; j<a.size(); j++){ if (a[i]==a[j]){ ans-- } } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [3]') 6 | cin >> a: | ~~~ ^~ ~ | | | | | int [3] | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*' 6 | cin >> a: | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(short int)((int*)(& a))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(short unsigned int)((int*)(& a))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(int)((int*)(& a))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(unsigned int)((int*)(& a))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'long int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(long int)((int*)(& a))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(long unsigned int)((int*)(& a))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'long long int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(long long int)((int*)(& a))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive] 6 | cin >> a: | ^ | | | int* a.cc:6:10: error: cannot bind rvalue '(long long unsigned int)((int*)(& a))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 6 | cin >> a: | ^ /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 'int [3]' 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 'int [3]' 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 'int [3]' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /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 'int [3]' 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 'int [3]' 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>
s824507290
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:8:21: error: lvalue required as left operand of assignment 8 | }else if(a==b||b=c||c=a){ | ~^~~
s259061450
p03962
C++
#include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <cassert> #include <functional> #include <string> #include <sstream> #include <cctype> using namespace std; int main(){ int A, B, C; cin >> A >> B >> C; int ans = 3; if(A == B && B == C) ans = 1; else if(A == B) ams = 2; else if(B == C) ans = 2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:20:19: error: 'ams' was not declared in this scope; did you mean 'ans'? 20 | else if(A == B) ams = 2; | ^~~ | ans
s168302520
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; int main() { //cout.precision(10); cin.tie(0); ios::sync_with_stdio(false); set<int> st; for(int i=0;i<3;i++) { int a; cin>>a; st.insert(a); } cout<<a.size()<<endl; return 0; }
a.cc: In function 'int main()': a.cc:39:9: error: 'a' was not declared in this scope 39 | cout<<a.size()<<endl; | ^
s727606101
p03962
C++
#include <iostream> #include <unordered_set> using namespace std; int main(){ int a, b, c; unorderded_set<int> s; cin >> a >> b >> c; s.insert(a); s.insert(b); s.insert(c); cout << s.size(); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'unorderded_set' was not declared in this scope 7 | unorderded_set<int> s; | ^~~~~~~~~~~~~~ a.cc:7:24: error: expected primary-expression before 'int' 7 | unorderded_set<int> s; | ^~~ a.cc:9:9: error: 's' was not declared in this scope 9 | s.insert(a); | ^
s917860587
p03962
C++
#include <iostream> #include <unordered_set> using namespace std; int main(){ int a, b, c; unorderded_set s; cin >> a >> b >> c; s.insert(a); s.insert(b); s.insert(c); cout << s.size(); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'unorderded_set' was not declared in this scope 7 | unorderded_set s; | ^~~~~~~~~~~~~~ a.cc:9:9: error: 's' was not declared in this scope 9 | s.insert(a); | ^
s603915208
p03962
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> //abs(); using namespace std; int main(void) { int x[10],cnt=1; cin >> x[0] >> x[1] >> x[2]; sort(x,x+3); for(i=0;i<3;i++){ if(x[i]!=x[0]) cnt++; } cout << cnt; return 0; }
a.cc: In function 'int main()': a.cc:15:9: error: 'i' was not declared in this scope 15 | for(i=0;i<3;i++){ | ^
s968150103
p03962
C++
#include<iostream> #include<stdio.h> #include<math.h> #include<algorithm> #include<vector> #include<cstdlib> #include<map> #include<fstream> #include<string> #include<sstream> #include<iomanip> #include<iostream> #include<numeric> #include<cctype> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int c = 1; if (a != b) c++; if (a != c && b != c) c++; cout << c << endl; }
a.cc: In function 'int main()': a.cc:20:13: error: redeclaration of 'int c' 20 | int c = 1; | ^ a.cc:18:19: note: 'int c' previously declared here 18 | int a, b, c; | ^
s479415988
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; int count=1; if(a==b) count ++; if(a==c) count++; cout << count << endl; ]
a.cc: In function 'int main()': a.cc:13:1: error: expected primary-expression before ']' token 13 | ] | ^ a.cc:13:2: error: expected '}' at end of input 13 | ] | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s682312508
p03962
C++
a,b,c=list(map(int, input().split())) X=[a,b,c] ans=len(list(set(X))) print(ans)
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c=list(map(int, input().split())) | ^
s617360396
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 || a==c || b==c){ cout<<2<<endl; } else{ cout<<3<<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==b&&b==c){ | ^~ a.cc:9:3: error: expected unqualified-id before 'else' 9 | else if(a==b || a==c || b==c){ | ^~~~ a.cc:12:3: error: expected unqualified-id before 'else' 12 | else{ | ^~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s306558304
p03962
C++
#include<bits/stdc++.h> using namespace std; main int{ int a,b,c; cin>>a>>b>>c; if (a==b&&b==c){ cout<<1<<endl; } else if(a==b || a==c || b==c){ cout<<2<<endl; } else{ cout<<3<<endl; } }
a.cc:3:1: error: 'main' does not name a type 3 | main int{ | ^~~~
s848158124
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 || a==c || b==c){ cout<<2<<endl; } else{ cout<<3<<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==b&&b==c){ | ^~ a.cc:9:3: error: expected unqualified-id before 'else' 9 | else if(a==b || a==c || b==c){ | ^~~~ a.cc:12:3: error: expected unqualified-id before 'else' 12 | else{ | ^~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s245126674
p03962
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!b&&b!c&&c!a){ cout<<3<<endl; }else if((a==b&&b!=c)||(a==c&&b!=c)||(c==b&&a!=c)){ cout<<2<<endl; }else{ cout<<1<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected ')' before '!' token 8 | if(a!b&&b!c&&c!a){ | ~ ^ | )
s525817689
p03962
C++
// Created by liszt on 2019/08/01. #include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d[101],cnt; cin>>a >>b >>c; d[a]=1; d[b]=1; d[c]=1; for(int i=0;i<n;i++){ if(d[i]>0)cnt++; } cout<<cnt<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: 'n' was not declared in this scope 12 | for(int i=0;i<n;i++){ | ^
s550139138
p03962
C++
#include "bits/stdc++.h" using namespace std; int main() { /*int a,b,h,s; cin >> a >> b >> h; s=(a+b)*h/2; cout << s << endl;*/ /*int N,A,B; cin >> N >> A; B=N*N-A; cout << B << endl;*/ /* int A,B,C,D,s1,s2; cin >> A >> B >> C >> D; s1=A*B; s2=C*D; if(s1>s2){ cout << s1 << endl; } else if(s1<s2){ cout << s2 << endl; } else{ cout << s1 << endl; }*/ int a,b,c,s; cin >> a >> b >> c; s=0; if(a!=b){ s=s+1 } if(a!=c){ s=s+1; } if(b!=c){ s=s+1; } cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:40:14: error: expected ';' before '}' token 40 | s=s+1 | ^ | ; 41 | } | ~
s540122138
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, i=3; cin >>a >>b >>c ; if(a==b) i--1; if(a==c) i--1; else if(b==c)i--1 cout << "i" << endl; }
a.cc: In function 'int main()': a.cc:8:15: error: expected ';' before numeric constant 8 | if(a==b) i--1; | ^ | ; a.cc:9:15: error: expected ';' before numeric constant 9 | if(a==c) i--1; | ^ | ; a.cc:10:19: error: expected ';' before numeric constant 10 | else if(b==c)i--1 | ^ | ;
s203822887
p03962
Java
import java.util.Scanner; public class AtCoDeerAndPaintCans{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); //台形の面積を求める int a = sc.nextInt(); //ペンキa int b = sc.nextInt(); //ペンキb int c = sc.nextInt(); //ペンキc if(a == b && b == c){ System.out.println(1); } else if(a != b && b != c && a != c){ System.out.println(3); } else{ System.out.println(2); } } }
Main.java:3: error: class AtCoDeerAndPaintCans is public, should be declared in a file named AtCoDeerAndPaintCans.java public class AtCoDeerAndPaintCans{ ^ 1 error
s387892505
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(); //ペンキa int b = sc.nextInt(); //ペンキb int c = sc.nextInt(); //ペンキc if(a == b && b == c){ System.out.println(1); } else if(a != b && b !=c && a != c){ System.out.println(3); } else{ System.out.println(2); } } }
Main.java:14: error: illegal character: '\u3000' else if(a != b && b !=c?&& a != c){ ^ Main.java:14: error: not a statement else if(a != b && b !=c?&& a != c){ ^ Main.java:14: error: ';' expected else if(a != b && b !=c?&& a != c){ ^ Main.java:17: error: 'else' without 'if' else{ ^ 4 errors
s567188682
p03962
C++
#include <bits/stdc++.h> #define mod 1000000007 using namespace std; typedef long long ll; int main(void){ set<int> a, b; cin >> b; a.insert(b); cin >> b; a.insert(b); cin >> b; a.insert(b); cout << a.size(); return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::set<int>') 12 | cin >> b; | ~~~ ^~ ~ | | | | | std::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<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::set<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:131:5: note: candidate: 'templ
s998953384
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a[3]; cin >> a[0] >> a[1] >> a[2]; int ans=0; sort(a.begin(),a.end()); if(a[0]==a[2]){ ans=1; }else if(a[0]==a[1]||a[1]==a[2]){ ans=2; }else{ ans=3; } return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: request for member 'begin' in 'a', which is of non-class type 'int [3]' 9 | sort(a.begin(),a.end()); | ^~~~~ a.cc:9:20: error: request for member 'end' in 'a', which is of non-class type 'int [3]' 9 | sort(a.begin(),a.end()); | ^~~
s699704243
p03962
C++
#include <bits/stdc++.h> #define ALL(v) v.begin(), v.end() #define RALL(a) (a).rbegin(), (a).rend() #define SORT(c) sort((c).begin(),(c).end()) #define dbug(x) cout<<#x<<"="<<x<<endl #define m0(x) memset(x,0,sizeof(x)) #define rep(i, n) for(int i = 0; i < n; i++) #define repr(i, n) for(int i = n; i >= 0; i--) #define reps(i, m, n) for(int i = m; i < n; i++) #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> pii; typedef long long ll; typedef pair<ll, ll> pl; template<typename T> istream& operator >> (istream& is, vector<T>& vec){ for(T& x: vec) is >> x; return is; } int man(){ int a,b,c; cin >> a>>b>>c; if(a==b){ if(a==c)return 1; return 2; } if(a==c||b==c) return 2; return 3; } int main{ std::cout << man() << '\n'; }
a.cc:39:5: error: cannot declare '::main' to be a global variable 39 | int main{ | ^~~~ a.cc:41:29: error: expected '}' before ';' token 41 | std::cout << man() << '\n'; | ^ a.cc:39:9: note: to match this '{' 39 | int main{ | ^ a.cc:41:22: error: invalid user-defined conversion from 'std::basic_ostream<char>' to 'int' [-fpermissive] 41 | std::cout << man() << '\n'; | ~~~~~~~~~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/istream:40, 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/bits/basic_ios.h:121:16: note: candidate is: 'std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 121 | explicit operator bool() const | ^~~~~~~~ /usr/include/c++/14/bits/basic_ios.h:121:16: note: return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion a.cc:42:1: error: expected declaration before '}' token 42 | } | ^
s050775476
p03962
Java
import java.util.*; public class Main { public static void main() { 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 && c != b || b == c && a != b) { Sytem.out.println(2); }else { Sytem.out.println(3); } } }
Main.java:11: error: incomparable types: boolean and int if (a == b == c) { ^ Main.java:16: error: package Sytem does not exist Sytem.out.println(2); ^ Main.java:18: error: package Sytem does not exist Sytem.out.println(3); ^ 3 errors
s378839410
p03962
Java
import java.util.*; public class Main { public static void main() { Scanner sc = new Scanner(); 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 && c != b || b == c && a != b) { Sytem.out.println(2); }else { Sytem.out.println(3); } } }
Main.java:5: 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) Main.java:11: error: incomparable types: boolean and int if (a == b == c) { ^ Main.java:16: error: package Sytem does not exist Sytem.out.println(2); ^ Main.java:18: error: package Sytem does not exist Sytem.out.println(3); ^ 4 errors
s916969964
p03962
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned long long int ll; const int INF = 1<<30; int main(){ map<int> mp; for(int i=0;i<3;i++){ int a;cin>>a; mp[a]++; } cout<<(int)mp.size()<<endl; }
a.cc: In function 'int main()': a.cc:7:10: error: wrong number of template arguments (1, should be at least 2) 7 | map<int> mp; | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map' 102 | class map | ^~~ a.cc:10:7: error: invalid types 'int[int]' for array subscript 10 | mp[a]++; | ^ a.cc:12:17: error: request for member 'size' in 'mp', which is of non-class type 'int' 12 | cout<<(int)mp.size()<<endl; | ^~~~
s460266123
p03962
C++
#include<bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < (int)n; i++) const int MOD = 1000000007; // long long a; int main(){ int a,b,c; cin >> a>>b>> c; int Max = max(a,max(b,c)); int Min = min(a,min(b,c)); int Mid = a + b+ c - Max -Min; if(Max == Min) cout << 1 << endl; else(Max == Mid || Mid == Min) cout << 2 << endl; else cout << 3 << endl; }
a.cc: In function 'int main()': a.cc:13:33: error: expected ';' before 'cout' 13 | else(Max == Mid || Mid == Min) cout << 2 << endl; | ^~~~~ | ; a.cc:14:3: error: 'else' without a previous 'if' 14 | else cout << 3 << endl; | ^~~~
s729026495
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc= new Scanner(System.in); Hashset set = new HashSet(); set.add(sc.nextInt()); set.add(sc.nextInt()); set.add(sc.nextInt()); System.out.println(set.size()); } }
Main.java:7: error: cannot find symbol Hashset set = new HashSet(); ^ symbol: class Hashset location: class Main 1 error
s266732586
p03962
Java
import java.util.Sccaner; import java.util.Hashset; public class Main{ public static void main(String[] args) { Scanner sc= new Scanner(System.in); Hashset set = new Hashset(); set.add(sc.nextInt()); set.add(sc.nextInt()); set.add(sc.nextInt()); System.out.println(set.size()); } }
Main.java:1: error: cannot find symbol import java.util.Sccaner; ^ symbol: class Sccaner location: package java.util Main.java:2: error: cannot find symbol import java.util.Hashset; ^ symbol: class Hashset location: package java.util Main.java:7: error: cannot find symbol Scanner sc= new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol Scanner sc= new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Hashset set = new Hashset(); ^ symbol: class Hashset location: class Main Main.java:8: error: cannot find symbol Hashset set = new Hashset(); ^ symbol: class Hashset location: class Main 6 errors
s234548087
p03962
Java
import java.util.Sccaner; import java.util.Hasnset; public class Main{ public static void main(String[] args) { Scanner sc= new Scanner(System.in); Hashset set = new Hashset(); set.add(sc.nextInt()); set.add(sc.nextInt()); set.add(sc.nextInt()); System.out.println(set.size()); } }
Main.java:1: error: cannot find symbol import java.util.Sccaner; ^ symbol: class Sccaner location: package java.util Main.java:2: error: cannot find symbol import java.util.Hasnset; ^ symbol: class Hasnset location: package java.util Main.java:7: error: cannot find symbol Scanner sc= new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol Scanner sc= new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Hashset set = new Hashset(); ^ symbol: class Hashset location: class Main Main.java:8: error: cannot find symbol Hashset set = new Hashset(); ^ symbol: class Hashset location: class Main 6 errors
s933256939
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc= new Scanner(System.in); Hashset set = new Hashset(); set.add(sc.nextInt()); set.add(sc.nextInt()); set.add(sc.nextInt()); System.out.println(set.size()); } }
Main.java:7: error: cannot find symbol Hashset set = new Hashset(); ^ symbol: class Hashset location: class Main Main.java:7: error: cannot find symbol Hashset set = new Hashset(); ^ symbol: class Hashset location: class Main 2 errors
s380125378
p03962
C++
 #include<iostream> #include<algorithm> #include <vector> #include <set> 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:1:1: error: extended character   is not valid in an identifier 1 |  #include<iostream> | ^ a.cc:1:3: error: stray '#' in program 1 |  #include<iostream> | ^ a.cc:1:1: error: '\U00003000' does not name a type 1 |  #include<iostream> | ^~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared 984 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std' 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std' 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std' 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std' 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope 1451 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 63 | #include <bits/version.h> +++ |+#include <cstddef> 64 | /usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid 1451 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared 1453 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope 1454 | struct extent<_Tp[_Size], 0> | ^~~~~ /usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid 1454 | struct extent<_Tp[_Size], 0> | ^ /usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~ /usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid 1455 | : public integral_constant<size_t, _Size> { }; | ^ /usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid /usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared 1457 | template<typename _Tp, unsigned _Uint, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope 1458 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid 1458 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope 1463 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid 1463 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type 1857 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ /usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp' 1860 | struct __select; | ^~~~~~~~ /usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared 1862 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared 1866 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, f
s919614577
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'; if else(a!=b&&b!=c&&c!=a) cout <<'3'; else cout <<'2'; }
a.cc: In function 'int main()': a.cc:9:6: error: expected '(' before 'else' 9 | if else(a!=b&&b!=c&&c!=a) | ^~~~ | ( a.cc:11:3: error: 'else' without a previous 'if' 11 | else | ^~~~
s718827937
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'; if else(a==b||a==c||b==c) cout <<'2'; else cout <<'3'; }
a.cc: In function 'int main()': a.cc:9:6: error: expected '(' before 'else' 9 | if else(a==b||a==c||b==c) | ^~~~ | ( a.cc:11:3: error: 'else' without a previous 'if' 11 | else | ^~~~
s492390674
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'; else(a==b||a==c||b==c) cout <<'2'; else cout <<'3'; }
a.cc: In function 'int main()': a.cc:9:25: error: expected ';' before 'cout' 9 | else(a==b||a==c||b==c) | ^ | ; 10 | cout <<'2'; | ~~~~ a.cc:11:3: error: 'else' without a previous 'if' 11 | else | ^~~~
s412240106
p03962
C++
#include<cstdio> int main(){ int a[2]; scanf("%d %d %d", &a[0], &a[1], &a[2]); for(int i=0; i<3; i++){ int tmp, n=0; if(tmp = a[[i]){ n++; } print("%d", n); } return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: two consecutive '[' shall only introduce an attribute before '[' token 8 | if(tmp = a[[i]){ | ^ a.cc:8:15: error: expected ')' before '[' token 8 | if(tmp = a[[i]){ | ~ ^ | ) a.cc:11:5: error: 'print' was not declared in this scope; did you mean 'printf'? 11 | print("%d", n); | ^~~~~ | printf
s643724736
p03962
C++
int main(){ int a,b,c; cin >> a >> b >> c; int d = 0; if(a != b) ++d; if(b != c) ++d; if(c != a) ++d; if(d > 0) cout << d; else cout << 1; return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin >> a >> b >> c; | ^~~ a.cc:9:13: error: 'cout' was not declared in this scope 9 | if(d > 0) cout << d; | ^~~~ a.cc:10:8: error: 'cout' was not declared in this scope 10 | else cout << 1; | ^~~~
s941346882
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; int c = 0; if(a != b) ++c; if(b != c) ++c; if(c != a) ++c; cout << c; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: redeclaration of 'int c' 7 | int c = 0; | ^ a.cc:5:11: note: 'int c' previously declared here 5 | int a,b,c; | ^
s683112735
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,n; cin >> a >> b >> c; if (a==b & b==c) { n=1; } else if (a==b) { n=2; } else if (b==c) { n=2; } else { n=1; } cout << n << endl; ]
a.cc: In function 'int main()': a.cc:19:1: error: expected primary-expression before ']' token 19 | ] | ^ a.cc:19:2: error: expected '}' at end of input 19 | ] | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s746888935
p03962
C++
#include <bits/stdc++> using namespace std; int main() { int a,b,c,n; cin >> a >> b >> c; if (a==b & b==c) { n=1; } else if (a==b) { n=2; } else if (b==c) { n=2; } else { n=1; } cout << n << endl; ]
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s699527005
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){ cout<<2<<endl; } else if(a!=b&&b==c){ cout<<2<<endl; } else{ cout<<3<<endl; } }
a.cc: In function 'int main()': a.cc:10:20: error: 'C' was not declared in this scope 10 | else if(a==b&&b!=C){ | ^
s761111628
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int>ans(3); cin>>ans.at(0)>>ans.at(1)>>ans.at(2); int sum=0; for(int i=0;i<3;i++){ if(i==0){ sum++; } if(i==1&&ans.at(i)!=ans.at(i-1)){ sum++; } if(i==2&&ans.at(i)!=ans.at(i-1)&&ans.at(i)!=ans.at(i-2)){ sum++ } } cout<<sum<<endl; }
a.cc: In function 'int main()': a.cc:20:12: error: expected ';' before '}' token 20 | sum++ | ^ | ; 21 | } | ~
s524810181
p03962
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int main() { int a,b,c; cin >> a >> b > c; if(a!=b&&b!=c&&a!=c) { cout << 3 << endl; return 0; } if((a==b&&b!=c)||(a!=b&&b==c)||(a!=b&&a==c)) { cout << 2 << endl; return 0; } if(a==b&&b==c) { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 7 | cin >> a >> b > c; | ~~~~~~~~~~~~~ ^ ~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:7:17: note: candidate: 'operator>(int, int)' (built-in) 7 | cin >> a >> b > c; | ~~~~~~~~~~~~~~^~~ a.cc:7:17: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | cin >> a >> b > c; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | cin >> 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:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:7:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | cin >> a >> b > c; | ^ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:7:19: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 7 | cin >> a >> b > c; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:7:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 7 | cin >> a >> b > c; | ^
s370645243
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 << 3 << endl; if((a == B && a != c) || (a == c && a != c) || (a == c && a != b)) cout << 2 << endl; if(a == b && a == c) cout << 1 << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: 'B' was not declared in this scope 8 | if((a == B && a != c) || (a == c && a != c) || (a == c && a != b)) | ^
s095410599
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if((a!b)&&(a!c)&&(b!c)){ cout << 3 << endl; }else if((a==b)&&(a==c)){ cout << 1 << endl; }else{ cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:7:8: error: expected ')' before '!' token 7 | if((a!b)&&(a!c)&&(b!c)){ | ~ ^ | ) a.cc:9:4: error: expected ')' before 'else' 9 | }else if((a==b)&&(a==c)){ | ^~~~ | ) a.cc:7:5: note: to match this '(' 7 | if((a!b)&&(a!c)&&(b!c)){ | ^ a.cc:14:1: error: expected primary-expression before '}' token 14 | } | ^
s035525506
p03962
C++
#include<stdio.h> int main(void) { int a,b,c,s; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); s=3; if(a==b) { s=s-1; } if(b==c) { s=s-1; } if(a==c) { s=s-1; } if(s==0) { s=s+1; }
a.cc: In function 'int main()': a.cc:20:10: error: expected '}' at end of input 20 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s740696369
p03962
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d",a); scanf("%d",&b); scanf("%d",c); if(a==b==c) { s=1; } if(a==b&&c==b&&a==c) { s=2+ } if((!(a==b==c))) { s=3; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 's' was not declared in this scope 9 | s=1; | ^ a.cc:13:17: error: 's' was not declared in this scope 13 | s=2+ | ^ a.cc:14:9: error: expected primary-expression before '}' token 14 | } | ^ a.cc:16:17: error: 's' was not declared in this scope 16 | s=3; | ^ a.cc:18:23: error: 's' was not declared in this scope 18 | printf("%d\n",s); | ^
s213768549
p03962
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d",a); scanf("%d",&b); scanf("%d",c); if(a==b==c) { s=1; } if(a==b&&c==b&&a==c) { s=2+ } if((!(a==b==c))) { s=3; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 's' was not declared in this scope 9 | s=1; | ^ a.cc:13:17: error: 's' was not declared in this scope 13 | s=2+ | ^ a.cc:14:9: error: expected primary-expression before '}' token 14 | } | ^ a.cc:16:17: error: 's' was not declared in this scope 16 | s=3; | ^ a.cc:18:23: error: 's' was not declared in this scope 18 | printf("%d\n",s); | ^
s814195031
p03962
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d",a); scanf("%d",&b); scanf("%d",c); if(a==b==c) { s=1; } if(a==b&&c==b&&a==c) { s=2+ } if(!(a==b==c)) { s=3; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 's' was not declared in this scope 9 | s=1; | ^ a.cc:13:17: error: 's' was not declared in this scope 13 | s=2+ | ^ a.cc:14:9: error: expected primary-expression before '}' token 14 | } | ^ a.cc:16:17: error: 's' was not declared in this scope 16 | s=3; | ^ a.cc:18:23: error: 's' was not declared in this scope 18 | printf("%d\n",s); | ^
s489130582
p03962
C++
#include<stdio.h> int main(void) { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); int color[1]; color[0] = a; int count = 1; if (color[0] == b) { if (color[0] == c) { } } else if (color[0] != c) { count = 3; } else { count = 2; } printf("%d\n", count); return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: redeclaration of 'int count' 12 | int count = 1; | ^~~~~ a.cc:4:13: note: 'int count' previously declared here 4 | int count = 0; | ^~~~~
s632554543
p03962
C++
#include<stdio.h> int main(void) { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); int color[1]; color[0] = a; int count = 1; if (color[0] == b) { if (color[0] == c) { } } else if (color[0] != c) { count = 3; } else { count = 2; } return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: redeclaration of 'int count' 12 | int count = 1; | ^~~~~ a.cc:4:13: note: 'int count' previously declared here 4 | int count = 0; | ^~~~~
s850264985
p03962
C++
#include<stdio.h> int main(void) { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); int color[1]; color[0] = a; int count = 1; if (color[0] == b) { if (color[0] == c) { } } else if (color[0] != c) { count = 3; } else { count = 2; } return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: redeclaration of 'int count' 12 | int count = 1; | ^~~~~ a.cc:4:13: note: 'int count' previously declared here 4 | int count = 0; | ^~~~~
s731853965
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int ans=1; if(a!=b){ans++;} if(b!=c){ans++;} if(a==c){ans--+} }
a.cc: In function 'int main()': a.cc:9:18: error: expected primary-expression before '}' token 9 | if(a==c){ans--+} | ^
s977236956
p03962
C
#include<stdio.h> int main(){ int a, b, c; scanf("%d %d %d", &a, &b, &c); if (a==b && b==c){ printf("%d", 1); }else if(a!=b && b!=c && c!=a){ printf("%d", 3); }else{ printf("%d", 2) } return 0; }
main.c: In function 'main': main.c:11:24: error: expected ';' before '}' token 11 | printf("%d", 2) | ^ | ; 12 | } | ~
s812278436
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a[3]; map<int,int>mp; for(int i=0;i<3;i++) { cin>>a[i]; mp[a[i]]++; } cout<<mp.size(): }
a.cc: In function 'int main()': a.cc:12:18: error: expected ';' before ':' token 12 | cout<<mp.size(): | ^ | ;
s097720973
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,count; cin >> a >> b >> c; count = 0 if (a==c) count++ if (a==b) count++ if(b==c) count++ cout << count <<endl; }
a.cc: In function 'int main()': a.cc:6:12: error: expected ';' before 'if' 6 | count = 0 | ^ | ; 7 | if (a==c) | ~~
s142632132
p03962
C++
#include <bits/stdc++.h> //JuniorMonster a.k.a Sho10 #define ll long long #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #define all(a) (a).begin(), (a).end() #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define sz size #define f first #define s second #define pb push_back #define er erase #define in insert #define mp make_pair #define pi pair #define rc(s) return cout<<s,0 #define mod 1000000007 #define PI 3.14159265359 #define CODE_START ios_base::sync_with_stdio();cin.tie();cout.tie(); using namespace std; ll a[4],ans=3; int32_t main(){ CODE_START; cin >> a[0] >> a[1] >> a[2]; sort(a,a+n); for(ll i=0;i<1;i++) if(a[i]==a[i+1]){ ans--; } cout << ans; }
a.cc: In function 'int32_t main()': a.cc:24:10: error: 'n' was not declared in this scope; did you mean 'yn'? 24 | sort(a,a+n); | ^ | yn
s949218534
p03962
C++
#include <iostream> using namespace std; int rr(int b,int N){ int c=N-1; int d=0; b=K-1; while(c>0){ d=b; b=b*d; c-=1; } return b; } int main() { int N,K,a,b,e; cin >>N>>K; if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K,N); } }
a.cc: In function 'int rr(int, int)': a.cc:6:9: error: 'K' was not declared in this scope 6 | b=K-1; | ^
s695326969
p03962
C++
#include <iostream> using namespace std; int rr(int b){ int c=N-1; int d=0; b=K-1; while(c>0){ d=b; b=b*d; c-=1; } return b; } int main() { int N,K,a,b,e; cin >>N>>K; if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } }
a.cc: In function 'int rr(int)': a.cc:4:13: error: 'N' was not declared in this scope 4 | int c=N-1; | ^ a.cc:6:9: error: 'K' was not declared in this scope 6 | b=K-1; | ^
s496846369
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,a,b,e; cin >>N>>K; int rr(int b){ int c=N-1; int d=0; b=K-1; while(c>0){ d=b; b=b*d; c-=1; } return b; } if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } }
a.cc: In function 'int main()': a.cc:7:17: error: a function-definition is not allowed here before '{' token 7 | int rr(int b){ | ^ a.cc:23:15: error: 'rr' was not declared in this scope 23 | e=K+(N-1)*rr(K); | ^~
s452553177
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,a,b,e; cin >>N>>K; int rr(int b){ int c=N-1; int d=0; b=K-1; while(c>0){ d=b; b=b*d; c-=1; } return b; } if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } cout << e; }
a.cc: In function 'int main()': a.cc:7:17: error: a function-definition is not allowed here before '{' token 7 | int rr(int b){ | ^ a.cc:23:15: error: 'rr' was not declared in this scope 23 | e=K+(N-1)*rr(K); | ^~
s473817726
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,a,b,e; cin >>N>>K; int rr(int b) { int c=N-1; int d=0; b=K-1; while(c>0){ d=b; b=b*d; c-=1; } return b; } if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } cout << e; }
a.cc: In function 'int main()': a.cc:7:18: error: a function-definition is not allowed here before '{' token 7 | int rr(int b) { | ^ a.cc:23:15: error: 'rr' was not declared in this scope 23 | e=K+(N-1)*rr(K); | ^~
s600719087
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,a,b,e; cin >>N>>K; int rr(int b){ int c=N-1; b=K-1; while(c>0){ b=b*b; c-=1; } return b; } for(int i=1;i<N;i++){ if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } } cout << e; }
a.cc: In function 'int main()': a.cc:7:17: error: a function-definition is not allowed here before '{' token 7 | int rr(int b){ | ^ a.cc:20:15: error: 'rr' was not declared in this scope 20 | e=K+(N-1)*rr(K); | ^~
s903552930
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,a,b,e; cin >>N>>K; int rr(int b){ int c=N-1; b=K-1; while(c>0){ b=b*b; c-=1 } return b; } for(int i=1;i<N;i++){ if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } } cout << e; }
a.cc: In function 'int main()': a.cc:7:17: error: a function-definition is not allowed here before '{' token 7 | int rr(int b){ | ^ a.cc:20:15: error: 'rr' was not declared in this scope 20 | e=K+(N-1)*rr(K); | ^~
s287081581
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,a,b,e; cin >>N>>K; for(int i=1;i<N;i++){ if(N==1){ a=N*K; }else{ e=K+(N-1)*rr(K); } } int rr(int b){ int c=N-1; b=K-1; while(c>0){ b=b*b; c-=1 } return b; } cout << e; }
a.cc: In function 'int main()': a.cc:11:15: error: 'rr' was not declared in this scope 11 | e=K+(N-1)*rr(K); | ^~ a.cc:14:18: error: a function-definition is not allowed here before '{' token 14 | int rr(int b){ | ^
s352090752
p03962
C++
#include<bits/stdc++> using namespace std; int main(void){ int a,b,c; cin>>a>>b>>c; if(a==b&&b==c) cout<<1<<endl; else if(a==b) cout<<2<<endl; else if(a==c) cout<<2<<endl; else if(b==c) cout<<2<<endl; else cout<<3<<endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s883663164
p03962
C++
#include<bits/stdc++> using namespace std; int main(void){ int a,b,c; cin>>a>>b>>c; if(a==b==c) cout<<1<<endl; else if(a==b) cout<<2<<endl; else if(a==c) cout<<2<<endl; else if(b==c) cout<<2<<endl; else cout<<3<<endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s723298065
p03962
C++
#include <iostream> 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 || c == a){ cout << 2; } else { cout << 3; } return 0; }
a.cc: In function 'int main()': a.cc:12:41: error: expected ';' before '{' token 12 | else if((a == b || b == c || c == a){ | ^ | ; a.cc:15:5: error: expected primary-expression before 'else' 15 | else { | ^~~~ a.cc:14:6: error: expected ')' before 'else' 14 | } | ^ | ) 15 | else { | ~~~~ a.cc:12:12: note: to match this '(' 12 | else if((a == b || b == c || c == a){ | ^
s927590304
p03962
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <vector> #include <string> #include <algorithm> #include <map> #include <set> #include <queue> #ifdef _DEBUG #define DMP(x) cerr << #x << ": " << x << "\n" #else #define DMP(x) ((void)0) #endif const int MOD = 1000000007, INF = 1111111111; using namespace std; typedef long long lint; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int A, B, C; cin >> A >> B >> C; if(A==B&&B==C) { cout<< 1; } else if(A==B||B==C||C==A){ cout << 2; } else{ cout << 3 } return 0; }
a.cc: In function 'int main()': a.cc:37:20: error: expected ';' before '}' token 37 | cout << 3 | ^ | ; 38 | } | ~
s263667051
p03962
C
#include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <vector> #include <string> #include <algorithm> #include <map> #include <set> #include <queue> #ifdef _DEBUG #define DMP(x) cerr << #x << ": " << x << "\n" #else #define DMP(x) ((void)0) #endif const int MOD = 1000000007, INF = 1111111111; using namespace std; typedef long long lint; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int A, B, C; cin >> A >> B >> C; if(A==B&&B==C) { cout<< 1; } else if(A==B||B==C||C==A){ cout << 2; } else{ cout << 3 } return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s007602397
p03962
C++
#include"bits/srdc++.h" using namespace std; int main() { /*int a, b, h; int sqer=0; cin >> a >> b >> h; if (h%2==0) { sqer=((a + b)*h) / 2; } else { cout << "error" << endl; } cout << sqer << endl;*/ int a,b,c; int ristrict = 3; cin >> a >> b >> c; if (a==b) { ristrict--; } if (b == c) { ristrict--; } if (a==c) { ristrict--; } cout << ristrict << endl; }
a.cc:1:9: fatal error: bits/srdc++.h: No such file or directory 1 | #include"bits/srdc++.h" | ^~~~~~~~~~~~~~~ compilation terminated.
s089829420
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() {set<int> s;int x;cin >> x;s.insert(x);cin >> x;s.insert(x);cin >> x;s.insert(x);cout << s.size() << endl;}
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h> using namespace std; int main() {set<int> s;int x;cin >> x;s.insert(x);cin >> x;s.insert(x);cin >> x;s.insert(x);cout << s.size() << endl;} | ^~~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s366848281
p03962
C++
#include <bits/stdc++.h> #define ll long long #define INIT std::ios::sync_with_stdio(false);std::cin.tie(0); #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; using namespace std; int main() { INIT; int a,b,c; cin >> a >> b >> c; std::set<int> s{a,b,c}; cout << s.length() << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:14: error: 'class std::set<int>' has no member named 'length' 17 | cout << s.length() << endl; | ^~~~~~
s857651176
p03962
C++
#include <stdio.h> #include <algorithm> #include <math.h> using namespace std; int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c) int ans=1; if(a!=b){ans++;} if(a!=c&&b!=c){ans++;} printf("%d\n",ans); }
a.cc: In function 'int main()': a.cc:8:27: error: expected ';' before 'int' 8 | scanf("%d %d %d",&a,&b,&c) | ^ | ; 9 | int ans=1; | ~~~ a.cc:10:10: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | if(a!=b){ans++;} | ^~~ | abs a.cc:11:16: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | if(a!=c&&b!=c){ans++;} | ^~~ | abs a.cc:12:15: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | printf("%d\n",ans); | ^~~ | abs
s958952237
p03962
C++
#include <stdio.h> #include <algorithm> #include <math.h> using namespace std; int main() { int a,b,c scanf("%d %d %d",&a,&b,&c) int ans=1; if(a!=b){ans++;} if(a!=c&&b!=c){ans++;} printf("%d\n",ans); }
a.cc: In function 'int main()': a.cc:8:1: error: expected initializer before 'scanf' 8 | scanf("%d %d %d",&a,&b,&c) | ^~~~~ a.cc:10:10: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | if(a!=b){ans++;} | ^~~ | abs a.cc:11:7: error: 'c' was not declared in this scope 11 | if(a!=c&&b!=c){ans++;} | ^ a.cc:11:16: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | if(a!=c&&b!=c){ans++;} | ^~~ | abs a.cc:12:15: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | printf("%d\n",ans); | ^~~ | abs
s174986462
p03962
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin a >> b >> c; bool ab, bc, ca, abc; ab = a == b; bc = b == c; ca = c == a; abc = ab && bc; if(abc) cout << 1; else if(ab || bc || ca) cout << 2; else cout << 3; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: expected ';' before 'a' 6 | cin a >> b >> c; | ^~ | ;
s748776120
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; int num = 3; cin >> a >> b >> c; if (a == b) num--; if (b == c) num--; if (a == c) num--; cout << num << end; return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | cout << num << end; | ~~~~~~~~~~~~^~~~~~ 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, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | op
s559457931
p03962
C++
#include<bits/stdc++> using namespace stdc; int main(){ int count=0; vector<int> vec(4); for(int i=0; i<3; i++){ cin >> ve.at(i); } for(int i=0; i<2; i++){ if(vec.at(i)=vec.at(i+1)){ count += 1; } } cout << 3-count << endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s896563286
p03962
C++
#include<iostream> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; int counter=0; if((a==b)&&(b==c){ counter=1; } else if((a==b)||(b==c)||(c==a)){ counter=2; } else{ counter=3; } cout<<counter<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: expected ';' before '{' token 8 | if((a==b)&&(b==c){ | ^ | ; a.cc:11:5: error: expected primary-expression before 'else' 11 | else if((a==b)||(b==c)||(c==a)){ | ^~~~ a.cc:10:6: error: expected ')' before 'else' 10 | } | ^ | ) 11 | else if((a==b)||(b==c)||(c==a)){ | ~~~~ a.cc:8:7: note: to match this '(' 8 | if((a==b)&&(b==c){ | ^
s806579457
p03962
C++
#include<iostream> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; int counter=0; if(a==b==c){ counter=1; } else if((a==b)||(b==c)||(c==a){ counter=2; } else{ counter=3; } cout<<counter<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:35: error: expected ';' before '{' token 11 | else if((a==b)||(b==c)||(c==a){ | ^ | ; a.cc:14:5: error: expected primary-expression before 'else' 14 | else{ | ^~~~ a.cc:13:6: error: expected ')' before 'else' 13 | } | ^ | ) 14 | else{ | ~~~~ a.cc:11:12: note: to match this '(' 11 | else if((a==b)||(b==c)||(c==a){ | ^
s966859885
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int k; if( a == b & b == c ) k = 1; else if( a = b or b = c or c = a ) k = 2; else k=3; cout << k; }
a.cc: In function 'int main()': a.cc:9:27: error: lvalue required as left operand of assignment 9 | else if( a = b or b = c or c = a ) | ~~^~~~
s062183447
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))||((b==c)&&(a!=b))||((a==c)&&(b!=c))){ cout << "2"; }else{ cout <<"3" } return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: expected ';' before '}' token 12 | cout <<"3" | ^ | ; 13 | } | ~
s127377891
p03962
C++
#include<iostream> int main(){ int ans = 0; int a,b,c; cin >> a >> b >> c; if(a != b && b!= c) ans = 3; else if(a != b || b != c || c != a) ans=2; else ans = 1; cout << ans << 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout << ans << 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:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout << ans << 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) | ^~~~
s184416345
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a,b,c; cin>>a>>b>>>c; if(a==b&&b==c) cout<<3<<<endl; else if(a!=b&&b!=c&&c!=a) cout<<1<<endl; else cout<<2<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: expected primary-expression before '>' token 6 | cin>>a>>b>>>c; | ^ a.cc:8:18: error: expected primary-expression before '<' token 8 | cout<<3<<<endl; | ^
s105207980
p03962
C++
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); if(a == b && b == c){ System.out.println("1"); } else if(a == b && a != c){ System.out.println("2"); } else if(b == c && b != a){ System.out.println("2"); } else if(a == c && c != b){ System.out.println("2"); } else { System.out.println("3"); } } }
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{ | ^~~~~~
s604072364
p03962
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #define _CRT_SECURE_NO_WARNINGS #define TLong long long // fact(n) int fact(int n){ if(n == 1) return 1; else return (n * fact(n - 1)); } // combination(n,r) int combination(int n, int r){ if(r == 0 || r == n) return 1; else if(r == 1) return n; return (combination(n - 1, r - 1) + combination(n - 1, r)); } int gcd(int a,int b){ if(!(a % b)) return b; return gcd(b,a % b); } // lcm(a.b) int lcm(int a,int b){ return (a * b) / gcd(a,b); } // qsort(array, size, sizeof(int),comp); int comp(const int *a,const int *b){ return (*a - *b); } // append(array,*size,addNum) void append(int *array,int *size,int num){ realloc(array, sizeof(int) * (*size + 1)); array[(*size)] = num; ++(*size); } // pop(array,*size) & nongetpop(array,*size) int pop(int *array,int *size){ int temp = array[(*size - 1)]; nongetpop(array,&(*size)); return temp; } void nongetpop(int *array,int *size){ realloc(array,sizeof(int) * (*size - 1)); --(*size); } int main(int argc, char const *argv[]){ TLong n,k; scanf("%d%d",&n,&k); ans = k; for(int i = 1;i < n; ++i) ans *= (k - 1); printf("%lld\n",ans); return 0; }
main.c: In function 'pop': main.c:48:9: error: implicit declaration of function 'nongetpop' [-Wimplicit-function-declaration] 48 | nongetpop(array,&(*size)); | ^~~~~~~~~ main.c: At top level: main.c:52:6: warning: conflicting types for 'nongetpop'; have 'void(int *, int *)' 52 | void nongetpop(int *array,int *size){ | ^~~~~~~~~ main.c:48:9: note: previous implicit declaration of 'nongetpop' with type 'void(int *, int *)' 48 | nongetpop(array,&(*size)); | ^~~~~~~~~ main.c: In function 'main': main.c:60:9: error: 'ans' undeclared (first use in this function); did you mean 'abs'? 60 | ans = k; | ^~~ | abs main.c:60:9: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'append': main.c:40:9: warning: ignoring return value of 'realloc' declared with attribute 'warn_unused_result' [-Wunused-result] 40 | realloc(array, sizeof(int) * (*size + 1)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c: In function 'nongetpop': main.c:53:9: warning: ignoring return value of 'realloc' declared with attribute 'warn_unused_result' [-Wunused-result] 53 | realloc(array,sizeof(int) * (*size - 1)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s099149331
p03962
C++
#include<iostream> using namespace std; int main(){ int a,b,c,s; cin>>a>>b>>c; if(a==b&&a==c) s=1; else if(a==b||b==c||c==a) s=2; else s=3 cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: expected ';' before 'cout' 9 | else s=3 | ^ | ; 10 | cout<<s<<endl; | ~~~~
s149464126
p03962
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ vector<int> vec; int a; for(int i=0; i<3; ++i){ cin >> a; vec.emplace_back(a); } sort(vec.begin(),vec.end()); vec.erase(unique(vec.begin(), vec.end()), vec.end()); cout << vec.size() << endl; }
a.cc: In function 'int main()': a.cc:5:9: error: 'vector' was not declared in this scope 5 | vector<int> vec; | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include<algorithm> +++ |+#include <vector> 3 | using namespace std; a.cc:5:16: error: expected primary-expression before 'int' 5 | vector<int> vec; | ^~~ a.cc:9:17: error: 'vec' was not declared in this scope 9 | vec.emplace_back(a); | ^~~ a.cc:11:14: error: 'vec' was not declared in this scope 11 | sort(vec.begin(),vec.end()); | ^~~
s593432103
p03962
C
#include<stdio.h> #include<string.h> int main(void){ int A,B,C,D,E,N,M,x,y,cou=0,cou2,v[1000000],w[1000000],min_i,en=0; char S[20],W[100],s[10],X,Y; scanf("%d %d %d",&A,&B,&C); if((A==C)||(A==B)||(B==A)){ if((A==C)||(A==B)||(B==A)){ printf("1"); }else{ printf("2"); } }else{ printf("3"); return 0; }
main.c: In function 'main': main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s457172842
p03962
C
#include<stdio.h> #include<string.h> int main(void){ int A,B,C,D,E,N,M,x,y,cou=0,cou2,v[1000000],w[1000000],min_i,en=0; char S[20],W[100],s[10],X,Y; scanf("%d %d %d",&A,&B,&C); if((A==C)||(A==B)||(B==A)){ if((A==C)||(A==B)||(B==A)){ printf("1"); }else{ printf("2") } }else{ printf("3"); return 0; }
main.c: In function 'main': main.c:11:23: error: expected ';' before '}' token 11 | printf("2") | ^ | ; 12 | } | ~ main.c:17:1: error: expected declaration or statement at end of input 17 | } | ^
s626044577
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { vector<int> v; int a = 3; for(int i = 0; i < 3; i++){ int x; cin >> x; v.push_back(x); } sort(v.begin(),v.end()); if(s[0] == s[1]){ a--; } if(s[1] == s[2]){ a--; } cout << a endl; }
a.cc: In function 'int main()': a.cc:15:8: error: 's' was not declared in this scope 15 | if(s[0] == s[1]){ | ^ a.cc:18:8: error: 's' was not declared in this scope 18 | if(s[1] == s[2]){ | ^ a.cc:21:14: error: expected ';' before 'endl' 21 | cout << a endl; | ^~~~~ | ;
s629675997
p03962
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> s(3); for(int i = 0; i < 3 ; i ++){ cin >> s[i]; } s.erase(unique(s.begin(), s.end()), s.end()); if(s.size != NULL){ cout << s.size() << endl; } else { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:14:8: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?) 14 | if(s.size != NULL){ | ~~^~~~ | ()
s155173698
p03962
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> s(3); for(int i = 0; i < 3 ; i ++){ cin >> s[i]; } s.erase(unique(s.begin(), s.end()), s.end()); if(s.size > 0){ cout << s.size() << endl; } else { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:15:8: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?) 15 | if(s.size > 0){ | ~~^~~~ | ()
s869582485
p03962
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> s(3); for(int i = 0; i < 3 ; i ++){ cin >> s[i]; } s.erase(unique(s.begin(), s.end()), s.end()); if(s.size != 0){ cout << s.size() << endl; } else { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:14:8: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?) 14 | if(s.size != 0){ | ~~^~~~ | ()
s125335094
p03962
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> s(3); for(int i = 0; i < 3 ; i ++){ cin >> s[i]; } erase(unique(s.begin(), s.end()), s.end()); cout << s.size() << endl; }
a.cc: In function 'int main()': a.cc:13:3: error: 'erase' was not declared in this scope 13 | erase(unique(s.begin(), s.end()), s.end()); | ^~~~~
s712319870
p03962
C++
#include<iostraem> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> s(3); for(int i = 0; i < 3 ; i ++){ cin >> s[i]; } erase(unique(s.begin(), s.end()), s.end()); cout << s.size() << endl; }
a.cc:1:9: fatal error: iostraem: No such file or directory 1 | #include<iostraem> | ^~~~~~~~~~ compilation terminated.
s714659101
p03962
C++
a, b, c = [int(x) for x in input().split()] print(len({a, b, c}))
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c = [int(x) for x in input().split()] | ^ a.cc:3:20: error: expected unqualified-id before ')' token 3 | print(len({a, b, c})) | ^
s656095129
p03962
C++
#include<iostream> using namespace std; int main(void) { int a,b,c,ans=3 cin >> a >> b >> c; if(a == b) { if(a == c) { cout << ans - 2; return 0; } else { cout << ans - 1; return 0; } } else { if(b == c) { cout << ans - 1; return 0; } else { cout << ans; return 0; } } }
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'cin' 7 | cin >> a >> b >> c; | ^~~
s746216378
p03962
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<map> using namespace std; #define ll long long int main(){ int a,b,c,ans; cin >> a >> b >> c; ans=3; if(a==b)ans--; if(a==c|b==c)ams--; cout <<ans; return 0; }
a.cc: In function 'int main()': a.cc:16:18: error: 'ams' was not declared in this scope; did you mean 'ans'? 16 | if(a==c|b==c)ams--; | ^~~ | ans
s388454702
p03962
C++
#include <iostream> using namespace std; int main() { int a, b, c,; cin >> a >> b >> c; int total = 1; if (a != b) total++; if (a != c && b != c) total++; cout << total << endl; }
a.cc: In function 'int main()': a.cc:5:15: error: expected unqualified-id before ';' token 5 | int a, b, c,; | ^
s705213312
p03962
C
#include <stdio.h> #include <iostream> #include <string> int main(void) { int a, b, h, s; std::cin >> a >> b >> h; if (a == b && a == h && b == h) { s = 1; } else if (a != b && a != h && b != h) { s = 3; } else s = 2; std::cout << s; return 0; }
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.