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> cla... |
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/... |
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 tup... | 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 << ": " <<... | 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 | ... |
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
| ^
... |
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__((... | 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/inc... |
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 (... | 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... |
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)
| ~ ^
| )
... |
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... | 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... |
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... | 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... | 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 ... | 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:... |
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 ... | 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:... |
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 c... | 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: ... |
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 I... | 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 '...' be... |
s996314275 | p03962 | C | 1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa | main.c:1:1: error: invalid suffix "aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa" on integer constant
1 | 1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa1aaaaaaaaaaaaaaaaaaa
| ^~~~~~~... |
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... |
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,
... |
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,
... |
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... | 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 | ... |
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.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 ')' tok... |
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... |
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... |
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,
... |
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++/... |
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... |
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;
}
}
}
... | 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.... |
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 = -214748... | 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;
| ... |
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.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,... | 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>
... |
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 Versi... | 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>
... |
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 ++ ;
}
... | 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 TS... | 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:
/us... |
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.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... | 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.ne... | 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 '-fm... |
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... | 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 | }
... |
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 | }
... |
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,
fr... |
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);
}
retur... | 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... | 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)
| ... |
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 ++;
}
... | 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 ; ... |
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 ++;
}
... | 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:... |
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... |
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\... | 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 ... |
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 ... | 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 #z... |
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
| ^
| ;
... |
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.