submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s547554848
|
p03962
|
C++
|
#include<iostream>
#include<set>
using namespace std;
set<int> set;
int a, b, c;
int main(){
cin >> a >> b >> c;
set.insert(a);
set.insert(b);
set.insert(c);
cout << set.size() << endl;
}
|
a.cc: In function 'int main()':
a.cc:10:3: error: reference to 'set' is ambiguous
10 | set.insert(a);
| ^~~
In file included from /usr/include/c++/14/set:63,
from a.cc:2:
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
96 | class set
| ^~~
a.cc:5:10: note: 'std::set<int> set'
5 | set<int> set;
| ^~~
a.cc:11:3: error: reference to 'set' is ambiguous
11 | set.insert(b);
| ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
96 | class set
| ^~~
a.cc:5:10: note: 'std::set<int> set'
5 | set<int> set;
| ^~~
a.cc:12:3: error: reference to 'set' is ambiguous
12 | set.insert(c);
| ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
96 | class set
| ^~~
a.cc:5:10: note: 'std::set<int> set'
5 | set<int> set;
| ^~~
a.cc:13:12: error: reference to 'set' is ambiguous
13 | cout << set.size() << endl;
| ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
96 | class set
| ^~~
a.cc:5:10: note: 'std::set<int> set'
5 | set<int> set;
| ^~~
|
s549158207
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c, ans;
cin >> a >> b >> c;
if(a == b && b == c && c == a)
{
ans = 1;
}
else if(a != b && b != c && c != a))
{
ans = 3;
}
else
{
ans = 2;
}
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:12:38: error: expected primary-expression before ')' token
12 | else if(a != b && b != c && c != a))
| ^
|
s453694477
|
p03962
|
C++
|
#include<iostream>
using namespace stdl;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b&&b==c){
cout<<1<<endl;
}else if(a==b||b==c||a==c){
cout<<2<<endl;
}else{
cout<<3<<endl;
}
}
|
a.cc:3:17: error: 'stdl' is not a namespace-name
3 | using namespace stdl;
| ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout<<1<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | cout<<1<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout<<2<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout<<2<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout<<3<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:15:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
15 | cout<<3<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s086153698
|
p03962
|
C++
|
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
static const int giga pow(10,9);
int main(void){
int a,b,c;
cin >> a >> b >> c;
int ans = 1;
if(a != b){
ans += 1;
}
if(c != b && c != a){
ans += 1;
}
cout << ans << endl;
return 0;
}
|
a.cc:15:23: error: expected initializer before 'pow'
15 | static const int giga pow(10,9);
| ^~~
|
s800230261
|
p03962
|
C++
|
#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstring>
using namespace std ;
typedef long long ll ;
#define rep (i , n ) for ( int i =0; i < n ; i++)
#define _sort(arg) sort(begin(arg), end(arg))
#define MOD 1000000007
#define pb push_back
#define DEBUG(x) cout << #x << ": " << x << endl;
/*
__attribute__((constructor))
void initial()
{
cin.tie(NULL);
ios::sync_with_stdio(false);
}
*/
int main()
{
cin.tie(NULL);
ios::sync_with_stdio(false);
int A, B, C;
cin >> A >> B >> C;
//int a[100];
if ( a == b )
{
if (a == c)
{
cout << 1 << endl;
}
else
{
cout << 2 << endl;
}
}
else
{
if (a == c)
{
cout << 2 << endl;
}
else if (b == c)
{
cout << 2 << endl;
}
else
{
cout << 3 << endl;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:34:14: error: 'a' was not declared in this scope
34 | if ( a == b )
| ^
a.cc:34:19: error: 'b' was not declared in this scope
34 | if ( a == b )
| ^
a.cc:36:26: error: 'c' was not declared in this scope
36 | if (a == c)
| ^
a.cc:47:26: error: 'c' was not declared in this scope
47 | if (a == c)
| ^
|
s972739806
|
p03962
|
C
|
#include <stdio.h>
int power(int x, int y){
int i,z;
z = 1;
for(i = 0; i < y; i;+){
z = z * x
}
return z;
}
int main (void){
int N,K;
int sum = 0, ans = 0;
scanf("%d\t", &N);
scanf("%d\n", &K);
sum = power(K - 1, N - 1);
ans = sum * K;
printf("%d",ans);
return 0;
}
|
main.c: In function 'power':
main.c:8:29: error: expected ')' before ';' token
8 | for(i = 0; i < y; i;+){
| ~ ^
| )
main.c:9:26: error: expected ';' before '}' token
9 | z = z * x
| ^
| ;
10 | }
| ~
|
s477996290
|
p03962
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod (ll)(1e9+7)
#define int ll
__attribute__((constructor))
void initial() {
cin.tie(0);
ios::sync_with_stdio(false);
}
signed main() {
int a, b, c;
cin >> a >> b >> c;
int ans = 3;
if(a == b) ans--;
if(b == c) ans--;
if(a == c) ans--;
cout << max(1, ans) << endl;
}
|
a.cc: In function 'int main()':
a.cc:28:14: error: no matching function for call to 'max(int, ll&)'
28 | cout << max(1, ans) << endl;
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
a.cc:28:14: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
28 | cout << max(1, ans) << endl;
| ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided
|
s386870946
|
p03962
|
C
|
#include <cstdio>
int main()
{
int a, b, c, d;
scanf ("%d %d %d",&a,&b,&c);
if (a == b && b == c) {
printf ("1\n");
}
else if (a != b && b != c && a != c) {printf ("3\n");
printf ("Three different colors: %d, %d, and %d.",a,b,c);
}
else {if (a == b && a != c )
{printf ("2\n");
printf ("Two different colors: %d and %d.",a,c);}
if (a != b && b == c)
{printf ("2\n");
printf ("Two different colors: %d and %d.",a,c);}
if (b != c && a == c)
{printf ("2\n");
printf ("Two different colors: %d and %d.",b,c);}
}
return 0;
}
|
main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s192423531
|
p03962
|
C
|
#include <cstdio>
int main()
{
int a, b, c, d;
scanf ("%d %d %d",&a,&b,&c);
if (a == b && b == c) printf ("1");
else if (a != b && b != c && a != c) printf ("3");
else printf ("2");
return 0;
}
|
main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s701755694
|
p03962
|
C++
|
#include <stdio.h>
int main(){
int a, b, c, n;
n = 0;
scanf("%d %d %d", &a,&b,&c);
if(a>=1&&b>=1&&c<=100){
if(a != b) n++;
if(a != c) n++;
if(b != c) n++;
if(n=0) printf("1")
else
printf("%d\n", n);}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:36: error: expected ';' before 'else'
11 | if(n=0) printf("1")
| ^
| ;
12 | else
| ~~~~
|
s812532991
|
p03962
|
C++
|
=#include <stdio.h>
int main(){
int a, b, c, n;
n = 0;
scanf("%d %d %d", &a,&b,&c);
if(a>=1&&b>=1&&c<=100){
if(a != b) n++;
if(a != c) n++;
if(b != c) n++;
if(n=0) printf("1")
else
printf("%d\n", n);}
return 0;
}
|
a.cc:1:2: error: stray '#' in program
1 | =#include <stdio.h>
| ^
a.cc:1:1: error: expected unqualified-id before '=' token
1 | =#include <stdio.h>
| ^
|
s140678790
|
p03962
|
C
|
#include<cstdio>
int main(){
int a, b, c, n;
n = 0;
scanf("%d %d %d", &a,&b,&c);
if(a>=1&&b>=1&&c<=100){
if(a != b) n++;
if(a != c) n++;
if(b != c) n++;
printf("%d\n", n);}
return 0;
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s237219973
|
p03962
|
C++
|
#include<cstdio>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a != b && b != c) printf("3\n");
else (a == b && b ==c) printf("1\n");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:31: error: expected ';' before 'printf'
6 | else (a == b && b ==c) printf("1\n");
| ^~~~~~~
| ;
|
s766648952
|
p03962
|
C++
|
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if (a=b=c) printf("1");
if (a!=b&&a!=c&&b!=c) printf("3");
if (a=b&&a!=c&&b!=c) printf("2");
if (a!=b&&a!=c&&b=c) printf("2");
if (a=c&&a!=b&&c!=b) printf("2");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:23: error: lvalue required as left operand of assignment
8 | if (a!=b&&a!=c&&b=c) printf("2");
| ~~~~~~~~~~^~~
|
s881537131
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,ans;
cin >> a>>b>>c;
int ans = 0;
if(a == b){
if(b == c){
ans = 1;
}
else ans =2;
}
else{
if(b == c) ans =2;
else{
if(a == c) ans = 2;
else ans = 3;
}
}
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int ans'
7 | int ans = 0;
| ^~~
a.cc:5:13: note: 'int ans' previously declared here
5 | int a,b,c,ans;
| ^~~
|
s684345935
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,ans;
cin >> a>>b>>c;
vector<int> v;
v = {a,b,c};
sort(v);
ans =1;
ans += (v[0] != v[1]);
ans += (v[1] != v[2]);
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:7: error: no matching function for call to 'sort(std::vector<int>&)'
9 | sort(v);
| ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/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
|
s082191305
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
printf("%d", (a == b ? a == c ? 1 : 2 : a == c ? 2 : b == c ? 2 : 3);
}
|
a.cc: In function 'int main()':
a.cc:7:71: error: expected ')' before ';' token
7 | printf("%d", (a == b ? a == c ? 1 : 2 : a == c ? 2 : b == c ? 2 : 3);
| ~ ^
| )
|
s985925800
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
printf("%d", (a == b ? a == c ? 1 : 2 : a == c ? 2 : b == c ? 2 : 3)
}
|
a.cc: In function 'int main()':
a.cc:7:71: error: expected ')' before '}' token
7 | printf("%d", (a == b ? a == c ? 1 : 2 : a == c ? 2 : b == c ? 2 : 3)
| ~ ^
| )
8 | }
| ~
|
s320251492
|
p03962
|
C++
|
#include <stdio.h>
#include <algorithm>
#include<math.h>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
int aa,bb,cc;
if(a >= max(b,c)){aa = min(b,c);bb = max(b,c);cc = a;}
if(a <max(b,c) && a > min(b,c)){aa= min(b,c);bb = a;cc =max(b,c);}
if(a <=min(b,c)){ aa = a;bb=min(b,c);cc=max(b,c);}
a=aa;b=bb;c=cc;
if (a==b&&b==c)
{ printf("1\n);
return 0;
}
if(a==b)
{ printf("2\n);
return 0;
}
if(b==c)
{ printf("2\n);
return 0;
}
if(a!=b&&b!=c)
{ printf("3\n);
return 0;
}
}
|
a.cc:18:12: warning: missing terminating " character
18 | { printf("1\n);
| ^
a.cc:18:12: error: missing terminating " character
18 | { printf("1\n);
| ^~~~~~
a.cc:22:12: warning: missing terminating " character
22 | { printf("2\n);
| ^
a.cc:22:12: error: missing terminating " character
22 | { printf("2\n);
| ^~~~~~
a.cc:26:12: warning: missing terminating " character
26 | { printf("2\n);
| ^
a.cc:26:12: error: missing terminating " character
26 | { printf("2\n);
| ^~~~~~
a.cc:30:12: warning: missing terminating " character
30 | { printf("3\n);
| ^
a.cc:30:12: error: missing terminating " character
30 | { printf("3\n);
| ^~~~~~
a.cc: In function 'int main()':
a.cc:19:5: error: expected primary-expression before 'return'
19 | return 0;
| ^~~~~~
a.cc:23:5: error: expected primary-expression before 'return'
23 | return 0;
| ^~~~~~
a.cc:27:5: error: expected primary-expression before 'return'
27 | return 0;
| ^~~~~~
a.cc:31:5: error: expected primary-expression before 'return'
31 | return 0;
| ^~~~~~
|
s973030229
|
p03962
|
C++
|
#include <stdio.h>
#include <algorithm>
#include<math.h>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
int aa,bb,cc;
if(a >= max(b,c)){aa = min(b,c);bb = max(b,c);cc = a;}
if(a <max(b,c) && a > min(b,c)){aa= min(b,c);bb = a;cc =max(b,c);}
if(a <=min(b,c)){ aa = a;bb=min(b,c);cc=max(b,c);}
a=aa;b=bb;c=cc;
if (a==b&&b==c)
{ printf("1\nOne different colors: %d.",a);
return 0;
}
if(a==b)
{ printf("2\nTwo different colors: %d and %d.",b,c);
return 0;
}
if(b==c)
{ printf("2\nTwo different colors: %d and %d.",a,b);
return 0;
}
if(a!=b||b!=c)
{ printf("3\nThree different colors: %d, %d, and %d.",a,b,c);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
32 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s294840653
|
p03962
|
C
|
#include <stdio.h>
#include <algorithm>
#include<math.h>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
int aa,bb,cc;
if(a >= max(b,c)){aa = min(b,c);bb = max(b,c);cc = a;}
if(a <max(b,c) && a > min(b,c)){aa= min(b,c);bb = a;cc =max(b,c);}
if(a <=min(b,c)){ aa = a;bb=min(b,c);cc=max(b,c);}
a=aa;b=bb;c=cc;
if (a==b&&b==c)
{ printf("1\nOne different colors:%d.",a);
return 0;
}
else if(a==b||c==a)
{ printf("2\nTwo different colors:%d and %d.",b,c);
return 0;
}
else if(b==c)
{ printf("2\nTwo different colors:%d and %d.",a,b);
return 0;
}
else
{ printf("3\nThree different colors:%d, %d, and %d.",a,b,c);
return 0;
}
}
|
main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s724707980
|
p03962
|
C++
|
#include<iostream>
int routine(int t,int a,int num){
int i=1;
int n=a+t;
while(n>=num){
n=n*i;
i++;
}
return n;
}
int main(){
int t,a;
int turn;
int num=0;
int i=1;
std::cin>>turn;
while(turn!=i){
std::cin>>t>>a;
num=routine(t,a,num);
i++;
}
std::cout<<n<<std::endl;
}
|
a.cc: In function 'int main()':
a.cc:27:14: error: 'n' was not declared in this scope
27 | std::cout<<n<<std::endl;
| ^
|
s352649689
|
p03962
|
C++
|
1 #include<iostream>↲
2 ↲
3 int main(){↲
4 int x;↲
5 int a[3];↲
6 int i=0;↲
7 int cnt=0;↲
8 ↲
9 while(std::cin>>x){↲
10 for(int j=0;j<i;j++){_↲
11 if(a[j]==x){↲
12 cnt++;↲
13 }↲
14 }↲
15 if(cnt==0){↲
16 a[i]=x;↲
17 i++;↲
18 }↲
19 cnt=0;↲
20 ↲
21 }↲
22 ↲
23 ↲
24 std::cout<<i<<std::endl;↲
25 return 0;↲
26 }↲
~
~
~
~
|
a.cc:1:5: error: stray '#' in program
1 | 1 #include<iostream>↲
| ^
a.cc:1:23: error: extended character ↲ is not valid in an identifier
1 | 1 #include<iostream>↲
| ^
a.cc:2:5: error: extended character ↲ is not valid in an identifier
2 | 2 ↲
| ^
a.cc:3:16: error: extended character ↲ is not valid in an identifier
3 | 3 int main(){↲
| ^
a.cc:4:13: error: extended character ↲ is not valid in an identifier
4 | 4 int x;↲
| ^
a.cc:5:16: error: extended character ↲ is not valid in an identifier
5 | 5 int a[3];↲
| ^
a.cc:6:15: error: extended character ↲ is not valid in an identifier
6 | 6 int i=0;↲
| ^
a.cc:7:17: error: extended character ↲ is not valid in an identifier
7 | 7 int cnt=0;↲
| ^
a.cc:8:5: error: extended character ↲ is not valid in an identifier
8 | 8 ↲
| ^
a.cc:9:26: error: extended character ↲ is not valid in an identifier
9 | 9 while(std::cin>>x){↲
| ^
a.cc:10:30: error: extended character ↲ is not valid in an identifier
10 | 10 for(int j=0;j<i;j++){_↲
| ^
a.cc:11:23: error: extended character ↲ is not valid in an identifier
11 | 11 if(a[j]==x){↲
| ^
a.cc:12:19: error: extended character ↲ is not valid in an identifier
12 | 12 cnt++;↲
| ^
a.cc:13:12: error: extended character ↲ is not valid in an identifier
13 | 13 }↲
| ^
a.cc:14:10: error: extended character ↲ is not valid in an identifier
14 | 14 }↲
| ^
a.cc:15:20: error: extended character ↲ is not valid in an identifier
15 | 15 if(cnt==0){↲
| ^
a.cc:16:18: error: extended character ↲ is not valid in an identifier
16 | 16 a[i]=x;↲
| ^
a.cc:17:15: error: extended character ↲ is not valid in an identifier
17 | 17 i++;↲
| ^
a.cc:18:10: error: extended character ↲ is not valid in an identifier
18 | 18 }↲
| ^
a.cc:19:15: error: extended character ↲ is not valid in an identifier
19 | 19 cnt=0;↲
| ^
a.cc:20:5: error: extended character ↲ is not valid in an identifier
20 | 20 ↲
| ^
a.cc:21:8: error: extended character ↲ is not valid in an identifier
21 | 21 }↲
| ^
a.cc:22:5: error: extended character ↲ is not valid in an identifier
22 | 22 ↲
| ^
a.cc:23:5: error: extended character ↲ is not valid in an identifier
23 | 23 ↲
| ^
a.cc:24:31: error: extended character ↲ is not valid in an identifier
24 | 24 std::cout<<i<<std::endl;↲
| ^
a.cc:25:16: error: extended character ↲ is not valid in an identifier
25 | 25 return 0;↲
| ^
a.cc:26:6: error: extended character ↲ is not valid in an identifier
26 | 26 }↲
| ^
a.cc:1:3: error: expected unqualified-id before numeric constant
1 | 1 #include<iostream>↲
| ^
a.cc:26:6: error: '\U000021b2' does not name a type
26 | 26 }↲
| ^
|
s395352119
|
p03962
|
C++
|
1 #include<iostream>↲
2 ↲
3 int main(){↲
4 int x;↲
5 int a[3];↲
6 int i=0;↲
7 int cnt=0;↲
8 ↲
9 while(std::cin>>x){↲
10 for(int j=0;j<i;j++){_↲
11 if(a[j]==x){↲
12 cnt++;↲
13 }↲
14 }↲
15 if(cnt==0){↲
16 a[i]=x;↲
17 i++;↲
18 }↲
19 cnt=0;↲
20 ↲
21 }↲
22 ↲
23 ↲
24 std::cout<<i<<std::endl;↲
25 return 0;↲
26 }↲
~
~
~
~
|
a.cc:1:5: error: stray '#' in program
1 | 1 #include<iostream>↲
| ^
a.cc:1:23: error: extended character ↲ is not valid in an identifier
1 | 1 #include<iostream>↲
| ^
a.cc:2:5: error: extended character ↲ is not valid in an identifier
2 | 2 ↲
| ^
a.cc:3:16: error: extended character ↲ is not valid in an identifier
3 | 3 int main(){↲
| ^
a.cc:4:13: error: extended character ↲ is not valid in an identifier
4 | 4 int x;↲
| ^
a.cc:5:16: error: extended character ↲ is not valid in an identifier
5 | 5 int a[3];↲
| ^
a.cc:6:15: error: extended character ↲ is not valid in an identifier
6 | 6 int i=0;↲
| ^
a.cc:7:17: error: extended character ↲ is not valid in an identifier
7 | 7 int cnt=0;↲
| ^
a.cc:8:5: error: extended character ↲ is not valid in an identifier
8 | 8 ↲
| ^
a.cc:9:26: error: extended character ↲ is not valid in an identifier
9 | 9 while(std::cin>>x){↲
| ^
a.cc:10:30: error: extended character ↲ is not valid in an identifier
10 | 10 for(int j=0;j<i;j++){_↲
| ^
a.cc:11:23: error: extended character ↲ is not valid in an identifier
11 | 11 if(a[j]==x){↲
| ^
a.cc:12:19: error: extended character ↲ is not valid in an identifier
12 | 12 cnt++;↲
| ^
a.cc:13:12: error: extended character ↲ is not valid in an identifier
13 | 13 }↲
| ^
a.cc:14:10: error: extended character ↲ is not valid in an identifier
14 | 14 }↲
| ^
a.cc:15:20: error: extended character ↲ is not valid in an identifier
15 | 15 if(cnt==0){↲
| ^
a.cc:16:18: error: extended character ↲ is not valid in an identifier
16 | 16 a[i]=x;↲
| ^
a.cc:17:15: error: extended character ↲ is not valid in an identifier
17 | 17 i++;↲
| ^
a.cc:18:10: error: extended character ↲ is not valid in an identifier
18 | 18 }↲
| ^
a.cc:19:15: error: extended character ↲ is not valid in an identifier
19 | 19 cnt=0;↲
| ^
a.cc:20:5: error: extended character ↲ is not valid in an identifier
20 | 20 ↲
| ^
a.cc:21:8: error: extended character ↲ is not valid in an identifier
21 | 21 }↲
| ^
a.cc:22:5: error: extended character ↲ is not valid in an identifier
22 | 22 ↲
| ^
a.cc:23:5: error: extended character ↲ is not valid in an identifier
23 | 23 ↲
| ^
a.cc:24:31: error: extended character ↲ is not valid in an identifier
24 | 24 std::cout<<i<<std::endl;↲
| ^
a.cc:25:16: error: extended character ↲ is not valid in an identifier
25 | 25 return 0;↲
| ^
a.cc:26:6: error: extended character ↲ is not valid in an identifier
26 | 26 }↲
| ^
a.cc:1:3: error: expected unqualified-id before numeric constant
1 | 1 #include<iostream>↲
| ^
a.cc:26:6: error: '\U000021b2' does not name a type
26 | 26 }↲
| ^
|
s670752624
|
p03962
|
C++
|
1 #include<iostream>↲
2 ↲
3 int main(){↲
4 int x;↲
5 int a[3];↲
6 int i=0;↲
7 int cnt=0;↲
8 ↲
9 while(std::cin>>x){↲
10 for(int j=0;j<i;j++){_↲
11 if(a[j]==x){↲
12 cnt++;↲
13 }↲
14 }↲
15 if(cnt==0){↲
16 a[i]=x;↲
17 i++;↲
18 }↲
19 cnt=0;↲
20 ____↲
21 }↲
22 __↲
23 ↲
24 std::cout>>i>>std::endl;↲
25 return 0;↲
26 }↲
|
a.cc:1:4: error: stray '#' in program
1 | 1 #include<iostream>↲
| ^
a.cc:1:22: error: extended character ↲ is not valid in an identifier
1 | 1 #include<iostream>↲
| ^
a.cc:2:5: error: extended character ↲ is not valid in an identifier
2 | 2 ↲
| ^
a.cc:3:16: error: extended character ↲ is not valid in an identifier
3 | 3 int main(){↲
| ^
a.cc:4:13: error: extended character ↲ is not valid in an identifier
4 | 4 int x;↲
| ^
a.cc:5:16: error: extended character ↲ is not valid in an identifier
5 | 5 int a[3];↲
| ^
a.cc:6:15: error: extended character ↲ is not valid in an identifier
6 | 6 int i=0;↲
| ^
a.cc:7:17: error: extended character ↲ is not valid in an identifier
7 | 7 int cnt=0;↲
| ^
a.cc:8:5: error: extended character ↲ is not valid in an identifier
8 | 8 ↲
| ^
a.cc:9:26: error: extended character ↲ is not valid in an identifier
9 | 9 while(std::cin>>x){↲
| ^
a.cc:10:30: error: extended character ↲ is not valid in an identifier
10 | 10 for(int j=0;j<i;j++){_↲
| ^
a.cc:11:23: error: extended character ↲ is not valid in an identifier
11 | 11 if(a[j]==x){↲
| ^
a.cc:12:19: error: extended character ↲ is not valid in an identifier
12 | 12 cnt++;↲
| ^
a.cc:13:12: error: extended character ↲ is not valid in an identifier
13 | 13 }↲
| ^
a.cc:14:10: error: extended character ↲ is not valid in an identifier
14 | 14 }↲
| ^
a.cc:15:20: error: extended character ↲ is not valid in an identifier
15 | 15 if(cnt==0){↲
| ^
a.cc:16:18: error: extended character ↲ is not valid in an identifier
16 | 16 a[i]=x;↲
| ^
a.cc:17:15: error: extended character ↲ is not valid in an identifier
17 | 17 i++;↲
| ^
a.cc:18:10: error: extended character ↲ is not valid in an identifier
18 | 18 }↲
| ^
a.cc:19:15: error: extended character ↲ is not valid in an identifier
19 | 19 cnt=0;↲
| ^
a.cc:20:5: error: extended character ↲ is not valid in an identifier
20 | 20 ____↲
| ^
a.cc:21:8: error: extended character ↲ is not valid in an identifier
21 | 21 }↲
| ^
a.cc:22:5: error: extended character ↲ is not valid in an identifier
22 | 22 __↲
| ^
a.cc:23:5: error: extended character ↲ is not valid in an identifier
23 | 23 ↲
| ^
a.cc:24:31: error: extended character ↲ is not valid in an identifier
24 | 24 std::cout>>i>>std::endl;↲
| ^
a.cc:25:16: error: extended character ↲ is not valid in an identifier
25 | 25 return 0;↲
| ^
a.cc:26:6: error: extended character ↲ is not valid in an identifier
26 | 26 }↲
| ^
a.cc:1:2: error: expected unqualified-id before numeric constant
1 | 1 #include<iostream>↲
| ^
a.cc:26:6: error: '\U000021b2' does not name a type
26 | 26 }↲
| ^
|
s674455309
|
p03962
|
C++
|
/*input
codefestival
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define F first
#define S second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define pb push_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#ifdef leowang
#define debug(...) do{\
fprintf(stderr,"%s - %d : (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
_DO(__VA_ARGS__);\
}while(0)
template<typename I> void _DO(I&&x){cerr<<x<<endl;}
template<typename I,typename...T> void _DO(I&&x,T&&...tail){cerr<<x<<", ";_DO(tail...);}
#else
#define debug(...)
#endif
template<typename T1,typename T2>
ostream& operator<<(ostream& out,pair<T1,T2> P){
out<<'('<<P.F<<','<<P.S<<')';
return out;
}
//}}}
const ll maxn=300005;
const ll maxlg=__lg(maxn)+2;
const ll INF64=8000000000000000000LL;
const int INF=0x3f3f3f3f;
const ll MOD=ll(1e9+7);
const double PI=acos(-1);
//const ll p=880301;
//const ll P=31;
ll mypow(ll a,ll b){
ll res=1LL;
while(b){
if(b&1) res=res*a%MOD;
a=a*a%MOD;
b>>=1;
}
return res;
}
set<int> st;
int main()
{
IOS;
REP(i,3){
cin>>tmp;
st.insert(tmp);
}
cout<<SZ(st);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:62:22: error: 'tmp' was not declared in this scope; did you mean 'tm'?
62 | cin>>tmp;
| ^~~
| tm
|
s260957007
|
p03962
|
C
|
#include<stdio.h>
int n[5],sum=0;
int main()
{
scanf("%d %d %d",&n[1],&n[2],&n[3]);
sum=3;
for(int i=1;i<=3;i++)
{
for(int j=0;j<=i-1;j++)
{
if(n[i]==n[j]){
sum--;
break;
}
}
}i
printf("%d",sum);
return 0;
}
|
main.c: In function 'main':
main.c:17:10: error: unknown type name 'i'
17 | }i
| ^
main.c:18:16: error: expected declaration specifiers or '...' before string constant
18 | printf("%d",sum);
| ^~~~
main.c:18:21: error: expected declaration specifiers or '...' before 'sum'
18 | printf("%d",sum);
| ^~~
|
s996314275
|
p03962
|
C
|
1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa
|
main.c:1:1: error: invalid suffix "aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa" on integer constant
1 | 1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:1:1: error: expected identifier or '(' before numeric constant
|
s022240854
|
p03962
|
C++
|
print(len(list(sorted(list(map(int, input().split()))))))
|
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
1 | print(len(list(sorted(list(map(int, input().split()))))))
| ^
|
s628054013
|
p03962
|
C++
|
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include <queue>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
map<int, int> ans;
ans.insert<a, 1>;
ans.insert<b, 1>;
ans.insert<c, 1>;
cout << ans.size() << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:13: error: statement cannot resolve address of overloaded function
17 | ans.insert<a, 1>;
| ~~~~^~~~~~~~~~~~
a.cc:18:13: error: statement cannot resolve address of overloaded function
18 | ans.insert<b, 1>;
| ~~~~^~~~~~~~~~~~
a.cc:19:13: error: statement cannot resolve address of overloaded function
19 | ans.insert<c, 1>;
| ~~~~^~~~~~~~~~~~
|
s881019240
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
int hash[101];
int main(){
int a,b,c,ans=0;
cin>>a>>b>>c;
hash[a]++;
hash[b]++;
hash[c]++;
for(int i=1;i<=100;i++){
if(hash[i]!=0){
ans++;
}
}
cout<<ans;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: reference to 'hash' is ambiguous
10 | hash[a]++;
| ^~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
a.cc:11:9: error: reference to 'hash' is ambiguous
11 | hash[b]++;
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
a.cc:12:9: error: reference to 'hash' is ambiguous
12 | hash[c]++;
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
a.cc:14:20: error: reference to 'hash' is ambiguous
14 | if(hash[i]!=0){
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
|
s666400234
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
int hash[101];
int main(){
int a,b,c,ans=0;
cin>>a>>b>>c;
hash[a]++;
hash[b]++;
hash[c]++;
for(int i=1;i<=100;i++){
if(hash[i]!=0){
ans++;
}
}
cout<<ans;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: reference to 'hash' is ambiguous
10 | hash[a]++;
| ^~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
a.cc:11:9: error: reference to 'hash' is ambiguous
11 | hash[b]++;
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
a.cc:12:9: error: reference to 'hash' is ambiguous
12 | hash[c]++;
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
a.cc:14:20: error: reference to 'hash' is ambiguous
14 | if(hash[i]!=0){
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
59 | struct hash;
| ^~~~
a.cc:6:5: note: 'int hash [101]'
6 | int hash[101];
| ^~~~
|
s521795992
|
p03962
|
C
|
#include<stdio.h>
int main()
{
int a, b, c;
int ans = 0;
scanf("%d %d %d", &a, &b, &c);
if(a != b && b != c)
printf("3\n");
if(a == b && a != c)
printf("2\n");
if(a == c && a != b)
printf("2\n");
if(b == c && b != a)
printf("2\n");
if(a == b && b == c)
printf("1\n");
return 0; && a != b)
printf("2\n");
if(b == c && b != a)
printf("2\n");
if(a == b && b == c)
printf("1\n");
return 0;
}
|
main.c: In function 'main':
main.c:17:64: warning: comparison between pointer and integer
17 | return 0; && a != b)
| ^~
main.c:17:68: error: expected ';' before ')' token
17 | return 0; && a != b)
| ^
| ;
main.c:17:68: error: expected statement before ')' token
main.c:17:49: error: label 'a' used but not defined
17 | return 0; && a != b)
| ^~~~~~
|
s138024815
|
p03962
|
C++
|
#include<stdio.h>
int main()
{
int a, b, c;
int ans = 0;
scanf("%d %d %d", &a, &b, &c);
if(a != b && b != c)
printf("3\n");
if(a == b && a != c)
printf("2\n");
if(a == c && a != b)
printf("2\n");
if(b == c && b != a)
printf("2\n");
if(a == b && b == c)
printf("1\n");
return 0; && a != b)
printf("2\n");
if(b == c && b != a)
printf("2\n");
if(a == b && b == c)
printf("1\n");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:17:64: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | return 0; && a != b)
| ~~~~~^~~~
a.cc:17:68: error: expected ';' before ')' token
17 | return 0; && a != b)
| ^
| ;
a.cc:17:62: error: label 'a' used but not defined
17 | return 0; && a != b)
| ^
|
s987604151
|
p03962
|
C
|
#incude <stdio.h>
int main(){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a==b && b==c) puts("1");
else puts((a-b)*(b-c)*(c-a)?"3":"2");
}
|
main.c:1:2: error: invalid preprocessing directive #incude; did you mean #include?
1 | #incude <stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d%d%d",&a,&b,&c);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #incude <stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d%d%d",&a,&b,&c);
| ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:20: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
5 | if(a==b && b==c) puts("1");
| ^~~~
main.c:5:20: note: include '<stdio.h>' or provide a declaration of 'puts'
|
s622962353
|
p03962
|
C
|
#incude <stdio.h>
int main(){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a==b && b==c) puts("1");
else puts((a-b)(b-c)(c-a)?"3":"2");
}
|
main.c:1:2: error: invalid preprocessing directive #incude; did you mean #include?
1 | #incude <stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d%d%d",&a,&b,&c);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #incude <stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d%d%d",&a,&b,&c);
| ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:20: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
5 | if(a==b && b==c) puts("1");
| ^~~~
main.c:5:20: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:6:15: error: called object is not a function or function pointer
6 | else puts((a-b)(b-c)(c-a)?"3":"2");
| ~~^~~
|
s824033112
|
p03962
|
C++
|
#include "bits/stdc++.h"
using namespace std;
int main(){
int n;cin>>n;--n;
int a,b,t,s,tmpa,tmpb;cin>>a>>b;
for(int i=0;i<n;++i){
cin>>t>>s;tmpa=t,tmpb=s;
int m=max((a+t-1)/t),(b+s-1)/s));
a=m*t;b=m*s;
}cout<<a+b;
}
|
a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'max(int)'
8 | int m=max((a+t-1)/t),(b+s-1)/s));
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: template argument deduction/substitution failed:
a.cc:8:18: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
8 | int m=max((a+t-1)/t),(b+s-1)/s));
| ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 1 provided
|
s045671754
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,ans;
cin>>a>>b>>c;
if(a!=b)ans++;
if(b!=c)ans++;
if(a!=c)ans++;
if(ans==0)ans++
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'cout'
9 | if(ans==0)ans++
| ^
| ;
10 | cout<<ans<<endl;
| ~~~~
|
s315551860
|
p03962
|
C
|
#include <stdio.h>
int main(void)
{
int a, b, c, p;
scanf("%d %d %d", &a, &b, &c);
if((a==b) && (b==c) && (c==a)))
p = 1;
else if((a==b) || (b==c) || (c==a))
p = 2;
else
p = 3;
printf("%d", p);
return 0;
}
|
main.c: In function 'main':
main.c:7:33: error: expected statement before ')' token
7 | if((a==b) && (b==c) && (c==a)))
| ^
main.c:9:3: error: 'else' without a previous 'if'
9 | else if((a==b) || (b==c) || (c==a))
| ^~~~
|
s503850066
|
p03962
|
C
|
#include <stdio.h.
int main(void)
{
int a, b, c, sum = 0;
scanf("%d %d %d", &a, &b, &c);
if((a==b) &&(b==c) && (c==a))
sum = a+b+c;
else if(a==b)
sum = a+c;
else if(b==c)
sum = b+a;
else if(c==a)
sum = c+b;
else
sum = a+b+c;
printf("%d", sum);
return 0;
}
|
main.c:1:19: error: missing terminating > character
1 | #include <stdio.h.
| ^
main.c:1:10: fatal error: stdio.h.: No such file or directory
1 | #include <stdio.h.
| ^
compilation terminated.
|
s041504538
|
p03962
|
C++
|
#include <iostream>
usign namespace std;
int main(){
int a,b,c;
int count =0;
cin >> a;
count ++;
cin >> b;
if(a!=b)count ++;
cin>>c;
if(c != a && c != b)count ++;
cout << count << endl;
return 0;
}
|
a.cc:3:1: error: 'usign' does not name a type
3 | usign namespace 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 >> a;
| ^~~
| 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:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << count << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:17:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << count << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s678489827
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, s, d,;
cin >> a >> s >> d ;
if(a==s&&s==d)
cout << "1";
else if(a!=s&&a!=d&&s!=d)
cout << "3";
else
cout << "2";
cout << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:15: error: expected unqualified-id before ';' token
6 | int a, s, d,;
| ^
|
s491068507
|
p03962
|
C++
|
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
vector<int> l = {a, b, c};
sort(l.begin(), l.end());
l.erase(unique(l.begin(), l.end()), l.end());
cout << l.size() << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(l.begin(), l.end());
| ^~~~
| short
a.cc:11:13: error: 'unique' was not declared in this scope
11 | l.erase(unique(l.begin(), l.end()), l.end());
| ^~~~~~
|
s921256682
|
p03962
|
C++
|
#include<iostream>
#include<set>
using namespace std;
int main(){
int a, b, c; cin >> a >> b >> c;
set<int> st{a, b, c};
cout << s.size() << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:11: error: 's' was not declared in this scope; did you mean 'st'?
8 | cout << s.size() << endl;
| ^
| st
|
s373193571
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
else if(a==b&&b==c){cout<<1<<endl;}
if (a==b||a==c||b==c){cout<<2<<endl;}
else{cout<<3<<endl;}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:2: error: 'else' without a previous 'if'
6 | else if(a==b&&b==c){cout<<1<<endl;}
| ^~~~
|
s236712217
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int a[3];
int main(){
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3);
int res = 0;
for(i=0;i<2;++i){
if(a[i] - a[i+1] == 0){
res++;
}
}
}
|
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
9 | for(i=0;i<2;++i){
| ^
|
s923422194
|
p03962
|
C++
|
a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
|
a.cc:1:1: error: 'a' does not name a type
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:32: error: 'a' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:35: error: 'b' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:38: error: 'c' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:16: error: 'scanf' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^~~~~
a.cc:1:49: error: 'd' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:61: error: 'd' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:73: error: 'd' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:97: error: 'd' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:115: error: 'd' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^
a.cc:1:101: error: 'printf' was not declared in this scope
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | a,b,c,d;main(){scanf("%d%d%d",&a,&b,&c);if(a!=b)d++;if(b!=c)d++;if(c!=a)d++;if(a==b&&b==c&&c==a)d++;printf("%d\n",d);}
|
s402377120
|
p03962
|
C
|
import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner stdIn=new Scanner(System.in);
int n[]=new int[3],s=1,i,j,t;
for(i=0;i<3;i++) n[i]=stdIn.nextInt();
for(i=0;i<2;i++) {
for(j=2;j>i;j--) {
if(n[j-1]>n[j]) {
t=n[j-1];
n[j-1]=n[j];
n[j]=t;
}
}
}
for(i=0;i<2;i++) if(n[i]!=n[i+1]) s++;
System.out.print(s);
}
}
|
main.c:1:1: error: unknown type name 'import'
1 | import java.util.Scanner;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.util.Scanner;
| ^
main.c:3:1: error: unknown type name 'class'
3 | class Main{
| ^~~~~
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
3 | class Main{
| ^
|
s618674763
|
p03962
|
C++
|
#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const int INTMAX = 2147483647;
const int INTMIN = -2147483648;
const unsigned int UINTMAX = 4294967295;
const long LONGMAX = 9223372036854775807;
const long LONGMIN = -9223372036854775808;
const unsigned long ULONGMAX = 18446744073709551615;
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n+1)
#define SUM(c) accumulate((c).begin(),(c).end(),0)
#define UNIQ(c) (c).erase(unique((c).begin(), (c).end()), (c).end());
#define Yn(b) puts(b?"Yes":"No")
#define YN(b) puts(b?"YES":"NO")
bool isprime(int p) {
if (p==1) return false;
FOR(i,2,p) {
if (p%i==0) return false;
}
return true;
}
int dig(int n, int a) {return n/(int)pow(10,a)%10;}
int digl(long n, int a) {return n/(long)pow(10,a)%10;}
int digsum(int n) {int r=0;REP(i,10){r+=dig(n,i);}return r;}
int digsuml(long n) {int r=0;REP(i,19){r+=digl(n,i);}return r;}
int dignum(int n) {return n?to_string(n).length():0;}
int dignuml(long n) {return n?to_string(n).length():0;}
int main(){
int a,b,c;
cin << a << b << c;
if(a==b&&b==c){
cout << 1;
} else if (a==b||b==c||c==a) {
cout << 2;
} else {
cout << 3;
}
return 0;
}
|
a.cc:15:23: warning: integer constant is so large that it is unsigned
15 | const long LONGMIN = -9223372036854775808;
| ^~~~~~~~~~~~~~~~~~~
a.cc:16:32: warning: integer constant is so large that it is unsigned
16 | const unsigned long ULONGMAX = 18446744073709551615;
| ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:44:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
44 | cin << a << b << c;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:44:7: note: candidate: 'operator<<(int, int)' (built-in)
44 | cin << a << b << c;
| ~~~~^~~~
a.cc:44:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:44:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
44 | cin << a << b << c;
| ^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:44:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]':
a.cc:44:10: required from here
44 | cin << a << b << c;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
|
s601399641
|
p03962
|
C++
|
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long lng;
#define UP(i,a,b) for(int i=(a); i<=(b); ++i)
#define DOWN(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) UP(i,0,n-1)
#define ALL(a) (a).begin(), (a).end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) //NOTE: <a> must be sorted in advance
lng power(lng b, lng n) {lng sol=1; while(n>0) {if(n&1) {sol=sol*b;} n>>=1; b*= b;} return sol;} //calculate b^n
const int MOD = 1000000007; //10^9+7
/*********** variables ************/
/**********************************/
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a,b,c;
cin>>a>>b>>c;
if(a==b&&b==c) cout 1 << endl;
else if(a==b||b==c||c==a) cout << 2 << endl;
else cout<< 3 << endl;
}
|
a.cc: In function 'int main()':
a.cc:27:24: error: expected ';' before numeric constant
27 | if(a==b&&b==c) cout 1 << endl;
| ^~
| ;
|
s707881390
|
p03962
|
C
|
#include<stdio.h>
int main(void) {
int a, b, c;
int x[101];
sum = 0;
scanf("%d %d %d", &a, &b, &c);
x[a]++; x[b]++; x[c]++;
for(int i = 0; i < 101; i++) {
if(x[i]) {
sum++;
}
}
}#include<stdio.h>
int main(void) {
int a, b, c;
int x[101];
int sum = 0;
scanf("%d %d %d", &a, &b, &c);
x[a]++; x[b]++; x[c]++;
for(int i = 0; i < 101; i++) {
if(x[i]) {
sum++;
}
}
}
|
main.c: In function 'main':
main.c:6:3: error: 'sum' undeclared (first use in this function)
6 | sum = 0;
| ^~~
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:17:2: error: stray '#' in program
17 | }#include<stdio.h>
| ^
main.c:17:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
17 | }#include<stdio.h>
| ^
|
s019109941
|
p03962
|
C
|
#include<stdio.h>
int main(void) {
int a, b, c;
int x[101];
sum = 0;
scanf("%d %d %d", &a, &b, &c);
x[a]++; x[b]++; x[c]++;
for(int i = 0; i < 101; i++) {
if(x[i]) {
sum++;
}
}
}
|
main.c: In function 'main':
main.c:6:3: error: 'sum' undeclared (first use in this function)
6 | sum = 0;
| ^~~
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
|
s443802252
|
p03962
|
C++
|
#!/usr/bin/env python3
#
# FILE: abc046_a.py
#
# @author: Arafat Hasan Jenin <opendoor.arafat[at]gmail[dot]com>
#
# LINK: https://abc046.contest.atcoder.jp/tasks/abc046_a?lang=en
#
# DATE CREATED: 17-06-18 00:09:52 (+06)
# LAST MODIFIED: 17-06-18 00:19:32 (+06)
#
# VERDICT:
#
# DEVELOPMENT HISTORY:
# Date Version Description
# --------------------------------------------------------------------
# 17-06-18 1.0 Deleted code is debugged code.
#
# _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
# _/ _/ _/_/ _/ _/ _/_/ _/
# _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/
# _/ _/ _/ _/ _/_/ _/ _/ _/_/
# _/_/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
#
##############################################################################
print(len(set(map(int, input().split()))))
|
a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python3
| ^
a.cc:3:3: error: invalid preprocessing directive #FILE
3 | # FILE: abc046_a.py
| ^~~~
a.cc:5:3: error: invalid preprocessing directive #@
5 | # @author: Arafat Hasan Jenin <opendoor.arafat[at]gmail[dot]com>
| ^
a.cc:7:3: error: invalid preprocessing directive #LINK
7 | # LINK: https://abc046.contest.atcoder.jp/tasks/abc046_a?lang=en
| ^~~~
a.cc:9:3: error: invalid preprocessing directive #DATE
9 | # DATE CREATED: 17-06-18 00:09:52 (+06)
| ^~~~
a.cc:10:3: error: invalid preprocessing directive #LAST
10 | # LAST MODIFIED: 17-06-18 00:19:32 (+06)
| ^~~~
a.cc:12:3: error: invalid preprocessing directive #VERDICT
12 | # VERDICT:
| ^~~~~~~
a.cc:14:3: error: invalid preprocessing directive #DEVELOPMENT
14 | # DEVELOPMENT HISTORY:
| ^~~~~~~~~~~
a.cc:15:3: error: invalid preprocessing directive #Date
15 | # Date Version Description
| ^~~~
a.cc:16:3: error: invalid preprocessing directive #--
16 | # --------------------------------------------------------------------
| ^~
a.cc:17:5: error: "-" is not a valid filename
17 | # 17-06-18 1.0 Deleted code is debugged code.
| ^
a.cc:19:17: error: invalid preprocessing directive #_
19 | # _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
| ^
a.cc:20:16: error: invalid preprocessing directive #_
20 | # _/ _/ _/_/ _/ _/ _/_/ _/
| ^
a.cc:21:15: error: invalid preprocessing directive #_
21 | # _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/
| ^
a.cc:22:8: error: invalid preprocessing directive #_
22 | # _/ _/ _/ _/ _/_/ _/ _/ _/_/
| ^
a.cc:23:9: error: invalid preprocessing directive #_
23 | # _/_/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
| ^
a.cc:25:1: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:3: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:5: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:7: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:9: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:11: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:13: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:15: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:17: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:19: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:21: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:23: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:25: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:27: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:29: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:31: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:33: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:35: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:37: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:39: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:41: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:43: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:45: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:47: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:49: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:51: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:53: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:55: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:57: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:59: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:61: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:63: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:65: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:67: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:69: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:71: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:73: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:75: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:25:77: error: stray '##' in program
25 | ##############################################################################
| ^~
a.cc:27:6: error: expected constructor, destructor, or type conversion before '(' token
27 | print(len(set(map(int, input().split()))))
| ^
|
s262460572
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a==b==c){
cout << 1 <<endl;
else if(a==b||b==c||c==a){
cout << 2 << endl;
}
else{cout << 3 << endl;}
}
|
a.cc: In function 'int main()':
a.cc:10:5: error: expected '}' before 'else'
10 | else if(a==b||b==c||c==a){
| ^~~~
a.cc:8:14: note: to match this '{'
8 | if(a==b==c){
| ^
|
s829689631
|
p03962
|
C++
|
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();
int sameCount = 0 ;
if( a == b ){
sameCount ++ ;
}
if( b == c ){
sameCount ++ ;
}
if( c == a ){
sameCount ++ ;
}
switch(sameCount){
case 0:
System.out.println(3);
break;
case 1:
System.out.println(2);
break;
case 3:
System.out.println(1);
break;
}
}
}
|
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:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s975057163
|
p03962
|
C++
|
#include <bits/stdc++.h>
#include <typeinfo>
#include <cxxabi.h>
#ifdef LOCAL
#include "dbgtoki.hpp"
#define DUMP(i) dump((string)TOSTRING(i), demangle(typeid(i).name()), __LINE__ , i)
DbgTimer D_t;
#define TSTART() D_t.start()
#define TSTOP() D_t.stop()
#else
#define DUMP(i)
#define TSTART()
#define TSTOP()
#endif
#define TOSTRING(x) #x
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(s) (s).begin(), (s).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()) , v.end());
using namespace std;
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
const int EPS = 1e-9;
int main (){
cin.tie(0);
ios::sync_with_stdio(false);
vi color(3);
while(cin >> color[0] >> color[1] >> color[2]){
TSTART();
int ans;
sort(color);//忘れないように!
UNIQUE(color);
ans = SZ(color);
cout << ans << endl;
TSTOP();
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:39:9: error: no matching function for call to 'sort(vi&)'
39 | sort(color);//忘れないように!
| ~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/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
|
s711442675
|
p03962
|
C++
|
#include<iostream>
#include<algorithm>
#include<math.h>
#include<set>
#include<vector>
#include<map>
#include <numeric>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==b&&b==c)
cout<<1<<endl;
else if(a==b&&b!=c)
cout<<2<<endl;
else if(b==c&&c!=a)
cout<<2<<endl;
else if(c==a&&a!=b)
cout<<2<<endl;
else if(a!=b!&&b!=c&&c!=a)
cout<<1<<endl;
}
|
a.cc: In function 'int main()':
a.cc:20:13: error: expected ')' before '!' token
20 | else if(a!=b!&&b!=c&&c!=a)
| ~ ^
| )
|
s510478333
|
p03962
|
C++
|
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <utility>
typedef long long ll;
ll MOD = 1e9+7;
using namespace std;
int main()
{
int a,b,c;
bool co[100];
fill(co,co+100,false);
int ans=0;
cin>>a>>b>>c;
co[a-1]=true;
co[b-1]=true;
co[c-1]=true;
for(int i=0;i<100;i++)
{
if(c[i])
ans++;
}
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:25:21: error: invalid types 'int[int]' for array subscript
25 | if(c[i])
| ^
|
s447714668
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a == b && b == c){
cout << '1' << endl;
} else if(a == b || a == c || b == c) {
cout << '2' << emdl;
} else {
cout << '3' << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:23: error: 'emdl' was not declared in this scope
9 | cout << '2' << emdl;
| ^~~~
|
s610953831
|
p03962
|
C++
|
#include <iostream>
#include <string>
#include<algorithm>
#include <cstdlib>
#include <cmath>
using namespace std;
int main()
{
int a, b, h;
cin >> a >> b >> h;
int count = 3;
if (a == b) count--;
else if (a == h) count--;
if (b == h) count--;
cout, < count << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:18:15: error: expected primary-expression before '<' token
18 | cout, < count << endl;
| ^
a.cc:18:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
18 | cout, < count << endl;
| ~~~~~~^~~~~~~
|
s971424022
|
p03962
|
C++
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
int a, b, c;
public static void main(String args[]) {
new Main().run();
}
void run() {
FastReader sc = new FastReader();
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
solve();
}
void solve() {
int ans = 3;
if (a == b && b == c) {
ans = 1;
} else if (a == b || b == c || c == a) {
ans = 2;
}
System.out.println(ans);
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
}
|
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.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.util.StringTokenizer;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class Main {
| ^~~~~~
|
s861608940
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int A[4];
int main(){
cin >> A[0] >> A[1] >> A[2];
int cc=0
for(int i=0;i<=3;i++){
if(A[i]!=A[i+1]) cc++;
}
cout << cc << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'for'
9 | for(int i=0;i<=3;i++){
| ^~~
a.cc:9:17: error: 'i' was not declared in this scope
9 | for(int i=0;i<=3;i++){
| ^
|
s157409053
|
p03962
|
C++
|
#include <stdio.h>
int main() {
int a, b, c, dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
8 | scanf_s("%d %d %d", &a, &b, &c);
| ^~~~~~~
| scanf
|
s219870817
|
p03962
|
C
|
#include <stdio.h>
int main() {
int a, b, c, dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scanf_s("%d %d %d", &a, &b, &c);
| ^~~~~~~
| scanf
|
s915683010
|
p03962
|
C++
|
#include <stdio.h>
int main() {
int a, b, c, dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
8 | scanf_s("%d %d %d", &a, &b, &c);
| ^~~~~~~
| scanf
|
s439252828
|
p03962
|
C++
|
#include <stdio.h>
int main() {
int a, b, c ,dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
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", &a, &b, &c);
| ^~~~~~~
| scanf
|
s363730475
|
p03962
|
C++
|
#include <stdio.h>
#include "stdafx.h"
int main() {
int a, b, c ,dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s161751452
|
p03962
|
C++
|
#include <stdio.h>
#include "stdafx.h"
int main() {
int a, b, c ,dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s017747521
|
p03962
|
C++
|
#include <stdio.h>
#include "stdafx.h"
int main() {
int a, b, c ,dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s365098729
|
p03962
|
C
|
#include <stdio.h>
#include "stdafx.h"
int main() {
int a, b, c ,dd = 0;
scanf_s("%d %d %d", &a, &b, &c);
if (a == b)dd++;
if (a == c)dd++;
if (b == c)dd++;
if (dd == 3) dd = 2;
printf("%d", 3 - dd);
return 0;
}
|
main.c:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s044909061
|
p03962
|
C
|
#include <iostream>
int main() {
int a, b, c;
cin << a << b << c;
if (a != b && a != c) {
if (b == c) {
cout << 2 << endl;
}
else {
cout << 3 << endl;
}
}
if (a == b && a == C) {
cout << 1 << endl;
}
if (a != b && a == c) {
if (a == b) {
cout << 1 << endl;
}
if (a != b) {
cout << 2 << endl;
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s139899883
|
p03962
|
C++
|
#include<iostream>
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 && b != c){
cout<<3<<endl;
}else {
cout<<2<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:10:7: error: expected '(' before 'else'
10 | }if else (a != b && b != c){
| ^~~~
| (
a.cc:12:4: error: 'else' without a previous 'if'
12 | }else {
| ^~~~
|
s403645274
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main () {
int a,b,c;
cin a>>b>>c;
if (a == b && a == c){
cout << 1 << endl;
}
if (a != b && b != c){
cout << 3 << endl;
} else { cout << 2 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a>>b>>c;
| ^~
| ;
|
s172214392
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main () {
int a,b,c;
cin a>>b>>c;
if (a == b && a == c){
cout << 1 << endl;
} else if (a != b && b != c){
cout << 3 << endl;
} else{ cout << 2 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a>>b>>c;
| ^~
| ;
|
s988444405
|
p03962
|
C++
|
#include<iostream>
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){
cout << 3 << endl;
else{ cout << 2 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a>>b>>c;
| ^~
| ;
a.cc:10:13: error: expected '(' before '!' token
10 | } else if !(a == b && a == c){
| ^
| (
a.cc:14:4: error: expected '}' at end of input
14 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s473766525
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main () {
int a,b,c;
cina>>b>>c;
if (a == b && a == c){
cout << 1 << endl;
} else if !(a == b && a == c){
cout << 3 << endl;
else{ cout << 2 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cina' was not declared in this scope
6 | cina>>b>>c;
| ^~~~
a.cc:10:13: error: expected '(' before '!' token
10 | } else if !(a == b && a == c){
| ^
| (
a.cc:14:4: error: expected '}' at end of input
14 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s400333918
|
p03962
|
C++
|
#include<iostream>
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 (a==c){
cout<<2<<endl;
} else if (b==c){
cout<<2<<endl;
} else if
cout<<3<<endl;
}
|
a.cc: In function 'int main()':
a.cc:17:5: error: expected '(' before 'cout'
17 | cout<<3<<endl;
| ^~~~
| (
|
s238968080
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main () {
int a,b,c;
cin >> a >> b >> c ;
if (a==b==c){
cout<<1<<endl;
} else if (a==b){
cout<<2<<endl;
} else if (a==c){
cout<<2<<endl;
} else if (b==c){
cout<<2<<endl;
} else if
cout<<3<<endl;
}
|
a.cc: In function 'int main()':
a.cc:17:5: error: expected '(' before 'cout'
17 | cout<<3<<endl;
| ^~~~
| (
|
s287212915
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == b == c){
cout << 1 << endl;
}else if(a != b && b != c && c != a){
cout << 3 << endl;
}else if{
cout << 2 << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:17: error: expected '(' before '{' token
11 | }else if{
| ^
| (
|
s143897295
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main () {
int a,b,c;
cin >> a >> b >> c ;
if (a==b==c){
cout<<1<<endl;
}else if (a==b){
cout<<2<<endl;
}else if (a==c){
cout<<2<<endl;
}else if (b==c){
cout<<2<<endl;
}else if (a!=b!=C){
cout<<3<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:16:19: error: 'C' was not declared in this scope
16 | }else if (a!=b!=C){
| ^
|
s053583349
|
p03962
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int x = 3;
if(a == b)||(b == c)||(a == c)
x--;
if(a == b)&&(b == c)&&(a == c)
x--;
cout << x << endl;
}
|
a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before '||' token
8 | if(a == b)||(b == c)||(a == c)
| ^~
a.cc:10:15: error: expected identifier before '(' token
10 | if(a == b)&&(b == c)&&(a == c)
| ^
|
s690293612
|
p03962
|
C++
|
include<stdio.h>
#include<iostream>
using namespace std;
int a,b,c;
int main (){
cin >> a >> b >> c;
int cnt = 0;
if(a != b) cnt++;
if(a != c) cnt++;
if(b != c) cnt++;
cout << cnt << endl;
return 0;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
179 | _GLIBCXX_N
|
s805218491
|
p03962
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,count=0;
scanf("%d%d%d",&a,&b,&c);
if(a==b&&a==c){
count=1;
printf("%d",count);
}else if (a==b&&a!=c){
count=2;
printf("%d",count);
}
}else if (a!=b&&a!=c&&b!=c){
count=3;
printf("%d",count);
}
return 0;
}
|
main.c:15:6: error: expected identifier or '(' before 'else'
15 | }else if (a!=b&&a!=c&&b!=c){
| ^~~~
main.c:19:5: error: expected identifier or '(' before 'return'
19 | return 0;
| ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
20 | }
| ^
|
s035348975
|
p03962
|
C++
|
sed 's/ /\n/g' | sort -u | wc -l
|
a.cc:1:5: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
1 | sed 's/ /\n/g' | sort -u | wc -l
| ^~~~~~~~~~
a.cc:1:1: error: 'sed' does not name a type
1 | sed 's/ /\n/g' | sort -u | wc -l
| ^~~
|
s727819281
|
p03962
|
C
|
#include <stdio.h>
int main(void)
{int i,h,a,b,c,k,l,m,N,K,j,v,g,flag,sum;
int a[3];
scanf("%d%d%d",&a[0],&a[1],&a[2]);
if(((a[0]==a[1])&&(a[1]!=a[2]))||((a[0]==a[2])&&(a[0]!=a[1]))||((a[1]==a[2])&&(a[1]!=a[0])))
printf("%d",2);
else if((a[0]==a[1])&&(a[1]==a[2]))
printf("%d",3);
else printf("%d",1);
return 0;
}
|
main.c: In function 'main':
main.c:5:13: error: conflicting types for 'a'; have 'int[3]'
5 | int a[3];
| ^
main.c:4:10: note: previous declaration of 'a' with type 'int'
4 | {int i,h,a,b,c,k,l,m,N,K,j,v,g,flag,sum;
| ^
|
s686590266
|
p03962
|
C
|
#include<stdio.h>
int main()
{
int a,b,c,p=2;
scanf("%d %d %d", &a,&b,&c);
if(a=b && b=c) p=1;
else if(a!=b && b!=c && c!=a) p=3;
printf("%d\n", p);
return 0;
}
|
main.c: In function 'main':
main.c:6:14: error: lvalue required as left operand of assignment
6 | if(a=b && b=c) p=1;
| ^
|
s986628565
|
p03962
|
C++
|
// ------------------------------------
// Date:2018/ 2/23
// Problem:ABC 046 AtCoDeerAndPaintCans a.cpp
//
// ------------------------------------
#include <bits/stdc++.h>
using namespace std;
#define EACH(i,a) for (auto&& i : a)
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
using ll = long long;
#define MOD 1000000007
int main()
{
vector<int> n(3);
REP(i,n) cin >> n[i];
sort(ALL(n));
n.erase(unique(ALL(n)));
cout << n.size() << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:39: error: invalid cast from type 'std::vector<int>' to type 'int'
12 | #define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
| ^
a.cc:14:18: note: in expansion of macro 'FOR'
14 | #define REP(i,n) FOR(i,0,n)
| ^~~
a.cc:25:3: note: in expansion of macro 'REP'
25 | REP(i,n) cin >> n[i];
| ^~~
|
s813387766
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,Answer = 0,checks[100];
for (int j = 0 ; j < 100 ; j++){
checks[j - 1] = 0;
}
cin >> a >> b >> c;
checks[a - 1] = 1 ; checks[b - 1] = 1 ; checks[c - 1] = 1
for (int j = 0 ; j < 100 ; j++){
if (checks[j] != 0){
Answer ++;
}
}
cout << Answer <<endl;
}
|
a.cc: In function 'int main()':
a.cc:11:60: error: expected ';' before 'for'
11 | checks[a - 1] = 1 ; checks[b - 1] = 1 ; checks[c - 1] = 1
| ^
| ;
12 | for (int j = 0 ; j < 100 ; j++){
| ~~~
a.cc:12:20: error: 'j' was not declared in this scope
12 | for (int j = 0 ; j < 100 ; j++){
| ^
|
s017801702
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,Answer = 0,checks[100];
for (int j == 0 ; j < 100 ; j++){
checks[j - 1] = 0;
}
cin >> a >> b >> c;
checks[a - 1] = 1 ; checks[b - 1] = 1 ; checks[c - 1] = 1
for (int j == 0 ; j < 100 ; j++){
if (checks[j] != 0){
Answer ++;
}
}
cout << Answer <<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before '==' token
6 | for (int j == 0 ; j < 100 ; j++){
| ^~~
| ;
a.cc:6:14: error: expected primary-expression before '==' token
6 | for (int j == 0 ; j < 100 ; j++){
| ^~
a.cc:6:28: error: expected ')' before ';' token
6 | for (int j == 0 ; j < 100 ; j++){
| ~ ^~
| )
a.cc:6:31: error: 'j' was not declared in this scope
6 | for (int j == 0 ; j < 100 ; j++){
| ^
a.cc:10:60: error: expected ';' before 'for'
10 | checks[a - 1] = 1 ; checks[b - 1] = 1 ; checks[c - 1] = 1
| ^
| ;
11 | for (int j == 0 ; j < 100 ; j++){
| ~~~
|
s906911255
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,Answer;
int memo[101]
cin >> a >> b >> c;
memo[a] = 1;memo [b] = 1;memo[c] = 1;
for(int j = 0;j < 102 ; j++){
if (memo[j] == 1){
Answer ++;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin >> a >> b >> c;
| ^~~
a.cc:9:3: error: 'memo' was not declared in this scope
9 | memo[a] = 1;memo [b] = 1;memo[c] = 1;
| ^~~~
|
s853763395
|
p03962
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c,Answer;
int memo[101]
cin >> a >> b >> c;
memo[a] = 1;memo [b] = 1;memo[c] = 1;
for(int j = 0;j < 102 ; j++){
if (memo[j] == 1){
Answer ++;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin >> a >> b >> c;
| ^~~
a.cc:9:3: error: 'memo' was not declared in this scope
9 | memo[a] = 1;memo [b] = 1;memo[c] = 1;
| ^~~~
|
s982522838
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> a(3);
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3);
printf("%d\n", unique(a,a+3)-a);
}
|
a.cc: In function 'int main()':
a.cc:7:14: error: no match for 'operator+' (operand types are 'std::vector<int>' and 'int')
7 | sort(a, a+3);
| ~^~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1798 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
7 | sort(a, a+3);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3616 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'const _CharT*' and 'std::vector<int>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3719 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'const _CharT*' and 'std::vector<int>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3726 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | sort(a, a+3);
| ^
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:340:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)'
340 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:340:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::vector<int>' is not derived from 'const std::complex<_Tp>'
7 | sort(a, a+3);
| ^
/usr/include/c++/14/complex:349:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const _Tp&)'
349 | operator+(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:349:5: note: template argument deduction/substitution fa
|
s080536537
|
p03962
|
C++
|
#include <bits/stdc++.h>
// #include "bits/stdc++.h"
#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)
typedef long long ll;
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a==b){
if(b==c){
printf("1\n");
}else{
printf("2\n");
}
}else{
if(b==c){
printf("2\n");
}else if(a==c){
printf("2\n");
}else{
printf("3\n");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
29 | }
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
s591479749
|
p03962
|
C
|
#include <stdio.h>
main() {
char str[100];
int a,b;
printf("色の種類\n");
scanf("%s",str);
b=0;
for(a=0;str[a];a++) {
if(str[i]=='a') {
j++;
}
}
printf("b=%d",b);
}
|
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main() {
| ^~~~
main.c: In function 'main':
main.c:11:8: error: 'i' undeclared (first use in this function)
11 | if(str[i]=='a') {
| ^
main.c:11:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:1: error: 'j' undeclared (first use in this function)
12 | j++;
| ^
|
s315655881
|
p03962
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int s,b,c;
cin>>a>>b>>c;
if(a==b && b==c)
{
cout<<1<<endl;
}
else if(a!=b && b!=c && a!=c)
{
cout<<3<<endl;
}else{
cout<<2<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s797698299
|
p03962
|
C++
|
#include<stdio.h>
int main(void){
int i=0,count=0,p;
int str[10001];
printf(" ");
scanf("%s",str);
while(str[i]=='p'||str[i]=='q'){
i++;
if(str[i]==112){
count++;
}
}
p=i/2;
printf("%d\n",p-count);
return0;
}
|
a.cc: In function 'int main()':
a.cc:16:1: error: 'return0' was not declared in this scope
16 | return0;
| ^~~~~~~
|
s560936832
|
p03962
|
C++
|
# -*- coding: utf-8 -*-
import math
import sys
import itertools
import numpy as np
import functools
import collections
mo = 1000000007
INF = 10**100
r = range
class infix(object):
def __init__(self, function):
self.function = function
def __ror__(self, other):
self.left = other
return self
def __or__(self, other):
return self.function(self.left, other)
def __call__(self, value1, value2):
return self.function(value1, value2)
@infix
def c(f_t_u, f_u_r): return lambda t: f_u_r(f_t_u(t))
class _Ap(object):
def __rlshift__(self, other):
self.value = other
return self
def __rshift__(self, other):
return other(self.value)
Ap = _Ap()
ap = Ap
#d = {1:2, 3:5, 6:10, 1000043:3814}
#zip(d.keys(), d.values())<<ap>>(list |c| sorted |c| reversed |c| list |c| print)
a = map(int,input().split())<<ap>>(sorted)
if a[0] == a[1] and a[1] == a[2]:
print(1);
elif a[0] != a[1] and a[1] != a[2]:
print(3);
else:
print(2);
|
a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:26:1: error: stray '@' in program
26 | @infix
| ^
a.cc:39:2: error: invalid preprocessing directive #d
39 | #d = {1:2, 3:5, 6:10, 1000043:3814}
| ^
a.cc:40:2: error: invalid preprocessing directive #zip
40 | #zip(d.keys(), d.values())<<ap>>(list |c| sorted |c| reversed |c| list |c| print)
| ^~~
a.cc:2:1: error: 'import' does not name a type
2 | import math
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:47:1: error: 'elif' does not name a type
47 | elif a[0] != a[1] and a[1] != a[2]:
| ^~~~
a.cc:49:1: error: expected unqualified-id before 'else'
49 | else:
| ^~~~
|
s526586417
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c
if(a==b && b==c)
cout<<"1";
else
if(a!=b && b==c || a==b && b!=c)
cout<<"2";
else
cout<<"3";
}
|
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'if'
6 | cin>>a>>b>>c
| ^
| ;
7 | if(a==b && b==c)
| ~~
a.cc:9:1: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s363491683
|
p03962
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,c=0;
cin>>a>>b>>c
if(a==b && b==c)
cout<<"1";
else
if(a!=b && b==c || a==b && b!=c)
cout<<"2";
else
cout<<"3";
}
|
a.cc: In function 'int main()':
a.cc:5:11: error: redeclaration of 'int c'
5 | int a,b,c,c=0;
| ^
a.cc:5:9: note: 'int c' previously declared here
5 | int a,b,c,c=0;
| ^
a.cc:6:13: error: expected ';' before 'if'
6 | cin>>a>>b>>c
| ^
| ;
7 | if(a==b && b==c)
| ~~
a.cc:9:1: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s525986571
|
p03962
|
C
|
#include <stdio.h>
int main(void)
{
int c[30]={0};
char x[200]={0};
scanf("%d %d %d", c+0,c+1,c+2);
for(int *color=c; *color!=0; ++color){
if(x[*color]++==0){
++count;
}
}
printf("%d\n", count);
return 0;
}
|
main.c: In function 'main':
main.c:9:9: error: 'count' undeclared (first use in this function)
9 | ++count;
| ^~~~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.