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...
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) a...
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.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'...
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; i...
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: erro...
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: erro...
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; ...
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 ';' ...
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){ ...
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.o...
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 != ...
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::bas...
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 r...
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: inva...
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 || ...
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 || ...
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 (...
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/incl...
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...
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 S...
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 S...
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...
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: 'pr...
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 <<...
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))...
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::...
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...
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 | } |...
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 | } |...
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 | } |...
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 #de...
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); } ...
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); } ...
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 { | ...
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 = 1111111...
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 = 1111111...
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) { ri...
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/.....
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__ << ")" << " " << __F...
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...
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 ...
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++/...
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: expecte...
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: e...
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; ///< Lin...
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"); ...
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...
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 nongetp...
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> ...
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"); }...
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") } ...
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; ...
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.