submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s100676728 | p03948 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
#include<string>
#include <math.h>
#include<algorithm>
// #incl... | a.cc: In function 'int main()':
a.cc:117:17: error: 'use' was not declared in this scope
117 | use[x]=1;
| ^~~
|
s267265634 | p03948 | C++ | 3 2
100 50 200
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 2
| ^
|
s147597477 | p03948 | C++ | #include <bits/stdc++.h>
//#include <boost/functional/hash.hpp>
//example: unordered_set< pair<int,int>,boost::hash< std::pair<int, int> > > used;
//priority_queue< pair<int,pair<int,int> >, vector<pair<int,pair<int,int>>>, greater<pair<int,pair<int,int> > > > pqueue; //cost, vertex(行き先)
using namespace std;
#defin... | a.cc: In function 'int main()':
a.cc:52:13: error: reference to 'count' is ambiguous
52 | count=1;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/... |
s202134194 | p03948 | C++ | #include <iostream>
using namespace std;
int town[100000];
int dis[100000];
int max=0;
int price=0;
int N;
int apple;
int ans;
int main() {
cin >> N >> apple;
for (int i = 0; i < N; i++) {
cin >> town[i];
}
for (int i = N - 1; i >= 0; i--) {
dis[i] = max - town[i];
if (max < town[i])max = town[i];
}
dis[N... | a.cc: In function 'int main()':
a.cc:18:26: error: reference to 'max' is ambiguous
18 | dis[i] = max - town[i];
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/incl... |
s863737547 | p03949 | C++ | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, co... | a.cc:20:62: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
20 | def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
| ^~~~~~~
a.cc:21:61: warning: multi-character literal with 5 characters e... |
s286212340 | p03949 | C++ | #define ONLINE_JUDGE
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll,ll> pl;
typedef vector<pl> vp;
const ll INF=1001001001;
const ll LINF=1001001001001001001;
const ll D4[]={0,1,0,-1,0};
const ll D8[]={0,1,1,0,-1,-1,1,-1,0};
#define _ov... | a.cc: In function 'void dfs2(ll, ll)':
a.cc:77:47: error: expected primary-expression before ')' token
77 | if(ans[to]<mi[to]||mx[to]<ans[to])){
| ^
|
s199966547 | p03949 | C++ | #include <bits/stdc++.h>
using namespace std;
const long long N = 100010;
vector<long long> g[N];
long long a[N];
void ini() {
for(long long i = 0; i < N; i++) {
a[i] = -1;
}
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
//cin >> t;
while(t--... | a.cc: In function 'int main()':
a.cc:48:27: error: 'z' was not declared in this scope
48 | else if(a[z] != 0) {
| ^
|
s871264193 | p03949 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
using namespace std;
#define int long long
const int INF = (1e18);
const int MOD = 1000000007;
signed main(){
// cin.tie(0);
// ios::sync_with_stdio(false);
bool flag = true;
int N, K;
vector<int> dis;
vector<vecto... | a.cc: In function 'int main()':
a.cc:83:19: error: no match for 'operator!=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} and '__gnu_cxx::__alloc_traits<std::... |
s590793812 | p03949 | C++ |
void dfsr(int now,int p){
ll ma = ans[now] + 1;
ll mi = ans[now] - 1;
fore(x, E[now]) {
if (x != p) {
if ((rec[now].first <= mi) && (mi <= rec[now].second))ans[x] = mi;
else ans[x] = ma;
dfsr(x, now);
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
for (int i ... | a.cc: In function 'void dfsr(int, int)':
a.cc:3:9: error: 'll' was not declared in this scope
3 | ll ma = ans[now] + 1;
| ^~
a.cc:4:11: error: expected ';' before 'mi'
4 | ll mi = ans[now] - 1;
| ^~~
| ;
a.cc:5:14: error: 'x' was not declared in this... |
s511775350 | p03949 | C++ | #include <bits/stdc++.h>
#define pb push_back
#define int long long
#define mp make_pair
#define inf 1000000007
#define ll long long
using namespace std;
struct edge{int to,cap,rev;};
vector<int> nex[114514];
int mi[114514],ma[114514],st;
int col[114514];
int used[114514];
int ans[114514];
int used2[114514];
bool fl = ... | a.cc: In function 'int main()':
a.cc:114:2: error: expected '}' at end of input
114 | }
| ^
a.cc:31:14: note: to match this '{'
31 | signed main(){
| ^
|
s996426122 | p03949 | C++ | #include <bits/stdc++.h>
#define pb push_back
#define int long long
#define mp make_pair
#define inf 1000000007
#define ll long long
using namespace std;
struct edge{int to,cap,rev;};
vector<int> nex[114514];
int mi[114514],ma[114514],st;
int col[114514];
int used[114514];
int ans[114514];
int used2[114514];
bool fl = ... | a.cc: In function 'int main()':
a.cc:105:31: error: expected primary-expression before '<' token
105 | cout<<<"No"<<endl;
| ^
a.cc:105:36: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
... |
s158995863 | p03949 | C++ | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define pb push_back
typedef pair<int, int> ii;
typedef long long ll;
const int maxn = 1e5+5;
vector<int> adj[maxn];
int has[maxn];
bool flex[maxn];
int pari[maxn];
int lb[maxn], rb[maxn];
int ans[maxn];
int n, k;
bool solve(int u, in... | a.cc: In function 'int main()':
a.cc:83:40: error: 'u' was not declared in this scope
83 | for(int i = 1; i<= n; i++) has[u] = -1;
| ^
|
s373189576 | p03949 | C++ | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define pb push_back
typedef pair<int, int> ii;
typedef long long ll;
const int maxn = 1e5+5;
vector<int> adj[maxn];
int has[maxn];
bool flex[maxn];
int pari[maxn];
int lb[maxn], rb[maxn];
int ans[maxn];
int n, k;
bool solve(int u, in... | a.cc: In function 'bool solve(int, int)':
a.cc:37:24: error: 'flex' cannot be used as a function
37 | if(flex(v)) continue;
| ~~~~^~~
|
s903137004 | p03949 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(W,n)cerr << v[W] << ' ';cerr << endl << endl;... | a.cc:28:1: error: expected initializer before 'void'
28 | void dfs(int node, int pre,ll LL, ll RR){
| ^~~~
a.cc: In function 'int main()':
a.cc:64:17: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
64 | REP(i,k)dfs(que[i].FI, que[i].FI, que[i].SE, que[i].SE);
| ... |
s056035508 | p03949 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#inclu... | a.cc: In function 'bool dfs(int, int)':
a.cc:36:27: error: no match for 'operator[]' (operand types are 'int [100005]' and 'std::vector<int>')
36 | if(abs(num[nei[now]]-num[nei[now][i])!=1){
| ^
a.cc:36:53: error: expected ']' before ')' token
36 | i... |
s305727754 | p03949 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#inclu... | a.cc: In function 'int main()':
a.cc:84:17: error: expected ';' at end of input
84 | return 0
| ^
| ;
a.cc:84:17: error: expected '}' at end of input
a.cc:44:11: note: to match this '{'
44 | int main(){
| ^
|
s046221413 | p03949 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#inclu... | a.cc: In function 'bool dfs(int, int)':
a.cc:31:25: error: request for member 'size' in 'a', which is of non-class type 'std::vector<int> [100100]'
31 | for(int i=0;i<a.size();i++){
| ^~~~
a.cc:33:43: error: expected ']' before ')' token
33 | if(abs(tag[-tag[a... |
s113688200 | p03949 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#inclu... | a.cc: In function 'bool dfs(int, int)':
a.cc:31:25: error: request for member 'size' in 'a', which is of non-class type 'std::vector<int> [100100]'
31 | for(int i=0;i<a.size();i++){
| ^~~~
a.cc:33:43: error: expected ']' before ')' token
33 | if(abs(tag[-tag[a... |
s846850980 | p03949 | C++ | #include <cstdio>
#include <queue>
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
const int SIZE=100005;
const int INF=100000005;
vector<int> mp[SIZE];
int id[SIZE],L[SIZE],R[SIZE];
bool ok=true;
void solve(int v,int p){
if(id[v]==-1){
L[v]=-INF;
R[v]=INF;
... | a.cc: In function 'void make(int, int)':
a.cc:49:33: error: expected '}' before 'else'
49 | id[to]=id[v]+1; else id[to]=id[v]-1;
| ^~~~
a.cc:48:49: note: to match this '{'
48 | if(L[to]<=id[v]+1 && id[v]+1<=R[to]){
| ... |
s169135922 | p03949 | C++ | #include<bits/stdc++.h>
#pragma comment(linker, "/STACK:16000000")
#define PI 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
#define ii pair<int,int>
using namespace std;
const int inf=0x3f3f3f3f;
const long long inf2=0x3f3f3f3f3f3f3f3f;
const double eps=1e-6;
con... | a.cc:13:16: error: 'pii' was not declared in this scope; did you mean 'ii'?
13 | priority_queue<pii, vector<pii>, greater<pii> > pq;
| ^~~
| ii
a.cc:13:28: error: 'pii' was not declared in this scope; did you mean 'ii'?
13 | priority_queue<pii, vector<pii>, greater<pii> >... |
s484782377 | p03949 | C++ | #include<bits/stdc++.h>
using namespace std;
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > >q;
int ans[100003];
vector<int>v[100003];
int main(){
memset(ans,-1,sizeof(ans));
int n,a,b,k;
cin>>n;
for(int i=1;i<n;i++)
{
cin>>a>>b;
a--;b--;
v[a].push_back(b);
v[b].push_back(a);
... | a.cc: In function 'int main()':
a.cc:30:42: error: request for member 'size' in 'tmp.std::pair<int, int>::second', which is of non-class type 'int'
30 | for(int i=0;i<tmp.second.size();i++)
| ^~~~
a.cc:31:42: error: invalid types 'int[int]' for array sub... |
s259693554 | p03949 | C++ | /*
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`---'\____
.' \\| |// `.
/ \\||| : |||// \
/ _||||| -:- |||||- \
| | \\\ - /// | |
... | a.cc:42:51: warning: bad option '-funsafe-loop-optimizations' to pragma 'optimize' [-Wpragmas]
42 | #pragma GCC optimize("-funsafe-loop-optimizations")
| ^
a.cc:44:39: warning: bad option '-fwhole-program' to pragma 'optimize' [-Wpragmas]
44 | #pragma GCC op... |
s656677080 | p03949 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int v[100010],p[100010],lb[100010],ub[100010];
vector<int> G[100010];
bool f=false;
//根からDFS
//範囲を決定していく
void dfs(int i,int pr,int l,int r){
if(p[i]!=-1){
if(p[i]%2!=l%2||p[i]<l||p[i]>r){
f=true;
return;
}
}
for(aut... | a.cc: In function 'void dfs(int, int, int, int)':
a.cc:27:17: error: 'retutn' was not declared in this scope
27 | retutn;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:41:24: error: 'INF' was not declared in this scope
41 | fill(ub,ub+n+1,INF);
| ... |
s506838807 | p03949 | C++ | #include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<math.h>
#include<numeric>
#include<cassert>
#include<random>
#include<deque>
#include<chrono... | a.cc: In function 'int main()':
a.cc:99:63: error: expected ';' before '}' token
99 | if(color[D[i].F]!=D[i].S%2){cout<<"No"<<endl; return 0}
| ^
| ;
|
s415248554 | p03949 | C++ | #include<cmath>
#include<vector>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
void Read(int &p)
{
p=0;
char c=getchar();
while(c<'0'||c>'9') c=getchar();
while(c>='0'&&c<='9')
p=p*10+c-'0',c=getchar();
}
const int MAXN=102018;
int N,k,root,u,v,val[MAXN],eoro[MAXN];
bool vis[MAXN],... | a.cc: In function 'void draw(int)':
a.cc:74:17: error: expected primary-expression before 'if'
74 | if(val[t]>=1) val[t]=val[p]-1,draw(t);
| ^~
|
s985461950 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#define ll long long
#define inf 1e9
#define eps 1e-10
#define mod 9901
#define mkp make_pair
using namespace std;
int i,j,k,m,s,t,n,ans1,ans2,n1,nn,m1... | a.cc: In function 'void insert(int, int)':
a.cc:43:9: error: reference to 'next' is ambiguous
43 | next[++m1]=first[u];
| ^~~~
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/... |
s519519797 | p03949 | C++ | #include <vector>
#include <cstdlib>
#include <utility>
#include <algorithm>
const int N = 1e5 + 10, INF = 1e7;
int n, rt, f[N], p[N], k;
std::vector<int> to[N], c[N];
std::pair<int, int> r[N];
bool o1, o2, d[N], h[N];
std::pair<int, int> merge(std::pair<int, int> a, std::pair<int, int> b) {
return std::make_pair... | a.cc: In function 'int main()':
a.cc:46:5: error: 'scanf' was not declared in this scope
46 | scanf("%d", &n);
| ^~~~~
a.cc:68:9: error: 'puts' was not declared in this scope
68 | puts("No");
| ^~~~
a.cc:74:9: error: 'puts' was not declared in this scope
74 | puts("Y... |
s492836188 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#define ll long long
#define inf 1e9
#define eps 1e-10
#define mod 9901
#define mkp make_pair
using namespace std;
int i,j,k,m,s,t,n,ans1,ans2,n1,nn,m1... | a.cc: In function 'void insert(int, int)':
a.cc:43:9: error: reference to 'next' is ambiguous
43 | next[++m1]=first[u];
| ^~~~
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/... |
s993404628 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#define ll long long
#define inf 1e9
#define eps 1e-10
#define mod 9901
#define mkp make_pair
using namespace std;
int i,j,k,m,s,t,n,ans1,ans2,n1,nn,m1... | a.cc: In function 'void dfs(int, int)':
a.cc:75:37: error: 'r' was not declared in this scope
75 | if (l1[v]-1>r) {bo=0;return;}
| ^
a.cc:76:37: error: 'l' was not declared in this scope
76 | if (r1[v]+1<l) {bo=0;return;}
... |
s149169726 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#define ll long long
#define inf 1e9
#define eps 1e-10
#define mod 9901
#define mkp make_pair
using namespace std;
int i,j,k,m,s,t,n,ans1,ans2,n1,nn,m1... | a.cc: In function 'void insert(int, int)':
a.cc:43:9: error: reference to 'next' is ambiguous
43 | next[++m1]=first[u];
| ^~~~
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/... |
s671458103 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#define ll long long
#define inf 1e9
#define eps 1e-10
#define mod 9901
#define mkp make_pair
using namespace std;
int i,j,k,m,s,t,n,ans1,ans2,n1,nn,m1... | a.cc: In function 'void insert(int, int)':
a.cc:43:9: error: reference to 'next' is ambiguous
43 | next[++m1]=first[u];
| ^~~~
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/... |
s600318214 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#define ll long long
#define inf 1e9
#define eps 1e-10
#define mod 9901
#define mkp make_pair
using namespace std;
int i,j,k,m,s,t,n,ans1,ans2,n1,nn,m1... | a.cc: In function 'void insert(int, int)':
a.cc:43:9: error: reference to 'next' is ambiguous
43 | next[++m1]=first[u];
| ^~~~
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/... |
s086521184 | p03949 | C | /*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define BIG 2000000007
#define VERYBIG 200000000000007LL
#define MOD 1000000007
typedef uint64_t ull;
ty... | main.c: In function 'solve':
main.c:567:9: error: implicit declaration of function 'dijk_init' [-Wimplicit-function-declaration]
567 | dijk_init(n * 2 - 2, path);
| ^~~~~~~~~
main.c:568:9: error: implicit declaration of function 'dijk_distinit' [-Wimplicit-function-declaration]
568 | d... |
s944565399 | p03949 | 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<int>> g(n);
for (int i = 0; i < n - 1; i ++) {
... | a.cc: In function 'int main()':
a.cc:33:9: error: 'function' was not declared in this scope
33 | function<bool (int, int)> dfs = [&](int u, int prev) {
| ^~~~~~~~
a.cc:8:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
... |
s137360654 | p03949 | 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 = 200005;
const int INF = ONE;
int get()
{
int res = 1, Q = 1; char c;
while( (c = getchar()) < 48 || c > 57)
i... | a.cc: In function 'void Add(int, int)':
a.cc:37:17: error: reference to 'next' is ambiguous
37 | next[++tot] = first[u], first[u] = tot, go[tot] = v;
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s053860104 | p03949 | C++ | #include<bits/stdc++.h>
using namespace std;
#define N 1111116
#define inf 1111111116
int n,x[N],y[N],p[N],next[N],f[N];
priority_queue<pair<int,int> > q;
int read(){
int x=0,f=1;char ch=getchar();
for (;!isdigit(ch);ch=getchar()) if (ch=='-') f=-f;
for (;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
return x*f;
}
i... | a.cc: In function 'int main()':
a.cc:21:17: error: reference to 'next' is ambiguous
21 | next[2*i-1]=p[x[2*i-1]];p[x[2*i-1]]=2*i-1;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
f... |
s338568336 | p03949 | C++ |
#include <string>
#include <sstream>
#include <iostream>
template<class T>
struct Range {
T inf_m;
T sup_m;
bool inf_inclusive_m;
bool sup_inclusive_m;
static Range Empty_range();
void Reduce();
public:
static bool Equal(const Range& left, const Range& right);
//static bool compare(const Range& left, const ... | a.cc: In static member function 'static bool Range<T>::Equal(const Range<T>&, const Range<T>&)':
a.cc:61:16: error: invalid use of member 'Range<T>::inf_m' in static member function
61 | return inf_m == other.inf_m
| ^~~~~
a.cc:8:11: note: declared here
8 | T inf_m;
| ... |
s806475758 | p03949 | C++ | #include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <utility>
typedef long long ll;
typedef std::pair<int, int> pii;
#define mp std::make_pair
int n, k, ans[100005];
bool vis[100005];
int head[100005], next[100005 << 1], to[100005 << 1], ed = 0;
int deg[100005];
void AddEdge(int u, int v) {
next... | a.cc: In function 'void DFS(int, int, bool)':
a.cc:46:20: error: too few arguments to function 'void DFS(int, int, bool)'
46 | DFS(to[i], now);
| ~~~^~~~~~~~~~~~
a.cc:42:6: note: declared here
42 | void DFS(int now, int fa, bool odd) {
| ^~~
|
s915265229 | p03949 | C++ | #include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <utility>
typedef long long ll;
typedef std::pair<int, int> pii;
#define mp std::make_pair
int n, k, ans[100005];
bool vis[100005];
int head[100005], next[100005 << 1], to[100005 << 1], ed = 0;
int deg[100005];
void AddEdge(int u, int v) {
next... | a.cc: In function 'int main()':
a.cc:67:12: error: too many arguments to function 'void DFS(int, int)'
67 | DFS(v, 0, p, p);
| ~~~^~~~~~~~~~~~
a.cc:42:6: note: declared here
42 | void DFS(int now, int fa) {
| ^~~
|
s864544362 | p03949 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<cstdlib>
#include<queue>
using namespace std;
int n,k;
int dist[100010];
bool vis[100010];
int ans[100010];
vector<pair<int,int> >v[100010];
void dij(int st)
{
for(int i=1;i<=n;i++)dist[i]=1e9;
priority_queue<pair<int,int> , vector<pair<int,int> > ,greater... | a.cc: In function 'void dij(int)':
a.cc:17:9: error: 'memset' was not declared in this scope
17 | memset(vis,false,sizeof(vis));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<queue>
+++ |+#include <... |
s952199760 | p03949 | C++ | #include<cstdio>
#include<utility>
#include<cstring>
#include<vector>
#include<string>
using namespace std;
typedef pair < int , int > pii;
template < typename T > T MAX(T a,T b){
return a<b?b:a;
}
template < typename T > T MIN(T a,T b){
return a<b?a:b;
}
template < typename T > T ABS(T a){
return a>0?a:-a;
}
int n,... | a.cc: In function 'void dfs(int, int)':
a.cc:37:17: error: reference to 'rank' is ambiguous
37 | if(f>=0)rank[ver]=rank[f]+1;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/utility:69,
from a.cc:2:
/usr/inc... |
s083278983 | p03949 | C++ | #include<stdio.h>
#include<string>
#include<math.h>
#include<stdlib.h>
#include<set>
#include<bitset>
#include<map>
#include<vector>
#include<string.h>
#include<algorithm>
#include<iostream>
#include<queue>
#include<deque>
#include<stack>
using namespace std;
const int INF=12345678;
const int N=100005;
bool end=false;... | a.cc: In function 'void dfs(int)':
a.cc:39:20: error: reference to 'end' is ambiguous
39 | if(end) return;
| ^~~
In file included from /usr/include/c++/14/string:53,
from a.cc:2:
/usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<... |
s990509619 | p03949 | C++ | // This amazing code is by Eric Sunli Chen.
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using ... | a.cc: In function 'int main()':
a.cc:105:46: error: expected '}' at end of input
105 | for(int i=1;i<=n;i++)printendl(a[i]);
| ^
a.cc:87:1: note: to match this '{'
87 | {
| ^
|
s599287665 | p03949 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <stdlib.h>
#include <functional>
#include <string>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
... | a.cc: In function 'int main()':
a.cc:122:27: error: expected unqualified-id before '>' token
122 | priority_queue<pii>> pq;
| ^~
a.cc:128:17: error: 'pq' was not declared in this scope
128 | pq.push(MP(depth[a], a));
| ^~
a.cc:134:16: err... |
s353266268 | p03949 | C++ | #include<bits/stdc++.h>
#define N 111111
#define M 222222
#define P 10001000
using namespace std;
int T,n,m,i,x,y,tot,S,fir[N],la[M],ne[M],V[N],L[N],R[N],AN[N];char s[N];bool ff,v[N];
void ins(int x,int y){la[++tot]=y;ne[tot]=fir[x];fir[x]=tot;}
void dfs1(int x,int fa){
int lv=-1e9,rv=1e9;
if(v[x])lv=rv=V[x];
for(in... | a.cc: In function 'void getans(int, int)':
a.cc:56:60: error: 'w' was not declared in this scope
56 | for(i=fir[x];i;i=ne[i])if(la[i]!=fa)getans(la[i],x,w^1);
| ^
a.cc: In function 'int to(int, int, int, int)':
a.cc:45:1: warning: control reach... |
s715297604 | p03949 | C++ | #include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdio>
using namespace std;
#define Set(a, b) memset(a, b, sizeof a)
const int N = 2e5 + 10;
const int Inf = INT_MAX / 2;
int n, m, a[N];
int tms, en[N], next[N], to[N];
void Link(int u, int v) {
to[++tms] = v;
next[tms] = ... | a.cc: In function 'void Link(int, int)':
a.cc:19:9: error: reference to 'next' is ambiguous
19 | next[tms] = en[u];
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/c++/14/... |
s162766371 | p03949 | C++ | #include<bits/stdc++.h>
#define N 111111
#define M 222222
#define P 10001000
using namespace std;
int T,n,m,i,x,y,tot,S,fir[N],la[M],ne[M],V[N],L[N],R[N],AN[N];char s[N];bool ff,v[N];
void ins(int x,int y){la[++tot]=y;ne[tot]=fir[x];fir[x]=tot;}
void dfs1(int x,int fa){
int lv=-1e9,rv=1e9;
if(v[x])lv=rv=V[x];
for(in... | a.cc: In function 'void getans(int, int)':
a.cc:56:60: error: 'w' was not declared in this scope
56 | for(i=fir[x];i;i=ne[i])if(la[i]!=fa)getans(la[i],x,w^1);
| ^
a.cc: In function 'int to(int, int, int, int)':
a.cc:45:1: warning: control reach... |
s336068045 | p03949 | C++ |
#include <cstdio>
#include <iostream>
#include <cassert>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
using namespace std;
int nNode;
int vs[100000+10];
int parity[100000+10];
int lbs[100000+10];
int ubs[100000+10];
vector<int> g[100000+1... | a.cc: In function 'void go2(int, int)':
a.cc:53:17: error: 'parent' was not declared in this scope
53 | value = lbs[parent]-1;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:96:8: error: too few arguments to function 'void go2(int, int)'
96 | go2(0);
| ~~~^~~
a.cc:45:6: note... |
s026313145 | p03949 | C++ |
#include<cstdio>
#include<cstring>
#include<vector>
using namespace std;
int N, K;
vector<int> e[100000], v[100000]; /*eは辺のメモ、vは整数min + iが書かれている頂点はどこかのメモ*/
int a[100000],vp[100000],P[100000];/*aは実際に書かれている整数のメモ*/
int min;
int main() {
int i,j,k,v1,v2;
scanf("%d", &N);
for (i = 0; i < N - 1; i++) {
scanf("%d %... | a.cc: In function 'int main()':
a.cc:29:9: error: reference to 'min' is ambiguous
29 | min = 1000000;
| ^~~
In file included from /usr/include/c++/14/vector:62,
from a.cc:4:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare... |
s237887832 | p03949 | C++ | #include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>... | a.cc: In function 'int main()':
a.cc:155:7: error: conflicting declaration 'int f'
155 | int f=1;
| ^
a.cc:137:15: note: previous declaration as 'std::vector<int, std::allocator<int> > f'
137 | vector<int> f(n);
| ^
a.cc:156:53: error: no match for 'operator=' (operand types are ... |
s963440857 | p03949 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb... | a.cc: In member function 'void DIJ::dij()':
a.cc:59:25: error: expected ',' or ';' before 'q'
59 | q.push(pii(-b,a-1));
| ^
a.cc: In member function 'void DIJ::solve()':
a.cc:96:47: error: 'vp' {aka 'class std::vector<std::pair<int, int> >'} has no member named '... |
s871645339 | p03949 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb... | a.cc: In member function 'void DIJ::dij()':
a.cc:57:23: error: 'm' was not declared in this scope; did you mean 'tm'?
57 | rep(i,m){
| ^
a.cc:15:35: note: in definition of macro 'loop'
15 | #define loop(i,a,b) for(int i=a;i<b;i++)
| ... |
s030508752 | p03949 | C++ | 5
1 2
3 1
4 3
3 5
2
2 6
5 7
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5
| ^
|
s703371033 | p03949 | C++ | w#include <bits/stdc++.h>
using namespace std;
bool chmax(int &a, int b) {if (a < b) { a = b; return true; } else return false; }
bool chmin(int &a, int b) {if (a > b) { a = b; return true; } else return false; }
const int MAX = 110000;
int N;
vector<int> tree[MAX];
int K;
int P[MAX];
int lo[MAX], hi[MAX];
int res[M... | 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:9:1: error: 'vector' does not name a type
9 | vector<int> tree[MAX];
| ^~~~~~
a.cc: In function 'bool dfs(int, int)':
a.cc:19:23: error:... |
s548548076 | p03949 | C++ | #include<bits/stdc++.h>
#include<climits>
#define FOR(i,a,b) for(int i = (a);i<=(b);i++)
#define ROF(i,a,b) for(int i = (a);i>=(b);i--)
#define MST(a,x) memset(a,x,sizeof(a))
#define ll long long
#define PB push_back
#define PH push
#define MP make_pair
#define FT first
#define SD second
#define N 100005
#define M 1000... | a.cc: Assembler messages:
a.cc:77: Error: operand type mismatch for `mov'
|
s104647179 | p03949 | C++ | // test
#include<bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define mygc(c) (c)=getchar_unlocked()
#define mypc(c) putchar_unlocked(c)
#define ll long long
#define ull unsigned ll
void reader(int *x){int k,m=0;*x=0;for(;;){mygc(k);if(k=='-'){m=1;break;}if('0... | a.cc: In function 'int main()':
a.cc:111:40: error: expected ';' before '}' token
111 | writerLn(mi[i])
| ^
| ;
112 | }
| ~
|
s514386147 | p03949 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
#include<string>
#include <math.h>
#include<algorithm>
// #incl... | a.cc: In function 'void saikiz(long long int, long long int)':
a.cc:138:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
138 | if(ans[oya]-1>=sita) ans[i]=ans[oya]-1;
| ~~~~~~~~~~^~~~~~
|
s551965340 | p03949 | C++ | #include <iostream>
#include <vector>
using namespace std;
const int INF = 1145141919;
int n;
vector<int> et[100000]; //et[i] = 頂点iから行ける頂点の集合
int num[100000]; //num[i] = 頂点iに書かれている値 (なければINF)
pair<int, int> range[100000]; //range[i] = 頂点i以下で矛盾を無くしたいときに頂点iに書ける値の範囲 (閉区間)
//開始頂点の番号を返す
int input() {
int i;
cin >> ... | a.cc: In function 'int main()':
a.cc:79:9: error: 'assert' was not declared in this scope
79 | assert(0);
| ^~~~~~
a.cc:3:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
2 | #include <vector>
+++ |+#include <cassert>
3 | usin... |
s402328653 | p03949 | C++ | #include <iostream>
#include <list>
#include <queue>
using namespace std;
int N,K;
int num[100001];
int bottom[100001];
int top[100001];
int dis[100001];
list<int> connect[100001];
int s, e;
int a;
queue<int>Q;
int main() {
cin >> N;
for (int i = 0; i < N - 1; i++) {
cin >> s >> e;
connect[s].push_back(e);
co... | a.cc: In function 'int main()':
a.cc:38:42: error: 'INT_MAX' was not declared in this scope
38 | dis[j] = INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits... |
s968514499 | p03949 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
using namespace std;
int INF = 1145141919;
int n;
int parents[10... | a.cc: In function 'int main()':
a.cc:78:46: error: expected ';' before ')' token
78 | flag &= dfs(-1, i, num[i], 0))
| ^
| ;
|
s726374129 | p03949 | C++ | #include <bits/stdc++.h>
#define MAX_N 100000
#define INF 10000000000000ll
#define int (long long)
using namespace std;
using pi = pair<int, int>;
vector<int> G[MAX_N];
sined main()
{
int N, K;
bool res = true;
cin >> N;
vector<pi> val(N, pi(0, INF));
vector<bool> used((N - 1) * 2, false);
for (int i = 0, A, B;... | a.cc:4:19: error: wrong number of template arguments (1, should be 2)
4 | #define int (long long)
| ^~~~
a.cc:6:17: note: in expansion of macro 'int'
6 | using pi = pair<int, int>;
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
... |
s836213692 | p03949 | C++ | #include <bits/stdc++.h>
#define MAX_N 100000
#define INF 10000000000000ll
#define int (long long)
using namespace std;
using pi = pair<int, int>;
vector<int> G[MAX_N];
sined main()
{
int N, K;
bool res = true;
cin >> N;
vector<pi> val(N, pi(0, INF));
vector<bool> used((N - 1) * 2, false);
for (int i = 0, A, B;... | a.cc:4:19: error: wrong number of template arguments (1, should be 2)
4 | #define int (long long)
| ^~~~
a.cc:6:17: note: in expansion of macro 'int'
6 | using pi = pair<int, int>;
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
... |
s883315375 | p03949 | C++ | /*
By Snickeen
*/
#include<bits/stdc++.h>
//#pragma comment(linker, "/STACK:102400000,102400000")
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <limits.h>
#include <math.h>
#include <algorithm>
#include <deque>
#include <q... | a.cc: In function 'int main()':
a.cc:108:17: error: 'd' was not declared in this scope
108 | d[u]++;d[v]++;
| ^
a.cc: In function 'LL bfs()':
a.cc:97:1: warning: control reaches end of non-void function [-Wreturn-type]
97 | }
| ^
|
s027554480 | p03949 | C++ | #include<bits/stdc++.h>
#define INF (1e9)
#define N 100005
using namespace std;
typedef pair<int,int> P;
int n,a,b,k,v,p,ans[N];
vector<int> e[N];
P minmax[N];
bool flag=true;
P rmerge(P A,P B){
return P(max(A.first,B.first),min(A.second,B.second));
}
P dfs(int x,int px){
P res=minmax[x];
for(int i=0;i<(int)e[x... | a.cc: In function 'P dfs(int, int)':
a.cc:16:9: error: reference to 'minmax' is ambiguous
16 | P res=minmax[x];
| ^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/... |
s531067381 | p03950 | C++ | #include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
x = 0;
bool flag = 0;
char ch = getchar();
while (!isdigit(ch)) {
if (ch == '-') {
flag = 1;
}
ch = getchar();
}
while (isdigit(ch)) {
x = x * 10 + ch - 48;
ch = getchar();
}
if (flag) {
x = -x;
}
}
... | a.cc:69:4: error: expected unqualified-id before '/' token
69 | }/
| ^
|
s224109274 | p03950 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
#define fr first
#define sc second
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)
#define mp1(a,b,c) P1(a,P(b,c))
int RET=0;
vector<P1> f(const vector<P> &vec,int W,int H){
//sort(vec.begin(),vec.end());
ve... | a.cc: In function 'int main()':
a.cc:126:30: error: 'H' was not declared in this scope
126 | chmax(RET,2*(H+vec[i+1].fr-vec[i].fr));
| ^
a.cc:9:28: note: in definition of macro 'chmax'
9 | #define chmax(a,b) a=max(a,b)
| ^
a.cc:13... |
s365086765 | p03950 | C++ | #include<bits/stdc++.h>
#define mo 1000000007
#define pi 3.1415926535898
#define eps 1e-9
using namespace std;
long long read(){
long long xx=0,flagg=1;
char ch=getchar();
while((ch<'0'||ch>'9')&&ch!='-')
ch=getchar();
if(ch=='-'){
flagg=-1;
ch=getchar();
}
while(ch>='0'... | a.cc: In function 'void solve(int, int)':
a.cc:77:35: error: expected ';' before ')' token
77 | for(k=0;k<=5&&head+k<=tail)
| ^
| ;
|
s735985091 | p03950 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define lson u << 1, l, mid
#define rson u << 1 | 1, mid + 1, r
using namespace std;
inline char nc() {
// return getchar();
static char buf[100000], *l = buf, *r = buf;
return l==r&&(r=(l=buf)+fread(buf,1,10000... | a.cc: In function 'int solve()':
a.cc:109:62: error: expected ';' before 'for'
109 | p[1] = unique(h[1] + 1, h[1] + p[1] + 1) - h[1] - 1;1
| ^
| ;
110 | for(int i = 1... |
s363263381 | p03950 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_MODE
#define DBG(n) n;
#else
#define DBG(n) ;
#endif
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << end... | a.cc: In function 'll seica(std::vector<std::pair<std::pair<long long int, long long int>, long long int> >, std::vector<std::pair<std::pair<long long int, long long int>, long long int> >, ll, ll, ll, ll)':
a.cc:87:20: error: 'v' was not declared in this scope
87 | if(v[i].FI.FI < (L + R) / 2)vv1.PB... |
s579766202 | p03950 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#inclu... | a.cc: In function 'bool dfs(int, int)':
a.cc:33:43: error: expected ']' before ')' token
33 | if(abs(tag[-tag[a[now][i]])!=1){
| ^
| ]
|
s791695410 | p03950 | C++ | #include <bits/stdc++.h>
using namespace std;
#define maxn 1500000
#define int long long
#define INF 199999999
int W, H, n, top, top2, S[maxn], S2[maxn];
int ans, mark[maxn], mx[maxn];
int read()
{
int x = 0, k = 1;
char c; c = getchar();
while(c < '0' || c > '9') { if(c == '-') k = -1; c = getchar(); }
while(c >=... | cc1plus: error: '::main' must return 'int'
|
s999372486 | p03950 | C++ | clude<cstdio>
#include<algorithm>
#include<cstring>
#define LL long long
#define lc(x) x<<1
#define rc(x) x<<1|1
using namespace std;
const int N=3e5+5;
int w,h,n,ans,L,R;
int mx[N*4],tag[N*4];
struct node{int x,y;node(int _x=0,int _y=0):x(_x),y(_y){};}p[N],a[N],b[N];
int read()
{
int x=0,f=1;char c=getchar();
... | a.cc:1:1: error: 'clude' does not name a type
1 | clude<cstdio>
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::... |
s162355353 | p03950 | C++ | #include<set>
#include<map>
#include<deque>
#include<queue>
#include<stack>
#include<cmath>
#include<ctime>
#include<bitset>
#include<string>
#include<vector>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<complex>
#include<iostream>
#include<algorithm>
#define ll long long
using namesp... | a.cc: In function 'int main()':
a.cc:140:13: error: redeclaration of 'int pos'
140 | int pos=1;
| ^~~
a.cc:104:13: note: 'int pos' previously declared here
104 | int pos=1;
| ^~~
|
s263122858 | p03950 | C++ | #include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#define N 300010
using namespace std;
int W, H, n;
int x[N], y[N];
/*
struct node {
int mx;
}tr[N << 2];
void update(int x) {
tr[x].mx = max(tr[x << 1].mx, tr[x << 1 | 1].mx);
}
void build(int a, int b, int x) {
tr[x].m... | a.cc: In function 'void solve()':
a.cc:75:54: error: reference to 'data' is ambiguous
75 | if (p <= top[b ^ 1]) data[s[b][top[b]]] = abs(x[r[s[b][top[b]]]] - x[r[p]]) - y[r[s[b][top[b]]]];
| ^~~~
In file included from /usr/inc... |
s334397178 | p03950 | C++ | #include<bits/stdc++.h>
#define N 111111
#define M 222222
using namespace std;
int A,B,n,x,y,t,i,j,now,an,maxT;
struct P{int x,y;}p[N];
multiset<int>S,T;
multiset<int>::iterator it,il,ir;
bool cmp(P a,P b){return a.x<b.x;}
void add(int x){
//printf("ADD %d\n",x);
ir=S.upper_bound(x);
il=--S.upper_bound(x);
//printf... | a.cc: In function 'int main()':
a.cc:61:27: error: 'fdsafdasf' was not declared in this scope
61 | printf("%d",an*2);fdsafdasf
| ^~~~~~~~~
|
s921250285 | p03950 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int MM = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 2e6 + 10;
int n, m;
int W, H;
struct Pt{
ll x, y;
} a[MAXN];
ll ans;
void read(){
scanf("%d%d%d", &W, &H, &n);
for(int i = 1; i <= n; i++){
scanf(... | a.cc: In function 'll work()':
a.cc:39:56: error: expected ';' before 'for'
39 | ans = max(ans, (a[i+1].x-a[i].x)*2+H*2)
| ^
| ;
40 | for(int i = 1; i <= n; i++){
... |
s438259414 | p03950 | C++ | compile error
#include <bits/stdc++.h>
using namespace std;
int h;
int w;
int n;
map<int, vector<int> > mp;
deque<pair<int,int> > las[300002];
vector<int> ids[300002];
vector<int> v[300002];
int ord;
void solve(){
int idx = 0;
ord = 0;
for (int i = 0; i < 300002; i++){
las[i].clear();
}
for (auto it = ... | a.cc:1:1: error: 'compile' does not name a type
1 | compile error
| ^~~~~~~
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:
/usr/... |
s783265177 | p03951 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:106:7: error: expected initializer before 'a'
106 | a = split(s,n-i,'l');
| ^
a.cc:107:7: error: 'b' was not declared in this scope
107 | b = split(t,i,'f');
| ^
a.cc: In function 'std::string split(std::string, ll, char)':
a.cc:97:2: warning:... |
s294103981 | p03951 | C++ | #include <iostream>
#include<vector>
using namespace std;
int main(void){
int n;
cin >> n;
string s,t;
cin >> s;
cin >> t;
int res = 0;
for(int i = 0;i <= n;i++){
if(s.substr(i,n - i) == t.substr(0,i))res =i;
}
cout << 2 * n - i << endl;
}
| a.cc: In function 'int main()':
a.cc:14:20: error: 'i' was not declared in this scope
14 | cout << 2 * n - i << endl;
| ^
|
s669790206 | p03951 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int n;cin>>n;
string s,t;
cin>>s>>t;
for(int i=0;i<n;i++){
if(s.subsrt(i,n-i)==t.subsrt(0,n-i)){
cout<<i+n<<endl;
return 0;
}
}
cout<<2*n<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:10: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'subsrt'; did you mean 'substr'?
10 | if(s.subsrt(i,n-i)==t.subsrt(0,n-i)){
| ^~~~~~
| substr
a.cc:10:27: error: 'std::string' {aka 'class std::__cxx11... |
s477470750 | p03951 | C | #include<bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define pb push_back
using namespace std;
using ll = long long;
using vi = vector<ll>;
using pi = pair<ll, ll>;
const int maxn = 5050, mlg = 17, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
string s, t;
int main() {
cin.ti... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s682836626 | p03951 | C++ | t1 = t.substr(0, i);
| a.cc:1:9: error: 't1' does not name a type
1 | t1 = t.substr(0, i);
| ^~
|
s986289727 | p03951 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int counter1,counter2;
int N;
cin>>N;
counter1=0;
counter2=0;
int answer=0;
int counter=0;
int i=0;
string S,T; cin>>S>>T;
while(counter1<N){
if(S.at(i)==T.at(counter2)){
answer++;
counter2++;
i++;}
else {
counter=max(answer,counter);
answer=0;
counter2=0;
i=0... | a.cc:25:26: error: expected declaration before '}' token
25 | cout<<2*N-counter<<endl;}}
| ^
|
s831967806 | p03951 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int counter1,counter2;
int N;
cin>>N;
counter1=0;
counter2=0;
int answer=0;
int counter=0;
string S,T; cin>>S>>T;
while(counter1<N){
if(S.at(i)==T.at(counter2)){
answer++;
counter2++;}
else {
counter=max(answer,counter);
answer=0;
counter2=0;counter1++;
continue... | a.cc: In function 'int main()':
a.cc:13:9: error: 'i' was not declared in this scope
13 | if(S.at(i)==T.at(counter2)){
| ^
a.cc: At global scope:
a.cc:21:26: error: expected declaration before '}' token
21 | cout<<2*N-counter<<endl;}}
| ^
|
s695133119 | p03951 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N;
string S,T;
cin>>N>>S>>T;
int kasanari=0;
for(int i=0;i<N;i++){
bool flag=true;
for(int j=i;j<N;j++){
if(S.at(j)!=T.at(j-i)){
flag=false;
}
}
if(flag){
count=i;
break;
}
if(i==N-1){
co... | a.cc: In function 'int main()':
a.cc:16:13: error: overloaded function with no contextual type information
16 | count=i;
| ^
a.cc:20:13: error: overloaded function with no contextual type information
20 | count=N;
| ^
a.cc:23:10: error: invalid operands of types 'in... |
s455502261 | p03951 | C++ | #include <iostream>
using namespace std;
int main(){
string s, t;
cin >> s;
cin >> t;
bool exist = false;
string a = " ";
for(int i=0;i<s.size();i++){
if(s[i] == t[0]){
for(int j = i+1 ;j<s.size();j++){
if(s[j] != t[j-i]){
break;
}
exist = ... | a.cc: In function 'int main()':
a.cc:46:4: error: expected '}' at end of input
46 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s012618298 | p03951 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
string s,t;
cin >> s >> t;
for(int i=0;i<=n;i++){
if(s.substr(i,s.size())==t.substr(0,t.size()-i){
cout << n+i;
return 0;
}
}
}
| a.cc: In function 'int main()':
a.cc:9:52: error: expected ')' before '{' token
9 | if(s.substr(i,s.size())==t.substr(0,t.size()-i){
| ~ ^
| )
a.cc:13:3: error: expected primary-expression before '}' ... |
s328092089 | p03951 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
string s,t;
cin >> s >> t;
for(int i=0;i<=n;i++){
if(s.substr(i,s.size())==t.substr(0,t.stze()-i){
cout << n+i;
return 0;
}
}
}
| a.cc: In function 'int main()':
a.cc:9:43: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'stze'; did you mean 'size'?
9 | if(s.substr(i,s.size())==t.substr(0,t.stze()-i){
| ^~~~
| ... |
s654340740 | p03951 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
string s,t;
cin >> s >> t;
for(int i=0;i<=n;i++){
if(s.substr(i,s.size())==t.substr(0,t.stze-i){
cout << n+i;
return 0;
}
}
} | a.cc: In function 'int main()':
a.cc:9:43: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'stze'; did you mean 'size'?
9 | if(s.substr(i,s.size())==t.substr(0,t.stze-i){
| ^~~~
| ... |
s720123537 | p03951 | C++ | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
const int mod= 1e+9+7;
int main(){
int n; cin>>n;
string s,t; cin>>s>>t;
int ans=... | a.cc: In function 'int main()':
a.cc:17:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sunstr'; did you mean 'substr'?
17 | if(s.sunstr(i,n-i)==t.substr(0,n-i)){
| ^~~~~~
| substr
|
s050528192 | p03951 | C++ | #include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(... | a.cc: In function 'int main()':
a.cc:56:23: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
56 | cout << x + n << end;
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
from ... |
s724282728 | p03951 | C++ | const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define ALL(v) (v.begin(),v.end())
#define COUT(x) cout<<(x)<<'\n'
int main(){
int n;
cin >> n;
string s,t;
cin ... | a.cc:3:7: error: 'll' does not name a type
3 | const ll LINF = 1e18;
| ^~
a.cc: In function 'int main()':
a.cc:13:5: error: 'cin' was not declared in this scope
13 | cin >> n;
| ^~~
a.cc:14:5: error: 'string' was not declared in this scope
14 | string s,t;
| ^~~~~~
a.cc... |
s715326205 | p03951 | C++ | N = int(input())
s = input()
t = input()
if s == t:
print(N)
exit(0)
tr = t[::-1]
match = 0
for i in reversed(range(0, N)):
if s[i] == tr[i]:
match += 1
else:
break
print(N*2-match)
| a.cc:1:1: error: 'N' does not name a type
1 | N = int(input())
| ^
|
s853501503 | p03951 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <queue>
#include <stack>
#include <bitset>
#include <set>
#include <chrono>
#include <string>
using namespace std;
#define endl '\n'
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
... | a.cc: In function 'int main()':
a.cc:44:5: error: 'assert' was not declared in this scope
44 | assert(false);
| ^~~~~~
a.cc:11:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
10 | #include <chrono>
+++ |+#include <cassert>
11 | #includ... |
s805047133 | p03951 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
string s,t;
cin >> s >> t;
int count=0;
for(int i=1;i<=n;i++){
if(s.substr(n-i,i)==t.substr(0.i)) count=i;
}
cout << n+n-count << endl;
} | a.cc: In function 'int main()':
a.cc:11:38: error: cannot convert 'std::complex<double>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
11 | if(s.substr(n-i,i)==t.substr(0.i)) count=i;
| ^~~
| |
... |
s488176300 | p03951 | C++ | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
using namespace std;
typedef long long int ll;
typedef long double ld;
template<class T> inline b... | a.cc: In function 'int main()':
a.cc:85:36: error: expected ';' before 'return'
85 | cout << ans << endl
| ^
| ;
86 | return 0;
| ~~~~~~
|
s293842842 | p03951 | C++ | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
using namespace std;
typedef long long int ll;
typedef long double ld;
template<class T> inline b... | a.cc: In function 'int main()':
a.cc:84:42: error: expected ';' before '{' token
84 | if(j==n-1)cout << ans << endl{
| ^
| ;
|
s050383243 | p03951 | C++ | // 006 AGC A - Prefix and Suffix 2016/10/29
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
typedef long long int int64;
typedef unsigned long long uint64;
int main(int argc , char* argv[]){
int n; cin >> n;
string s , t;
cin >> s >> t;
rep... | a.cc: In function 'int main(int, char**)':
a.cc:18:30: error: expected primary-expression before '=' token
18 | if (s1==t1 && s!==t) { cout << 2*n - i << endl; return 0;}
| ^
|
s214826352 | p03951 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;
int main() {
int n, s;
string s, t;
cin >> n >> s >> t;
rep(i, n){
bool b = 1;
rep(j, n-i){
if(s[j] != t[i+j]){
b = 0;
break;
}
}
if(b){
s = n + i;
... | a.cc: In function 'int main()':
a.cc:8:10: error: conflicting declaration 'std::string s'
8 | string s, t;
| ^
a.cc:7:10: note: previous declaration as 'int s'
7 | int n, s;
| ^
a.cc:13:11: error: invalid types 'int[int]' for array subscript
13 | if(s[j] != t[i+j]){
... |
s277787148 | p03951 | C++ | # coding:utf-8
N = int(input())
S = input()
T = input()
ans = 0
for n in range(1,N+1):
#print (S[-n:],T[:n])
if (S[-n:]==T[:n]):
ans = n
print (2*N-ans) | a.cc:1:3: error: invalid preprocessing directive #coding
1 | # coding:utf-8
| ^~~~~~
a.cc:7:6: error: invalid preprocessing directive #print
7 | #print (S[-n:],T[:n])
| ^~~~~
a.cc:2:1: error: 'N' does not name a type
2 | N = int(input())
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.