submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s823089541 | p03940 | C++ | #include <bits/stdc++.h>
#define SZ(x) ((int) (x).size())
using namespace std;
typedef long long i64;
int main() {
#ifdef LOCAL_RUN
freopen("task.in", "r", stdin);
freopen("task.out", "w", stdout);
//freopen("task.err", "w", stderr);
#endif // ONLINE_JUDGE
ios::sync_with_stdio(false);
cin.... | a.cc: In function 'int main()':
a.cc:28:24: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type&, long long int)'
28 | dp[i] = min(dp[i], dp[j] + X[j + 1] - X[j] +
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 | ... |
s376759990 | p03940 | C++ | #include <iostream>
#define NMAX 100000
using namespace std;
int min[NMAX], max[NMAX];
long long c[NMAX], dp[NMAX];
int n;
long long e, t;
long long mxm(long long a, long long b);
int main()
{
cin >> n >> e >> t;
int prec = -1e9, m = 0, cit;
while (n--) {
cin >> cit;
if (cit - prec > t) {
m++;
min[m] =... | a.cc: In function 'int main()':
a.cc:21:25: error: reference to 'min' is ambiguous
21 | min[m] = cit;
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include... |
s702468081 | p03940 | C++ | #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <bitset>
#include <cassert>
using namespace std;
const int MAXN = 100009;
const long long INF = 1000000000000000000;
struct SegmentTree {
long long tr_min[4 * MAXN];
long long tr_add[4 * MAXN];
... | a.cc: In constructor 'SegmentTree::SegmentTree(int)':
a.cc:21:9: error: 'memset' was not declared in this scope
21 | memset(tr_min, 0, sizeof(tr_min));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include <c... |
s081435502 | p03940 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <functional>
#include <set>
#include <ctime>
#include <random>
#include <chrono>
#include <cassert>
#include <tuple>
#include <utility>
using namesp... | a.cc: In member function 'starry_sky_tree::Int starry_sky_tree::getMin(int, int, int, int, int)':
a.cc:85:35: error: 'LLONG_MAX' was not declared in this scope
85 | if (r <= a || b <= l) return (LLONG_MAX);
| ^~~~~~~~~
a.cc:18:1: note: 'LLONG_MAX' is defined in header '<cl... |
s990307341 | p03940 | C++ | #include <string>
#include <iostream>
#include <vector>
using namespace std;
int main(){
long long int N, E, T, tot = 0;
cin >> N >> E >> T;
long long int x[N];
for(int i; i<N; i++){
tot += min(2*T+x[i+1]-x[i], 2*(x[i+1]-x[i])+ max(0, T-(x[i+1]-x[i])) + max(0, T-2*(x[i+1]-x[i]));
}
tot+=x[0]+(E-x[N-1... | a.cc: In function 'int main()':
a.cc:13:53: error: no matching function for call to 'max(int, long long int)'
13 | tot += min(2*T+x[i+1]-x[i], 2*(x[i+1]-x[i])+ max(0, T-(x[i+1]-x[i])) + max(0, T-2*(x[i+1]-x[i]));
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included fr... |
s756416651 | p03940 | Java | Int();
t = in.nextInt();
x = new int[n];
for (int i = 0; i < n; ++i)
x[i] = in.nextInt();
if (n == 1) {
out.println(e + t);
return;
}
long ans = x[0];
int idx = 0;
while (idx < n - 1) {
long cnt = 2;
int nxt = idx;
long tem... | Main.java:1: error: class, interface, enum, or record expected
Int();
^
Main.java:2: error: class, interface, enum, or record expected
t = in.nextInt();
^
Main.java:3: error: class, interface, enum, or record expected
x = new int[n];
^
Main.java:4: error: class, interface, enum, or record expect... |
s167239524 | p03940 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <algorithm>
#define rep(i,n) for(int i=0; i<(n); i++)
#define rrep(i,n) for(int i=(n)-1; i>=0; i--)
#define all(X) (X).begin(),(X).end()
using namespace std;
typedef long long int ll;
typedef pair<int,int> pii;
template<class T> bool ... | a.cc: In function 'int main()':
a.cc:31:16: error: no matching function for call to 'min(ll&, int)'
31 | N = min(N, 2000);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/inclu... |
s115643119 | p03940 | C++ | #include <bits/stdc++.h>
using namespace std;
void chmin(int64_t &x, int64_t y) {
if (x > y) x = y;
}
int64_t dp[2020][2020];
int main() {
int n;
int64_t T, E;
cin >> n >> E >> T;
vector<long long> x(n);
for (int i = 0; i < n; i++) scanf("%lld", &x[i]);
vector<int64_t> d(n), ds(n + 1);
... | a.cc: In function 'int main()':
a.cc:35:58: error: no matching function for call to 'max(long long int, int64_t)'
35 | chmin(dp[i + 1][0], dp[i][j] + d[i] + max(0LL, T - 2 * dist) + dist * 2);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /... |
s000222803 | p03940 | C++ | #include <bits/stdc++.h>
using namespace std;
void chmin(int64_t &x, int64_t y) {
if (x > y) x = y;
}
int64_t dp[2020][2020];
int main() {
int n;
int64_t T, E;
cin >> n >> E >> T;
vector<int64_t> x(n);
for (int i = 0; i < n; i++) scanf("%I64d", &x[i]);
vector<int64_t> d(n), ds(n + 1);
... | a.cc: In function 'int main()':
a.cc:35:58: error: no matching function for call to 'max(long long int, int64_t)'
35 | chmin(dp[i + 1][0], dp[i][j] + d[i] + max(0LL, T - 2 * dist) + dist * 2);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /... |
s399442094 | p03940 | C++ | #include <bits/stdc++.h>
using namespace std;
void chmin(int64_t &x, int64_t y) {
if (x > y) x = y;
}
int64_t dp[2020][2020];
int main() {
int n;
int64_t T, E;
cin >> n >> E >> T;
vector<int64_t> x(n);
for (int i = 0; i < n; i++) scanf("%lld", &x[i]);
vector<int64_t> d(n), ds(n + 1);
... | a.cc: In function 'int main()':
a.cc:35:58: error: no matching function for call to 'max(long long int, int64_t)'
35 | chmin(dp[i + 1][0], dp[i][j] + d[i] + max(0LL, T - 2 * dist) + dist * 2);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /... |
s234166920 | p03941 | C++ | #include <bits/stdc++.h>
const int MAXN = 131083;
typedef long long LL;
typedef std::pair<LL, LL> pi;
typedef std::vector<pi> vec;
int son[MAXN][2], val[MAXN][2], n;
LL mid;
vec dfs(int u) {
if (!son[u][0]) return vec({pi(0, 0)});
vec lhs = dfs(son[u][0]), rhs = dfs(son[u][1]), r1, r2, r3, r4;
for (auto & t : lhs)... | a.cc:46:11: error: redefinition of 'const int MAXN'
46 | const int MAXN = 131083;
| ^~~~
a.cc:3:11: note: 'const int MAXN' previously defined here
3 | const int MAXN = 131083;
| ^~~~
a.cc:50:5: error: redefinition of 'int son [131083][2]'
50 | int son[MAXN][2], val[MAXN][2], n;... |
s772597627 | p03941 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct star{int to,nxt,w;}a[1000010];
int head[1000010],cnt,n,fa[1000010],siz[1000010];
ll dis[1000010],a1,a2,b1,b2;
void add(int u,int v,int w){
cnt++;
a[cnt].to=v,a[cnt].nxt=head[u],a[cnt].w=w,head[u]=cnt;
}
struct data{
long long a,b;
... | a.cc:18:12: error: template argument 1 is invalid
18 | vector<data>X[1000010];
| ^
a.cc:18:12: error: template argument 2 is invalid
a.cc:19:12: error: template argument 1 is invalid
19 | vector<data>v;
| ^
a.cc:19:12: error: template argument 2 is invalid
a.cc: In function 'int ... |
s073839841 | p03941 | C++ | #include<bits/stdc++.h>
#define N 131075
#define INF 0x7fffffff
using namespace std;
struct edge
{
int a,b;
};
bool operator < (edge a,edge b)
{
if(a.a==b.a)return a.b<b.b;
return a.a<b.a;
}
int n,sum;
int cnt,head[N],to[N<<1],w[N<<1],nxt[N<<1];
int ch[N][2],pre[N],size[N];
vector<edge>g[N],o;
void adde(int u... | a.cc: In function 'void dfs(int, int)':
a.cc:36:9: error: reference to 'size' is ambiguous
36 | size[u]=1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52... |
s682602542 | p03941 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define x first
#define y second
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
template<typename T,typename F>T bsl(T l,T h,const F&f){T r=-1,m;while(l<=h){m=(l+h)/2;if(f(m)){h=m-1;r=m;}else{l=m+1;}}return r;}
vector<vector<pll>... | a.cc: In function 'std::vector<std::pair<long long int, long long int> > solve(int, ll)':
a.cc:36:13: error: 'reverse' was not declared in this scope
36 | reverse(A.begin(),A.end());
| ^~~~~~~
a.cc:39:9: error: 'sort' was not declared in this scope; did you mean 'short'?
39 | ... |
s385633787 | p03941 | C++ | あ#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
using namespace std;
typedef long long LL;
typedef vector<int> VI;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define EACH(i,c) for(__typeof((c).begin()) i=(c).begin(),i##_end=(c).end();i!=i#... | a.cc:1:3: error: stray '#' in program
1 | あ#include<stdio.h>
| ^
a.cc:1:1: error: '\U00003042' 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:4... |
s597179221 | p03941 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int RLEN=1<<18|1;
inline char nc() {
static char ibuf[RLEN],*ib,*ob;
(ib==ob) && (ob=(ib=ibuf)+fread(ibuf,1,RLEN,stdin));
return (ib==ob) ? -1 : *ib++;
}
inline int rd() {
char ch=nc(); int i=0,f=1;
while(!isdigit(ch)) {if(ch... | a.cc:19:9: error: 'pLL' was not declared in this scope; did you mean 'LL'?
19 | vector <pLL> edge[N];
| ^~~
| LL
a.cc:19:12: error: template argument 1 is invalid
19 | vector <pLL> edge[N];
| ^
a.cc:19:12: error: template argument 2 is invalid
a.cc:20:9: error: 'pLL' w... |
s815306877 | p03941 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#define maxn 131080
#define LL long long
using namespace std;
typedef pair<LL,LL> PLL;
int n,fa[maxn];
vector<PLL> f[maxn];
struct node { int v,w; node *nxt; } edge[maxn],*head[maxn],*ncnt;
void addedge(int u,int v,int w)
{
ncnt++;
ncnt->v=v,ncnt->w=w,ncnt->nxt=he... | a.cc: In function 'void dfs(int)':
a.cc:79:37: error: cannot convert 'std::vector<std::pair<long long int, long long int> >' to 'int' in initialization
79 | for(int i=0,siz=f[head[u]->v])
| ~~~~~~~~~~~~^
| |
| ... |
s239949126 | p03941 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#include<algorithm>
#define ll long long
using namespace std;
const int N=2*(1e5)+10;
struct Pr{
ll in,out;
Pr(){}
Pr(ll x,ll y){in=x; out=y;}
};
int h[N],ch[N][2],dis[N][2];
ll rec[N];
vector<Pr> f[N];
int n,tot;
ll sum,Mx;
bool cmp1(Pr x,Pr y){... | a.cc:105:11: error: redefinition of 'const int N'
105 | const int N=2*(1e5)+10;
| ^
a.cc:8:11: note: 'const int N' previously defined here
8 | const int N=2*(1e5)+10;
| ^
a.cc:106:8: error: redefinition of 'struct Pr'
106 | struct Pr{
| ^~
a.cc:9:8: note: previous de... |
s128694098 | p03941 | C++ | cities numbered 1 through N, which are connected by N−1 bidirectional roads. In terms of graph theory, there is a unique simple path connecting every pair of cities. That is, the N cities form a tree. Besides, if we view city 1 as the root of this tree, the tree will be a full binary tree (a tree is a full binary tree... | a.cc:1:54: error: extended character − is not valid in an identifier
1 | cities numbered 1 through N, which are connected by N−1 bidirectional roads. In terms of graph theory, there is a unique simple path connecting every pair of cities. That is, the N cities form a tree. Besides, if we view city 1 as the root of... |
s751957558 | p03941 | C++ | #include<bits/stdc++.h>
using namespace std;
inline int read()
{
int x=0;char ch=getchar();
while(ch<'0'|| ch>'9')ch=getchar();
while('0'<=ch && ch<='9')x=x*10+(ch^48),ch=getchar();
return x;
}
typedef long long ll;
typedef pair<ll,ll> pr;
typedef vector<pr> vec;
#define x first
#define y second
cons... | a.cc: In function 'void work(vec&, vec&, vec&)':
a.cc:33:36: error: 'Q' was not declared in this scope
33 | sort(rs.begin(),rs.end(),cmpx);Q
| ^
|
s661011302 | p03941 | C++ | sdsadsadsa | a.cc:1:1: error: 'sdsadsadsa' does not name a type
1 | sdsadsadsa
| ^~~~~~~~~~
|
s286002843 | p03941 | C++ | #include<bits/stdc++.h>
#define rep(i,a,b) for (int i=(a); i<=(b); ++i)
#define per(i,a,b) for (int i=(a); i>=(b); --i)
#define REP(i,a) for (int i=0; i<(a); ++i)
#define PER(i,a) for (int i=int(a)-1; i>=0; --i)
using namespace std;
typedef long long LL;
const int maxn = 150005;
struct node { LL x, y; } f[maxn], g[max... | a.cc: In function 'void merge(std::vector<node>&, std::vector<node>&, std::vector<node>&, LL)':
a.cc:34:80: error: expected ')' before 'p'
34 | while (p <= n && (c.back().x == f[p].x || c.back().y <= f[p].y) p++;
| ~ ^... |
s241953388 | p03941 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAXN = 2e5 + 10;
long long oo = 100000000000007ll;
class Edges{
public:
int next , to , v;
};
Edges edge[MAXN];
int fa[MAXN] , first[MAXN];
int n , te = 0 , ans = 0;
void add(int s , int t , int v){
++ te;
edge[te].to = t;
... | a.cc: In function 'long long int work(int)':
a.cc:32:18: error: no matching function for call to 'max(int&, long long int&)'
32 | ans = max(ans , maxn);
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:4... |
s374995327 | p03941 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAXN = 2e5 + 10;
long long oo = 100000000000007ll;
class Edges{
public:
int next , to , v;
};
Edges edge[MAXN];
int fa[MAXN] , first[MAXN];
int n , te = 0 , ans = 0;
void add(int s , int t , int v){
++ te;
edge[te].to = t;
... | a.cc: In function 'long long int work(int)':
a.cc:29:24: error: no matching function for call to 'min(int, long long int&)'
29 | t = min(ret + edge[e].v , t);
| ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c... |
s356462451 | p03941 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
using namespace std;
static const int INF = 0x3f3f3f3f;
int main() {
int n;
scanf("%d", &n);
vector<vector<pair<int, int>>> g(n), dp(n);
for (int i = 1; i < n; i... | a.cc: In function 'int main()':
a.cc:22:9: error: 'function' was not declared in this scope
22 | function<void (int, int)> dfs = [&](int u, int x) {
| ^~~~~~~~
a.cc:8:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
7 |... |
s792615022 | p03941 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
const int maxn = 2e5;
int n, son[maxn][2], len[maxn];
long long ans;
typedef pair<long long, long long> Pair;
vector<Pair> set[maxn];
void Combine(vector<Pair> &s, int u, int v) {
s.clear();
if (u.empt... | a.cc: In function 'void Combine(std::vector<std::pair<long long int, long long int> >&, int, int)':
a.cc:16:9: error: request for member 'empty' in 'u', which is of non-class type 'int'
16 | if (u.empty()) {
| ^~~~~
|
s523367612 | p03941 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<vector>
using namespace std;
typedef long long s64;
const int ONE = 1000005;
const int INF = 2147483640;
int get()
{
int res = 1, Q = 1; char c;
while( (c = getchar()) < 48 || c > ... | a.cc: In function 'void Add(int, int, int)':
a.cc:45:17: error: reference to 'next' is ambiguous
45 | next[++tot] = first[u], first[u] = tot, go[tot] = v, w[tot] = z;
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/local... |
s992281896 | p03941 | C++ | #include<set>
#include<map>
#include<cmath>
#include<queue>
#include<bitset>
#include<string>
#include<cstdio>
#include<cctype>
#include<cassert>
#include<cstdlib>
#include<cstring>
#include<sstream>
#include<iostream>
#include<algorithm>
#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pa... | a.cc: In function 'void dfs(int)':
a.cc:87:11: error: 'x7' was not declared in this scope; did you mean 'x'?
87 | F[x7
| ^~
| x
a.cc:87:13: error: expected ']' before numeric constant
87 | F[x7
| ^
| ]
88 | 1 1
| ~ ... |
s438129101 | p03941 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#define For(i, j, k) for(int i = j; i <= k; i++)
#define Forr(i, j, k) for(int i = j; i >= k; i--)
#define pb push_back
#define x first
#define y second
#define mp make_pair
using namespace std;
const int N = 132000;
type... | a.cc:23:1: error: 'vector' does not name a type
23 | vector<PII> c[N];
| ^~~~~~
a.cc: In function 'bool DFS(int)':
a.cc:32:17: error: 'c' was not declared in this scope
32 | c[o].pb(mp(val[o], val[o]));
| ^
a.cc:38:12: error: 'c' was not declared in this scope
38 | ... |
s427375156 | p03941 | C++ | #include <bits/stdc++.h>
#define int ll
#define N 210010
#define ls c[rt][0]
#define rs c[rt][1]
#define lw w[rt][0]
#define rw w[rt][1]
using namespace std;
typedef long long ll;
inline int read()
{
int x=0,f=1; char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+... | a.cc: In function 'bool check(ll, ll)':
a.cc:37:17: error: expected ';' before 'i'
37 | for(int i=ll,j=rr;i>=0;i--)
| ^
a.cc:37:27: error: 'i' was not declared in this scope
37 | for(int i=ll,j=rr;i>=0;i--)
| ^
a.cc:39:23: error: 'j' was not de... |
s809684299 | p03941 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using... | a.cc: In function 'bool can(ll)':
a.cc:44:41: error: 'B' was not declared in this scope
44 | while(j<B && vp[b][j].fs<=left) j++;
| ^
|
s233060920 | p03941 | C++ | #include <bits/stdc++.h>
#define LL long long
#define INF 0x7FFFFFFF//or 0x3f3f3f3f ? -Wall
using namespace std;
template<class T> inline
void read(T& x) {
int f = 1; x = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {if (ch == '-') f = -1; ch = getchar();}
while (ch >= '0' && ch <= '9') {x = x * 10 + ch... | a.cc: In function 'int main()':
a.cc:72:14: error: expected ';' before 'while'
72 | check
| ^
| ;
73 | while (l <= r) {
| ~~~~~
|
s813132981 | p03941 | C++ | //============================================================================
// Author : Sun YaoFeng
//============================================================================
//#pragma comment(linker, "/STACK:100240000,100240000")
//#include <cstdio>
//#include <cstdlib>
//#include <cstring>
//#include <... | a.cc: In function 'int main(int, char**)':
a.cc:103:26: error: expected primary-expression before ',' token
103 | I64 l= 1-, r= 1ll << 35;
| ^
a.cc:104:30: error: 'r' was not declared in this scope
104 | for (; l+1 < r;) {
| ... |
s407367124 | p03942 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=1e6;
int n,s[N+1],t[N+1];
int hea=1,tai,que[N+2];
int res;
void input(int x[])
{
static char str[N+2];
scanf("%s",str+1);
for(int i=1;i<=n;++i) {
x[i]=str[i]-'a';
}
return;
}
bool check0()
{
for(int i=1;i<=n;++i) {
if(s[i]... | a.cc: In function 'int main()':
a.cc:33:26: error: expected ';' before 'return'
33 | puts("0")
| ^
| ;
34 | return 0;
| ~~~~~~
|
s127283305 | p03942 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
#include <set>
#include <cstring>
#incl ude <map>
using namespace std;
const int MAXN = 1000005;
char S[MAXN], T[MAXN];
int n, q[MAXN], head = 1, tail;
signed main () {
scanf("%d%s%s", &n, S+1, T+1);
if(strcmp(S+1, T+1) == 0) { puts("0"); return 0; }
int ans =... | a.cc:6:2: error: invalid preprocessing directive #incl; did you mean #include?
6 | #incl ude <map>
| ^~~~
| include
a.cc: In function 'int main()':
a.cc:22:25: error: 'pos' was not declared in this scope
22 | if(i != pos) ans = max(ans, tail-head+1);
| ... |
s447478439 | p03942 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <deque>
#include <map>
#include <set>
#include <complex>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <chrono>
#define ft first
#define sc second
#define pb push_back
#define len(v) (... | a.cc: In function 'int main()':
a.cc:82:26: error: no matching function for call to 'max(ll&, int)'
82 | ans = max(ans, 1);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s437028036 | p03942 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <queue>
#include <stack>
using namespace std;
char s[1000005],t[1000005];
queue <int> Q;
int n;
bool check()
{
for(int i=1;i<=n;i++)if(s[i]!=t[i])return 0;
return 1;
}
int main()
{
scanf("%d",&n... | a.cc: In function 'int main()':
a.cc:34:43: error: invalid cast from type 'std::queue<int>' to type 'int'
34 | if((int)Q.front()-(int)Q,size()>=i)Q.pop();
| ^~~~~~
a.cc:34:54: error: no matching function for call to 'size()'
34 | ... |
s479290170 | p03942 | C++ | //実装が重そうな問題はある程度考えてから書く
//初期化を忘れずに(特に二分探索とか)
//コーナーケースを考えて(特に場合分けとか)
//不可解すぎるバグは配列外参照(配列の長さ)を検討
#include "bits/stdc++.h"
#define YES "YES"
#define Yes "Yes"
#define NO "NO"
#define No "No"
#define YESNO(x) OUT(three(x,YES,NO))
#define YesNo(x) OUT(three(x,Yes,No))
#define ECHO OUT(solve())
#define three(A,B,C) ((A)?(B)... | a.cc: In function 'LL solve()':
a.cc:81:56: error: 'last' was not declared in this scope
81 | if (abs(i - now) > 0) MX(B[i], last-1);
| ^~~~
|
s390968566 | p03942 | C++ | ERROR: type should be string, got "https://agc007.//waz\n#include <bits/stdc++.h>\n \nusing namespace std;\n \n#define mp make_pair\n#define pb push_back\n#define fi first\n#define se second\n#define ALL(x) (x).begin(), (x).end()\n#define SZ(x) ((int)((x).size()))\n \ntypedef pair<int, int> PII;\ntypedef vector<int> VI;\ntypedef long long int64;\ntypedef unsigned int uint;\ntypedef unsigned long long uint64;\n \n#define gi(x) ((x) = F())\n#define gii(x, y) (gi(x), gi(y))\n#define giii(x, y, z) (gii(x, y), gi(z))\n \nint F()\n{\n char ch;\n int x, a;\n while (ch = getchar(), (ch < '0' || ch > '9') && ch != '-');\n if (ch == '-') ch = getchar(), a = -1;\n else a = 1;\n x = ch - '0';\n while (ch = getchar(), ch >= '0' && ch <= '9')\n x = (x << 1) + (x << 3) + ch - '0';\n return a * x;\n}\n \nconst int N = 1e6 + 10;\n \nint n;\n \nchar s[N], t[N];\n \nint q[N];\nint id[N];\nint main()\n{\t\n int l = 1, r = 0;\n gi(n);\n scanf(\"%s\", s + 1);\n scanf(\"%s\", t + 1);\n if (!strcmp(s + 1, t + 1))\n {\n puts(\"0\");\n return 0;\n }\n int ans = 0;\n for (int i = n, j = n; i; --i)\n {\t\n \t if (t[i] == t[i - 1]);\n else\n {\t\n j = min(j, i);\n while (j && t[i] != s[j]) --j;\n if (!j) return puts(\"-1\"), 0;\n id[j+1]++;id[i+1]--;\n }\n\t}\n\tint Ans=0;\n\tfor(int i=1;i<=n;i++)id[i]+=id[i-1],Ans=max(Ans,id[i]);\n printf(\"%d\\n\", Ans+1);\n return 0;\n\t}\n\n\ncontest.atcoder.jp/tasks/agc007_f" | a.cc:1:1: error: 'https' does not name a type
1 | https://agc007.//waz
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:2:
/u... |
s599934229 | p03942 | C++ | #include<cstdio>
#include<iostream>
#include<cstring>
#include<queue>
#define RG register
using namespace std;
const int N=1e6+10;
int n,ans;
char st[N],ed[N];
queue<int> pn;
inline int mi(int a,int b){return a<b ? a : b;}
inline int mx(int a,int b){return a>b ? a : b;}
int main()
{
// freopen("Shik and Copying String.... | a.cc: In function 'int main()':
a.cc:18:20: error: 's' was not declared in this scope; did you mean 'st'?
18 | if(!strcmp(s+1,t+1)) return printf("-1\n"), 0;
| ^
| st
a.cc:18:24: error: 't' was not declared in this scope; did you mean 'tm'?
18 | if... |
s759941528 | p03942 | C++ | w#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 1; i <= (n); i ++)
#define re0(i, n) for (int i = 0; i < (int) n; i ++)
#define travel(i, u) for (int i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;
typedef long long LL;
template<typename tp> inline void read... | a.cc:1:2: error: stray '#' in program
1 | w#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'w' does not name a type
1 | w#include <bits/stdc++.h>
| ^
a.cc: In function 'void read(tp&)':
a.cc:12:19: error: there are no arguments to 'getchar' that depend on a template parameter, so a declaration of 'ge... |
s655185119 | p03942 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N=1000005;
int n,m;
int b[N],tb=0,a[N];
int st[N],top=0;
char S[N],T[N];
int main(){
scanf("%d%s%s",&n,S+1,T+1);
T[0]=T[1]-1;
for (int i=1;i<=n;i++)
if (T[i]!=T[i-1])
b[++tb]=i;
ta=tb;
for (int i=n;i>=1;i--)
if (i<=b[ta]&&S[i]==T[b[ta]])
a[ta--]=i;
... | a.cc: In function 'int main()':
a.cc:14:9: error: 'ta' was not declared in this scope; did you mean 'tm'?
14 | ta=tb;
| ^~
| tm
|
s926373386 | p03942 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 30, INF = 1e9, MAXN = 1e6 + 10;
int mn[MAX];
vector <int> index[MAX];
bitset <MAX> b, flag;
bool cmp(int a, int b) {
return mn[a] < mn[b];
}
int h[MAX];
int32_t main () {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)... | a.cc:6:23: error: 'std::vector<long long int> index [30]' redeclared as different kind of entity
6 | vector <int> index[MAX];
| ^
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++... |
s796443423 | p03942 | C++ | #include<bits/stdc++.h>
#define N 1000006
using namespace std;
char s0[N],t[N];
int n;
int val[N],match[N],end[N];
int main(){
scanf("%d%s%s",&n,s0+1,t+1);
for(int i=1,p=0,last,lleter;i<=n;i++)
if(t[i]!=t[i-1]){
last=-1;end[i]=i;lleter=i;
while(p+1<=i) p++,last=t[i]==s0[p]? p:las... | a.cc: In function 'int main()':
a.cc:11:21: error: reference to 'end' is ambiguous
11 | last=-1;end[i]=i;lleter=i;
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/valarray:1265:5: note: candida... |
s163785387 | p03942 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,lst[1000100][26],gg[1000100];
char s[1000100],t[1000100];
struct treaps
{
int son[1201000][2],size[1201000],num[1201000],tag[1201000],rd[1200100],tt;
void update(int s){size[s]=size[son[s][0]]+size[son[s][1]]+1;}
int build(int n)
{
if (n==0) return 0;
int s=++... | a.cc: In function 'int main()':
a.cc:61:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
61 | gets(s+1);gets(t+1);
| ^~~~
| getw
|
s901396758 | p03942 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,lst[1000100][26],gg[1000100];
char s[1000100],t[1000100];
struct treaps
{
int son[1201000][2],size[1201000],num[1201000],tag[1201000],rd[1200100],tt;
void update(int s){size[s]=size[son[s][0]]+size[son[s][1]]+1;}
int build(int n)
{
if (n==0) return 0;
int s=++... | a.cc: In function 'int main()':
a.cc:61:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
61 | gets(s+1);gets(t+1);
| ^~~~
| getw
|
s536913446 | p03942 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,lst[1000100],gg[1000100];
char s[1000100],t[1000100];
struct treaps
{
int son[1001000][2],size[1001000],num[1001000],tag[1001000],rd[1000100],tt;
int build(int n)
{
if (n==0) return 0;
int s=++tt;size[s]=1;rd[s]=rand();
if (n==1) return s;
n--;
son[s][0]=... | a.cc: In function 'int main()':
a.cc:84:17: error: expected '}' before 'else'
84 | else
| ^~~~
a.cc:72:9: note: to match this '{'
72 | {
| ^
a.cc: At global scope:
a.cc:88:15: error: expected constructor, destructor, or type conversion before '(' token
... |
s670334683 | p03942 | C++ | #include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
const int MAXN = 1000005;
int n, tot;
char a[MAXN], b[MAXN];
int end[MAXN], fr[MAXN];
void chk_same() {
for (int i = 1; i <= n; i++)
if (a[i] != b[i])
return;
puts("0"), exit(0);
}
int main() {
scanf("%d %s %s", ... | a.cc: In function 'int main()':
a.cc:21:13: error: reference to 'end' is ambiguous
21 | end[tot++] = i - 1;
| ^~~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
from /usr/include/c++/14/bits/stl_algo.h:59,
from /usr/include/c++/14/alg... |
s143239424 | p03942 | C++ | #include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
char s[1000010],t[1000010];
int n;
int next[26][1000001];
int L[1000001],R[1000001],cnt;
int main(){
scanf("%d%s",&n,s+1);
for(int i=1;i<=n;i++){
for(int j=0;j<26;j++)
next[j][i]=next[j][i-1];
next[s[i]-'a'][i]=i;
}
scanf("%s",t+1);
... | a.cc: In function 'int main()':
a.cc:13:17: error: reference to 'next' is ambiguous
13 | next[j][i]=next[j][i-1];
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c+... |
s306306556 | p03942 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | a.cc: In function 'void solve()':
a.cc:31:15: error: 'rev' was not declared in this scope
31 | MINUS(rev);
| ^~~
a.cc:12:25: note: in definition of macro 'MINUS'
12 | #define MINUS(a) memset(a,0xff,sizeof(a))
| ^
|
s042126459 | p03942 | C++ | #include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N=1000010;
char s[N],t[N];
int head[130],next[N];
int main()
{
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
int n;scanf("%d",&n);
scanf("%s",s+1);scanf("%s",t+1);
for (int i=1;i<=n... | a.cc: In function 'int main()':
a.cc:21:17: error: reference to 'next' is ambiguous
21 | next[i]=head[s[i]];head[s[i]]=i;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/bits/specfun.h:43,
from /... |
s766576255 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
vector<int>vec;
set<int>st;
int main()
{
int i,j,n,t,a,b,c;
string s,s1,s2;
cin>>a>>b>>c;
if(a+b==c||a+c==b||b+c==a)
cout"Yes"<<"\n";
else
cout<<"No"<<"\n";
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before string constant
11 | cout"Yes"<<"\n";
| ^~~~~
| ;
|
s717190631 | p03943 | Java | import java . util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int []x ={ input.nextInt(), input.nextInt(), input.nextInt()};
for (int i = 0; i < x.length; i++) {
Arrays.sort(x);
}
if (x[2]==x[1... | Main.java:16: error: reached end of file while parsing
"candies always has more candies than the other Note that every pack must be given to one of them.");
^
1 error
|
s266295577 | p03943 | Java | import java.util.Scanner;
public class FightingOverCandies {
public void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.println("yes");
else if (b == a + c)
System.out.println("yes");
else i... | Main.java:3: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
1 error
|
s102651564 | p03943 | Java | import java.util.Scanner;
public class FightingOverCandies {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.println("yes");
else if (b == a + c)
System.out.println("yes");
... | Main.java:3: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
1 error
|
s807637643 | p03943 | Java | import java.util.Scanner;
public class FightingOverCandies {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
System.out.println("enter candies quantity as: ");
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.println("yes");
... | Main.java:3: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
1 error
|
s586597456 | p03943 | Java | import java.util.Scanner;
public class main {
public main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
System.out.println("enter candies quantity as: ");
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.println("yes");
else if (b == a + c)
Sy... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s469160729 | p03943 | Java | public class main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
System.out.println("enter candies quantity as: ");
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.println("yes");
else if (b == a + c)
System.out.printl... | Main.java:1: error: class main is public, should be declared in a file named main.java
public class main {
^
Main.java:3: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class main
Main.java:3: error: cannot find symbol
Scanner in = new Scanner(System.... |
s942003016 | p03943 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
System.out.println("enter candies quantity as: ");
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.println("yes");
else if (b == ... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s188118757 | p03943 | Java | package Comp;
import java.util.Scanner;
public class FightingOverCandies {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c;
System.out.println("enter candies quantity as: ");
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if (a == b + c)
System.out.pr... | Main.java:5: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
1 error
|
s155724222 | p03943 | Java | public class FightingOverCandies {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
int a,b,c ;
System.out.println("enter candies quantity as: ");
a=in.nextInt();
b=in.nextInt();
c=in.nextInt();
if(a==b+c)
System.out.println("yes");
else if (b==a+c)
System.out.printl... | Main.java:1: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
Main.java:3: error: cannot find symbol
Scanner in = new Scanner (System.in);
^
symbol: class Scanner
location: class FightingOverCandies
Main.java:3:... |
s159939529 | p03943 | Java | package Comp;
import java.util.Scanner;
public class FightingOverCandies {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
int a,b,c ;
System.out.println("enter candies quantity as: ");
a=in.nextInt();
b=in.nextInt();
c=in.nextInt();
if(a==b+c)
System.out.println("yes"... | Main.java:5: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
1 error
|
s545512430 | p03943 | Java | Scanner in = new Scanner (System.in);
int a,b,c ;
System.out.println("enter candies quantity as: ");
a=in.nextInt();
b=in.nextInt();
c=in.nextInt();
if(a==b+c)
System.out.println("yes");
else if (b==a+c)
System.out.println("yes");
else if (c==b+a)
System.out.println("yes");
else
System.... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner in = new Scanner (System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
int a,b,c ;
^
Main.java:3: error: class, interface, enum, or record exp... |
s098643395 | p03943 | Java | import java.util.Scanner;
public class FightingOverCandies {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
int a,b,c ;
System.out.println("enter candies quantity as: ");
a=in.nextInt();
b=in.nextInt();
c=in.nextInt();
if(a==b+c)
System.out.println("yes");
else if (b... | Main.java:3: error: class FightingOverCandies is public, should be declared in a file named FightingOverCandies.java
public class FightingOverCandies {
^
1 error
|
s956606198 | p03943 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a + c != b)
cout << "No" << "\n";
else if (a + b != c)
cout << "No" << "\n";
else if (b + c <!= a)
cout << "No" << "\n";
else
cout << "Yes" << "\n";
} | a.cc: In function 'int main()':
a.cc:10:25: error: expected primary-expression before '!=' token
10 | else if (b + c <!= a)
| ^~
|
s146143318 | p03943 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a + c > b &|| a + c < b)
cout << "No" << "\n";
else if (a + b > c || a + b < c)
cout << "No" << "\n";
else if (b + c < a || b + c > a)
cout << "No" << "\n";
else
cout << "Yes" << "\n";
} | a.cc: In function 'int main()':
a.cc:6:24: error: expected primary-expression before '||' token
6 | if (a + c > b &|| a + c < b)
| ^~
|
s199515787 | p03943 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a + c > b && a + c < b)
cout << "Np" << "\n";
else if (a + b > c && a + b < c)
cout << "Np" << "\n";
else if (b + c < a && b + c > a)
cout << "Np" << "\n";
else
cout << "Yes << "\n";"
} | a.cc:13:34: error: stray '\' in program
13 | cout << "Yes << "\n";"
| ^
a.cc: In function 'int main()':
a.cc:13:34: error: expected ';' before 'n'
13 | cout << "Yes << "\n";"
| ^~
| ... |
s517085473 | p03943 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int max = max(a, max(b, c));
if ((a + b + c) / 2 <= max)
cout << "No" << "\n";
else
cout << "Yes" << "\n";
} | a.cc: In function 'int main()':
a.cc:7:29: error: 'max' cannot be used as a function
7 | int max = max(a, max(b, c));
| ~~~^~~~~~
a.cc:7:35: error: 'max' cannot be used as a function
7 | int max = max(a, max(b, c));
| ^
|
s980456936 | p03943 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int max = max(a, max(b, c));
if ((a + b + c) / 2 <= max)
cout << "No" << "\n";
else
cout << "Yes" << "\n";
} | a.cc: In function 'int main()':
a.cc:7:29: error: 'max' cannot be used as a function
7 | int max = max(a, max(b, c));
| ~~~^~~~~~
a.cc:7:35: error: 'max' cannot be used as a function
7 | int max = max(a, max(b, c));
| ^
|
s038172607 | p03943 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int max = max(a, b, c);
if ((a + b + c) / 2 <= max)
cout << "No" << "\n";
else
cout << "Yes" << "\n";
} | a.cc: In function 'int main()':
a.cc:7:22: error: 'max' cannot be used as a function
7 | int max = max(a, b, c);
| ~~~^~~~~~~~~
|
s959939315 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
bool flag=false;
if((a+b)==c)flag=ture;
if((b+c)==a)flag=true;
if((c+a)==b)flag=true;
if(flag)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:20: error: 'ture' was not declared in this scope
9 | if((a+b)==c)flag=ture;
| ^~~~
|
s542597647 | p03943 | Java | import java.util.*;
import static java.lang.System.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if((a + b == c) || (a + c == b) ){
out.println("Yes")... | Main.java:7: error: not a statement
int = sc.nextInt();
^
Main.java:7: error: ';' expected
int = sc.nextInt();
^
2 errors
|
s594109955 | p03943 | C++ | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
//using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define PI 3.141592653589793
#define MOD 1000000007
#define ALL(obj) (obj).begin(),(obj).end()
template<class T>inline bool chmax(T& a,T ... | a.cc:33:17: error: stray '#' in program
33 | cout << #include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:33:18: error: 'include' was not declared in this scope
33 | cout << #include <bits/stdc++.h>
| ^~~~~~~
a.cc:33:27: error: 'bits' was n... |
s190986793 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
vector<int> c(3);
for(int i = 0; i < N; ++i)
cin >> c[i];
sort(c.begin(), c.end());
cout << (c[2] != c[1] + c[0] ? "No": "Yes") << '\n';
return 0;... | a.cc: In function 'int main()':
a.cc:11:24: error: 'N' was not declared in this scope
11 | for(int i = 0; i < N; ++i)
| ^
|
s463906110 | p03943 | C++ | #include <bits/stdc++.h>
#define arep(a,i,n) for(ll i=(a);i<(n);i++)
#define rep(i,n) for(ll i=0;i<(n);i++)
#define cinf(x,n) for(ll i=0;i<(n);i++)cin>>x[i];
#define coutf(x,n) for(ll i=0;i<(n);i++)cout<<x[i]<<endl;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
int... | a.cc: In function 'int main()':
a.cc:15:13: error: no matching function for call to 'sort(int [3], int)'
15 | sort(a,3);
| ~~~~^~~~~
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:... |
s953327679 | p03943 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
int main(void){
// Your
int a,b,c, max;
cin >> a >> b >> c;
max = max(a,(b,c));
min = (a+b+c)-max;
if(max = min){
cout <<"Yes" << endl;
}
else
{
cout << "... | a.cc: In function 'int main()':
a.cc:11:14: error: 'max' cannot be used as a function
11 | max = max(a,(b,c));
| ~~~^~~~~~~~~
a.cc:12:19: error: overloaded function with no contextual type information
12 | min = (a+b+c)-max;
| ^~~
a.cc:15:14: error: cannot resolve o... |
s635527892 | p03943 | C | #include <stdio.h>
int main(void)
{
int a,b,c,ab,bc,ac;
scanf("%d%d%d",&a,&b,&c);
ab=a+b;
ac=a+c;
bc=b+c;
if(ab==c || ac==b || bc=a)printf("Yes");
else printf("No");
return 0;
}
| main.c: In function 'main':
main.c:10:32: error: lvalue required as left operand of assignment
10 | if(ab==c || ac==b || bc=a)printf("Yes");
| ^
|
s360566580 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
... | a.cc: In function 'int main()':
a.cc:19:20: error: expected ';' before '}' token
19 | ll mx = ({a, b, c});
| ^
| ;
|
s988310869 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
... | a.cc: In function 'int main()':
a.cc:18:20: error: expected ';' before '}' token
18 | ll mx = ({a, b, c});
| ^
| ;
|
s194120001 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a+b==c||a+c==b||b+c==a){
cout << "Yes" << endl;
}
else{
cout << "No" << endl
}
} | a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before '}' token
10 | cout << "No" << endl
| ^
| ;
11 | }
| ~
|
s753755439 | p03943 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cina>>b>>c;
if (a+b==c||b+c==a||c+a==b){
cout<<"Yes";
}
else{
cout<<"No";
}
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'cina' was not declared in this scope
5 | cina>>b>>c;
| ^~~~
|
s497514880 | p03943 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cina>>b>>c;
if (a+b=c||b+c=a||c+a=b){
cout<<"Yes";
}
else{
cout<<"No";
}
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'cina' was not declared in this scope
5 | cina>>b>>c;
| ^~~~
a.cc:6:21: error: lvalue required as left operand of assignment
6 | if (a+b=c||b+c=a||c+a=b){
| ~^~~~~
|
s011398002 | p03943 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a + b = c or a + c = b or b + c = a){
cout << "Yes" << '\n';
}else{
cout << "No" << '\n';
}
} | a.cc: In function 'int main()':
a.cc:6:29: error: lvalue required as left operand of assignment
6 | if(a + b = c or a + c = b or b + c = a){
| ~~^~~~~~~~
|
s153632920 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == b + c || b = c + a || c = a + b) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:31: error: lvalue required as left operand of assignment
8 | if (a == b + c || b = c + a || c = a + b) {
| ~~~~~~^~~~
|
s620730242 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout << ( a+b+c-max{(a,b,c)}==max{(a,b,c)} ? "Yes" : "No" ) <<endl;
} | a.cc: In function 'int main()':
a.cc:7:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
7 | cout << ( a+b+c-max{(a,b,c)}==max{(a,b,c)} ? "Yes" : "No" ) <<endl;
| ~~~~~^~~~
a.cc:7:22: error: expected ')' before '{' token
7 | cout <... |
s874897807 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout << ( a+b+c-max({a,b,c})==max({a,b,c)} ? "Yes" : "No" ) <<endl;
} | a.cc: In function 'int main()':
a.cc:7:43: error: expected '}' before ')' token
7 | cout << ( a+b+c-max({a,b,c})==max({a,b,c)} ? "Yes" : "No" ) <<endl;
| ~ ^
a.cc:7:44: error: expected ')' before '}' token
7 | cout << ( a+b+c-max({a,b,c})==max({a,b,c)} ? "Yes" :... |
s849507075 | p03943 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
// どれかが残り二つの合計値になっていたらYes
if(a == b + c || b == c + a || c = a + b) {
Syste... | Main.java:12: error: bad operand types for binary operator '||'
if(a == b + c || b == c + a || c = a + b) {
^
first type: boolean
second type: int
1 error
|
s812324225 | p03943 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
// どれかが残りの二つの合計になっていたらYes
if(a == b + c || b = a + c || c = a + b) {
... | Main.java:12: error: bad operand types for binary operator '||'
if(a == b + c || b = a + c || c = a + b) {
^
first type: boolean
second type: int
Main.java:12: error: bad operand types for binary operator '||'
if(a == b + c || b = a + c || c = a + b) {
^
f... |
s384498445 | p03943 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s444001136 | p03943 | C++ | #include <bits/stdc++.h>
#include <cassert>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct Edge
{
int to;
int weight;
Edge(int t, int w) : to(t), weight(w) {}
};
using Graph = vector<vector<Edge>>;
// using Graph = vector<vector<int>>;
... | a.cc: In function 'int main()':
a.cc:28:24: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int')
28 | cout << a + b + c %2 == 0 ? "Yes" : "No" << endl;
| ~~~~~~~~~~~~~~~~~~~~ ^~ ~
| | |
| | int
| s... |
s601506770 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a + b == c){
System.out.println(Yes);
}else if(a + c == b){
System.out.println(Yes)... | Main.java:10: error: cannot find symbol
System.out.println(Yes);
^
symbol: variable Yes
location: class Main
Main.java:12: error: cannot find symbol
System.out.println(Yes);
^
symbol: variable Yes
location: class Main
Main.java:14: error: cannot find symbol
... |
s173871307 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の取得
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a=b+c){
System.out.println("Yes");
}else if(b=a+c){
Sy... | Main.java:11: error: incompatible types: int cannot be converted to boolean
if(a=b+c){
^
Main.java:13: error: incompatible types: int cannot be converted to boolean
}else if(b=a+c){
^
Main.java:15: error: incompatible types: int cannot be converted to boolean
}else if(c=a+b){... |
s460418312 | p03943 | C++ | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define MOD 1000000007
#define ll long long int
#define pair <ll, ll> pi
#define vector <ll> vi
#define F first
#define S second
#define PB push_back
#define MP make_pa... | a.cc: In function 'int main()':
a.cc:31:16: error: 'c' was not declared in this scope
31 | cin>>a>>b>>c;
| ^
|
s487600013 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<int,string>;
int main() {
int a,b,c;
cin >> a >> b >> c;
if(a+b == c || b+c == a || c+a==b) xout << "Yes" << endl;
else cout << "No" << endl ;
} | a.cc: In function 'int main()':
a.cc:10:36: error: 'xout' was not declared in this scope
10 | if(a+b == c || b+c == a || c+a==b) xout << "Yes" << endl;
| ^~~~
|
s738826550 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
signed main(){
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if(a + b + c = 2 * max(a, max(b, c))){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: lvalue required as left operand of assignment
7 | if(a + b + c = 2 * max(a, max(b, c))){
| ~~~~~~^~~
|
s865004959 | p03943 | C++ | #include <bits/stdc++.h>
using namespace std;
signed main(){
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if(a + b + c = 2 * max({a, b, c})){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: lvalue required as left operand of assignment
7 | if(a + b + c = 2 * max({a, b, c})){
| ~~~~~~^~~
|
s764347162 | p03943 | C | #include <stdio.h>
int main(){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a+b==c)
printf("Yes");
else if(c+b==a)
printf("Yes");
else if(a+c==b)
printf("Yes");
else
printf("No")
return 0;
} | main.c: In function 'main':
main.c:14:15: error: expected ';' before 'return'
14 | printf("No")
| ^
| ;
......
19 | return 0;
| ~~~~~~
|
s061850853 | p03943 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a,b,c;
cin>>a>>b>>c;
if(a[0]==b[1]||a[0]==c[2]||b[1]==c[2]){
cout<<"No"<<endl;
}
else{
cout<<"Yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s357527469 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int num1 = sc.nextInt();
int num2 = sc.nextInt();
int num3 = sc.nextInt();
if((num1 + num2 + num3)%2 == 0){
System.out.println("Yes");
}else{
... | Main.java:17: error: reached end of file while parsing
}
^
1 error
|
s725265897 | p03943 | C++ | Crawling of this problem failed or hasn't finished | a.cc:1:40: warning: missing terminating ' character
1 | Crawling of this problem failed or hasn't finished
| ^
a.cc:1:40: error: missing terminating ' character
1 | Crawling of this problem failed or hasn't finished
| ^~~~... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.