submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s063321596
p03962
C
#include<stdio.h> int main() { int n,k,fac1=1,fac2=1,fac3=1,t; scanf("%d%d",&n,&k); if(n==k) printf("%d",n); else { while(k>=1) { fac1=fac1*k; --k; } while(n>=1) { fac2=fac2*n; --n; } while(k-n>=1) { fac3=fac3*(k-n); ...
main.c: In function 'main': main.c:24:9: error: lvalue required as decrement operand 24 | --(k-n); | ^~
s986721073
p03962
C
#include<stdio.h> int main() { int n,k,fac1=1,fac2=1,fac3=1; scanf("%d%d",&n,&k); if(n==k) printf("%d",n); else { while(k>=1) { fac1=fac1*k; --k; } while(n>=1) { fac2=fac2*n; --n; } while(k-n>=1) { fac3=fac3*(k-n); -...
main.c: In function 'main': main.c:23:9: error: lvalue required as decrement operand 23 | --(k-n-1); | ^~
s566522931
p03962
Java
import java.util.*; public class Solution{ public static void main(String args[]){ Scanner in = new Scanner(System.in); int a =in.nextInt(), b = in.nextInt(), c = in.nextInt(); int count = 0; if(a!=b) { count++; } if(b!=c) { count++; } if(a!=c) { count++; } if(count == 3) { System.out....
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java public class Solution{ ^ 1 error
s789403097
p03962
Java
import java.util.*; public class Solution{ public static void main(String args[]){ Scanner in = new Scanner(System.in); int a =in.nextInt(), b = in.nextInt(), c = in.nextInt(); int count = 0; if(a!=b) { count++; } if(b!=c) { count++; } if(a!=c) { count++; } if(count == 3) { System.out....
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java public class Solution{ ^ 1 error
s208375653
p03962
C++
#include <bits/stdc++.h> int main() { int a,b,c,i,t; cin>>a>>b>>c; if((a==b)||(b==c)||(c==a)) { cout<<2; } else if(a==b==c) { cout<<1; } else cout<<3; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::c...
s651849663
p03962
Java
import java.util.*; public class Solution{ public static void main(String args[]){ Scanner in = new Scanner(System.in); int a =in.nextInt(), b = in.nextInt(), c = in.nextInt(); int count = 0; if(a!=b) { count++; } if(b!=c) { count++; } if(a!=c) { count++; } if(count == 3) { System.out....
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java public class Solution{ ^ 1 error
s656109881
p03962
C++
#include<iostream> int main() { int a[5],i,c=0,b[i],j; for(i=0;i<3;i++) { cin>>a[i]; } for(i=0;i<2;i++) { for(j=(i+1);j<3;j++) { if(a[i]!=a[j]) c++; } } cout<<c; }
a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>a[i]; | ^~~ | 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...
s505587464
p03962
C++
#include<bits/stdc++.h> int main() { int a[5],i,c=0,b[i],j; for(i=0;i<3;i++) { cin>>a[i]; } for(i=0;i<2;i++) { for(j=(i+1);j<3;j++) { if(a[i]!=a[j]) c++; } } cout<<c; }
a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>a[i]; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin'...
s192389745
p03962
C++
#include<bits/stdc++.h> int main() { int a[5],i,c=0,b[i]; for(i=0;i<3;i++) { cin>>a[i]; } for(i=0;i<2;i++) { for(j=(i+1);j<3;j++) { if(a[i]!=a[j]) c++; } } }
a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>a[i]; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin'...
s213138569
p03962
C
#include<stdio.h> void main() { int a[3],b[100]; int ct=0; for(int i=0;i<3;i++) scanf("%d",&a[i]); for(int i=0;i<100;i++) { b[i]=0; } for(int i=0;i;<3;i++) { if(b[a[i]]==0) { ct++; b[a[i]]=1; } } printf("%d\n",ct); }
main.c: In function 'main': main.c:13:23: error: expected expression before '<' token 13 | for(int i=0;i;<3;i++) | ^
s256226082
p03962
C
#include<stdio.h> int main(void){ int color[3]; int count=0; int i,j; for(i=0;i<3;i++){ scanf("%d",&color[i]); if(i!=0){ for(j=0;j<i;j++){ if(color[i]==color[j]){ count++; break; } } } int a=3-count; printf("%d",a); return 0; }
main.c: In function 'main': main.c:19:3: error: expected declaration or statement at end of input 19 | } | ^
s076438336
p03962
C
#include<stdio.h> int main(void){ int color[3]; int count=0; int i,j; for(i=0;i<3;i++){ scanf("%d",&color[i]); if(i!=0){ for(j=0;j<i;J++){ if(color[i]==color[j]){ count++; break; } } } int a=3-count; printf("%d",a); return 0; }
main.c: In function 'main': main.c:9:19: error: 'J' undeclared (first use in this function) 9 | for(j=0;j<i;J++){ | ^ main.c:9:19: note: each undeclared identifier is reported only once for each function it appears in main.c:19:3: error: expected declaration or statement at end of inpu...
s373403821
p03962
C
#include<stdio.h> int main(void){ int color[3]; int count=0; int i; for(i=0;i<3;i++){ scanf("%d",&color[i]); if(i!=0){ for(j=0;j<i;J++){ if(color[i]==color[j]){ count++; break; } } } int a=3-count; printf("%d",a); return 0; }
main.c: In function 'main': main.c:9:11: error: 'j' undeclared (first use in this function) 9 | for(j=0;j<i;J++){ | ^ main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in main.c:9:19: error: 'J' undeclared (first use in this function) 9 | ...
s819177706
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a=0, b=0, c=0; cin >> a >> b >> c; if(a==b && a==c) { cout << "1" << endl; } else if(a!=b && a!=c && b!=c) { cout << "3" << endl; } else if { cout << "2" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:13: error: expected '(' before '{' token 17 | } else if { | ^ | (
s725803548
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 if(a==b||b==c||c==a){ cout << 2; } int e=3; else{ cout << e; } }
a.cc: In function 'int main()': a.cc:13:3: error: 'else' without a previous 'if' 13 | else{ | ^~~~
s001586100
p03962
C++
#include <bits/stdc++.h> using namespace std; #define pp pair<int,int> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ll long long #define ld long double #define all(a) (a).begin(),(a).end() #define mk make_pair ll MOD=1000000007; ll mod=998244353; int inf=1000001000; ll INF=1e18+5; int main() { set<int> s; ...
a.cc: In function 'int main()': a.cc:22:15: error: no matching function for call to 'std::set<int>::find()' 22 | if (s.find()==s.end()) s.insert(f); | ~~~~~~^~ In file included from /usr/include/c++/14/set:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158, ...
s087211815
p03962
C++
#include <bits/stdc++.h> #define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++) using namespace std; //////全探索したいときに開けよ//////// vector<vector<int>> fspattern; vector<int> fspattern_draft; int fspcnt = 0; void setfspattern_core(int floor,int number,int degree){ if(floor==degree){ fspattern.at(fspcnt) = fspattern...
a.cc:110:1: error: expected declaration before '}' token 110 | } | ^
s891699376
p03962
C++
#include<iostream> int a[4],ans[105],ak; main() { for(int i=1;i<=3;i++){ cin>>a[i]; ans[a[i]]++; } for(int i=1;i<=103;i++){ if(ans[i]>0) ak++; } cout<<ak<<endl; return 0; }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a[i]; | ^~~ | std::cin In file included from ...
s150017060
p03962
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b =sc.nextInt(); int c = sc.nextInt(); int ans = 0; if(a == b) { if(b == c) ans = 1; else ans = 2; }else if(b == c) { ans = 2; }else if(a == c...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s299599641
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c ; int ans =3; if(a==c) ans--; if(a==b) ans--; if(c== b) ans--; if((a == b) && (b == c)) ans ++ cout << ans ; }
a.cc: In function 'int main()': a.cc:15:11: error: expected ';' before 'cout' 15 | ans ++ | ^ | ; 16 | cout << ans ; | ~~~~
s555613411
p03962
C++
#include <iostream> using namespace std; int main(){ cin>>a>>b>>c; cout<<1+(a!=b)+(b!=c&&a!=c); return 0; }
a.cc: In function 'int main()': a.cc:6:8: error: 'a' was not declared in this scope 6 | cin>>a>>b>>c; | ^ a.cc:6:11: error: 'b' was not declared in this scope 6 | cin>>a>>b>>c; | ^ a.cc:6:14: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c; | ...
s447704134
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args) { Set colorSet = new Set(); Scanner sc = new Scanner(System.in); int color1 = sc.nextInt(); int color2 = sc.nextInt(); int color3 = sc.nextInt(); colorSet.add(color1); color.add(color2); colorSet.add(color3...
Main.java:5: error: Set is abstract; cannot be instantiated Set colorSet = new Set(); ^ Main.java:12: error: cannot find symbol color.add(color2); ^ symbol: variable color location: class Main Main.java:15: error: incompatible types: Object[] cannot be converted to int[] int[] c...
s675588988
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args) { Set colorSet = new Set(); Scanner sc = new Scanner(System.in); int color1 = sc.nextInt(); int color2 = sc.nextInt(); int color3 = sc.nextInt(); colorSet.add(color1); color.add(color2); colorSet.add(color3...
Main.java:15: error: not a statement colorSet.toArray().length; ^ 1 error
s263454799
p03962
C++
#include<bits/stdc++.h> using namespace std; typedef long long int ll #define int ll int32_t main(){ int i = 3; set<int> myset; while(i--){ int temp; cin>>temp; myset.insert(temp); } cout<<myset.size()<<endl; }
a.cc:5:1: error: expected initializer before 'int32_t' 5 | int32_t main(){ | ^~~~~~~
s459702333
p03962
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a,b,c ; a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); if(a != b && b!= c && c!=a){ System.out.println(3) }else if( a==b && b==c && c==a){ ...
Main.java:11: error: ';' expected System.out.println(3) ^ 1 error
s993307053
p03962
C++
#include <iostream> using namespace std; int main(void){ string str; vector<string> v; while (getline(cin, str, ' ')) { v.push_back(str); } sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); cout << v.size() << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'vector' was not declared in this scope 5 | vector<string> v; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> ...
s226410617
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; if(A!=B&&B!=C&&C!=A) cout<<3<<endl; else if(A==B&&B==C&&C==A) cout<<1<<endl; else cout<<2<<endl; }
a.cc: In function 'int main()': a.cc:6:6: error: 'A' was not declared in this scope 6 | if(A!=B&&B!=C&&C!=A) cout<<3<<endl; | ^ a.cc:6:9: error: 'B' was not declared in this scope 6 | if(A!=B&&B!=C&&C!=A) cout<<3<<endl; | ^ a.cc:6:15: error: 'C' was not declared in this scope 6 ...
s067775811
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,cnt = 0; cin >> a >> b >> c; if(a != b) cnt++; else if(a != c) cnt++; else if(b != c) cnt++; cout << cnt << endl; } }
a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s561187129
p03962
Java
import java.util.*; import java.util.ArrayList; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<Integer>(); int a =sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); number = 3; if(a ==...
Main.java:10: error: cannot find symbol number = 3; ^ symbol: variable number location: class Main Main.java:12: error: cannot find symbol number--; ^ symbol: variable number location: class Main Main.java:15: error: cannot find symbol number --; ^ symbol: variabl...
s373997841
p03962
Java
import java.util.*; import java.util.ArrayList; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<Integer>(); int a =sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); number = 3; if(a ==...
Main.java:24: error: reached end of file while parsing } ^ 1 error
s700479858
p03962
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define co(a) cout<<a<<endl #define sz size() #define bgn begin() #defin...
a.cc: In function 'int main()': a.cc:319:11: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 319 | cout<3<<endl; | ~^~~~~~
s701004395
p03962
C
#include <stdio.h> int main(void){ int a,b,c,sum; scanf("%d%d%d",&a,&b,&c); if(a!=b){ sum++; } if(b!=c){ sum++; } if(c!=a){ sum++; } if(a==B||a==c){ sum=1; } printf("%d",sum); return 0; }
main.c: In function 'main': main.c:14:15: error: 'B' undeclared (first use in this function) 14 | if(a==B||a==c){ | ^ main.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
s344324460
p03962
C++
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main(){ int a[4]; cin>>a[0]>>a[1]>>a[2]; int cnt=3; if(a[i]==a[(i+1)%3]&&a[(i+2)%3]==a[(i+1)%3]){ cout<<1<<endl; return 0; } for(int i=0;i<3;i++){ if(a[i]==a[(i+1)%3])cnt--; } cout<<cnt<<endl; }
a.cc: In function 'int main()': a.cc:9:8: error: 'i' was not declared in this scope 9 | if(a[i]==a[(i+1)%3]&&a[(i+2)%3]==a[(i+1)%3]){ | ^
s917370541
p03962
C
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a == b && a==c){ printf("1"); } else if((a==b && a!=c) || (a != b && a==c)) { printf("2"); } else{ printf("3"); return 0; }
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s532344742
p03962
Java
import java.util.*; public class A { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int c = Integer.parseInt(sc.next()); int ans = 3; if(a == b) { ans--; }else if(a == c){ ans--; }else if(b...
Main.java:2: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s363839487
p03962
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
a.cc: In function 'int main()': a.cc:80:5: error: 'ing' was not declared in this scope; did you mean 'int'? 80 | ing num=0; | ^~~ | int a.cc:81:12: error: expected initializer before '.' token 81 | int min.max; | ^ a.cc:82:14: error: overloaded function with no context...
s630519744
p03962
C++
#include<bit/stdc++.h> using namespace std; int main() { int a, b, c; cin>>a>>b>>c; map<int, int> m; m[a]++;m[b]++;m[c]++; int count = 0; for(auto i = m.begin(); i != m.end(); i++) { if(i -> second != 0) count++; } cout<<count<<"\n"; return 0; }
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory 1 | #include<bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s536331338
p03962
C++
#include <iostream> using namespace std; int a,b,c,sum=3; int main(){ cin>>a>>b>>c; if(a==b){ sum--; } if(b==c){ sum--; } if(c==a){ sum--; } if(a==b&&b==c){ cout<<1; break; } cout<<sum; return 0; }
a.cc: In function 'int main()': a.cc:17:17: error: break statement not within loop or switch 17 | break; | ^~~~~
s897812820
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl; }
a.cc: In function 'int main()': a.cc:7:40: error: expected '}' before ')' token 7 | cout << (max({A, B, C})==min({A, B, C)}?"1":((A!=B&&B!=C)?"3":"2")) << endl; | ~ ^ a.cc:7:41: error: expected ')' before '}' token 7 | cout << (max({A, B, C})==min({A, B, C)}?"1":((...
s745460394
p03962
C++
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};con...
a.cc:1:21: warning: multi-character character constant [-Wmultichar] 1 | const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input...
s006885472
p03962
C++
// C++ implementation of the approach #include <bits/stdc++.h> using namespace std; // Function to generate and print the required string void generateString(int A, int B) { string rt; while (0 < A || 0 < B) { // More 'b', append "bba" if (A < B) { if (0 < B--) ...
a.cc:60:1: error: expected unqualified-id before 'return' 60 | return 0;} | ^~~~~~ a.cc:60:10: error: expected declaration before '}' token 60 | return 0;} | ^
s529936779
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){ cout << "2" << endl; }else if(b == c){ cout << "2" << endl; }else if(a == c){ cout << "2" << endl; }else{ cout << "3" << endl; } }
a.cc: In function 'int main()': a.cc:4:12: error: found ':' in nested-name-specifier, expected '::' 4 | int a,b,c: | ^ | :: a.cc:4:11: error: 'c' has not been declared 4 | int a,b,c: | ^ a.cc:5:7: error: qualified-id in declaration before '>>' token 5 | ...
s937370902
p03962
C++
#include <iostream> using namespace std; int main() { int r,m,d; cin>>r>>m>>d; if(r==m && r==d){ cout<<1; } else if ( (r==m && r!=d)||(r!=m && d==m)||(a==d && a!=m )) { cout<<2; } else if (r!=m && m!=d && r!=d) { cout<<3; } return 0; }
a.cc: In function 'int main()': a.cc:15:46: error: 'a' was not declared in this scope 15 | else if ( (r==m && r!=d)||(r!=m && d==m)||(a==d && a!=m )) | ^
s209593971
p03962
C++
#include <iostream> #include <string> #include <sstream> #include <iomanip> #include <math.h> #include <stdio.h> #include <string.h> #include <queue> #include <stack> #include <vector> #include <map> #include <set> #include <functional> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <b...
a.cc: In function 'int main()': a.cc:33:24: error: no matching function for call to 'std::set<int>::count()' 33 | cout << s.count(); | ~~~~~~~^~ In file included from /usr/include/c++/14/set:63, from a.cc:12: /usr/include/c++/14/bits/stl_set.h:756:9: note: candidate: 't...
s723134696
p03962
C++
#include<iostraem> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if ((a == b) && (b == c) && (c ==a)) cout << 1 << endl; else if ((a == b) || (b == c) || (c == a)) cout << 2 << endl; else cout << 3 << endl; return 0; }
a.cc:1:9: fatal error: iostraem: No such file or directory 1 | #include<iostraem> | ^~~~~~~~~~ compilation terminated.
s870834717
p03962
C++
#include <vector> #include <iostream> #include <algorithm> #include <functional> #include <string> #include <limits.h> #include <cmath> #include <queue> #include <map> #include <iomanip> #include <random> #include <fstream> #define rep(i, n) for (int i = 0; i < n; i++) #define PI 3.14159265358979323846 #define MOD 1000...
a.cc: In function 'int main()': a.cc:71:7: error: 'a' was not declared in this scope 71 | if (a==b && b==c){cout << 1;} | ^ a.cc:71:10: error: 'b' was not declared in this scope 71 | if (a==b && b==c){cout << 1;} | ^ a.cc:71:18: error: 'c' was not declared in this scope 71 | if...
s911094662
p03962
C++
#include<stdio.h> int main() { int a[3]={0}; int i,j,x,; int k=1; for(i=0;i<3;i++){ scanf("%d",&x); a[i]=x;} for(i=0;i<2;i++) { for(j=i+1;j<3;j++) { if(a[i]!=a[j]) k++; } } printf("%d\n",k); return 0; }
a.cc: In function 'int main()': a.cc:5:19: error: expected unqualified-id before ';' token 5 | int i,j,x,; | ^
s506498408
p03962
C++
#include<stdio.h> int main() { int a[3]={0}; int i,j,x,; int k=0; for(i=0;i<3;i++){ scanf("%d",&x); a[i]=x;} for(i=0;i<3;i++) { for(j=i+1;j<3;j++) { if(a[i]!=a[j]) k++; } } printf("%d\n",k); return 0; }
a.cc: In function 'int main()': a.cc:5:19: error: expected unqualified-id before ';' token 5 | int i,j,x,; | ^
s195772823
p03962
C
#include <stdio.h> int main1() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b||a==c||b==c) { printf("2"); } else if(a==b&&b==c) { printf("1"); } else { printf("1"); } return 0; }
/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
s038980382
p03962
C++
#include <bits/stdc++.h> using namespace std; int a; set<int> s; int main(){ for(int i = 0; i < n; i++){ cin >> a; s.insert(a); } cout << s.size(); }
a.cc: In function 'int main()': a.cc:7:25: error: 'n' was not declared in this scope 7 | for(int i = 0; i < n; i++){ cin >> a; s.insert(a); } | ^
s017175598
p03962
C++
#include<bits/stdc++> using namespace std; int main(){ int a,b,c; int answer; cin >> a >> b >> c; if(a==b && b==c) answer = 1; else if(a!=b && b!=c) answer = 3; else answer = 2; cout << answer << endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s846071060
p03962
C++
3 1 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 1 4 | ^
s581411340
p03962
Java
#include<iostream> #include <algorithm> #define syso(s) std::cout<<s<<endl; #define sc(i) std::cin>>i; using namespace std; int main() { int a, b, c; int count = 0; sc(a) sc(b) sc(c) if (a == b) { count++; } if (b == c) { count++; } if (c == a) { count++; } if (count == 3) { count--; } syso(3-coun...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include <algorithm> ^ Main.java:3: error: illegal character: '#' #define syso(s) std::cout<<s<<endl; ^ Main.java:4: error: illegal character: '#' #define sc(i) std::cin>>i; ^ Main.java:4: error: class, interface,...
s635079737
p03962
C++
import java.util.Scanner; public class Main { static Scanner scan=new Scanner(System.in); static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;} static long lcm (int a, int b) {return a*b/gcd(a,b);} static int max(int a,int b) {return a>b?a:b;} static int min(int a,int b) {return a<b?a:b;} static long factorial...
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:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s149549589
p03962
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define pb emplace_back #define mp make_pair #define f(i,a,n) for(int i=a ; i<n ; i++) #define F first #define S second #define fast ios:: sync_with_stdio(false),cin.tie(0); int32_t main(){ fast; map<int,int<m; int a,b,c; cin >> a >> b >> c; m[a]...
a.cc: In function 'int32_t main()': a.cc:4:18: error: 'long int' is not a template 4 | #define int long long | ^~~~ a.cc:14:17: note: in expansion of macro 'int' 14 | map<int,int<m; | ^~~ a.cc:14:21: error: 'm' was not declared in this scope; did you mean 'tm'...
s600709437
p03962
C++
#include <iostream> int main(){int a,b,c;std::cin>>a>>b>>c;std::cout<<max(1,(a!=b)+(b!=c)+(c!=a));}
a.cc: In function 'int main()': a.cc:2:51: error: 'max' was not declared in this scope; did you mean 'std::max'? 2 | int main(){int a,b,c;std::cin>>a>>b>>c;std::cout<<max(1,(a!=b)+(b!=c)+(c!=a));} | ^~~ | ...
s225341107
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,count; count = 0; if(a != b){ count ++; } if(a != c){ count ++; } if(c != b){ count ++; } if (count == 0){ count ++ } cout << count << endl; }
a.cc: In function 'int main()': a.cc:16:13: error: expected ';' before '}' token 16 | count ++ | ^ | ; 17 | } | ~
s128149862
p03962
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b&&b==c) { printf("1\n"); } if(a==b&&a!=c) { printf("2\n"); } if(a!=b&&b==c) { printf("2\n"); } if(a!=b&&a==c) { printf("2\n"); } if(a!=b&&b!=c&&a!=c) { printf("3...
main.c: In function 'main': main.c:24:18: error: expected ';' before '}' token 24 | printf("3\n") | ^ | ; 25 | } | ~
s778464732
p03962
C
#include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b&&b==c) { printf("1\n"); } if(a==b&&a!=c) { printf("2\n"); } if(a!=b&&b==c) { printf("2\n"); } if(a!=b&&a==c) { printf("2\n"); } if(a!=b&&b!=c&&a!=c) { printf("3...
main.c: In function 'main': main.c:24:18: error: expected ';' before '}' token 24 | printf("3\n") | ^ | ; 25 | } | ~
s011559810
p03962
C++
include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b==c) printf("%d\n",a); if(a==b&&a!=c) printf("%d %d\n",a,c); if(a==c&&a!=b) printf("%d %d\n",a,b); if(b==c&&a!=b) printf("%d %d\n",a,b); if(a!=b&&a!=c&&b!=c) printf("%d %d %d\n",a,b,c); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s016311019
p03962
C
include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b==c) printf("%d\n",a); if(a==b&&a!=c) printf("%d %d\n",a,c); if(a==c&&a!=b) printf("%d %d\n",a,b); if(b==c&&a!=b) printf("%d %d\n",a,b); if(a!=b&&a!=c&&b!=c) printf("%d %d %d\n",a,b,c); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s118283058
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int>color(3); int ans; ans=0; for(int i=0;i<3;i++){ cin>>color.at(i); } if(color.at(0)!=color.at(1)){ ans++; } if(color.at(1)!=color.at(2)){ ans++; } if(color.at(1)!=color.at(2)){ ans++; } if(color.at(0)==color.at(1)...
a.cc: In function 'int main()': a.cc:24:4: error: expected '}' at end of input 24 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s707072227
p03962
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int ans=3; if(a==b) ans-=; if(a==c) ans-=; if(b==c) ans-=; if(a==b && b==c) ans+=; cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:10:17: error: expected primary-expression before ';' token 10 | if(a==b) ans-=; | ^ a.cc:11:17: error: expected primary-expression before ';' token 11 | if(a==c) ans-=; | ^ a.cc:12:17: error: expected primary-expression before ';...
s268381584
p03962
C++
// RAM RAM #include <bits/stdc++.h> #define int long long #define pb push_back #define ppb pop_back #define vi vector<int> #define mp make_pair #define arrayin(a,n) for(int i=0;i<n;i++){cin>>a[i];} #define N 55 using namespace std; int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0); set<int> s; ...
a.cc: In function 'int32_t main()': a.cc:24:9: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::set<long long int>') 24 | cout<<s,szie()<<endl; | ~~~~^~~ | | | | | std::set<long long int> | std::ostream {...
s450758284
p03962
Java
046A' import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); Set<Integer> hs = new HashSet<>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } }
Main.java:1: error: class, interface, enum, or record expected 046A' ^ Main.java:1: error: illegal line end in character literal 046A' ^ 2 errors
s658797975
p03962
Java
046A' import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); Set<> hs = new HashSet<>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } }
Main.java:1: error: class, interface, enum, or record expected 046A' ^ Main.java:1: error: illegal line end in character literal 046A' ^ Main.java:12: error: illegal start of type Set<> hs = new HashSet<>(); ^ 3 errors
s687623691
p03962
Java
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); Set<int> hs = new HashSet<>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } }
Main.java:11: error: unexpected type Set<int> hs = new HashSet<>(); ^ required: reference found: int 1 error
s331025459
p03962
Java
046A' import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); HashSet<int> hs = new HashSet<>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } }
Main.java:1: error: class, interface, enum, or record expected 046A' ^ Main.java:1: error: illegal line end in character literal 046A' ^ 2 errors
s837803529
p03962
Java
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); Set<int> hs = new HashSet<int>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } } p
Main.java:20: error: reached end of file while parsing p ^ 1 error
s177176037
p03962
Java
046A' import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); HashSet<int> hs = new HashSet<int>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } }
Main.java:1: error: class, interface, enum, or record expected 046A' ^ Main.java:1: error: illegal line end in character literal 046A' ^ 2 errors
s819727196
p03962
Java
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); HashSet< int > hs = new HashSet<int>(); hs.add(a); hs.add(b); hs.add(c); System.out.println(hs.size()); } }
Main.java:10: error: unexpected type HashSet< int > hs = new HashSet<int>(); ^ required: reference found: int Main.java:10: error: unexpected type HashSet< int > hs = new HashSet<int>(); ^ required: reference found: int 2 errors
s454713509
p03962
Java
046A import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int total = 3; if(a == b || a == c || b == c){ total = 2; } if(a == b && a == c && b == c){ total = 1; } System.out.println(total); } }...
Main.java:1: error: class, interface, enum, or record expected 046A ^ 1 error
s390493630
p03962
C++
#include<bits/stdc++.h> using namespace std; int x; map<int> a; int main(){ cin>>x;a[x]++; cin>>x;a[x]++; cin>>x;a[x]++; cout<<a.size()<<endl; }
a.cc:4:8: error: wrong number of template arguments (1, should be at least 2) 4 | map<int> a; | ^ 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...
s696095731
p03962
C++
#include<iostream> using namespace std; int x; map<int> a; int main(){ cin>>x;a[x]++; cin>>x;a[x]++; cin>>x;a[x]++; cout<<a.size()<<endl; }
a.cc:4:1: error: 'map' does not name a type 4 | map<int> a; | ^~~ a.cc: In function 'int main()': a.cc:6:10: error: 'a' was not declared in this scope 6 | cin>>x;a[x]++; | ^
s013607164
p03962
C++
#include <iostream> using namespace std; typedef long long ll; int main(){ set<ll>S; for(ll i = 0; i < 3; i++){ ll x; cin >> x; S.insert(x); } cout << S.size() << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'set' was not declared in this scope 8 | set<ll>S; | ^~~ a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 1 | #include <iostream> +++ |+#include <set> 2 | using namespace std; a.cc:8:...
s714712066
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; } if(a==b && b==c){ cout<<"1"<<endl; } else{ cout<<"2"<<endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: expected primary-expression before '=' token 7 | if(a!==b && a!==c && b!==c){ | ^ a.cc:7:18: error: expected primary-expression before '=' token 7 | if(a!==b && a!==c && b!==c){ | ^ a.cc:7:27: error: expected primary-expre...
s323031999
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int[] data=new int[3]; for(int i=0;i<3;i++){ data[i]=sc.nextInt(); } Arrays.sort(data); if(data[0]==data[1]){ if(data[1]==data[2]){ System.out.println(1); ...
Main.java:19: error: ';' expected System.out.println(2) ^ 1 error
s794416410
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >>b ; cout << b*((b-1)^(a-1)) << endl; }​
a.cc:14:2: error: '\U0000200b' does not name a type 14 | }​ |
s492777044
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, cnt=0; cin >> a >> b >> c; if (a==b && b==c) { cout << 1; return 0; } if (a!=b) cnt++; if (a!=c) cnt++; if (b!=c) cnt++; cout << << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:12: error: expected primary-expression before '<<' token 14 | cout << << endl; | ^~
s937631909
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a==b&&a==c)cout << 1 <<endl; if(a =! b && a =! c) cout << 3 << endl; else cout << 2 << endl; }
a.cc: In function 'int main()': a.cc:7:15: error: lvalue required as left operand of assignment 7 | if(a =! b && a =! c) cout << 3 << endl; | ~~~~^~~~
s498135667
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >>a>>b>>c; if(a==b&&a==c)cout << 1 <<endl; if(a =! b && a =! c && c =! b) cout << 3 << endl; else cout << 2 << endl; }
a.cc: In function 'int main()': a.cc:7:25: error: lvalue required as left operand of assignment 7 | if(a =! b && a =! c && c =! b) cout << 3 << endl; | ~~~~^~~~
s168791484
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int color = 3; if(a==b || a==c) color--; ir(b==c) color--; cout << color << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'ir' was not declared in this scope 9 | ir(b==c) color--; | ^~
s912752966
p03962
C
#include<stdio.h> int main(){ int a,b,c; scanf("%d\n%d\n%d",&a,&b,&c); if(a=b&&a=c){ printf("1"); }else if(a=b&&a!=c){ printf("2"); }else if(a=c&&a!=b){ printf("2"); }else if(c=b&&a!=c){ printf("2"); }else{ printf("3"); } return 0; }
main.c: In function 'main': main.c:5:12: error: lvalue required as left operand of assignment 5 | if(a=b&&a=c){ | ^
s341177435
p03962
C
#include<stdio.h> int main(){ int a,b,c; scanf("%d\n%d\n%d",&a,&b,&c); if(a=b&&a=c){ printf("1"); }else if(a=b&&a!=c){ printf("2"); }else if(a=c&&a!=b){ printf("2"); }else if(c=b&&a!=c){ printf("2"); }else if(a!=b!=c){ printf("3"); } return 0; }
main.c: In function 'main': main.c:5:12: error: lvalue required as left operand of assignment 5 | if(a=b&&a=c){ | ^
s254276769
p03962
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0;i < (n); ++i) using namespace std; int main(){ map<int,int> num; rep(i,3){ int tmp = 0; cin >> tmp; map[tmp]++; } cout << map.size(); return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: conflicting declaration 'auto tmp' 13 | map[tmp]++; | ^~~ a.cc:10:9: note: previous declaration as 'int tmp' 10 | int tmp = 0; | ^~~ a.cc:13:13: error: expected initializer before '++' token 13 | map[tmp]++; | ...
s758153026
p03962
C++
#include<bits/stdc++.h> int main(){ map<int,int> m; int a,b,c; cin>>a>>b>>c; m[a]++; m[b]++; m[c]++; cout<<m.size()<<endl; }
a.cc: In function 'int main()': a.cc:3:5: error: 'map' was not declared in this scope 3 | map<int,int> m; | ^~~ a.cc:3:5: note: suggested alternatives: In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from ...
s857898492
p03962
C++
#include<stdc.h++> int main(){ map<int,int> m; int a,b,c; cin>>a>>b>>c; m[a]++; m[b]++; m[c]++; cout<<m.size()<<endl; }
a.cc:1:9: fatal error: stdc.h++: No such file or directory 1 | #include<stdc.h++> | ^~~~~~~~~~ compilation terminated.
s758527886
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; set<int> colors; colors.push(a); colors.push(b); colors.push(c); cout << colors.size() << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'class std::set<int>' has no member named 'push' 9 | colors.push(a); | ^~~~ a.cc:10:10: error: 'class std::set<int>' has no member named 'push' 10 | colors.push(b); | ^~~~ a.cc:11:10: error: 'class std::set<int>' has no member na...
s647939126
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; set<int> colors; set.push(a); set.push(b); set.push(c); cout << set.size() << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:6: error: expected unqualified-id before '.' token 9 | set.push(a); | ^ a.cc:10:6: error: expected unqualified-id before '.' token 10 | set.push(b); | ^ a.cc:11:6: error: expected unqualified-id before '.' token 11 | set.push(c); | ...
s023932295
p03962
C++
#include<iostream> using namespace std; int main() { int a,b,c ; cin >> a >> b >> c ; if ( a==b and b==c ) cout << 1 ; else if (a!=b and b!=c and a!c) cout << 3 ; else cout << 2 ; }
a.cc: In function 'int main()': a.cc:10:31: error: expected ')' before '!' token 10 | else if (a!=b and b!=c and a!c) cout << 3 ; | ~ ^ | )
s884999924
p03962
C++
#include <bits/stdc++.h> using namespace std; int main () { int a, b, c; cin >> a >> b >> c; if ((a == b) && (a == c)){ cout << 1 << endl; else if ((a != b) && (a != c) && (b != c)) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:11:3: error: expected '}' before 'else' 11 | else if ((a != b) && (a != c) && (b != c)) { | ^~~~ a.cc:8:28: note: to match this '{' 8 | if ((a == b) && (a == c)){ | ^
s073200907
p03962
C++
#include <bits/stdc++.h> using namespace std; int main () { int a, b, c; cin >> a >> b >> c; if ((a == b) && (a == c)){ cout << 1 << endl; } if else ((a != b) && (a != c) && (b != c)) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:11:6: error: expected '(' before 'else' 11 | if else ((a != b) && (a != c) && (b != c)) { | ^~~~ | ( a.cc:14:3: error: 'else' without a previous 'if' 14 | else { | ^~~~
s756482513
p03962
C++
#include <bits/stdc++.h> using namespace std; int main () { int a, b, c; cin >> a >> b >> c if ((a == b) && (a == c)){ cout << 1 << endl; } if else ((a != b) && (a != c) && (b != c)) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:7:21: error: expected ';' before 'if' 7 | cin >> a >> b >> c | ^ | ; 8 | 9 | if ((a == b) && (a == c)){ | ~~ a.cc:12:6: error: expected '(' before 'else' 12 | if else ((a != b) && (a !...
s536903517
p03962
C++
#include <bits/stdc++.h> using namespace std; int a, b, c; int main () { cin >> a; cin >> b; cin >> c; if ((a == b) && (a == c)){ cout << 1 << endl; } if else ((a != b) && (a != c) && (b != c)) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:14:6: error: expected '(' before 'else' 14 | if else ((a != b) && (a != c) && (b != c)) { | ^~~~ | ( a.cc:17:3: error: 'else' without a previous 'if' 17 | else { | ^~~~
s426216804
p03962
C++
#include <bits/stdc++.h> using namespace std; int a, b, c; int main () { cin >> a >> b >> c; if ((a == b) && (a == c)){ cout << 1 << endl; } if else ((a != b) && (a != c) && (b != c)) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:11:6: error: expected '(' before 'else' 11 | if else ((a != b) && (a != c) && (b != c)) { | ^~~~ | ( a.cc:14:3: error: 'else' without a previous 'if' 14 | else { | ^~~~
s273468474
p03962
C++
#include <bits/stdc++.h> using namespace std; int a, b, c; int main () { cin >> a >> b >> c; if ((a == b) && (a == c)){ cout << 1 << endl; } if else ((a != b) && (a != c)) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:11:6: error: expected '(' before 'else' 11 | if else ((a != b) && (a != c)) { | ^~~~ | ( a.cc:14:3: error: 'else' without a previous 'if' 14 | else { | ^~~~
s558410149
p03962
C++
#include <bits/stdc++.h> using namespace std; int a, b, c; int main () { cin >> a >> b >> c; if (a == b && a == c){ cout << 1 << endl; } if else (a != b && a != c) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:11:6: error: expected '(' before 'else' 11 | if else (a != b && a != c) { | ^~~~ | ( a.cc:14:3: error: 'else' without a previous 'if' 14 | else { | ^~~~
s557745717
p03962
C
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> int main() { scanf("&d\n",a); scanf("&d\n", b); scanf("&d\n", c); if (a == b == c) { printf("1\n"); } else if(a!=b && a!=c){ printf("3\n"); } else { printf("2\n"); } }
main.c: In function 'main': main.c:7:22: error: 'a' undeclared (first use in this function) 7 | scanf("&d\n",a); | ^ main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in main.c:8:31: error: 'b' undeclared (first use in this function) ...
s630630808
p03962
C
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> int main() { scanf("&d\n",a) scanf("&d\n", b) scanf("&d\n", c) if (a == b == c) { printf("1\n"); } else if(a!=b && a!=c){ printf("3\n"); } else { printf("2\n"); } }
main.c: In function 'main': main.c:7:22: error: 'a' undeclared (first use in this function) 7 | scanf("&d\n",a) | ^ main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in main.c:7:24: error: expected ';' before 'scanf' 7 | s...
s328180309
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { vector(int) x(3); cin>>x.at(0)>>x.at(1)>>x.at(2); sort(x.begin(), x.end()); if(x.at(0)!=x.at(1)){ cout<<3<<endl; } if(x.at(0)==x.at(1) && x.at(0)!=x.at(2)){ cout<<2<<endl; } if(x.at(0)==x.at(1) && x.at(0)==x.at(2)){ cout<<1<<en...
a.cc: In function 'int main()': a.cc:5:9: error: missing template arguments before '(' token 5 | vector(int) x(3); | ^ a.cc:5:10: error: expected primary-expression before 'int' 5 | vector(int) x(3); | ^~~ a.cc:6:8: error: 'x' was not declared in this scope 6 | cin>>x.at(0...