submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s313530302 | p03726 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <cmath>
#include <list>
#include <chrono>
#include <thread>
using namespace std;
const bool debug = false;
#ifndef M_PI
const double M_PI = acos(-1.0);
#endif // M_PI
#define y1 ... | a.cc: In function 'int main()':
a.cc:78:29: error: 'is_not_leaf' was not declared in this scope
78 | while(b[u] == 1 && !is_not_leaf[u]){
| ^~~~~~~~~~~
|
s963135213 | p03726 | C++ | #pragma comment(linker, "/STACK:1000000000")
#define _CRT_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#i... | a.cc: In function 'int main()':
a.cc:63:12: error: expected '(' before '%' token
63 | for% (int qb = 0; qb < qe; qb++) {
| ^
| (
a.cc:63:12: error: expected primary-expression before '%' token
a.cc:63:15: error: expected primary-expression before 'int'
63 | for% (... |
s813979772 | p03726 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
typedef long long ll;
#define fi first
#define se second
using namespace std;
///////////////////////////////////////
//
//
///////////////////////////////////////
//
int N;
int jd = 0;
int A;
int B;
int a[1... | a.cc: In function 'int main()':
a.cc:58:7: error: reference to 'next' is ambiguous
58 | next = idx[i]/100000;
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,... |
s705036542 | p03726 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n... | a.cc: In function 'int main()':
a.cc:100:38: error: 'j' was not declared in this scope
100 | if(cnt[i]==1 || G[i][j].size()>=3){
| ^
a.cc: In function 'int dfs(int)':
a.cc:36:1: warning: control reaches end of non-void function [-Wreturn-type]
36 | }
... |
s058998927 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define ALL(c) (c).begin(... | a.cc: In function 'void dfs(int, int)':
a.cc:59:27: error: 'onlypath' was not declared in this scope; did you mean 'only_path'?
59 | if (codd >= 2 || (onlypath && ceven > 0 && codd == 0)) {
| ^~~~~~~~
| only_path
|
s598720648 | p03726 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
typedef long long ll;
#define fi first
#define se second
using namespace std;
///////////////////////////////////////
//
//
///////////////////////////////////////
//
int N;
int jd = 0;
int A;
int B;
int a[1... | a.cc: In function 'int main()':
a.cc:58:7: error: reference to 'next' is ambiguous
58 | next = idx[i]/100000;
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,... |
s123826388 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
#define mp(x, y) make_pair((x), (y))
typedef long long ll;
int n;
set<int> nex[100005];
int d[100005];
int l[100005];
int beg, end;
int m[100005];
int main()
{
scanf("%d", &n);
if(n%2==1) {
printf("First\n");
return 0;
}
for(int i=0; i<n-1; i++) {
int u, v;
... | a.cc: In function 'int main()':
a.cc:33:27: error: reference to 'end' is ambiguous
33 | l[end++]=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: cand... |
s739677786 | p03726 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
const int N=100010;
int e[N*2],next[N*2],head[N],ed=0;
int d[N];
void adde(int x,int y){e[++ed]=y;next[ed]=head[x];head[x]=ed;}
int main(){
int n,x,y,i,j,sum;
s... | a.cc: In function 'void adde(int, int)':
a.cc:12:34: error: reference to 'next' is ambiguous
12 | void adde(int x,int y){e[++ed]=y;next[ed]=head[x];head[x]=ed;}
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_cla... |
s015216136 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define For(n) for(int i = 0; i < n; i++)
#define FOR(i, r, k) for(int i = r; i < k; i ++)
#define pb push_back
#define X first
#define Y second
#define mp make_pair
const ll maxn = 1e5 + 244;
const ll mod = 1e9 + 7;
const ll inf = 1e18 + 500;
ll l[maxn... | a.cc: In function 'int main()':
a.cc:55:5: error: 'else' without a previous 'if'
55 | else cout << "Second";
| ^~~~
|
s171975118 | p03726 | C++ | #include <bits/stdc++.h>
#define ll long long
#define fr first
#define ii pair<int,int>
#define sc second
#define mp make_pair
#define All(v) v.begin(),v.end()
using namespace std;
vector < int > v[300000];
int main()
{
int n;
cin>>n;
for(int i=0;i<n-1;i++)
{
int x,y;
scanf("%d%d",&x,&y);
v[x].push_back(y);... | a.cc: In function 'int main()':
a.cc:27:19: error: request for member 'size' in 'v[i].std::vector<int>::operator[](((std::vector<int>::size_type)j))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
27 | if(v[i][j].size() < 3)
| ... |
s741382756 | p03726 | C++ | #include <bIts/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
vector <int> a[N];
int cou(int u) {
int res = 0;
for (int i = 0; i < a[u].size(); i++) {
int v = a[u][i];
if (a[v].size() == 1) res++;
}
return res;
}
int main() {
scanf("%d", &n);
for (int i = 1; i < n... | a.cc:1:10: fatal error: bIts/stdc++.h: No such file or directory
1 | #include <bIts/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s430899762 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, a[N], b[N];
vector<int> g[N];
int tot = -1, dfn[N], fa[N], dep[N], sz[N], son[N], top[N];
void pre(int u) {
sz[u] = 1;
for (auto v : g[u]) {
if (v ^ fa[u]) {
dep[v] = dep[u] + 1;
fa[v] = u;
pre(v);
sz[u] += sz[v]... | a.cc: In function 'int main()':
a.cc:127:44: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
127 | modify(1, 1, tot, pos, pos, (Data) {0, 1e9});
| ^~~
|
s579448200 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, a[N], b[N];
vector<int> g[N];
int tot = -1, dfn[N], fa[N], dep[N], sz[N], son[N], top[N];
void pre(int u) {
sz[u] = 1;
for (auto v : g[u]) {
if (v ^ fa[u]) {
dep[v] = dep[u] + 1;
fa[v] = u;
pre(v);
sz[u] += sz[v]... | a.cc: In function 'int main()':
a.cc:129:44: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
129 | modify(1, 1, tot, pos, pos, (Data) {0, 1e9});
| ^~~
|
s753487586 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, a[N], b[N];
vector<int> g[N];
int tot, dfn[N], fa[N], dep[N], sz[N], son[N], top[N];
void pre(int u) {
sz[u] = 1;
for (auto v : g[u]) {
if (v ^ fa[u]) {
dep[v] = dep[u] + 1;
fa[v] = u;
pre(v);
sz[u] += sz[v];
... | a.cc:50:3: error: reference to 'data' is ambiguous
50 | data info, tag;
| ^~~~
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,
from a.cc:1:
/usr/include/c+... |
s337802532 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, a[N], b[N];
vector<int> g[N];
int tot, dfn[N], fa[N], dep[N], sz[N], son[N], top[N];
void pre(int u) {
sz[u] = 1;
for (auto v : g[u]) {
if (v ^ fa[u]) {
dep[v] = dep[u] + 1;
fa[v] = u;
pre(v);
sz[u] += sz[v];
... | a.cc:50:3: error: reference to 'data' is ambiguous
50 | data info, tag;
| ^~~~
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,
from a.cc:1:
/usr/include/c+... |
s392762579 | p03727 | C++ |
#include<bits/stdc++.h>
const int maxn=1e5+10;
using namespace std;
int tot=0,head[maxn],n,x,y,siz[maxn],f[maxn];
struct line{int to,next;}e[maxn*2];
void pushline(int x,int y)
{
e[++tot].x=y;e[tot].next=head[x],head[x]=tot;
}
bool dfs(int x,int fa)
{
siz[x]=1;
int cnt=0;
for(int i=head[x];int v=e[i].to;i=e[i].nex... | a.cc: In function 'void pushline(int, int)':
a.cc:9:18: error: 'struct line' has no member named 'x'
9 | e[++tot].x=y;e[tot].next=head[x],head[x]=tot;
| ^
|
s169859819 | p03727 | C++ | #include<bits/stdc++.h>
namespace my_std{
using namespace std;
#define pii pair<int,int>
#define fir first
#define sec second
#define MP make_pair
#define rep(i,x,y) for (int i=(x);i<=(y);i++)
#define drep(i,x,y) for (int i=(x);i>=(y);i--)
#define go(x) for (int i=head[x];i;i=edge[i].nxt... | a.cc: In function 'void dfs1(int, int)':
a.cc:54:30: error: reference to 'size' is ambiguous
54 | dep[x]=dep[::fa[x]=fa]+1;size[x]=1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/incl... |
s768608898 | p03727 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <unordered_set>
#include <chrono>
using namespace std;
struct custom_hash {
typedef long long ll;
typedef unsigned long long ull;
const ull FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
static ull splitmix64(ull x... | a.cc:63:8: error: ISO C++ forbids declaration of 'INS' with no type [-fpermissive]
63 | inline INS(long long temp){
| ^~~
a.cc: In function 'int INS(long long int)':
a.cc:75:1: warning: no return statement in function returning non-void [-Wreturn-type]
75 | }
| ^
a.cc: At global scope:
a.cc:77:... |
s714986170 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
const int N = 100005;
set<int> g[N];
int p[N];
int num = 0;
int find(int x){
return x == p[x] ? x : p[x]=findset(p[x]);
}
void merge(int u, int v){
u = find(u), v = find(v);
if (u == v) return;
if (g[u].size() < g[v].size()) swap(u,... | a.cc: In function 'int find(int)':
a.cc:9:33: error: 'findset' was not declared in this scope
9 | return x == p[x] ? x : p[x]=findset(p[x]);
| ^~~~~~~
|
s690379618 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
const int N = 100005;
set<int> g[N];
int p[N];
int num = 0;
int find(int x){
return x == p[x] ? x : p[x];
}
void merge(int u, int v){
u = find(u), v = find(v);
if (u == v) return;
if (g[u].size() < g[v].size()) swap(u,v);
//prin... | a.cc: In function 'int main()':
a.cc:40:9: error: 'ct' was not declared in this scope
40 | ct[{a,b}]++;
| ^~
a.cc:42:29: error: 'mer' was not declared in this scope; did you mean 'merge'?
42 | if (ct[{a,b}] >= 2) mer(a,b);
| ^~~
| ... |
s612479006 | p03727 | C++ | #include<cstdio>
using namespace std;
int main(){
cout<<"Yes";
return 0;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'cout' was not declared in this scope
4 | cout<<"Yes";
| ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<cstdio>
+++ |+#include <iostream>
2 | using name... |
s514206946 | p03727 | C++ | /☭
#include<cstdio>
#include<queue>
#include<map>
#include<set>
using namespace std;
const int N=1e5+10;
struct pai{
int f, s;
};
bool operator <(pai a, pai b) {
return (a.f==b.f)?(a.s<b.s):(a.f<b.f);
}
map< pai, int>m;
set<int> mu[N];
queue< pai >q;
int f[N], n;
inline void add(int x, int y) {mu[... | a.cc:1:2: error: extended character ☭ is not valid in an identifier
1 | /☭
| ^
a.cc:1:1: error: expected unqualified-id before '/' token
1 | /☭
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/deque:62,
from /usr/includ... |
s810883152 | p03727 | C++ | // luogu-judger-enable-o2
#include<iostream>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<ctime>
#include<set>
#include<map>
#include<climits>
#include<algorithm>
#include<queue>
#define ll long long
using namespace std;
const int N=100010;
typedef set<int>::iterator It;
set<int> s[N];
queue<pair<int,int... | a.cc: In function 'void insert(int, int)':
a.cc:29:12: error: expected primary-expression before ')' token
29 | if()
| ^
a.cc:30:1: error: expected primary-expression before '}' token
30 | }
| ^
|
s599920980 | p03727 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = (a), i##_end_ = (b); i <= i##_end_; ++i)
#define drep(i, a, b) for(int i = (a), i##_end_ = (b); i >= i##_end_; --i)
#define clar(a, b) memset((a), (b), sizeof(a))
#define debug(...) fprintf(stderr, __VA_ARGS__)
typedef long long LL;
typedef l... | a.cc: In function 'LL read()':
a.cc:13:17: error: 'IO' was not declared in this scope; did you mean 'EIO'?
13 | #define getchar IO.getchar
| ^~
a.cc:16:19: note: in expansion of macro 'getchar'
16 | char ch = getchar();
| ^~~~~~~
a.cc: In function 'int main()'... |
s248304378 | p03727 | C++ |
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("IL")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma G... | a.cc:5:26: warning: bad option '-fIL' to pragma 'optimize' [-Wpragmas]
5 | #pragma GCC optimize("IL")
| ^
a.cc:23:39: warning: bad option '-fwhole-program' to pragma 'optimize' [-Wpragmas]
23 | #pragma GCC optimize("-fwhole-program")
| ^
... |
s449156884 | p03727 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<int,P> P1;
#define fr first
#define sc second
#... | a.cc:298:13: error: declaration of 'seg HL::seg' changes meaning of 'seg' [-Wchanges-meaning]
298 | seg seg;
| ^~~
a.cc:298:9: note: used here to mean 'struct seg'
298 | seg seg;
| ^~~
a.cc:43:8: note: declared here
43 | struct seg{
| ^~~
|
s890769233 | p03727 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<int,P> P1;
#define fr first
#define sc second
#... | a.cc:203:2: error: expected '}' at end of input
203 | }
| ^
a.cc:70:10: note: to match this '{'
70 | struct HL{
| ^
a.cc: In member function 'void HL::run_adhoc()':
a.cc:173:19: error: a function-definition is not allowed here before '{' token
173 | void out(){
| ... |
s617251621 | p03727 | C++ | #include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <ctime>
#include <map>
#include <queue>
#include <cstdlib>
#include <string>
#include <climits>
#include <set>
#include <vector>
#include <complex>
#define pa pair<int,int>
#define mkp make_pair
#define fi first
#def... | a.cc: In function 'int main()':
a.cc:43:9: error: 'n' was not declared in this scope
43 | n=read();
| ^
a.cc:51:31: error: 'q' was not declared in this scope
51 | if(mp[now]==2)q.push(now);
| ^
a.cc:57:28: error: 'q' was not declared in thi... |
s356312051 | p03727 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 100005;
typedef pair<int, int> pii;
int n;
// build tree
namespace Tree1
{
set<pii> st;
struct Edge
{
int to, nxt;
} e[maxn<<1];
int first[maxn];
inline void add_edge(int from, int to)
{
static int cnt = 0;
st.insert(m... | a.cc:16:9: error: 'set' does not name a type
16 | set<pii> st;
| ^~~
a.cc: In function 'void Tree1::add_edge(int, int)':
a.cc:28:17: error: 'st' was not declared in this scope; did you mean 'std'?
28 | st.insert(make_pair(from, to));
| ^~
| ... |
s048412687 | p03727 | C++ | #include <bits/stdc++.h>
#include <tr1/unordered_map>
using namespace std;
using namespace std::tr1;
typedef long long ll;
#define rg register
template <typename _Tp> inline _Tp read(_Tp&x){
char c11=getchar();x=0;while(!isdigit(c11))c11=getchar();
while(isdigit(c11))x=x*10+c11-'0',c11=getchar();return x;
}
const i... | a.cc:17:1: error: reference to 'unordered_map' is ambiguous
17 | unordered_map<ll,int> cnt;
| ^~~~~~~~~~~~~
In file included from /usr/include/c++/14/tr1/unordered_map:44,
from a.cc:2:
/usr/include/c++/14/tr1/unordered_map.h:180:11: note: candidates are: 'template<class _Key, class _Tp, class ... |
s074464332 | p03727 | C++ | //waz
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)((x).size()))
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long int64;
typedef unsigned int uint;
typedef u... | a.cc: In function 'void link(int, int)':
a.cc:52:24: error: 'now' was not declared in this scope; did you mean 'pow'?
52 | q.push(now);
| ^~~
| pow
|
s450150403 | p03727 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<queue>
#include<set>
#include<map>
#define Pr pair<int,int>
using namespace std;
const int N=1e5+10;
struct xxx{
int y,nxt;
}a[N*2];
queue<Pr> q;
map<Pr,int> cnt;
multiset<int> rec[N];
multiset<int>::iterator it,tmpit;
int h[N],f[N];
int req[N][2];
int n,m... | a.cc: In function 'bool link(int, int)':
a.cc:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
28 | }
| ^
a.cc: In function 'void cut(int, int)':
a.cc:31:18: error: no match for 'operator[]' (operand types are '<unresolved overloaded function type>' and 'std::pair<int, int>')
... |
s599828773 | p03727 | C++ | queue<Int> mg;
for(auto z:H[v]){
if(uf.same(z,v)||!G[v].count(z)) continue;
mg.emplace(uf.find(z));
}
while(!mg.empty()){
Int u=mg.front();mg.pop();
u=uf.find(u);
if(uf.same(u,v)) continue;
if(H[v].size()<H[u].size()) swap(H[v],H[u]);
if(G[v].size()<G[u].size(... | a.cc:1:5: error: 'queue' does not name a type
1 | queue<Int> mg;
| ^~~~~
a.cc:2:5: error: expected unqualified-id before 'for'
2 | for(auto z:H[v]){
| ^~~
a.cc:6:5: error: expected unqualified-id before 'while'
6 | while(!mg.empty()){
| ^~~~~
a.cc:36:5: error: expec... |
s807067046 | p03727 | C++ | #include<bits/stdc++.h>
using namespace std;
using Int = long long;
struct UnionFind{
Int n;
vector<Int> r,p;
UnionFind(){}
UnionFind(Int sz):n(sz),r(sz,1),p(sz,0){iota(p.begin(),p.end(),0);}
Int find(Int x){
return (x==p[x]?x:p[x]=find(p[x]));
}
bool same(Int x,Int y){
return find(x)==find(y);
... | a.cc: In function 'int main()':
a.cc:76:23: error: 'w' was not declared in this scope
76 | if(G[u].count(w)||G[v].count(w)) mg.emplace(w);
| ^
a.cc:78:22: error: 'w' was not declared in this scope
78 | H[v].emplace(w);
| ^
|
s818270220 | p03727 | C++ | #include<bits/stdc++.h>
#define maxn 100009
#define mk make_pair
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef pair<int,int> P;
multiset<int>st[maxn];
map<P,int>mp;
map<P,int>::iterator it;
multiset<int>::iterator jt;
int fa[maxn],sz[maxn];
queue<P>q;
vector<int>vec[maxn];
int fin... | a.cc: In function 'int main()':
a.cc:48:20: error: 't' was not declared in this scope
48 | st[y].erase(x);t
| ^
|
s842142549 | p03727 | C++ | #include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
vector<int> bi[100005];
int n,m,i,j,x,y,sz[100005],rt;
struct ii
{
int x,y;
}ed[100005];
void dfs(int x,int fa)
{
int i;
for (i=... | a.cc: In function 'void dfs(int, int)':
a.cc:28:17: error: 'dfs2' was not declared in this scope; did you mean 'dfs'?
28 | dfs2(bi[x][i],x);
| ^~~~
| dfs
a.cc:29:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
... |
s296390229 | p03727 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<set>
#define fi first
#define se second
#define N 100010
using namespace std;
typedef pair<int,int>P;
set<int>s[N],s2[N];
set<int>::iterator it;
int n,t,u,v,fa[N];
P q[N<<4];
inline void rd(int& x){
static char ch;while(!isdigit(ch=getchar()));
for(x=0;i... | a.cc: In function 'void rd(int&)':
a.cc:15:31: error: 'isdigit' was not declared in this scope
15 | static char ch;while(!isdigit(ch=getchar()));
| ^~~~~~~
a.cc:16:17: error: 'isdigit' was not declared in this scope
16 | for(x=0;isdigit(ch);ch=getchar())x=x*10+c... |
s688351729 | p03727 | C++ | #include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cstring>
using namespace std;
const int MX=100011,MXT=262333;
int n;
struct Edge{int t,nxt;Edge(int _t=0,int _nxt=0):t(_t),nxt(_nxt){}}e[MX<<1];
int hed[MX],ec;
inline void ade(int f,int t){e[++ec]=Edge(t,hed[f]);hed[f]=ec;}
#define FE(k,i) for(int (i)=... | a.cc: In function 'int main()':
a.cc:87:9: error: 'scanf' was not declared in this scope
87 | scanf("%d",&n);
| ^~~~~
a.cc:99:38: error: 'puts' was not declared in this scope
99 | if(sg[1].mn>1)return puts("NO"),0;
| ^~~~
a.cc:104:9:... |
s826199009 | p03727 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int ... | a.cc:126:52: error: redefinition of 'int a'
126 | void upd(int a,int b,int k,int l,int r,int a){
| ~~~~^
a.cc:126:22: note: 'int a' previously declared here
126 | void upd(int a,int b,int k,int l,int r,int a){
| ~~~~^
a.cc: ... |
s549179592 | p03727 | C++ | #include <map>
#include <cmath>
#include <queue>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef pair<int,int> pii;
const int N=100010;
int fa[N],deg[N],next[4*N],b[4*N],head[N],tail[N];
map<pii,int> a;
queue<pii> q;
int find(int x)
{
if (x!=fa[x]) fa[x]=find(fa[x]);
... | a.cc: In function 'int main()':
a.cc:32:48: error: reference to 'next' is ambiguous
32 | b[++m]=y;if (!head[x]) head[x]=m; else next[tail[x]]=m;tail[x]=m;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/i... |
s079514914 | p03727 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <climits>
#include <stack>
#include <random>
#include <tuple>
#include <functional>
#include <chrono>
#include <cassert>
#define repeat(i, n) for (int i = 0; (i) < int(n); ++(i))
#define repeat_from(i, m, n) for (int i... | a.cc: In lambda function:
a.cc:17:63: warning: 'void std::random_shuffle(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]' is deprecated: use 'std::shuffle' instead [-Wdeprecated-declarations]
17 | #define whole(f, x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(who... |
s291310415 | p03727 | Java | import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
new Main().run();
}
long toKey(int a, int b) {
if (a < b) {
return (long) b << 32 | a;
} else {
return (long) a <<... | Main.java:109: error: illegal start of expression
private static void tr(Object... o) {
^
1 error
|
s190076977 | p03727 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
typedef pa... | a.cc: In function 'int main()':
a.cc:57:26: error: 'm' was not declared in this scope
57 | E.insert(m);
| ^
a.cc:63:9: error: 'x' was not declared in this scope
63 | x++;
| ^
|
s476263527 | p03727 | C | using System;
class A{static void Main(){Console.WriteLine("YES");}} | main.c:1:1: error: unknown type name 'using'
1 | using System;
| ^~~~~
main.c:2:1: error: unknown type name 'class'
2 | class A{static void Main(){Console.WriteLine("YES");}}
| ^~~~~
main.c:2:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
2 | class A{static void Main... |
s247311868 | p03727 | C | #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s029500175 | p03727 | C | #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s130612940 | p03727 | C | #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s891263792 | p03727 | C | #include<stdio.h>
#include "stdafx.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#inclu... | main.c:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s535104320 | p03727 | C | #include<stdio.h>
#include "stdafx.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#inclu... | main.c:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s143755425 | p03727 | C++ | // tzl ak IOI!
#include<bits/stdc++.h>
#define HEAP priority_queue
#define rep(i, n) for(int i = 0, _end_ = (n); i < _end_; ++i)
#define per(i, n) for(int i = (n) - 1; i >= 0 ; --i)
#define forn(i, l, r) for(int i = (l), _end_ = (r); i <= _end_; ++i)
#define nrof(i, r, l) for(in... | a.cc: In function 'void RANK1()':
a.cc:258:17: error: expected ';' before 'if'
258 | if(foo.X != 1)
| ^~
|
s320743263 | p03727 | C++ | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <numeric>
#include <random>
#include <vector>
#include <array>
#include <bitset>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map... | a.cc:100:10: error: declaration of 'void Tree::set(int, int, int)' changes meaning of 'set' [-Wchanges-meaning]
100 | void set(int a, int b, int x) {
| ^~~
a.cc:33:5: note: used here to mean 'class std::set<int>'
33 | set<int> v;
| ^~~~~~~~
In file included from /usr/include/c++/14... |
s168212684 | p03727 | C++ | #include <bits/stdc++.h>
#define F first
#define S second
#define X real()
#define Y imag()
using namespace std;
typedef long long ll;
typedef long double ld;
struct Node {
Node* c[2], *p;
int id, rev;
int v, mv;
int av;
int isr() {
return !p||(p->c[0]!=this&&p->c[1]!=this);
}
int dir() {
return p->c[1]==th... | a.cc: In function 'int main()':
a.cc:171:33: error: 'np' was not declared in this scope; did you mean 'p'?
171 | np.push_back(p.S);
| ^~
| p
|
s663473285 | p03727 | C++ | #include <bits/stdc++.h>
#define F first
#define S second
#define X real()
#define Y imag()
using namespace std;
typedef long long ll;
typedef long double ld;
struct Node {
Node* c[2], *p;
int id, rev;
int v, mv;
int av;
int isr() {
return !p||(p->c[0]!=this&&p->c[1]!=this);
}
int dir() {
return p->c[1]==th... | a.cc: In function 'int main()':
a.cc:171:33: error: 'np' was not declared in this scope; did you mean 'p'?
171 | np.push_back(p.S);
| ^~
| p
|
s366470078 | p03727 | C++ | まず黒い木の上に赤いpathをいっぱい書いて、それぞれの辺を赤いpathが何回通ったかと言うのを持っておくと、値が1のときにそのpathを消す、という操作を最後までできれば良くて、これはもとの木がpathの形なら区間minと区間addで出来て(どのpathか?っていうのはidのsumみたいなのを別に持つ),木だとHL_decompすればいい気がしたんですけど、正しい方針がわかりません。助けてください。 | a.cc:1:1: error: extended character 、 is not valid in an identifier
1 | まず黒い木の上に赤いpathをいっぱい書いて、それぞれの辺を赤いpathが何回通ったかと言うのを持っておくと、値が1のときにそのpathを消す、という操作を最後までできれば良くて、これはもとの木がpathの形なら区間minと区間addで出来て(どのpathか?っていうのはidのsumみたいなのを別に持つ),木だとHL_decompすればいい気がしたんですけど、正しい方針がわかりません。助けてください。
| ^
a.cc:1:1: error: extended chara... |
s717597555 | p03727 | C++ | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <numeric>
#include <random>
#include <vector>
#include <array>
#include <bitset>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map... | a.cc:70:10: error: declaration of 'void Tree::set(int, int, int)' changes meaning of 'set' [-Wchanges-meaning]
70 | void set(int a, int b, int x) {
| ^~~
a.cc:33:5: note: used here to mean 'class std::set<int>'
33 | set<int> v;
| ^~~~~~~~
In file included from /usr/include/c++/14/... |
s544469448 | p03728 | C | #pragma GCC optimize("Ofast")
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
int Max(int a, int b) {return a > b ? a : b;}
#define maxn 200005
struct T {
char mon;
int val, mx, fst;
int fix;
T *lson, *rson;
} t[maxn];
int tot;
T *new_node(int v) {
T... | main.c:16:9: error: unknown type name 'T'
16 | T *lson, *rson;
| ^
main.c:21:1: error: unknown type name 'T'; use 'struct' keyword to refer to the type
21 | T *new_node(int v) {
| ^
| struct
main.c: In function 'new_node':
main.c:22:9: error: unknown type name 'T'; use 'struct' ... |
s454061206 | p03728 | C++ | oppai love | a.cc:1:1: error: 'oppai' does not name a type
1 | oppai love
| ^~~~~
|
s274387360 | p03728 | C++ | #include <bits/stdc++.h>
#include <windows.h>
using namespace std;
//#define FILE_IO
struct Value
{
int x;
Value *prv, *nxt;
Value()
{
x = 0;
prv = nxt = 0;
}
Value(int _x, Value *_prv, Value *_nxt) { x = _x; prv = _prv; nxt = _nxt; }
};
int N;
void erasePosition(Value *V)... | a.cc:2:10: fatal error: windows.h: No such file or directory
2 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s222238082 | p03728 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmat... | a.cc: In function 'void out1(int, int)':
a.cc:44:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
44 | gets(s);
| ^~~~
| getw
|
s019998376 | p03729 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b,c;
cin>>a>>b>>c;
int d,e;
d=a.size();
e=b.size();
if(a(d-1)==b(0)&&b(e-1)==c(0)){
cout<<"YES";
}
else{
cout<<"NO";
}
} | a.cc: In function 'int main()':
a.cc:11:7: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
11 | if(a(d-1)==b(0)&&b(e-1)==c(0)){
| ~^~~~~
a.cc:11:15: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
11 | if(a(d-1)==b(0)... |
s136168711 | p03729 | C++ | #include <iostream>
#include <algorythm>
#include <string>
#include <set>
#include <regex>
#include <locale>
using namespace std;
int main () {
string a, b, c;
cin >> a >> b >> c;
cout << ((reverse(a.begin(),a.end()), a[0] == b[0]) && (reverse(b.begin(),b.end()), b[0] == c[0]) ? "YES" : "NO") << endl;
} | a.cc:2:10: fatal error: algorythm: No such file or directory
2 | #include <algorythm>
| ^~~~~~~~~~~
compilation terminated.
|
s303859801 | p03729 | C++ | #include <iostream>
#include <string>
#include <set>
#include <regex>
#include <locale>
using namespace std;
int main () {
string a, b, c;
cin >> a >> b >> c;
cout << ({a.reverse(), a[0] == b[0]} && {b.reverse(), b[0] == c[0]} ? "YES" : "NO") << endl;
} | a.cc: In function 'int main()':
a.cc:12:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
12 | cout << ({a.reverse(), a[0] == b[0]} && {b.reverse(), b[0] == c[0]} ? "YES" : "NO") << endl;
| ^~~~~~~
| ... |
s876763517 | p03729 | C++ | #include <iostream>
#include <string>
#include <set>
#include <regex>
#include <locale>
using namespace std;
int main () {
string a, b, c;
cin >> a >> b >> c;
cout << (a.reverse()[0] == b[0] && b.reverse()[0] == c[0] ? "YES" : "NO") << endl;
} | a.cc: In function 'int main()':
a.cc:12:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
12 | cout << (a.reverse()[0] == b[0] && b.reverse()[0] == c[0] ? "YES" : "NO") << endl;
| ^~~~~~~
| reserve
a.... |
s777537649 | p03729 | C | #include<stdio.h>
#include<string.h>
int main(){
char a[10],b[10],c[10];
scanf("%s %s %s",&a,&b,&c);
int d,e,f;
d=strlen(a[]);
e=strlen(b[]);
f=strlen(c[]);
if(a[d-1]==b[0]&&b[e-1]==c[0])
printf("YES");
else
printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:7:14: error: expected expression before ']' token
7 | d=strlen(a[]);
| ^
main.c:8:14: error: expected expression before ']' token
8 | e=strlen(b[]);
| ^
main.c:9:14: error: expected expression before ']' token
9 | f=strlen(c[]);
... |
s115153081 | p03729 | C | #include<stdio.h>
#include<string.h>
int main(){
char a[10],b[10],c[10];
scanf("%s %s %s",&a,&b,&c);
int d,e,f;
d=strlen(a[]);
e=strlen(b[]);
f=strlen(c[]);
if(a[d-1]==b[0]&&b[e-1]==c[0])
printf("YES");
else
printf("NO");
return 0;
}
| main.c: In function 'main':
main.c:7:14: error: expected expression before ']' token
7 | d=strlen(a[]);
| ^
main.c:8:14: error: expected expression before ']' token
8 | e=strlen(b[]);
| ^
main.c:9:14: error: expected expression before ']' token
9 | f=strlen(c[]);
... |
s483579545 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string A, B, C;
cin >> A >> B >> C;
if ((A[A.length()-1]==B[0]) && (B[B.lengtj()-1]==C[0])) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lengtj'; did you mean 'length'?
8 | if ((A[A.length()-1]==B[0]) && (B[B.lengtj()-1]==C[0])) {
| ^~~~~~
| ... |
s759516639 | p03729 | C++ | #include <iostream>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
if(a.at(a.size()-1)!=b.at(0)) cout << "NO";
else if(b.at(b.size()-1)!=c.at(0)))cout << "NO";
else cout << "YES";
}
| a.cc: In function 'int main()':
a.cc:9:37: error: expected primary-expression before ')' token
9 | else if(b.at(b.size()-1)!=c.at(0)))cout << "NO";
| ^
|
s284286607 | p03729 | C++ | #include <iostream>
#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#inc... | a.cc: In function 'int main()':
a.cc:42:39: error: expected ']' before numeric constant
42 | if(A[A.size()-1]==B[0]&&B[B.size()1]==C[0]){
| ^
| ]
a.cc:42:39: error: expected ')' before numeric constant
42 | if(A[A.size... |
s332411776 | p03729 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
// your code goes here
string a, b, c; cin >> a >> b >> c;
if (a[-1] == b[0]) && (b[-1] == c[0]) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:31: error: expected identifier before '(' token
8 | if (a[-1] == b[0]) && (b[-1] == c[0]) {
| ^
|
s545560034 | p03729 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String A = sc.next();
String B = sc.next();
String C = sc.next();
if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
System.out.println("YES");
... | Main.java:8: error: cannot find symbol
if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
^
symbol: variable a
location: class Main
Main.java:8: error: cannot find symbol
if(a.charAt(a.length()-1) == b.charAt(0) && b.charAt(b.length()-1) == c.charAt(0)) {
... |
s246715011 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a.at(a.size()-1)==b.at(0)&&b.at(b.size()-1)==c.at(0)){
cout<<"YES"<<ednl;}
else{cout<<"NO"<<endl;}
} | a.cc: In function 'int main()':
a.cc:7:18: error: 'ednl' was not declared in this scope
7 | cout<<"YES"<<ednl;}
| ^~~~
|
s397269615 | p03729 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{ char a[100],b[100],c[100];
cin>>a;
cin>>b;
cin>>c;
if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])
cout<<"Yes";
else
cout<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:14:13: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
14 | cout<"No";
| ~~~~^~~~~
| | |
| | const char [3]
| std::ostream {aka std::basi... |
s869127227 | p03729 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{ char a[100],b[100],c[100];
cin>>a;
cin>>b;
cin>>c;
if(a[strlen(a)-1]==b[0] && b[strlen(b)-1]==c[0])
cout<<"Yes";
else
cout<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:14:13: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
14 | cout<"No";
| ~~~~^~~~~
| | |
| | const char [3]
| std::ostream {aka std::basi... |
s959513611 | p03729 | C | #include<stdio.h>
int main()
{
char a[11],b[11],c[11];
int a , b, c;
scanf("%s",x);
scanf("%s",y);
scanf("%s",z);
a=strlen(x)-1;
b=strlen(y)-1;
c=strlen(z)-1;
if((x[a]==y[0])&&(y[b]==z[0]))
{
printf("YES\n");
}
else
{
pr... | main.c: In function 'main':
main.c:6:9: error: conflicting types for 'a'; have 'int'
6 | int a , b, c;
| ^
main.c:5:10: note: previous declaration of 'a' with type 'char[11]'
5 | char a[11],b[11],c[11];
| ^
main.c:6:13: error: conflicting types for 'b'; have 'int'
6 | ... |
s994722100 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,N) for(int i=0; i<N; i++){ ;
int main() {
string A,B,C;
if(A.at(A.size()-1)==B.ay(0)&&B.at(B.size()-1)==C.at(0)){
cout<<"YES"<<endl;
}
else
cout<<"NO"<<endl;
} | a.cc: In function 'int main()':
a.cc:7:28: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'ay'; did you mean 'at'?
7 | if(A.at(A.size()-1)==B.ay(0)&&B.at(B.size()-1)==C.at(0)){
| ^~
| at
|
s892257001 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
if(a[a.size()+1]==b[0]&&b[b.size()+1]==c[0]&){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:47: error: expected primary-expression before ')' token
6 | if(a[a.size()+1]==b[0]&&b[b.size()+1]==c[0]&){
| ^
|
s517482377 | p03729 | C++ | #include <bits/stdc++.h>
#define cinf(n,x) for(int i=0;i<(n);i++)cin>>x[i];
#define ft first
#define sc second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(),(v).end()
#define LB(a,x) lb(all(a),x)-a.begin()
#define UB(a,x) ub(all(a),x)-a.begin()
#define mod 1000000007
#def... | a.cc: In function 'int main()':
a.cc:31:10: error: 's' was not declared in this scope
31 | if(a[s.size()-1]==b[0]&&b[b.size()-1]==c[0])cout<<"YES"<<endl;
| ^
|
s873380912 | p03729 | C++ | # # Make IO faster
# import sys
# input = sys.stdin.readline
# # get single (or) multiple str
# X = input()
# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]
# f... | a.cc:1:3: error: invalid preprocessing directive ##
1 | # # Make IO faster
| ^
a.cc:2:3: warning: #import is a deprecated GCC extension [-Wdeprecated]
2 | # import sys
| ^~~~~~
a.cc:2:10: error: #import expects "FILENAME" or <FILENAME>
2 | # import sys
| ^~~
a.cc:3:3: error: i... |
s491088803 | p03729 | C++ | #include <stdio.h>
#include <strings.h>
int main() {
char A[15], B[15], C[15];
scanf("%s %s %s", &A, &B, &C);
int lastCharA = strlen(A) - 1;
int lastCharB = strlen(B) - 1;
if (A[lastCharA] == B[0] && B[lastCharB] == C[0]){
printf("YES\n");
}
else {
printf("NO\n");
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:25: error: 'strlen' was not declared in this scope
6 | int lastCharA = strlen(A) - 1;
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <strings.h>
... |
s347749052 | p03729 | C++ | #include <stdio.h>
#include <string.h>
int main() {
char A[12], B[12], C[12];
A[12] = 'a' - 'z'
B[12] = 'a' - 'z'
C[12] = 'a' - 'z'
scanf ("%s %s %s", &A, &B, &C);
if (A [strlen(A) - 1] == B[0] && B [strlen(B) - 1] == C[0]) {
printf ("YES");
}
else {
printf ("NO");
... | a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before 'B'
6 | A[12] = 'a' - 'z'
| ^
| ;
7 | B[12] = 'a' - 'z'
| ~
|
s452533362 | p03729 | C++ | #include <stdio.h>
#include <string.h>
int main() {
char A[15], B[15], C[15];
A[15] = 'a' - 'z'
B[15] = 'a' - 'z'
C[15] = 'a' - 'z'
scanf ("%s %s %s", &A, &B, &C);
if (A [strlen(A) - 1] == B[0] && B [strlen(B) - 1] == C[0]) {
printf ("YES");
}
else {
printf ("NO");
... | a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before 'B'
6 | A[15] = 'a' - 'z'
| ^
| ;
7 | B[15] = 'a' - 'z'
| ~
|
s025618290 | p03729 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char a[255];
char b[255];
char c[255];
scanf("%s %s %s", a, b, c);
int len = strlen(a);
int n = strlen(b);
int s = strlen(c);
if (a[len - 1] == b[0] && b[n - 1] == c[0]){
puts("YES");
}
else puts("NO");
}
return 0;
} | a.cc:19:9: error: expected unqualified-id before 'return'
19 | return 0;
| ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
s254991715 | p03729 | C++ | #include <stdio.h>
#include <String.h>
int main(){
char A[15],B[15],C[15];
scanf("%s %s %s",&A,&B,&C);
int lenA=strlen(A);
int lenB=strlen(B);
if(A[lenA-1]==B[0]&&B[lenB-1]==C[0]){
printf("YES");
}
else{
printf("NO");
}
return 0;
} | a.cc:2:10: fatal error: String.h: No such file or directory
2 | #include <String.h>
| ^~~~~~~~~~
compilation terminated.
|
s334084911 | p03729 | C++ | #include <stdio.h>
#include <string.h>
int main (){
char A[12],B[12],C[12];
scanf("%s %s %s", A, B ,C);
}
if (A[strlen(A)-1] == B[0] && B[strlen(B)-1] == C[0]){
printf("YES\n");
}else {
printf("NO\n");
}
return 0;
} | a.cc:10:5: error: expected unqualified-id before 'if'
10 | if (A[strlen(A)-1] == B[0] && B[strlen(B)-1] == C[0]){
| ^~
a.cc:12:6: error: expected unqualified-id before 'else'
12 | }else {
| ^~~~
a.cc:17:5: error: expected unqualified-id before 'return'
17 | return 0;
| ... |
s786736103 | p03729 | C++ | #include <stdio.h>
#include <string.h>
int main () {
char a [10];
char b[10];
char c[10];
scanf ("%s %s %s",&a,&b,&c);
int len1 = strlen(a);
int len2 = strlen(b);
int len3 = strlen(c);
if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
if (a[len1-1] == b[0] && b[len2-1] == c[0]) {
printf("YES"... | a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if (a>='a' && a<='z' && b>='a' &&b<='z' &&c>='a' &&c<='z' ) {
| ~^~~~~
a.cc:12:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12... |
s496026307 | p03729 | C++ | #include <stdio.h>
#include<string.h>
int main(){
char A[15], B[15], C[15];
scanf("%s%s%s", &A,&B,&C);
if( A[strlen(A)-1]==B[0] && B[strlen(B)-1]==V[0]){
printf("YES");
}
else{
printf("NO");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:53: error: 'V' was not declared in this scope
9 | if( A[strlen(A)-1]==B[0] && B[strlen(B)-1]==V[0]){
| ^
|
s822367883 | p03729 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
int flag=0;
char a[10],b[10],c[10];
gets(a);
gets(b);
gets(c);
if(a[strlen(a)-1]==b[0]){flag=1;}
else {flag=0;}
if(b[strlen(b)-1]==c[0]){flag=1;}
else {flag=0;}
if(flag==0){printf("NO");}
else {printf("YES");}
}
| a.cc: In function 'int main()':
a.cc:10:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(a);
| ^~~~
| getw
|
s706304231 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int i,j,flag=0,x,y;
char a[10],b[10],c[10];
gets(a);
gets(b);
gets(c);
if(a[strlen(a)-1]==b[0]){flag=1;}
else {flag=0;}
if(b[strlen(b)-1]==c[0]){flag=1;}
else {flag=0;}
if(flag==0){cout<<"NO"<<endl;}
else {cout<<"Y... | a.cc: In function 'int main()':
a.cc:9:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s474615572 | p03729 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
int asize;bsize;
asize=a.size();
bsize=b.size();
if(a.at(asize-1)==b.at(0)&&b.at(bsize-1)==c.at(0))cout <<"YES"<<endl;
else cout <<"N"<endl;
} | a.cc: In function 'int main()':
a.cc:6:13: error: 'bsize' was not declared in this scope; did you mean 'asize'?
6 | int asize;bsize;
| ^~~~~
| asize
a.cc:10:18: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function ty... |
s875707445 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B, C;
cin >> A >> B >> C;
if (A.[A.size()-1] == B[0] && B[B.size()-1] == C[0]) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:9: error: expected unqualified-id before '[' token
8 | if (A.[A.size()-1] == B[0] && B[B.size()-1] == C[0]) {
| ^
|
s328336918 | p03729 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;
#define intmax INT_MAX
#define lmax LONG_MAX
#define uint... | a.cc: In function 'int main()':
a.cc:52:10: error: redeclaration of 'std::string S'
52 | string S="NO";
| ^
a.cc:48:10: note: 'std::string S' previously declared here
48 | string S,T,U;
| ^
|
s265101587 | p03729 | Java | import java.util.Scanner;
//import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
String c = scan.next();
System.out.println(b.startsWith(a.charAt(a.length()-1).toString()) && c.startsWith(... | Main.java:10: error: char cannot be dereferenced
System.out.println(b.startsWith(a.charAt(a.length()-1).toString()) && c.startsWith(b.charAt(b.length()-1).toString()) ? "YES" : "NO");
^
Main.java:10: error: char cannot be dereferenced
System.out.println(b.star... |
s021116713 | p03729 | Java | import java.util.Scanner;
//import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
String c = scan.next();
System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.... | Main.java:10: error: incompatible types: char cannot be converted to String
System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.length()-1)) ? "YES" : "NO");
^
Main.java:10: error: incompatible types: char cannot be converted to String
System.... |
s287562670 | p03729 | Java | import java.util.Scanner;
//import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next()
String c = scan.next();
System.out.println(b.startsWith(a.charAt(a.length()-1)) && c.startsWith(b.charAt(b.l... | Main.java:7: error: ';' expected
String b = scan.next()
^
1 error
|
s525598549 | p03729 | C++ | #include <iostream>
#include <string>
int main() {
string a, b, c;
cin >> a >> b >> c;
int x = a.length(), y = b.length(), z = c.length();
if (a[x - 1] == b[0] && b[y - 1] == c[0])
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
5 | string a, b, c;
| ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ost... |
s752811509 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin >> a >> b >> c;
if(a.at.size()==b.at(0)&&b.at.size()==c.at(0)){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:8: error: invalid use of member function 'std::__cxx11::basic_string<char>::at' (did you forget the '()' ?)
7 | if(a.at.size()==b.at(0)&&b.at.size()==c.at(0)){
| ~~^~
a.cc:7:11: error: expected ')' before 'size'
7 | if(a.at.size()==b.at(0)&&b.at.size()==c.at... |
s871374547 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
int D==A.size();
int E==B.size();
if(A.at(D)==B.at(0)&&B.at(E)==C.at(0)){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '==' token
7 | int D==A.size();
| ^~
a.cc:8:8: error: expected initializer before '==' token
8 | int E==B.size();
| ^~
a.cc:9:11: error: 'D' was not declared in this scope
9 | if(A.at(D)==B.at(0)&&B.... |
s300127615 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A,B,C;
cin >> A >> B >> C;
if(A.at.size()==B.at(0)&&B.at.size()==C.at(0)){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:8: error: invalid use of member function 'std::__cxx11::basic_string<char>::at' (did you forget the '()' ?)
7 | if(A.at.size()==B.at(0)&&B.at.size()==C.at(0)){
| ~~^~
a.cc:7:11: error: expected ')' before 'size'
7 | if(A.at.size()==B.at(0)&&B.at.size()==C.at... |
s414026314 | p03729 | C | #include<stdio.h>
#include<string.h>
int main(){
char a,b,c;
scanf("%s%s%s",a,b,c);
if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
printf("YES");
else
printf("NO");
return 0;
} | main.c: In function 'main':
main.c:6:15: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
6 | if(a[strlen(a)-1]==b[0]&&b[strlen(b)-1]==c[0])
| ^
| |
| char
In file included from main.c:2:
/usr/include/str... |
s883828701 | p03729 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,c;cin>>a>>b>>c;
if (a[a.length()-1] == b[0] %% b[b.length()-1] == c[0]) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:6:32: error: expected primary-expression before '%' token
6 | if (a[a.length()-1] == b[0] %% b[b.length()-1] == c[0]) cout << "YES" << endl;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.