submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s697930741
|
p03962
|
C++
|
using namespace std;
int hako[111];
int main(){
int a,b,c;
cin>>a>>b>>c;
hako[a]=1;
hako[b]=1;
hako[c]=1;
a=0;
for(int i=0;i<111;i++){
a+=hako[i];
}
cout<<a<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:13:1: error: 'cout' was not declared in this scope
13 | cout<<a<<endl;
| ^~~~
a.cc:13:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:10: error: 'endl' was not declared in this scope
13 | cout<<a<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
|
s275284790
|
p03962
|
C++
|
int hako[111];
int main(){
int a,b,c;
std::cin>>a>>b>>c;
hako[a]=1;
hako[b]=1;
hako[c]=1;
a=0;
for(int i=0;i<111;i++){
a+=hako[i];
}
std::cout<<a<<std::endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:4:6: error: 'cin' is not a member of 'std'
4 | std::cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int hako[111];
a.cc:12:6: error: 'cout' is not a member of 'std'
12 | std::cout<<a<<std::endl;
| ^~~~
a.cc:12:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:20: error: 'endl' is not a member of 'std'
12 | std::cout<<a<<std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | int hako[111];
|
s957215860
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main (){
int N,K;
cin >>N >>K;
int ans = K
for (int i=0; i<N-1;i++){
ans = ans * (K-1);
}
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'for'
9 | for (int i=0; i<N-1;i++){
| ^~~
a.cc:9:19: error: 'i' was not declared in this scope
9 | for (int i=0; i<N-1;i++){
| ^
|
s277816577
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a == b && b == c) {
cout << 3 << endl;
} else if(a == b b == c || a == c) {
cout << 2 << endl;
} else {
cout << 1 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:19: error: expected ')' before 'b'
9 | } else if(a == b b == c || a == c) {
| ~ ^ ~
| )
|
s872059279
|
p03962
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main()
{
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
int n = 3;
if (a[1] == a[2]) {
n = n - 1;
}
if(a[0]==a[1])
{
n = n - 1;
}
cout << n << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(a, a + 3);
| ^~~~
| short
|
s877071777
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(void){
int a,c,b=1,d;
cin>>a;
cin>>c;
if(c!=a){
b++;
}
cin>>d;
if(d!=a&&d!=c){
b++;
}
}
cout<<b<<endl;
}
|
a.cc:15:5: error: 'cout' does not name a type
15 | cout<<b<<endl;
| ^~~~
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s852524401
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vvd> vvvd;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
#define LL long long;
#define REP(i,s,N) for (int i=s; i<N; i++)
int main() {
vi a(3,0);
int ans = 1;
REP(i,0,3) cin >> vi[i];
sort(vi.begin(), vi.end());
if(vi[0]!=vi[1]) ans++;
if(vi[1]!=vi[2]) ans++;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:18:29: error: expected primary-expression before '[' token
18 | REP(i,0,3) cin >> vi[i];
| ^
a.cc:19:16: error: expected primary-expression before '.' token
19 | sort(vi.begin(), vi.end());
| ^
a.cc:19:28: error: expected primary-expression before '.' token
19 | sort(vi.begin(), vi.end());
| ^
a.cc:20:14: error: expected unqualified-id before '[' token
20 | if(vi[0]!=vi[1]) ans++;
| ^
a.cc:21:14: error: expected unqualified-id before '[' token
21 | if(vi[1]!=vi[2]) ans++;
| ^
|
s750701189
|
p03962
|
C++
|
import std.algorithm,
std.string,
std.array,
std.range,
std.stdio,
std.conv;
void main() {
readln.chomp.split.to!(int[]).sort!"a<b".uniq.array.length.writeln;
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import std.algorithm,
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: '::main' must return 'int'
8 | void main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'readln' was not declared in this scope
9 | readln.chomp.split.to!(int[]).sort!"a<b".uniq.array.length.writeln;
| ^~~~~~
|
s871588553
|
p03962
|
C++
|
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int sum =3;
if(a == b) sum-=1;
if(a == c) sum-=1;
if(b == c) sum-=1;
System.out.println(sum);
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
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 {
| ^~~~~~
|
s541672382
|
p03962
|
C++
|
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int sum =3;
if(a == b) sum-=1;
if(a == c) sum-=1;
if(b == c) sum-=1;
System.out.println(sum);
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
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 {
| ^~~~~~
|
s204774080
|
p03962
|
Java
|
import java.util.*;
public class Main {
public class A_AtCoDeerandPaintCans {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a == b && b == c){
System.out.println(1);
}else if(a == b || b == c || a == c){
System.out.println(2);
}else{
System.out.println(3);
}
}
}
|
Main.java:17: error: reached end of file while parsing
}
^
1 error
|
s581130583
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a == b || a == c || b == c){
System.out.println("2");
}elseif(a == b == c){
System.out.println("1");
}else{
System.out.println("3");
}
}
}
|
Main.java:10: error: ';' expected
}elseif(a == b == c){
^
Main.java:12: error: 'else' without 'if'
}else{
^
2 errors
|
s643468117
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double N = sc.nextInt();
double K = sc.nextInt();
double cnt = K * (Math.pow(K-1.0,N-1.0));
System.out.println(int)(cnt);
}
}
|
Main.java:8: error: '.class' expected
System.out.println(int)(cnt);
^
Main.java:8: error: ';' expected
System.out.println(int)(cnt);
^
Main.java:8: error: not a statement
System.out.println(int)(cnt);
^
Main.java:8: error: ';' expected
System.out.println(int)(cnt);
^
4 errors
|
s197729305
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String c = sc.next();
double N = sc.nextInt();
double K = sc.nextInt();
double cnt = K * (Math.(K-1,N-1));
System.out.println(cnt);
}
}
|
Main.java:9: error: <identifier> expected
double cnt = K * (Math.(K-1,N-1));
^
1 error
|
s717263782
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String c = sc.next();
int N = sc.nextInt();
int K = sc.nextInt();
int cnt = K * (int)(Math.(K-1,N-1));
System.out.println(cnt);
}
}
|
Main.java:9: error: <identifier> expected
int cnt = K * (int)(Math.(K-1,N-1));
^
1 error
|
s661455549
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
int c =sc.nextInt();
if((a==b) && (b==c)){
System.out.println("1");
}else if((a==b && b!=c) || (b==c && b!=a) ||(a=c && b!=a)){
System.out.println("2");
}else{
System.out.println("3");
}
}
}
|
Main.java:10: error: bad operand types for binary operator '&&'
}else if((a==b && b!=c) || (b==c && b!=a) ||(a=c && b!=a)){
^
first type: int
second type: boolean
Main.java:10: error: bad operand types for binary operator '||'
}else if((a==b && b!=c) || (b==c && b!=a) ||(a=c && b!=a)){
^
first type: boolean
second type: int
2 errors
|
s424133089
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
int c =sc.nextInt();
if(a==b==c){
System.out.println("1");
}else if((a==b && b!=c) || (b==c && b!=a)){
System.out.println("2");
}else{
System.out.println("3");
}
}
}
|
Main.java:8: error: incomparable types: boolean and int
if(a==b==c){
^
1 error
|
s018279454
|
p03962
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
int c =sc.nextInt();
if(a==b==c){
System.out.println("1");
}else if(a==b!=c || b==c!=a){
System.out.println("2");
}else{
System.out.println("3");
}
}
}
|
Main.java:8: error: incomparable types: boolean and int
if(a==b==c){
^
Main.java:10: error: incomparable types: boolean and int
}else if(a==b!=c || b==c!=a){
^
Main.java:10: error: incomparable types: boolean and int
}else if(a==b!=c || b==c!=a){
^
3 errors
|
s388085704
|
p03962
|
C++
|
#include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;}
|
a.cc:1:30: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;}
| ^~~~~~~~~
a.cc:1:9: fatal error: bits/stdc++.h>usin: No such file or directory
1 | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;}
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s969182933
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,t[1000]={},a[1000]={};
cin>>n;
for(int i=0;i<n;i++){
cin>>t[i]>>a[i];
if(i)
long long j=1;
if((a[i-1]-1)/a[i]>(t[i-1]-1)/t[i]) j+=(a[i-1]-1)/a[i];
else j+=(t[i-1]-1)/t[i];
a[i]*=j;
t[i]*=j;
}
cout<<a[n-1]+t[n-1]<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:40: error: 'j' was not declared in this scope
10 | if((a[i-1]-1)/a[i]>(t[i-1]-1)/t[i]) j+=(a[i-1]-1)/a[i];
| ^
a.cc:11:9: error: 'j' was not declared in this scope
11 | else j+=(t[i-1]-1)/t[i];
| ^
a.cc:12:10: error: 'j' was not declared in this scope
12 | a[i]*=j;
| ^
|
s169742601
|
p03962
|
C++
|
#include<bit/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b==c)cout<<1<<endl;
else if(a!=b && b!=c)cout<<3<<endl;
else cout<<2<<endl;
return 0;
}
|
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
1 | #include<bit/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s261266528
|
p03962
|
C++
|
#include<bit/stdc++.h>
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b==c)cout<<1<<endl;
else if(a!=b && b!=c)cout<<3<<endl;
else cout<<2<<endl;
return 0;
}
|
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
1 | #include<bit/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s308905062
|
p03962
|
Java
|
import java.util.HashSet;
import java.util.Scanner;
public class ABC046A {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
HashSet<Integer> hs = new HashSet<Integer>();
hs.add(scanner.nextInt());
System.out.println(hs.size());
scanner.close();
}
}
|
Main.java:4: error: class ABC046A is public, should be declared in a file named ABC046A.java
public class ABC046A {
^
1 error
|
s642140001
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)
int main() {
int a[3];
rep(i, n) cin >> a[i];
sort(a, a + 3);
if(a[0] == a[1] && a[0] == a[2]) cout << 3 << endl;
else if(a[0] == a[1] || a[1] == a[2]) cout << 2 << endl;
else cout << 1 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:16: error: 'n' was not declared in this scope
11 | rep(i, n) cin >> a[i];
| ^
a.cc:5:41: note: in definition of macro 'FOR'
5 | #define FOR(i, j, k) for(int i = j; i < k; ++i)
| ^
a.cc:11:9: note: in expansion of macro 'rep'
11 | rep(i, n) cin >> a[i];
| ^~~
|
s638631587
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(void) {
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
if(a[0] == a[1] && a[1] == a[2]) cout << 1 << endl;
else if(a[0] == a[1] || a[1] == a[2] || a[2] == a[0]) cout << 2 << endl;
else cout << 3 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
11 | sort(a, a + 3);
| ^~~~
| short
|
s462373577
|
p03962
|
C++
|
//#include "IntMod.h"
//typedef IntMod<1000000007> MInt;
//#include "Union_Find.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
//#include <unordered_set>
//#include <unordered_map>
#include <iomanip>
#include <sstream>
using namespace std;
#define REP(i,a,n) for(int i = a; i < n; ++i)
#define REPM(i,n,a) for(int i = n - 1; i >= a; --i)
#define EPS 0.0001
#define INF 0x3FFFFFFF
#define INFLL 0x3FFFFFFF3FFFFFFF
#define INFD 1.0e+308
typedef long long LL;
typedef unsigned long long ULL;
class SplitStream {
typedef basic_ostream<char, char_traits<char> > BaseOst;
std::ostream& ost_m;
bool line_is_empty_m;
public:
SplitStream(std::ostream& ost);
template <typename T>
SplitStream& operator<<(T right);
SplitStream& operator<<(BaseOst& (*right)(BaseOst&));
};
SplitStream::SplitStream(std::ostream& ost) : ost_m(ost), line_is_empty_m(true) {}
template <typename T>
SplitStream& SplitStream::operator<<(T right) {
if (!line_is_empty_m) ost_m << ' ';
line_is_empty_m = false;
ost_m << right;
return *this;
}
/* std::endl のみ */
SplitStream& SplitStream::operator<<(BaseOst& (*right)(BaseOst&)) {
ost_m << '\n';
ost_m.flush();
line_is_empty_m = true;
return *this;
}
SplitStream Scout(cout);
template <typename T, int Begin, int End>
class OffsetArray {
T arr_m[End - Begin];
public:
OffsetArray();
T& operator[](int index);
T operator[](int index) const;
};
template<typename T, int Begin, int End>
OffsetArray<T, Begin, End>::OffsetArray() : arr_m() {}
template<typename T, int Begin, int End>
T & OffsetArray<T, Begin, End>::operator[](int index) {
return arr_m[index - Begin];
}
template<typename T, int Begin, int End>
T OffsetArray<T, Begin, End>::operator[](int index) const {
return arr_m[index - Begin];
}
int A, B, C;
int main() {
cin >> A >> B >> C;
cout << (A == B&&B == C ? 1 : A != B &&B != C&&C != A ? 3 : 2) << endl;
2 return 0;
}
|
a.cc: In function 'int main()':
a.cc:88:8: error: expected ';' before 'return'
88 | 2 return 0;
| ^~~~~~~~~~~~~
| ;
|
s159902812
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
#define out(x) cout<<(x)<<"\n"
int main(){
int a,b,c,A;
cin>>a>>b>>c;
if(a==b && b==c){
A=1;
}
else if(a==b || b==c || c==a){
A=2;
}
else{
A=3;
}
out(A)
}
|
a.cc: In function 'int main()':
a.cc:19:1: error: expected ';' before '}' token
19 | }
| ^
|
s191209951
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
#define out(x) cont<<(x)<<"\n"
int main(){
int a,b,c,A;
cin>>a>>b>>c;
if(a==b && b==c){
A=1;
}
else if(a==b || b==c || c==a){
A=2;
}
else{
A=3;
}
out(A)
}
|
a.cc: In function 'int main()':
a.cc:4:16: error: 'cont' was not declared in this scope; did you mean 'const'?
4 | #define out(x) cont<<(x)<<"\n"
| ^~~~
a.cc:18:1: note: in expansion of macro 'out'
18 | out(A)
| ^~~
|
s383051093
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(){
int color[3];
int rel=1;
for(int i=0;i<3;i++) cin>>color[i];
for(int i=1;i<3;i++){
bool flag=true;
for(int j=0;j<3;j++){
if(i!=j&&color[i]==color[j]) flag=false;
}
if(flag&&1<=color[i]&&color[j]<=100) rel++;
}
cout<<rel<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:33: error: 'j' was not declared in this scope
15 | if(flag&&1<=color[i]&&color[j]<=100) rel++;
| ^
|
s947021104
|
p03962
|
C++
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int i;input[3],count=0;
for(i=0;i<3;i++){
cin>>input[i];
}
for(i=0;i<2;i++){
if(input[i]==input[i+1]){
count++;
}
}
if(input[0]==input[3]){
count++;
}
cout<<count<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: 'input' was not declared in this scope; did you mean 'int'?
5 | int i;input[3],count=0;
| ^~~~~
| int
a.cc:5:18: error: 'count' was not declared in this scope
5 | int i;input[3],count=0;
| ^~~~~
|
s183598119
|
p03962
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, c;
scan("%d%d%d", &a, &b, &c);
if (a == b) {
if (b == c) {
printf("1\n");
}
else { printf("2\n"); }
}
else if (a == c) {
printf("2\n");
}
else if (b == c) {
printf("2\n");
}
else { printf("3\n"); }
return 0;
}
|
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scan("%d%d%d", &a, &b, &c);
| ^~~~
| scanf
|
s231228161
|
p03962
|
C++
|
import sys
abc = sys.stdin.readline().split()
abc_uniq = []
for x in abc:
if x not in abc_uniq:
abc_uniq.append(x)
print len(abc_uniq)
|
a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s521800540
|
p03962
|
C++
|
s = raw_input()
abc = s.split()
abc_uniq = []
for x in abc:
if x not in abc_uniq:
abc_uniq.append(x)
print len(abc_uniq)
|
a.cc:1:1: error: 's' does not name a type
1 | s = raw_input()
| ^
|
s939117044
|
p03962
|
C++
|
#include <stdio.h>
#include <iostream>
#include <pair>
#include <algorithm>
#include <cmath>
#include <map>
int main(){
bool num[100];
int input,count=0;
for(int i=0; i<100;i++){
num[i]=false;
}
while(cin >> input){
if(!num[input-1]){
num[input-1]=true;
count++;
}
}
cout << count << endl;
}
|
a.cc:3:10: fatal error: pair: No such file or directory
3 | #include <pair>
| ^~~~~~
compilation terminated.
|
s936925426
|
p03962
|
C
|
#include<stdio.h>
int main(){
int a,b,c,r;
scanf("%d %d %d",&a,&b,&c);
if(a==b){
if(b==c)
r=1;
else r=2;
else if(b==c){
r=2;
if(a==c) r=2;
else r=3;
}
else if(a==c) r=2;
else r=3;
}
printf("%d",r);
}
|
main.c: In function 'main':
main.c:10:2: error: expected '}' before 'else'
10 | else if(b==c){
| ^~~~
main.c: At top level:
main.c:18:8: error: expected declaration specifiers or '...' before string constant
18 | printf("%d",r);
| ^~~~
main.c:18:13: error: unknown type name 'r'
18 | printf("%d",r);
| ^
main.c:19:1: error: expected identifier or '(' before '}' token
19 | }
| ^
|
s264453260
|
p03962
|
C
|
#include<stdio.h>
int main(){
int a,b,c,r;
scanf("%d %d %d",a,b,c);
if(a==b){
if(b==c)
r=1;
else r=2;
else if(b==c){
r=2;
if(a==c) r=2;
else r=3;
}
else if(a==c) r=2;
else r=3;
}
printf("%d",r);
}
|
main.c: In function 'main':
main.c:10:2: error: expected '}' before 'else'
10 | else if(b==c){
| ^~~~
main.c: At top level:
main.c:18:8: error: expected declaration specifiers or '...' before string constant
18 | printf("%d",r);
| ^~~~
main.c:18:13: error: unknown type name 'r'
18 | printf("%d",r);
| ^
main.c:19:1: error: expected identifier or '(' before '}' token
19 | }
| ^
|
s206593577
|
p03962
|
C++
|
#include <iostream>
int main(void){
int a, b, c, cnt;
std::cin >> a >> b >> c;
if(a == b && b == c) cnt = 1;
else if(a == b && b != c) cnt = 2;
else if(c == b && a != c) cnt = 2;
else if(a == c && b != a) cnt = 2;
else cnt = 3;
std::cout << cnt << std:endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:28: error: found ':' in nested-name-specifier, expected '::'
13 | std::cout << cnt << std:endl;
| ^
| ::
|
s850131768
|
p03962
|
C++
|
#include"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:1:9: fatal error: stdc++.h: No such file or directory
1 | #include"stdc++.h"
| ^~~~~~~~~~
compilation terminated.
|
s116622298
|
p03962
|
C++
|
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void){
int i,j,k,t,tmp;
string s;
int a,b,c;
cin>>a>>b>>c;
if(a==b&&b==c) cout<<1;
else if((a==b&&b!=c)||(b==c&&c!=a)||(a==c&&c!=b)) cout<<2;
else cout<<3;
cout<<endl
return 0;
}
|
a.cc: In function 'int main()':
a.cc:20:13: error: expected ';' before 'return'
20 | cout<<endl
| ^
| ;
21 | return 0;
| ~~~~~~
|
s338985145
|
p03962
|
C++
|
#include<cstdio>
using namespace std;
int a,b,c;
int d = 2;
int main(){
scanf_s("%d %d %d\n",&a,&b,&c);
if(a==b && a==c && b==c)d=1;
if(a!=b && a!=c && b!=c)d=3;
printf_s("%d\n",d);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d %d %d\n",&a,&b,&c);
| ^~~~~~~
| scanf
a.cc:10:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
10 | printf_s("%d\n",d);
| ^~~~~~~~
| printf
|
s520141614
|
p03962
|
C++
|
//
#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <array>
#include <numeric>
#include <functional>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<utility>
#include<complex>
using namespace std;
#define REP(i,m,n) for(int i=m;i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define ALL(x) (x).begin(),(x).end()
typedef long long ll;
typedef pair<int, int> pii;
const ll inf = INT_MAX;
const double eps = 1e-10;
const double pi = acos(-1.0);
const int di[][2] = {{1,0},{0,1},{-1,0},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};
int main(){
int a,b,c;
cin >> a >> b >>c;
if(a != b && b != c && c != a)
printf("3\n");
else{
if(a == b && b == c)
printf("1\n");
else{
printf("2\n");
}
}
return 0;
}
|
a.cc:29:16: error: 'INT_MAX' was not declared in this scope
29 | const ll inf = INT_MAX;
| ^~~~~~~
a.cc:19:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
18 | #include<complex>
+++ |+#include <climits>
19 |
|
s297731455
|
p03962
|
Java
|
import java.util.Scanner;
public class ProbD {
public static void main(String[] args) {
int a,b,c;
Scanner foo = new Scanner(System.in);
a = new Integer(foo.next()).intValue();
b = new Integer(foo.next()).intValue();
c = new Integer(foo.next()).intValue();
if (a == b && b == c) {
System.out.println("1");
} else if (a == b || b == c || c == a) {
System.out.println("2");
} else {
System.out.println("3");
}
}
}
|
Main.java:4: error: class ProbD is public, should be declared in a file named ProbD.java
public class ProbD {
^
Main.java:8: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
a = new Integer(foo.next()).intValue();
^
Main.java:9: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
b = new Integer(foo.next()).intValue();
^
Main.java:10: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
c = new Integer(foo.next()).intValue();
^
1 error
3 warnings
|
s781183252
|
p03962
|
C++
|
#include <iostream>
int main()
{
int a,b,c;
int n = 6;
std::cin >> a >> b >> c;
a==b: (n--) ? ;
a==c: (n--) ? ;
b==c: (n--) ? ;
(a==b && a==c && b==c): (n++) ? ;
cout << n << "¥n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before ':' token
7 | a==b: (n--) ? ;
| ^
| ;
a.cc:8:13: error: expected ';' before ':' token
8 | a==c: (n--) ? ;
| ^
| ;
a.cc:9:13: error: expected ';' before ':' token
9 | b==c: (n--) ? ;
| ^
| ;
a.cc:10:31: error: expected ';' before ':' token
10 | (a==b && a==c && b==c): (n++) ? ;
| ^
| ;
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout << n << "¥n";
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s413636999
|
p03962
|
C++
|
#include <iostream>
int main()
{
int a,b,c;
int n = 6;
std::cin >> a >> b >> c;
a==b: (n--) ? ;
a==c: (n--) ? ;
b==c: (n--) ? ;
(a==b && a==c && b==c): (n++) ? ;
cout << n << "¥n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before ':' token
7 | a==b: (n--) ? ;
| ^
| ;
a.cc:8:13: error: expected ';' before ':' token
8 | a==c: (n--) ? ;
| ^
| ;
a.cc:9:13: error: expected ';' before ':' token
9 | b==c: (n--) ? ;
| ^
| ;
a.cc:10:31: error: expected ';' before ':' token
10 | (a==b && a==c && b==c): (n++) ? ;
| ^
| ;
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout << n << "¥n";
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s212616310
|
p03962
|
C
|
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a==b && b==c){
printf("1¥n");
} else if(a==b || b==c || a==c){
printf("2¥n")
} else{
printf("3¥n")
}
return 0;
}
|
main.c: In function 'main':
main.c:9:18: error: expected ';' before '}' token
9 | printf("2¥n")
| ^
| ;
10 | } else{
| ~
main.c:11:18: error: expected ';' before '}' token
11 | printf("3¥n")
| ^
| ;
12 | }
| ~
|
s823977637
|
p03962
|
Java
|
import java.util.*;
2.import java.lang.*;
3.import java.io.*;
4.
5.class Main
6.{
7. public static void main (String[] args) throws java.lang.Exception
8. {
9. BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
10. String s = br.readLine();
11. String[] str = s.split("\\s+");
12. int[] col = new int[str.length];
13. for(int i = 0;i < str.length;i++){
14. col[i] = Integer.parseInt(str[i]);
15. }
16. boolean[] penki = new boolean[100];
17. int cnt = 0;
18. int sum = 0;
19. while(cnt < 3){
20. if(!(penki[col[cnt]])){
21. penki[col[cnt]] = true;
22. sum++;
23. }
24. cnt++;
25. }
26. System.out.print(sum);
27. }
28.}
|
Main.java:2: error: class, interface, enum, or record expected
2.import java.lang.*;
^
Main.java:3: error: class, interface, enum, or record expected
3.import java.io.*;
^
Main.java:4: error: class, interface, enum, or record expected
4.
^
Main.java:5: error: '{' expected
5.class Main
^
Main.java:7: error: illegal start of type
7. public static void main (String[] args) throws java.lang.Exception
^
Main.java:7: error: ';' expected
7. public static void main (String[] args) throws java.lang.Exception
^
Main.java:9: error: not a statement
9. BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:9: error: ';' expected
9. BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:10: error: not a statement
10. String s = br.readLine();
^
Main.java:10: error: ';' expected
10. String s = br.readLine();
^
Main.java:11: error: not a statement
11. String[] str = s.split("\\s+");
^
Main.java:11: error: ';' expected
11. String[] str = s.split("\\s+");
^
Main.java:12: error: not a statement
12. int[] col = new int[str.length];
^
Main.java:12: error: ';' expected
12. int[] col = new int[str.length];
^
Main.java:13: error: not a statement
13. for(int i = 0;i < str.length;i++){
^
Main.java:13: error: ';' expected
13. for(int i = 0;i < str.length;i++){
^
Main.java:14: error: not a statement
14. col[i] = Integer.parseInt(str[i]);
^
Main.java:14: error: ';' expected
14. col[i] = Integer.parseInt(str[i]);
^
Main.java:15: error: not a statement
15. }
^
Main.java:15: error: ';' expected
15. }
^
Main.java:16: error: not a statement
16. boolean[] penki = new boolean[100];
^
Main.java:16: error: ';' expected
16. boolean[] penki = new boolean[100];
^
Main.java:17: error: not a statement
17. int cnt = 0;
^
Main.java:17: error: ';' expected
17. int cnt = 0;
^
Main.java:18: error: not a statement
18. int sum = 0;
^
Main.java:18: error: ';' expected
18. int sum = 0;
^
Main.java:19: error: not a statement
19. while(cnt < 3){
^
Main.java:19: error: ';' expected
19. while(cnt < 3){
^
Main.java:20: error: not a statement
20. if(!(penki[col[cnt]])){
^
Main.java:20: error: ';' expected
20. if(!(penki[col[cnt]])){
^
Main.java:21: error: not a statement
21. penki[col[cnt]] = true;
^
Main.java:21: error: ';' expected
21. penki[col[cnt]] = true;
^
Main.java:22: error: not a statement
22. sum++;
^
Main.java:22: error: ';' expected
22. sum++;
^
Main.java:23: error: not a statement
23. }
^
Main.java:23: error: ';' expected
23. }
^
Main.java:24: error: not a statement
24. cnt++;
^
Main.java:24: error: ';' expected
24. cnt++;
^
Main.java:25: error: not a statement
25. }
^
Main.java:25: error: ';' expected
25. }
^
Main.java:26: error: not a statement
26. System.out.print(sum);
^
Main.java:26: error: ';' expected
26. System.out.print(sum);
^
Main.java:27: error: not a statement
27. }
^
Main.java:27: error: ';' expected
27. }
^
Main.java:28: error: illegal start of type
28.}
^
45 errors
|
s047881173
|
p03962
|
Java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Main {
private static Scanner sc;
public static void main(String[] args) {
sc = new Scanner();
this.solve();
}
private static void solve() {
try {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a == b && a == c) {
System.out.println(1);
} else if (a != b && a != c && b != c) {
System.out.println(3);
} else {
System.out.println(2);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class Scanner {
String[] s;
int i;
BufferedReader br;
String regex = " ";
public Scanner() {
s = new String[0];
i = 0;
br = new BufferedReader(new InputStreamReader(System.in));
}
@Override
protected void finalize() throws Throwable {
try {
super.finalize();
} finally {
destruction();
}
}
private void destruction() throws IOException {
if (br != null) br.close();
}
public String next() throws IOException {
if (i < s.length) return s[i++];
String st = br.readLine();
while (st == "") st = br.readLine();
s = st.split(regex, 0);
i = 0;
return s[i++];
}
public int nextInt() throws NumberFormatException, IOException {
return Integer.parseInt(next());
}
public Long nextLong() throws NumberFormatException, IOException {
return Long.parseLong(next());
}
public Double nextDouble() throws NumberFormatException, IOException {
return Double.parseDouble(next());
}
}
|
Main.java:36: error: class Scanner is public, should be declared in a file named Scanner.java
public class Scanner {
^
Main.java:15: error: non-static variable this cannot be referenced from a static context
this.solve();
^
Main.java:49: warning: [removal] finalize() in Object has been deprecated and marked for removal
protected void finalize() throws Throwable {
^
Main.java:51: warning: [removal] finalize() in Object has been deprecated and marked for removal
super.finalize();
^
2 errors
2 warnings
|
s732101380
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(void){
int a,b,c; cin >> a >> b >> c; cin .ignore();
if(a==b && b==c) cout << 1 << endl;
else if(a==b || b==c || a==c) cout << 2 << end;
else cout << 3 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:49: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | else if(a==b || b==c || a==c) cout << 2 << end;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
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 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'st
|
s162146175
|
p03962
|
Java
|
import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b =scan.next();
String c = scan.next();
if ((a == b && b == c)&&(a==c)) {
System.out.println("1");
} else if ((a != b || b !=c)&&(b !=c || c != a)) {
System.out.println("2");
} else {
System.out.println("3");
}
|
Main.java:21: error: reached end of file while parsing
}
^
1 error
|
s913651432
|
p03962
|
C++
|
#include <iostream>
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<initializer_list>
using namespace std;
const double pi=4*atan(1.0);
constexpr long long mod=static_cast<long long>(1e9+7);
int main() {
long long N,K,A;
cin >> N >> K ;
A=K;
for(int i=1;i<N;i++)) {
A*=(K-1);
}
cout<<A<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:37:29: error: expected primary-expression before ')' token
37 | for(int i=1;i<N;i++)) {
| ^
|
s823882768
|
p03962
|
C++
|
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<initializer_list>
using namespace std;
#include <iostream>
using namespace std;
int main() {
long long N,K,A;
cin >> N >> K ;
A=K;
for(int i=1;i<N;i++)) {
A*=(K-1);
}
cout<<A<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:32:29: error: expected primary-expression before ')' token
32 | for(int i=1;i<N;i++)) {
| ^
|
s566048311
|
p03962
|
C++
|
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<initializer_list>
using namespace std;
#include <iostream>
using namespace std;
int main() {
long long N,K,A;
cin >> N >> K ;
A=K;
for(int i=1;i<N;i++)) {
A=A*(K-1);
}
cout<<A<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:32:29: error: expected primary-expression before ')' token
32 | for(int i=1;i<N;i++)) {
| ^
|
s889366241
|
p03962
|
C++
|
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<initializer_list>
using namespace std;
#include <iostream>
using namespace std;
int main() {
int N,K,A;
cin >> N >> K ;
int A=K;
for(int i=1;i++;i<N-1)) {
A=A*(K-1);
}
cout<<A;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:30:12: error: redeclaration of 'int A'
30 | int A=K;
| ^
a.cc:26:17: note: 'int A' previously declared here
26 | int N,K,A;
| ^
a.cc:32:31: error: expected primary-expression before ')' token
32 | for(int i=1;i++;i<N-1)) {
| ^
|
s786655093
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main() {
int N,K,A;
cin >> N >> K ;
A=K;
for(int i=1;i++;i<N-1)) {
A=A*(K-1);
}
cout<<A;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:31: error: expected primary-expression before ')' token
11 | for(int i=1;i++;i<N-1)) {
| ^
|
s540628214
|
p03962
|
Java
|
import java.util.HashSet;
import java.util.Scanner;
/**
* Created by Taichi1 on 10/22/16.
*/
public class Main2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
HashSet<Integer> set = new HashSet<>();
while (sc.hasNext()) {
set.add(sc.nextInt());
}
System.out.println(set.size();
}
}
|
Main.java:15: error: ')' or ',' expected
System.out.println(set.size();
^
1 error
|
s484940435
|
p03962
|
C++
|
#include<stdio.h>
int main()
{
//declare the variables//
int a, b, c;
//scan the numbers of the colors//
printf("Please tell me the 3 numbers of the colors.\n");
scanf_s("%d %d %d", &a, &b, &c);
//judge weather or not same numbersare included//
if (a == b) {
if (a == c) {
printf("1\n");
}
else if (a != c) {
printf("2\n");
}
}
else if (a != b) {
if (a == c) {
printf("2\n");
}
else if (a != c) {
if (b == c) {
printf("2\n");
}
else if (b != c) {
printf("3\n");
}
}
}
return(0);
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
9 | scanf_s("%d %d %d", &a, &b, &c);
| ^~~~~~~
| scanf
|
s220053137
|
p03962
|
Java
|
public class Main {
public static void main(String args[]) {
HashSet<String> hs = new HashSet<String>();
Scanner sc = new Scanner(System.in);
for (int i = 0; i < 3; i++) {
hs.add(sc.next());
}
System.out.println(hs.size());
}
}
|
Main.java:4: error: cannot find symbol
HashSet<String> hs = new HashSet<String>();
^
symbol: class HashSet
location: class Main
Main.java:4: error: cannot find symbol
HashSet<String> hs = new HashSet<String>();
^
symbol: class HashSet
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
4 errors
|
s356050055
|
p03962
|
C++
|
line = input()
elems = line.split()
penkis = {int(e) for e in elems}
print(len(penkis))
|
a.cc:1:1: error: 'line' does not name a type
1 | line = input()
| ^~~~
a.cc:4:6: error: expected constructor, destructor, or type conversion before '(' token
4 | print(len(penkis))
| ^
|
s249964085
|
p03962
|
C
|
#include<stdio.h>
int main(void){
int a,b,c;
int ans;
scanf("%d %d %d",&a,&b,&c);
if(a==b && b==c){
ans=1;
}else if(a==b %% b!=c){
ans=2;
}else if(a!=b && b==c){
ans=2;
}else if(a!=b && b!=c && a==c){
ans=2;
}else{
ans=3;
}
printf("%d\n",ans);
return 0;
}
|
main.c: In function 'main':
main.c:10:18: error: expected expression before '%' token
10 | }else if(a==b %% b!=c){
| ^
|
s241810170
|
p03962
|
Java
|
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
HashSet<Integer> a = new HashSet<>();
for (int i = 0; i < 3; i++){
a.add(scan.nextInt());
}
System.out.println(a.size());
}
}
|
Main.java:4: error: class ???? is public, should be declared in a file named ????.java
public class ???? {
^
1 error
|
s726167378
|
p03962
|
Java
|
import java.util.HashSet;
import java.util.Scanner;
public class A {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
HashSet<Integer> a = new HashSet<>();
for (int i = 0; i < 3; i++){
a.add(scan.nextInt());
}
System.out.println(a.size());
}
}
|
Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s060967035
|
p03962
|
C++
|
#include <iostream>
#include <algorithm>
#include <vector>
#define ll long long
using namesace std;
int main(){
ll n,k;
cin >> n >> k;
ll ans = k;
for(ll i = 0; i < n -1; i++){
ans *= (k-1)
}
cout << ans << '\n';
return 0;
}
|
a.cc:6:7: error: expected nested-name-specifier before 'namesace'
6 | using namesace std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
10 | cin >> n >> k;
| ^~~
| 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:13:29: error: expected ';' before '}' token
13 | ans *= (k-1)
| ^
| ;
14 | }
| ~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout << ans << '\n';
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s068792360
|
p03962
|
C++
|
#include <iostream>
#include <set>
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){int n;cin>>n;set<int> a;REP(i,n){cin>>a[i];}}
|
a.cc: In function 'int main()':
a.cc:6:51: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
6 | int main(){int n;cin>>n;set<int> a;REP(i,n){cin>>a[i];}}
| ^
|
s595091323
|
p03962
|
C++
|
#include <iostream>
#include <set>
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){int n;cin>>n;set<int> a(n);REP(i,n){cin>>a[i];}}
|
a.cc: In function 'int main()':
a.cc:6:37: error: no matching function for call to 'std::set<int>::set(int&)'
6 | int main(){int n;cin>>n;set<int> a(n);REP(i,n){cin>>a[i];}}
| ^
In file included from /usr/include/c++/14/set:63,
from a.cc:2:
/usr/include/c++/14/bits/stl_set.h:273:9: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
273 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/14/bits/stl_set.h:273:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:210:9: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
210 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/14/bits/stl_set.h:210:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:193:9: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
193 | set(_InputIterator __first, _InputIterator __last)
| ^~~
/usr/include/c++/14/bits/stl_set.h:193:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:267:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
267 | set(initializer_list<value_type> __l, const allocator_type& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:267:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:261:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::__type_identity_t<_Alloc> = std::allocator<int>]'
261 | set(set&& __x, const __type_identity_t<allocator_type>& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:261:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:257:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::__type_identity_t<_Alloc> = std::allocator<int>]'
257 | set(const set& __x, const __type_identity_t<allocator_type>& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:257:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:253:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
253 | set(const allocator_type& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:253:33: note: no known conversion for argument 1 from 'int' to 'const std::set<int>::allocator_type&' {aka 'const std::allocator<int>&'}
253 | set(const allocator_type& __a)
| ~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:245:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
245 | set(initializer_list<value_type> __l,
| ^~~
/usr/include/c++/14/bits/stl_set.h:245:40: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
245 | set(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:233:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
233 | set(set&&) = default;
| ^~~
/usr/include/c++/14/bits/stl_set.h:233:11: note: no known conversion for argument 1 from 'int' to 'std::set<int>&&'
233 | set(set&&) = default;
| ^~~~~
/usr/include/c++/14/bits/stl_set.h:225:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
225 | set(const set&) = default;
| ^~~
/usr/include/c++/14/bits/stl_set.h:225:11: note: no known conversion for argument 1 from 'int' to 'const std::set<int>&'
225 | set(const set&) = default;
| ^~~~~~~~~~
/usr/include/c++/14/bits/stl_set.h:178:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
178 | set(const _Compare& __comp,
| ^~~
/usr/include/c++/14/bits/stl_set.h:178:27: note: no known conversion for argument 1 from 'int' to 'const std::less<int>&'
178 | set(const _Compare& __comp,
| ~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_set.h:169:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set() [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
169 | set() = default;
| ^~~
/usr/include/c++/14/bits/stl_set.h:169:7: note: candidate expects 0 arguments, 1 provided
a.cc:6:54: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
6 | int main(){int n;cin>>n;set<int> a(n);REP(i,n){cin>>a[i];}}
| ^
|
s965108295
|
p03962
|
C++
|
#include <iostream>
#include <set>
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){int n;cin>>n;set<int> a(n)REP(i,n){cin>>a[i];}}
|
a.cc: In function 'int main()':
a.cc:6:37: error: no matching function for call to 'std::set<int>::set(int&)'
6 | int main(){int n;cin>>n;set<int> a(n)REP(i,n){cin>>a[i];}}
| ^
In file included from /usr/include/c++/14/set:63,
from a.cc:2:
/usr/include/c++/14/bits/stl_set.h:273:9: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
273 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/14/bits/stl_set.h:273:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:210:9: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
210 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/14/bits/stl_set.h:210:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:193:9: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
193 | set(_InputIterator __first, _InputIterator __last)
| ^~~
/usr/include/c++/14/bits/stl_set.h:193:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:267:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
267 | set(initializer_list<value_type> __l, const allocator_type& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:267:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:261:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::__type_identity_t<_Alloc> = std::allocator<int>]'
261 | set(set&& __x, const __type_identity_t<allocator_type>& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:261:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:257:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::__type_identity_t<_Alloc> = std::allocator<int>]'
257 | set(const set& __x, const __type_identity_t<allocator_type>& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:257:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_set.h:253:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
253 | set(const allocator_type& __a)
| ^~~
/usr/include/c++/14/bits/stl_set.h:253:33: note: no known conversion for argument 1 from 'int' to 'const std::set<int>::allocator_type&' {aka 'const std::allocator<int>&'}
253 | set(const allocator_type& __a)
| ~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:245:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
245 | set(initializer_list<value_type> __l,
| ^~~
/usr/include/c++/14/bits/stl_set.h:245:40: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
245 | set(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_set.h:233:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
233 | set(set&&) = default;
| ^~~
/usr/include/c++/14/bits/stl_set.h:233:11: note: no known conversion for argument 1 from 'int' to 'std::set<int>&&'
233 | set(set&&) = default;
| ^~~~~
/usr/include/c++/14/bits/stl_set.h:225:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
225 | set(const set&) = default;
| ^~~
/usr/include/c++/14/bits/stl_set.h:225:11: note: no known conversion for argument 1 from 'int' to 'const std::set<int>&'
225 | set(const set&) = default;
| ^~~~~~~~~~
/usr/include/c++/14/bits/stl_set.h:178:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
178 | set(const _Compare& __comp,
| ^~~
/usr/include/c++/14/bits/stl_set.h:178:27: note: no known conversion for argument 1 from 'int' to 'const std::less<int>&'
178 | set(const _Compare& __comp,
| ~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_set.h:169:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set() [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
169 | set() = default;
| ^~~
/usr/include/c++/14/bits/stl_set.h:169:7: note: candidate expects 0 arguments, 1 provided
a.cc:3:18: error: expected ',' or ';' before 'for'
3 | #define REP(i,n) for(int i=0;i<(n);i++)
| ^~~
a.cc:6:38: note: in expansion of macro 'REP'
6 | int main(){int n;cin>>n;set<int> a(n)REP(i,n){cin>>a[i];}}
| ^~~
a.cc:6:42: error: 'i' was not declared in this scope
6 | int main(){int n;cin>>n;set<int> a(n)REP(i,n){cin>>a[i];}}
| ^
a.cc:3:30: note: in definition of macro 'REP'
3 | #define REP(i,n) for(int i=0;i<(n);i++)
| ^
|
s990113113
|
p03962
|
C++
|
#include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>
#define MP make_pair
#define PB push_back
#define ALL(x) (x).begin(),(x).end()
#define REP(i,n) for(int i=0;i<(n);i++)
#define REP1(i,n) for(int i=1;i<(n);i++)
#define REP2(i,d,n) for(int i=(d);i<(n);i++)
#define RREP(i,n) for(int i=(n);i>=0;i--)
#define CLR(a) memset((a),0,sizeof(a))
#define MCLR(a) memset((a),-1,sizeof(a))
#define RANGE(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY))
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI > VVI;
typedef vector<string> VS;
typedef vector<LL> VLL;
typedef pair<int,int> PII;
const int INF = 0x3f3f3f3f;
const LL INFL = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-9;
const int DX[]={1,0,-1,0},DY[]={0,-1,0,1};
int main(){
int a;
VI A;
int ans=1;
REP(i,3;){
cin >> a;
A.PB(a);
}
sort(A);
REP(i,2){
if(A[i]!=A[i+1])
ans++;
}
cout << ans << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:51:16: error: expected ')' before ';' token
51 | REP(i,3;){
| ^
a.cc:23:33: note: in definition of macro 'REP'
23 | #define REP(i,n) for(int i=0;i<(n);i++)
| ^
a.cc:23:32: note: to match this '('
23 | #define REP(i,n) for(int i=0;i<(n);i++)
| ^
a.cc:51:9: note: in expansion of macro 'REP'
51 | REP(i,3;){
| ^~~
a.cc:51:13: error: 'i' was not declared in this scope
51 | REP(i,3;){
| ^
a.cc:23:36: note: in definition of macro 'REP'
23 | #define REP(i,n) for(int i=0;i<(n);i++)
| ^
a.cc:55:13: error: no matching function for call to 'sort(VI&)'
55 | sort(A);
| ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:17:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
| ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
| ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 1 provided
|
s728612643
|
p03962
|
C
|
#include<stdio.h>
int main(){
int n,k;
scanf("%d %d",&n,&k);
int answer=k;
for(int i=0;i<k;i++){
answer*=(k-1);
}
printf("%d",answer)
return 0;
}
|
main.c: In function 'main':
main.c:9:20: error: expected ';' before 'return'
9 | printf("%d",answer)
| ^
| ;
10 | return 0;
| ~~~~~~
|
s603104308
|
p03962
|
C
|
#include<stdio.h>
int main(){
int n,k;
scanf("%d %d",&n,&k);
int answer=k;
for(i=0;i<k;i++){
answer*=(k-1);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:5: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<k;i++){
| ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
|
s705995246
|
p03962
|
C
|
#include<stdio.h>
int main(){
int n,k;
scanf("%d %d",&n,&k);
int answer=k;
for(i=0,i<k,i++){
answer*=(k-1);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:5: error: 'i' undeclared (first use in this function)
6 | for(i=0,i<k,i++){
| ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:16: error: expected ';' before ')' token
6 | for(i=0,i<k,i++){
| ^
| ;
main.c:6:16: error: expected expression before ')' token
|
s480458401
|
p03962
|
C
|
#include<stdio.h>
#include<math.h>
int main(){
double N,K;
scanf("%lf %lf",&N,&K);
if(N%2==0.0){
int a=N/2;
double c=pow(K,a)*pow(K-1,a);
printf("%f",c);
}
else{
int a=N/2+1;
double c=pow(K,a)*pow(K-1,a-1);
printf("%f",c);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:5: error: invalid operands to binary % (have 'double' and 'int')
7 | if(N%2==0.0){
| ^
|
s264542101
|
p03962
|
C
|
#include<stdio.h>
#include<math.h>
int main(){
double N,K;
scanf("%f %f",&N,&K);
if(N%2==0){
int a=N/2;
double c=pow(K,a)*pow(K-1,a);
printf("%f",c);
}
else{
int a=N/2+1;
double c=pow(K,a)*pow(K-1,a-1);
printf("%f",c);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:5: error: invalid operands to binary % (have 'double' and 'int')
7 | if(N%2==0){
| ^
|
s690837403
|
p03962
|
Java
|
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.NoSuchElementException;
public class A {
public static void main(String[] args) {
FS r = new FS();
int a = r.nextInt();
int b = r.nextInt();
int c = r.nextInt();
int count = 1;
if(a != b) count++;
if(a != c && b != c) count++;
System.out.println(count);
}
// Read Class
static class FS {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() { return hasNextByte() ? buffer[ptr++] : -1;}
private boolean isPrintableChar(int c) {return 33 <= c && c <= 126;}
private void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
public boolean hasNext() { skipUnprintable(); return hasNextByte();}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while(isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public int nextInt() {
return (int)nextLong();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while(true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if(b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
}
}
|
Main.java:6: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s773796843
|
p03962
|
C++
|
a = []
for i in range(3):
a.append(input())
s = set(a)
print(len(s))
|
a.cc:1:1: error: 'a' does not name a type
1 | a = []
| ^
|
s327848547
|
p03962
|
Java
|
import java.lang.Math;
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner stdId[] = new Scanner(System.in);
int n = stdId.nextInt();
System.out.println();
}
|
Main.java:9: error: reached end of file while parsing
}
^
1 error
|
s456986734
|
p03962
|
C++
|
#include <nits/stdc++.h>
using namespace std;
int main() {
set<int> s;
for (int i = 0; i < 3; ++i) {
int t; cin >> t;
s.insert(t);
}
cout << s.size() << endl;
}
|
a.cc:1:10: fatal error: nits/stdc++.h: No such file or directory
1 | #include <nits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s725798696
|
p03962
|
C++
|
#include<Bits/stdc++.h>
using namespace std;
int main()
{
int x,i;
set<int>s;
for(i=0;i<3;i++)
{
cin>>x;
s.insert(x);
}
cout<<s.size()<<endl;
return 0;
}
|
a.cc:1:9: fatal error: Bits/stdc++.h: No such file or directory
1 | #include<Bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s514133305
|
p03962
|
C
|
#include <stdio.h>
int main(){
int a,b,c,count=1;
scanf("%d %d %d", &a, &b, &c);
if(a==b){
if(b==c){
if (a==c){
count=1;
}else{
count=2;
}
}else{
if(b==c){
count=2;
}else{
if(a==c){
count=2;
}else{
count=3;
}
}
}
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
27 | }
| ^
|
s280547013
|
p03962
|
C
|
#include <stdio.h>
int main(){
int a,b,c,count=1;
scanf("%d %d %d", &a, &b, &c);
if(a==b){
if(b==c){
if (a==c){
count=1;
}else{
count=2;
}
}else{
if(b==c){
count=2;
}else{
if(a==c){
count=2;
}else{
count=3;
}
}
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:26:1: error: expected declaration or statement at end of input
26 | }
| ^
main.c:26:1: error: expected declaration or statement at end of input
|
s358265632
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main(void){
int p[3],c=3;
for(int i=0;i<3;i++){
cin>>p[i];
for(int j=i-1;j>=0;j--){
if(p[j]==p[i])c--;
}
}
cout<<c<<endl;
return 0;
}
return 0;
}
|
a.cc:17:2: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s934082262
|
p03962
|
C++
|
#include <iostream>
#include <set>
using namespace std;
int main(){
set<int> s;
for(int i = 0, t; i < 3; i++)
cin >> t; s.insert(t);
cout << s.size() << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:24: error: 't' was not declared in this scope
8 | cin >> t; s.insert(t);
| ^
|
s936450885
|
p03962
|
C++
|
for(int i = 0, t ; i < 3 ; i++ )
cin>>t, s.insert(t);
cout<<s.size()<<endl;
return 0;
}
|
a.cc:2:5: error: expected unqualified-id before 'for'
2 | for(int i = 0, t ; i < 3 ; i++ )
| ^~~
a.cc:2:24: error: 'i' does not name a type
2 | for(int i = 0, t ; i < 3 ; i++ )
| ^
a.cc:2:32: error: 'i' does not name a type
2 | for(int i = 0, t ; i < 3 ; i++ )
| ^
a.cc:4:5: error: 'cout' does not name a type
4 | cout<<s.size()<<endl;
| ^~~~
a.cc:5:5: error: expected unqualified-id before 'return'
5 | return 0;
| ^~~~~~
a.cc:6:1: error: expected declaration before '}' token
6 | }
| ^
|
s926487349
|
p03962
|
C++
|
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define pi M_PI
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
int main(){
map<int, int> m;
int ans = 0;
REP(i,n){
int x;
cin >> x;
m[x]++;
if (m[x] > 0) ans++;
}
cout << ans << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:30:11: error: 'n' was not declared in this scope
30 | REP(i,n){
| ^
a.cc:15:33: note: in definition of macro 'REP'
15 | #define REP(i,n) for(int i=0; i<n; ++i)
| ^
|
s235389069
|
p03962
|
C++
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] line = br.readLine().split(" ");
int a = Integer.parseInt(line[0]),
b = Integer.parseInt(line[1]),
c = Integer.parseInt(line[2]);
int colors = 1;
if(b!=a) colors++;
if(c!=a && c!=b) colors++;
System.out.println(colors);
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s727931406
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------
void solve() {
int i,j,k,l,r,x,y; string s;
cin>>x>>y>>z;
set<int> S;
S.insert(x);
S.insert(y);
S.insert(z);
cout<<S.size()<<endl;
}
int main(int argc,char** argv){
string s;int i;
if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
FOR(i,argc-1) s+=argv[i+1],s+='\n';
FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
solve(); return 0;
}
|
a.cc: In function 'void solve()':
a.cc:17:20: error: 'z' was not declared in this scope
17 | cin>>x>>y>>z;
| ^
|
s632494699
|
p03962
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
namespace ABC046
{
class Q3
{
static void Main()
{
int N = int.Parse(Console.ReadLine());
List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList();
int a = datas[0][0], b = datas[0][1];
for (int i = 1; i < N; i++)
{
int a2 = -1;
int b2 = -1;
for (int j = 1; a2 < a || b2 < b; j++)
{
a2 = datas[i][0] * j;
b2 = datas[i][1] * j;
}
a = a2;
b = b2;
}
Console.WriteLine(a + b);
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:30:10: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc: In static member function 'static void ABC046::Q3::Main()':
a.cc:11:33: error: expected primary-expression before 'int'
11 | int N = int.Parse(Console.ReadLine());
| ^~~
a.cc:12:25: error: 'List' was not declared in this scope
12 | List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList();
| ^~~~
a.cc:12:35: error: expected primary-expression before 'int'
12 | List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList();
| ^~~
a.cc:13:33: error: 'datas' was not declared in this scope
13 | int a = datas[0][0], b = datas[0][1];
| ^~~~~
a.cc:19:64: error: 'b' was not declared in this scope
19 | for (int j = 1; a2 < a || b2 < b; j++)
| ^
a.cc:25:33: error: 'b' was not declared in this scope; did you mean 'b2'?
25 | b = b2;
| ^
| b2
a.cc:28:25: error: 'Console' was not declared in this scope
28 | Console.WriteLine(a + b);
| ^~~~~~~
a.cc:28:47: error: 'b' was not declared in this scope
28 | Console.WriteLine(a + b);
| ^
|
s564968293
|
p03962
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
namespace ABC046
{
class Q3
{
static void Main()
{
int N = int.Parse(Console.ReadLine());
List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList();
int a = datas[0][0], b = datas[0][1];
for(int i = 1; i < N; i++)
{
int a2 = -1;
int b2 = -1;
for (int j = 1; a2 < a || b2 < b; j++)
{
a2 = datas[i][0] * j;
b2 = datas[i][1] * j;
}
a = a2;
b = b2;
}
Console.WriteLine(a + b);
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:30:10: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc: In static member function 'static void ABC046::Q3::Main()':
a.cc:11:33: error: expected primary-expression before 'int'
11 | int N = int.Parse(Console.ReadLine());
| ^~~
a.cc:12:25: error: 'List' was not declared in this scope
12 | List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList();
| ^~~~
a.cc:12:35: error: expected primary-expression before 'int'
12 | List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList();
| ^~~
a.cc:13:33: error: 'datas' was not declared in this scope
13 | int a = datas[0][0], b = datas[0][1];
| ^~~~~
a.cc:19:64: error: 'b' was not declared in this scope
19 | for (int j = 1; a2 < a || b2 < b; j++)
| ^
a.cc:25:33: error: 'b' was not declared in this scope; did you mean 'b2'?
25 | b = b2;
| ^
| b2
a.cc:28:25: error: 'Console' was not declared in this scope
28 | Console.WriteLine(a + b);
| ^~~~~~~
a.cc:28:47: error: 'b' was not declared in this scope
28 | Console.WriteLine(a + b);
| ^
a.cc: At global scope:
a.cc:30:10: error: expected '}' at end of input
30 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s680377983
|
p03962
|
C++
|
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <fstream>
#include <iomanip>
#include <cassert>
//#include <utility>
//#include <memory>
//#include <functional>
//#include <deque>
//#include <cctype>
//#include <ctime>
//#include <numeric>
//#include <list>
//#include <iomanip>
//#if __cplusplus >= 201103L
//#include <array>
//#include <tuple>
//#include <initializer_list>
//#include <forward_list>
//
//#define cauto const auto&
//#else
//#endif
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;
#define VV(T) vector<vector< T > >
template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
v.assign(a, vector<T>(b, t));
}
template <class F, class T>
void convert(const F &f, T &t){
stringstream ss;
ss << f;
ss >> t;
}
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()
#define DEBUG
#ifdef DEBUG
#define dump(x) cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#else
#define dump(x)
#define debug(x)
#endif
#define MOD 1000000007LL
#define EPS 1e-8
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
#define maxs(x,y) x=max(x,y)
#define mins(x,y) x=min(x,y)
void mainmain(){
set<int> se;
rep(i,3){
int a;
cin>>a;
se.insert(a);
}
cout<<a.size()<<endl;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout<<fixed<<setprecision(20);
mainmain();
}
|
a.cc: In function 'void mainmain()':
a.cc:104:15: error: 'a' was not declared in this scope
104 | cout<<a.size()<<endl;
| ^
|
s677721835
|
p03962
|
C
|
#include <stdio.h>
int main(void) {
int a,b,c,nr;
printf("print paint color types\n");
scanf("%d %d %d",&a,&b,&c);
if(a==c||c==a)
{
if(a==b||b==a)
{
nr=1;
}
else
{
nr=2;
}
}
else if(a==b||b==a)
{
if(a==c||c==a)
{
nr=1;
}
else
{
nr=2;
}
}
else if(b==c||c==b)
{
if(a==b||b==a)
{
nr=1;
}
else
{
nr=2;
}
}
else
{
nr=3;
}
printf("%d",nr);
return 0;
}
\n
|
main.c:47:1: error: stray '\' in program
47 | \n
| ^
main.c:47:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
|
s989962796
|
p03962
|
C++
|
sum = 0
input = list(map(int,input().split()))
if input[0] != input[1]:
sum +=1
if input[0] != input[2]:
sum +=1
if input[1] != input[2]:
sum +=1
print(sum)
|
a.cc:1:1: error: 'sum' does not name a type
1 | sum = 0
| ^~~
|
s784756736
|
p03962
|
C++
|
#include<stdio.h>
int main(viud){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a==b || b==c || c==a){
printf("2");
}
else if(a==b && b==c && c==a){
printf("1");
}
else{
printf("3");
}
return 0;
}
|
a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main(viud){
| ^~~~
a.cc:3:10: error: 'viud' was not declared in this scope
3 | int main(viud){
| ^~~~
|
s421754326
|
p03962
|
C
|
#include <stdio.h>
int main(void) {
int a, b, c;
scant("%d %d %d\n", &a, &b, &c);
int count = 3;
if(a == b) count--;
if(b == c) count--;
if(a == c) count--;
if(count == 0) count++;
return 0;
}
|
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scant("%d %d %d\n", &a, &b, &c);
| ^~~~~
| scanf
|
s829771894
|
p03962
|
C
|
#include <stdio.h>
int main(void) {
int a, b, c;
scant("%d %d %d\n", &a, &b, &c);
int count = 3;
if(a == b) count--;
if(b == c) count--;
if(a == c) count--;
if(count == 0) count++;
return 0;
}
|
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scant("%d %d %d\n", &a, &b, &c);
| ^~~~~
| scanf
|
s411591752
|
p03962
|
Java
|
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=sc.nextInt();
long ans=Math.pow(k-1,n-1);
System.out.println(ans*k);
}
}
|
Main.java:7: error: incompatible types: possible lossy conversion from double to long
long ans=Math.pow(k-1,n-1);
^
1 error
|
s915454024
|
p03962
|
C
|
#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int a;
int b;
int c;
int cnt;
// 個数のの入力
scanf("%d %d %d",&a,&b,&c);
if(a == b) {
if (a == c ) {
cnt = 1;
}
else {
cnt = 2;
}
}
if (a != b) {
if (a == c) {
cnt = 2;
}
elseif (b == c) {
cnt = 2;
}
else {
cnt = 1;
}
}
printf("%d\n",cnt);
return 0;
}
|
main.c: In function 'main':
main.c:30:11: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
30 | elseif (b == c) {
| ^~~~~~
main.c:30:27: error: expected ';' before '{' token
30 | elseif (b == c) {
| ^~
| ;
|
s955657202
|
p03962
|
C++
|
#include <stdio.h>
int coler[3];
int answer = 3;
int main(){
scanf_s("%d %d %d", &(coler[0]), &(coler[1]), &(coler[2]));
if (coler[0] == coler[1]){
answer -= 1;
}
if (coler[1] == coler[2]){
answer -= 1;
}
if (coler[0] == coler[3]){
answer -= 1;
}
if (coler[0] == coler[1] && coler[1] == coler[2]){
answer = 1;
}
printf("%d\n", answer);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d %d %d", &(coler[0]), &(coler[1]), &(coler[2]));
| ^~~~~~~
| scanf
|
s670166179
|
p03962
|
Java
|
import java.util.Arrays;
import java.util.Scanner;
public Main A {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
int a[] = new int[3];
Scanner sc = new Scanner(System.in);
a[0] = sc.nextInt();
a[1] = sc.nextInt();
a[2] = sc.nextInt();
sc.close();
Arrays.sort(a);
if(a[0]==a[1] && a[1]==a[2]) System.out.println("1");
else if(a[0]==a[1] || a[1]==a[2])System.out.println("2");
else System.out.println("3");
}
}
|
Main.java:5: error: class, interface, enum, or record expected
public Main A {
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:21: error: class, interface, enum, or record expected
}
^
3 errors
|
s545689276
|
p03962
|
C++
|
#include <iostream>
#include <set>
#include <algorithm>
int main() {
std::unordered_set<int> penkis;
for (int i = 0; i < n; i++) {
int v;
std::cin >> v;
penkis.insert(v);
}
std::cout << penkis.size() << std::endl;
}
|
a.cc: In function 'int main()':
a.cc:6:14: error: 'unordered_set' is not a member of 'std'
6 | std::unordered_set<int> penkis;
| ^~~~~~~~~~~~~
a.cc:4:1: note: 'std::unordered_set' is defined in header '<unordered_set>'; this is probably fixable by adding '#include <unordered_set>'
3 | #include <algorithm>
+++ |+#include <unordered_set>
4 |
a.cc:6:28: error: expected primary-expression before 'int'
6 | std::unordered_set<int> penkis;
| ^~~
a.cc:7:29: error: 'n' was not declared in this scope
7 | for (int i = 0; i < n; i++) {
| ^
a.cc:10:17: error: 'penkis' was not declared in this scope
10 | penkis.insert(v);
| ^~~~~~
a.cc:13:22: error: 'penkis' was not declared in this scope
13 | std::cout << penkis.size() << std::endl;
| ^~~~~~
|
s844076283
|
p03962
|
C
|
#include <stdlib.h>
int main()
{
int a;
int b;
int c;
// 個数のの入力
scanf("%d %d %d",&a,&b,&c);
if(a == b) {
if (a == c ) {
printf("%d\n",1);
}
else {
printf("%d\n",2);
}
}
else {
if (a == c ) {
printf("%d\n",2);
}
else {
if (b == C) {
printf("%d\n",2);
}
else {
printf("%d\n",1);
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
11 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
1 | #include <stdlib.h>
+++ |+#include <stdio.h>
2 | int main()
main.c:11:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
11 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:17:13: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
17 | printf("%d\n",1);
| ^~~~~~
main.c:17:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
20 | printf("%d\n",2);
| ^~~~~~
main.c:20:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
25 | printf("%d\n",2);
| ^~~~~~
main.c:25:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:23: error: 'C' undeclared (first use in this function)
28 | if (b == C) {
| ^
main.c:28:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
29 | printf("%d\n",2);
| ^~~~~~
main.c:29:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
32 | printf("%d\n",1);
| ^~~~~~
main.c:32:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s165207272
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(void){
int a,b,c,s=0;
int[101] arr={};
cin >> a >> b >> c;
arr[a]=1;
arr[b]=1;
arr[c]=1;
for(int i=0;i<101;i++){
s+=arr[i];
}
cout << s;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: expected identifier before numeric constant
6 | int[101] arr={};
| ^~~
a.cc:6:13: error: expected ']' before numeric constant
6 | int[101] arr={};
| ^~~
| ]
a.cc:6:12: error: structured binding declaration cannot have type 'int'
6 | int[101] arr={};
| ^
a.cc:6:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:12: error: empty structured binding declaration
a.cc:6:18: error: expected initializer before 'arr'
6 | int[101] arr={};
| ^~~
a.cc:8:9: error: 'arr' was not declared in this scope
8 | arr[a]=1;
| ^~~
|
s411358869
|
p03962
|
Java
|
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a==b$$b==c&&c==a){
System.out.println(1);
}else if(a==b||b==c||c==a){
System.out.println(2);
}else if(a!=b&&b!=c&&c!=a){
System.out.println(3);
}
}
}
|
Main.java:8: error: cannot find symbol
if(a==b$$b==c&&c==a){
^
symbol: variable b$$b
location: class Main
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.