submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s393443599
p03857
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
a.cc: In function 'int main()': a.cc:76:5: error: 'iota' was not declared in this scope 76 | iota(uf1, uf1+n, 0); | ^~~~
s266298575
p03857
C++
def inp() a=gets.chomp.split(" ").map(&:to_i)end def inpf() a=gets.chomp.split(" ").map(&:to_f)end def inps() a=gets.chomp.split(" ")end def copy(a) Marshal.load(Marshal.dump(a)) end def kaizyo(n)(n < 2)? 1 : (2..n).inject(:*) end def scount(a) b = na(a.max+1); a.each{|n|b[n]+=1};return b end def na(n=0,d=0) Array.n...
a.cc:5:28: error: too many decimal points in number 5 | def kaizyo(n)(n < 2)? 1 : (2..n).inject(:*) end | ^~~~ a.cc:48:2: error: too many decimal points in number 48 | (1..n).each do |i| | ^~~~ a.cc:52:2: error: too many decimal points in number 52 | (1..n-1).each do |i...
s733991907
p03857
C++
#include<cstdio> #include<map> using namespace std; typedef pair<int,int> pp; class UF { public: int par[300000]={}; UF(int n) { for(int i=0; i<n; i++) par[i] = i; } int find(int x) { if(par[x] == x) return x; return par[x] = find(par[x]); } void unite(i...
a.cc: In function 'int main()': a.cc:43:15: error: expected primary-expression before '(' token 43 | res[pp(road.find(i),rail.find(i)]++; | ^ a.cc:43:41: error: expected ')' before ']' token 43 | res[pp(road.find(i),rail.find(i)]++; | ~ ...
s646438744
p03857
C++
#include<cstdio> #include<map> using namespace std; typedef pair<int,int> pp; class UF { public: int par[300000]={}; UF(int n) { for(int i=0; i<n; i++) par[i] = i; } int find(int x) { if(par[x] == x) return x; return par[x] = find(par[x]); } void unite(i...
a.cc: In function 'int main()': a.cc:41:11: error: wrong number of template arguments (1, should be at least 2) 41 | map<pp> res; | ^ In file included from /usr/include/c++/14/map:63, from a.cc:2: /usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key,...
s486255225
p03857
C++
#include<cstdio> #include<map> using namespace std; typedef pair<int,int> pp; class UF { public: int par[300000]={}; UF(int n) { for(int i=0; i<n; i++) par[i] = i; } int find(int x) { if(par[x] == x) return x; return par[x] = find(par[x]); } void unite(i...
a.cc: In function 'int main()': a.cc:41:12: error: expected initializer before '<' token 41 | map res<pp>; | ^ a.cc:43:9: error: 'res' was not declared in this scope 43 | res[pp(road.find(i),rail.find(i)]++; | ^~~ a.cc:43:15: error: expected primary-expression before '('...
s320372771
p03857
C++
#include <iostream> #include <vector> #include <map> using namespace std; int N,K,L; int a[200001],b[200001],rank_a[200001],rank_b[200001]; typedef pair<int ,int > P; void init(int x){ for(int i=0;i<x;i++){ a[i]=i;b[i]=i; rank_a[i]=0;rank_b[i]=0; } } int find(int x,int *par){ if(par[x]==x)return x; els...
a.cc: In function 'int main()': a.cc:51:32: error: no matching function for call to 'find(int&)' 51 | for(int i=0;i<N;i++) m[P(find(a[i]),find(b[i]))]++; | ~~~~^~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/b...
s025786919
p03857
C++
#include <stdio.h> #include <vector> class Union_Find { std::vector<int>per; std::vector<int>rank; public: void init(int size) { for (int i = 0; i < size; ++i) { per.push_back(i); rank.push_back(0); } } int get_per(int x) { if (x == per[x]) { return x; } return per[x] = get_per(per[x]); } bool...
a.cc: In member function 'void Union_Find::togett(int, int)': a.cc:28:41: error: expected unqualified-id before 'int' 28 | int x_per = get_per(x), int y_per = get_per(y); | ^~~ a.cc:29:30: error: 'y_per' was not declared in this scope; did you mean 'x_per...
s614144904
p03857
C++
struct UF { vector<int> data; UF(int n) { data.resize(n, -1); } int root(int i) { return data[i] < 0 ? i : data[i] = root(data[i]); } int size(int i) { i = root(i); return -data[i]; } void unite(int x, int y) { x = root(x), y = root(y); if ...
a.cc:2:5: error: 'vector' does not name a type 2 | vector<int> data; | ^~~~~~ a.cc: In constructor 'UF::UF(int)': a.cc:4:9: error: 'data' was not declared in this scope 4 | data.resize(n, -1); | ^~~~ a.cc: In member function 'int UF::root(int)': a.cc:7:16: error: 'data' was n...
s720985197
p03857
C
#include <stdio.h> #include <stdlib.h> #define EMPTY 0 #define NOTEMPTY 1 typedef struct node{ int n; struct node *next; }node; char *graph; int empty(node *q); int dequeue(node *q); void enqueue(node *q, int n); void check_connect(char *g, int *r, const int n, const int t); int main(void){ int n, k, l; int...
main.c: In function 'main': main.c:28:25: error: subscripted value is neither array nor pointer nor vector 28 | graph[p][q] = 1; | ^ main.c:33:25: error: subscripted value is neither array nor pointer nor vector 33 | graph[p][q] += 2; | ...
s213160157
p03857
C++
#include<cstdio> #include<map> #include<cstring> #define mp make_pair #define Maxn 200010 using namespace std; typedef pair<int,int> pii; int N,K,L; map<pii,int> sz; int par[Maxn*2],rank[Maxn*2]; int num[Maxn]; void init(int n) { for(int i=1;i<=2*n;i++) { par[i] = i; rank[i] = 0; } memset(num,0,sizeof num); } ...
a.cc: In function 'void init(int)': a.cc:17:17: error: reference to 'rank' is ambiguous 17 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++...
s245654727
p03857
C++
//#include "IntMod.h" //typedef IntMod<1000000007> MInt; #include <cstdio> #include <iostream> #include <string> #include <vector> #include <utility> #include <algorithm> #include <functional> #include <cmath> #include <stack> #include <queue> #include <set> #include <map> #include <iomanip> using namespace std; #d...
a.cc: In function 'int main()': a.cc:127:48: error: 'i' was not declared in this scope 127 | volatile int a = M.count(PP(Ur.Root_of(i), Ut.Root_of(i))); | ^
s967377272
p03857
C++
//#include "IntMod.h" //typedef IntMod<1000000007> MInt; #include <cstdio> #include <iostream> #include <string> #include <vector> #include <utility> #include <algorithm> #include <functional> #include <cmath> #include <stack> #include <queue> #include <set> #include <map> #include <iomanip> using namespace std; #def...
a.cc:48:10: fatal error: Union_Find.h: No such file or directory 48 | #include "Union_Find.h" | ^~~~~~~~~~~~~~ compilation terminated.
s723907006
p03857
C++
#include <stdio.h> typedef struct Item { struct Item *next; int to; } Item; #define MAX_NODE (200000) Item *train[MAX_NODE] = {0}, *road[MAX_NODE] = {0}; int parent[MAX_NODE], sizes[MAX_NODE] = {0}; int setted[MAX_NODE] = {0}, resetted[MAX_NODE] = {0}; int ans[MAX_NODE] = {0}; void add(Item* list[], int from, int t...
a.cc: In function 'void add(Item**, int, int)': a.cc:14:26: error: 'malloc' was not declared in this scope 14 | Item *p = (Item*)malloc(sizeof(Item)); | ^~~~~~ a.cc:2:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>' ...
s384910693
p03857
C++
#include <bits/stdc++.h> using namespace std; // why am I so weak int n, k, l; int par[2][200055]; typedef pair<int, int> P; map<p, int> c; int fin(int i, int j) { if (par[i][j] == j) return j; return par[i][j] = fin(i, par[i][j]); } int main() { scanf("%d %d %d", &n, &k, &l); for (int i = 0; i < n; i++) { ...
a.cc:11:5: error: 'p' was not declared in this scope 11 | map<p, int> c; | ^ a.cc:11:11: error: template argument 1 is invalid 11 | map<p, int> c; | ^ a.cc:11:11: error: template argument 3 is invalid a.cc:11:11: error: template argument 4 is invalid a.cc: In function 'int main()': a.cc:...
s421471721
p03857
C++
copy #include<bits/stdc++.h> #define pi pair<int,int> #define mp make_pair //#define int long long #define endl '\n' using namespace std; int n,k,l; int idrd[(int)2.1e5],idral[(int)2.1e5]; void initialize() { for(int i = 1;i <= n;++i) idrd[i] = i,idral[i]=i; } int rootroad(int x) { while(idrd[x]...
a.cc:1:1: error: 'copy' does not name a type 1 | copy | ^~~~ 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/include/c++/14/...
s144444449
p03857
C++
int main() { int N, K, L; cin >> N >> K >> L; /* vector<int> pre_road(N + 1); vector<int> pre_railway(N + 1); for (int i = 1; i <= N; i++) { pre_road[i] = i; pre_railway[i] = i; }*/ unordered_map<int, unordered_set<int>> roads; unordered_map<int, unordered_set<int>> railways; for (int i = 0; i < K; i++) {...
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope 4 | cin >> N >> K >> L; | ^~~ a.cc:12:9: error: 'unordered_map' was not declared in this scope 12 | unordered_map<int, unordered_set<int>> roads; | ^~~~~~~~~~~~~ a.cc:12:23: error: e...
s568085922
p03857
C++
#include<bits/stdc++.h> using namespace std; struct Union{ vector<int> r,p; Union(int size){init(size);} void init(int size){ r.resize(size); p.resize(size); for(int i=0;i<size;i++) r[i]=1,p[i]=i; } int find(int x){ if(x!=p[x]) p[x]=find(p[x]); return p[x]; } bool same(int x,int y){ ...
a.cc: In function 'int main()': a.cc:42:8: error: wrong number of template arguments (1, should be at least 2) 42 | map<P> mp; | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/include/...
s754931436
p03857
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <iostream> #include <sstream> #include <string> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; //repetition #define FOR(i,a,b) for(int i=(a);...
a.cc: In function 'int main(int, char**)': a.cc:134:13: error: 'ans' was not declared in this scope; did you mean 'ans2'? 134 | ans[i]++; | ^~~ | ans2
s130487921
p03857
C++
#include <iostream> #include <string> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <complex> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <bitset> #include <ctime> #include <map> #include <uno...
a.cc:129:5: error: conflicting declaration 'int cnt [200005]' 129 | int cnt[MAX]; | ^~~ a.cc:128:4: note: previous declaration as 'VI cnt' 128 | VI cnt; | ^~~
s204049291
p03857
C++
// D_Connectivity.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<unordered_map> #include<unordered_set> #include<iostream> using namespace std; void BuildCon(unordered_map<int, unordered_set<int>>& paths, int n) { for (int k = 1; k <= n; k++) for (int i = 1; i <= n; i++) for (int j = 1; j <= n && j != i; ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s679133732
p03857
C++
#include <bits/stdc++.h> using namespace std; class UF { public: int par[200000]; int r[200000]; UF (int N) { for (int i = 0; i < N; i++) { par[i] = i; } } int find(int x) { if (x == par[x]) return x; return par[x] = find(par[x]); } void add(in...
a.cc: In function 'int main()': a.cc:85:29: error: no matching function for call to 'std::map<int, int>::map(int&)' 85 | map<int,int> count(N); | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,...
s088916612
p03857
C++
#include <iostream> #include <utility> #include <algorithm> using namespace std; #define PrintLn(X) cout << X << endl #define Rep(i, n) for(int i = 0; i < (int)(n); ++i) #define For(i, a, b) for(int i = a; i < (int)(b); ++i) int ans[200000] = {0}; int k[200000]; int l[200000]; int num[200000] = {0}; pair<int, int> pq...
a.cc: In function 'int main()': a.cc:83:25: error: 'memset' was not declared in this scope 83 | memset(num, 0, N * sizeof(int)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #i...
s283837480
p03857
C++
#include<iostream> using namespace std; const int _K=20000+5; class UnionFind{ int par[_K]; int siz[_K]; public: void init(int n){ for(int i=0; i<n; i++) par[i]=i; for(int i=0; i<n; i++) siz[i]=1; } int find(int x){ if(par[x]==x){ return x; }else{ return par[x]=find(par[x]); } } bool same(i...
a.cc: In function 'int main()': a.cc:55:9: error: 'Union' was not declared in this scope; did you mean 'union'? 55 | Union Find ubar; | ^~~~~ | union a.cc:56:9: error: 'ubar' was not declared in this scope 56 | ubar.init(N); | ^~~~
s338236586
p03857
Java
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.*; /* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ ...
Main.java:30: error: class MainD is public, should be declared in a file named MainD.java public class MainD { ^ 1 error
s656157080
p03857
C++
#include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<stack> #include<queue> #include<vector> #include<map> #include<set> #include<algorithm> #define FOR1(n) for(int i=0;i<n;i++) #define FOR2(j, n) for(int j=0;j<n;j++) #define FOR3(i, m, n) for(int i=m;i<=n;i++) #define ALL(c)...
a.cc: In function 'int main()': a.cc:104:36: error: expected ']' before ')' token 104 | printf("%d", mp[par[1][n-1]); | ^ | ]
s880054304
p03857
C++
#include<bits/stdc++.h> using namespace std; template<typename T> class UF { public: UF() { size = 0; } //値を挿入する void push( T a ) { M[a] = size; V.push_back( size ); rank.push_back( 0 ); C.push_back( 1 ); size++; } //同じグループにする void unite( T a, T b ) { long long int x = find( M[a] ); long lon...
a.cc: In function 'int main()': a.cc:81:30: error: expected ';' before '}' token 81 | uf2.push( i ) | ^ | ; 82 | } | ~
s001532859
p03858
C++
#include <cassert> #include <unordered_map> #include <queue> #include <set> #include <vector> using namespace std; int L1(int a, int b, int c, int d) { return abs(a - c) + abs(b - d); } int main() { int N, a, b; cin >> N >> a >> b; int x[N], y[N]; struct Point { int x, y; int idx; ...
a.cc: In function 'int L1(int, int, int, int)': a.cc:9:12: error: 'abs' was not declared in this scope 9 | return abs(a - c) + abs(b - d); | ^~~ a.cc: In function 'int main()': a.cc:13:18: error: 'cin' was not declared in this scope 13 | int N, a, b; cin >> N >> a >> b; | ...
s578968387
p03858
C++
8 1 2 1 5 4 3 8 2 4 7 8 8 3 3 6 6 4 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 8 1 2 | ^
s065833708
p03858
C++
#include <cstdio> #include <vector> #include <algorithm> #include <map> #include <set> #include <queue> #define LL long long const int maxn = 1e5 + 5; using namespace std; inline int read(){ int x = 0; char ch = getchar(); while (!isdigit(ch)) ch = getchar(); while (isdigit(ch)) x = (x * 10) + (ch & 15), ch = getcha...
a.cc: In function 'int read()': a.cc:12:17: error: 'isdigit' was not declared in this scope 12 | while (!isdigit(ch)) ch = getchar(); | ^~~~~~~ a.cc:13:16: error: 'isdigit' was not declared in this scope 13 | while (isdigit(ch)) x = (x * 10) + (ch & 15), ch = getchar(); ...
s649187122
p03858
C++
#include<bits/stdc++.h> #define maxn 100005 #define pii pair<int,int> #define ll long long using namespace std; struct point { int x,y; }arr[maxn]; struct node { int pos,num; bool operator < (const node& a) const{ return pos != a.pos ? pos < a.pos : num < a.num; } }; bool vis[maxn]; int main() { ios::sync_with_s...
a.cc: In function 'int main()': a.cc:73:84: error: narrowing conversion of '-1.0e+9' from 'double' to 'int' [-Wnarrowing] 73 | auto L = ptrs[min(t+1,1)][type].lower_bound(node{l,-1e9}); | ^~~~ a.c...
s900493032
p03858
C++
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <s...
a.cc: In function 'int main()': a.cc:101:9: error: lvalue required as left operand of assignment 101 | &p = mpx2[sx]; | ^~
s029974803
p03858
C++
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <s...
a.cc: In function 'int main()': a.cc:101:22: error: redeclaration of 'std::vector<long long int>& p' 101 | vector<int> &p = mpx2[sx]; | ^ a.cc:81:22: note: 'std::vector<long long int>& p' previously declared here 81 | vector<int> &p = mpx2[sx]; | ...
s584079285
p03858
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN=1e5+10; struct edge{int nxt,to;}e[MAXN*8];//一定要开8倍空间 struct data{int x,y,id;}dat[MAXN]; int n,d,a,b,x,y,head[MAXN],vis[MAXN],cnt[MAXN],tot=0; ll res=0; void add_edge(int from,int to) {    e[++tot].nxt=head[from];e[tot].to=to;head[fro...
a.cc:5:34: error: extended character   is not valid in an identifier 5 | void add_edge(int from,int to) {    e[++tot].nxt=head[from];e[tot].to=to;head[from]=tot;    e[++tot].nxt=head[to];e[tot].to=from;head[to]=tot; } | ^ a.cc:5:36: error: extended character   is not valid in ...
s196725759
p03858
C++
#include <iostream> #include <string> #include <vector> #include <set> #include <algorithm> #include <cctype> #include <cmath> #include <queue> #include <map> #include <numeric> #include <unordered_map> #include <iomanip> #include <functional> #include <bitset> #include <complex> #define rep(i, n) for(ll i = 0; i < (l...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s754211613
p03858
C++
#include<cstdio> #include<cstring> #include<cctype> #include<vector> #include<set> #include<algorithm> #define maxn 100005 #define LL long long using namespace std; vector<LL>W[maxn],H[maxn]; LL n,x[maxn],y[maxn],sa[maxn],sb[maxn],Q[maxn],L,R; LL ans=0; bool usd[maxn]; struct node { LL num,id; node(LL a=0,LL ...
a.cc: In function 'int main()': a.cc:101:14: error: 'class std::set<node>' has no member named 'Insert'; did you mean 'insert'? 101 | w[i].Insert(10000000000ll); | ^~~~~~ | insert a.cc:102:14: error: 'class std::set<node>' has no member named 'Insert'; did you mean 'inser...
s955746473
p03858
C++
#include "bits/stdc++.h" #define ll long long #define rep2(i,a,b) for(int i=a;i<=b;++i) #define rep(i,n) for(int i=0;i<n;i++) #define pii pair<int,int> #define ti3 tuple<int,int,int> ll int MOD=998244353; int INF=1e6; using namespace std; string alphabet("abcdefghijklmnopqrstuvwxyz"); main(){ int n,a,b; c...
a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 14 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:45:17: error: expected primary-expression before 'else' 45 | else {flag[sum[i].second]=1; q.push(sum[i].second);} | ^~~~ a.cc:...
s820747958
p03858
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef pair<ll,ll> P; const double EPS = 1e-10; const ll INF = 100000000; const ll MOD = 1000000007; ll n; ll ans; ll x[100000], y[100000]; ll dx[4] = {1, 1, -1, -1}, dy[4] = {1, -1, 1, -1}; int a, b; ll d...
a.cc:23:11: error: conflicting declaration 'std::vector<std::pair<long long int, long long int> > mx [10000]' 23 | vector<P> mx[10000]; | ^~ a.cc:18:20: note: previous declaration as 'std::map<long long int, std::vector<std::pair<long long int, long long int> > > mx' 18 | map<ll, vector<P>> mx; ...
s997685498
p03858
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<set> #include<complex> #define lol(i,n) for(int i=0;i<n;i++) #define mod 1000000007 #define inf 1000000007000000007 typedef long long ll; using namespace std; typedef pair<ll,ll> P; set<P> datx,daty,setx,sety; set<P>::iterator ita,itb; qu...
a.cc: In function 'void BFS(ll, ll)': a.cc:23:17: error: no match for 'operator-' (operand types are 'std::set<std::pair<long long int, long long int> >::iterator' {aka 'std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int, long long int>, std::_Identity<std::pair<long long int, long long int>...
s912476697
p03858
C++
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <li...
a.cc: In function 'int main()': a.cc:67:30: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>') 67 | x = y = vector<int>(n); | ^ In file included from /usr/include/c++/14/vector:72, from /usr/include/c++/1...
s717439667
p03858
C++
#include "IntMod.h" typedef IntMod<1000000007> MInt; //#include "Union_Find.h" #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <vector> #include <utility> #include <algorithm> #include <functional> #include <cmath> #include <stack> #include <queue> #include <set>...
a.cc:1:10: fatal error: IntMod.h: No such file or directory 1 | #include "IntMod.h" | ^~~~~~~~~~ compilation terminated.
s149508734
p03858
C++
#include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <cmath> #include <queue> #include <set> using namespace std;//(|xa-xb|==d&&|ya-yb|[-d,d])||(|xa-xb|[-d,d]&&|ya-yb|==d) const int N=100001; int n,a,b,mx=0,my=0,ans=0; int head[N],next[2*N],adj[2*N]...
a.cc: In function 'void addedge(int, int)': a.cc:42:5: error: reference to 'next' is ambiguous 42 | next[tot]=head[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/ios_base....
s220085532
p03858
C++
/* %Dalao --InterestingLSY */ /* 代码长度 - - */ #include <iostream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <algorithm> #include <set> #include <map> #define pb push_back #define mp make_pair #define INF 9999999 #define LINF 9999999999999999 #define uint unsigned int #define msn(...
a.cc:119:1: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive] 119 | intmain(){ | ^~~~~~~
s470665860
p03858
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <vector> #include <map> #include <queue> #include <set> #include <cmath> using namespace std; typedef pair<int,int> P; typedef pair<P,P> PP; vector<P> xys; vector<P> yxs; set<P> visited; P rev(P s) { return P(s.second, s.first); } int main(voi...
a.cc: In function 'int main()': a.cc:56:9: error: 'ub' was not declared in this scope; did you mean 'b'? 56 | ub = upper_bound( yxs.begin(), yxs.end(), P( fir.second - dis, fir.first + dis - 1)); | ^~ | b a.cc:56:54: error: 'fir' was not declared in this scope 56 | ub =...
s386614118
p03858
C++
#include <cmath> #include <iostream> #include <vector> class DisjointSet { public: std::vector<unsigned> parent; std::vector<unsigned> rank; DisjointSet(unsigned size) : parent(size), rank(size, 0u) { for (unsigned i = 0; i < size; ++i) { parent[i] = i; } } unsigned find(unsigned index) { ...
a.cc: In function 'int main()': a.cc:77:8: error: 'sort' is not a member of 'std'; did you mean 'sqrt'? 77 | std::sort(hole.begin(), hole.end(), cmp_first); | ^~~~ | sqrt a.cc:87:31: error: no matching function for call to 'lower_bound(std::vector<std::pair<std::pair<int, int>, unsigned i...
s922481077
p03858
C++
#include <iostream> #include <vector> #include <map> using namespace std; typedef long long lli; lli n,a,b; vector<pair<lli,lli> > c; map<pair<lli,lli>,lli> cx; map<pair<lli,lli>,lli> cy; vector<pair<lli,lli> > k; lli d; vector<lli> counter; lli ans = 0; void dfs(lli x){ pair<lli,lli> o = c[x]; cx.erase(o);cy....
a.cc: In function 'int main(int, const char**)': a.cc:48:5: error: 'sort' was not declared in this scope; did you mean 'short'? 48 | sort(k.begin(),k.end()); | ^~~~ | short a.cc:51:94: error: 'upper_bound' was not declared in this scope 51 | counter[t] += lower_bound(k.begin(),k.en...
s170760976
p03858
C++
#include <iostream> #include <map> #include <set> #include <algorithm> #define rep(i, n) for(int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; const int inf = 1e6; int n, a, b; int x[100000]; int y[100000]; int d; int c[100000]; map<int, set<P>> p, q; map<int, vector<int...
a.cc:21:10: error: 'vector' was not declared in this scope 21 | map<int, vector<int>> f, g; | ^~~~~~ a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 4 | #include <algorithm> +++ |+#include <vector> 5 | a.cc:21:20: error: ...
s378486329
p03858
C++
#include <bits/stdc++.h> #define ll long long #define INF 999999999 #define MOD 1000000007 #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; const int MAX_N = 100005; int a[MAX_N]; map<P,int> mx,my; set<P> sx,sy; set<int> ss; int x[MAX_N],y[MAX_N]; void dfs(int v) { ss.insert(v); ...
a.cc: In function 'void dfs(int)': a.cc:26:22: error: 'd' was not declared in this scope 26 | cur = P(x[v]-d,y[v]-d); | ^ a.cc:30:34: error: no match for 'operator||' (operand types are 'std::set<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<in...
s353240259
p03858
C++
import java.util.Scanner; /** * Created by zzt on 17-1-16. */ public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int a = scanner.nextInt(); int b = scanner.nextInt(); int[][] pinholes = new int...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: expected unqualified-id before 'public' 6 | public class Main { | ^~~~~~
s594017089
p03858
C++
#include<algorithm> #include<cmath> #include<iomanip> #include<iostream> #include<map> #include<numeric> #include<queue> #include<set> #include<sstream> #include<vector> using namespace std; using uint = unsigned int; using ll = long long; const int M = 1e9 + 7; const ll MLL = 1e18L + 9; #pragma unused(M) #pragma unuse...
a.cc: In function 'void connect(Node*, int, std::map<int, std::vector<std::pair<int, int> > >&, int, int, std::vector<Node*>&)': a.cc:48:5: error: 'printd' was not declared in this scope; did you mean 'prints'? 48 | printd(yint); | ^~~~~~ | prints a.cc: In function 'int main()': a.cc:93:5: er...
s700155161
p03858
C++
#include<iostream> #include<vector> #include<iomanip> #include<algorithm> #include<numeric> #include<cmath> #include<queue> #include<set> #include<map> #include"basic.hpp" using namespace std; using uint = unsigned int; using ll = long long; const int M = 1e9 + 7; #pragma unused(M) struct Node{ vector<Node*> dests...
a.cc:10:9: fatal error: basic.hpp: No such file or directory 10 | #include"basic.hpp" | ^~~~~~~~~~~ compilation terminated.
s045809313
p03858
C
#include <stdio.h> #include <stdlib.h> #define MAX_HOLE 1000000000 // #define MAX_HOLE 1000 typedef struct xy { int x, y; } XY; static int N = 0; static XY hole[MAX_HOLE] = {0}; static int memo[MAX_HOLE][MAX_HOLE] = {0}; void memo_clear(); int memo_count(); int countup(int now_a, int now_b); int d(int i, int j);...
/tmp/cc66YPU1.o: in function `memo_count': main.c:(.text+0x111): relocation truncated to fit: R_X86_64_PC32 against `.bss' /tmp/cc66YPU1.o: in function `memo_clear': main.c:(.text+0x183): relocation truncated to fit: R_X86_64_PC32 against `.bss' /tmp/cc66YPU1.o: in function `countup': main.c:(.text+0x2b2): relocation t...
s921210745
p03858
C++
#include <iostream> #include <map> #include <set> using namespace std; int N, a, b, d; set<pair<int, int>> s1, s2, s3; int getD(pair<int, int> z1, pair<int, int> z2) { return max(abs(z1.first - z2.first), abs(z1.second - z2.second)); } void dfs(pair<int, int> z) { s3.insert(z); s1.erase(z); s2.erase(...
a.cc: In function 'void dfs(std::pair<int, int>)': a.cc:21:21: error: 'upper_bound' was not declared in this scope 21 | auto itr2 = upper_bound(s1.begin(), s1.end(), | ^~~~~~~~~~~ a.cc:30:21: error: 'upper_bound' was not declared in this scope 30 | auto itr2 = upper_bound...
s801230922
p03858
C++
f
a.cc:1:1: error: 'f' does not name a type 1 | f | ^
s089908282
p03858
C++
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector< int > data; UnionFind(int sz) { data.assign(sz, -1); } void unite(int x, int y) { x = find(x), y = find(y); if(x != y) { if(data[x] > data[y]) swap(x, y); data[x] += data[y]; data[y] = x; } } ...
a.cc: In function 'void ask(int)': a.cc:54:71: error: 'INF' was not declared in this scope 54 | auto p = lower_bound(begin(cc), end(cc), make_pair(b[i] - R - v, +INF)); | ^~~ a.cc:61:71: error: 'INF' was not declared in this scope 61 ...
s684301998
p03858
C++
#include<bits/stdc++.h> #define int long long int #define MP make_pair #define PB push_back #define F first #define S second using namespace std; typedef vector<int> VI; typedef pair<int, int> PII; typedef vector<PII> VP; typedef pair<double, int> PDI; typedef vector<PDI> VD; int n, a, b; int x[100010], y[100010]; VI ...
a.cc: In function 'int main()': a.cc:71:36: error: 'i' was not declared in this scope 71 | int st = lower_bound(xpy[i].begin(), xpy[i].end(), MP(x[now] - y[now] - dist, -INF)) - xpy.begin(); | ^ a.cc:71:90: error: 'INF' was not declared in this scope 71 | ...
s237806144
p03858
C++
#include <bits/stdc++.h> using namespace std; #define FORE(i, a) for (auto i = a.begin(); i != a.end(); ++i) #define REPU(i, a, b) for (int i = (a); i < (b); ++i) #define REPD(i, a, b) for (int i = (a); i > (b); --i) #define MEM(a, x) memset(a, x, sizeof(a)) #define ALL(a) a.begin(), a.end() #define UNIQUE(a) a.erase(...
a.cc: In function 'int main(int, char**)': a.cc:80:28: error: 'std::unordered_map<int, std::set<std::pair<long long int, int> > >::mapped_type' {aka 'class std::set<std::pair<long long int, int> >'} has no member named 'push_back' 80 | mp1[x + y].push_back(P(x - y, i)); | ...
s134517472
p03858
C++
#include<bits/stdc++.h> #define int long long int #define MP make_pair #define PB push_back #define F first #define S second using namespace std; typedef vector<int> VI; typedef pair<int, int> PII; typedef vector<PII> VP; typedef pair<double, int> PDI; typedef vector<PDI> VD; int n, a, b; int x[100010], y[100010]; VI ...
a.cc: In function 'int main()': a.cc:47:5: error: 'xmy' was not declared in this scope; did you mean 'xpy'? 47 | xmy[xmyidx[i]].PB(MP(x[i] + y[i], i)); | ^~~ | xpy a.cc:52:10: error: 'xmy' was not declared in this scope; did you mean 'xpy'? 52 | sort(xmy[i].begin(), xmy[i].end()); ...
s293754652
p03858
C++
#include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y...
a.cc: In function 'int main()': a.cc:48:12: error: call of overloaded 'get(std::pair<int, int>&)' is ambiguous 48 | id1=get(st1); | ~~~^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x...
s214265977
p03859
Java
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.Field; import java.util.ArrayList; import lib.io.ExtendedScanner; import lib.io.Out; import lib.util.IntPair; public class Main { public static vo...
Main.java:9: error: package lib.io does not exist import lib.io.ExtendedScanner; ^ Main.java:10: error: package lib.io does not exist import lib.io.Out; ^ Main.java:11: error: package lib.util does not exist import lib.util.IntPair; ^ Main.java:29: error: cannot find symbol ...
s935892556
p03859
C++
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;++i) #define rep(i,n) for(ll i=0;i<n;i++) #define rep3(i,a,b) for(ll i=a;i>=b;i--) #define pii pair<int,int> #define pll pair<ll,ll> #define pq priority_queue #define pb push_back #define eb emplace_back #define...
a.cc: In function 'int main()': a.cc:171:14: error: 'l' was not declared in this scope 171 | prel=l,prer=r; | ^ a.cc:171:21: error: 'r' was not declared in this scope 171 | prel=l,prer=r; | ^
s018568922
p03859
C++
#include <bits/stdc++.h> #define endl '\n' #define ALL(v) std::begin(v), std::end(v) #define ALLR(v) std::rbegin(v), std::rend(v) using ll = std::int64_t; using ull = std::uint64_t; using pll = std::pair<ll, ll>; using tll = std::tuple<ll, ll, ll>; template <typename T> using vec = std::vector<T>; template <typename T>...
a.cc:208:2: error: #endif without #if 208 | #endif | ^~~~~
s316691197
p03859
C++
#include<bits/stdc++.h> using namespace std; #define f1(a,b,c) for(int c=a;c<=b;c++) #define f2(a,b,c) for(int c=a;c>=b;c--) #define f3(a,b,c) for(int c=a;c;c=b) #define so1(a,n) sort(a+1,a+n+1,mycmp); #define so2(a,n) sort(a+1,a+n+1); #define ll long long #define itn int #define ubt int #define mp make_pair #define p...
/tmp/ccTTn28J.o: in function `init()': a.cc:(.text+0x218): relocation truncated to fit: R_X86_64_PC32 against symbol `To' defined in .bss section in /tmp/ccTTn28J.o a.cc:(.text+0x2f0): relocation truncated to fit: R_X86_64_PC32 against symbol `To' defined in .bss section in /tmp/ccTTn28J.o a.cc:(.text+0x32a): relocatio...
s459904394
p03859
C++
#include<bits/stdc++.h> using namespace std; #define f1(a,b,c) for(int c=a;c<=b;c++) #define f2(a,b,c) for(int c=a;c>=b;c--) #define f3(a,b,c) for(int c=a;c;c=b) #define so1(a,n) sort(a+1,a+n+1,mycmp); #define so2(a,n) sort(a+1,a+n+1); #define ll long long #define itn int #define ubt int #define mp make_pair #define p...
/tmp/ccd2mm1S.o: in function `init()': a.cc:(.text+0x218): relocation truncated to fit: R_X86_64_PC32 against symbol `To' defined in .bss section in /tmp/ccd2mm1S.o a.cc:(.text+0x2f0): relocation truncated to fit: R_X86_64_PC32 against symbol `To' defined in .bss section in /tmp/ccd2mm1S.o a.cc:(.text+0x32a): relocatio...
s274619083
p03859
C++
#include <bits/stdc++.h> #define int long long using namespace std; int n, m; string s; int cnt[3005]; int mx[3005], mn[3005]; int dp[3005][3005]; signed main() { cin>>n>>m>>s; for(int i=1; i<=n; i++) { cnt[i]=cnt[i-1]+(s[i-1]=='1'); mx[i]=cnt[i], mn[i]=cnt[i]; } for(int i=1; i<=m; i++) { int l, r; cin>...
a.cc: In function 'int main()': a.cc:28:53: error: no matching function for call to 'max(int, long long int)' 28 | mn[j]=min(mn[j], mn[l-1]+max(0, lol-(r-j))); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s630819882
p03859
C++
#include <bits/stdc++.h> #define mset(a, b) memset(a, b, sizeof(a)) #define mcpy(a, b) memcpy(a, b, sizeof(a)) #define rg register using namespace std; typedef long long LL; const int MAXN = 2005; const int MOD = 1e9 + 7; template <typename T> inline void read(T &AKNOI) { T x = 0, flag = 1; char ch = getchar(); whi...
a.cc: In function 'int Inc(int&, int)': a.cc:29:1: warning: no return statement in function returning non-void [-Wreturn-type] 29 | } | ^ a.cc: In function 'void init()': a.cc:33:21: error: 's' was not declared in this scope 33 | scanf("%s", s + 1); | ^ a.cc:42:17: error: '...
s399718274
p03859
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #include<map> #include<vector> #include<set> #define SF scanf #define PF printf #define MAXN 3010 #define MOD 1000000007 using namespace std; typedef long long ll; ll dp[MAXN][MAXN]; int n,m; char s[MAXN]; int end[MAXN],pre[MAXN]; int main(){ SF("%...
a.cc: In function 'int main()': a.cc:26:17: error: reference to 'end' is ambiguous 26 | end[i]=max(end[i],i); | ^~~ In file included from /usr/include/c++/14/map:65, from a.cc:5: /usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<cla...
s541392176
p03859
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<set> #include<map> #include<queue> using namespace std; typedef long long ll; #define int long long #define sqr(x) ((x)*(x)) #define mp make_pair inline char gc(){ static char buf[100000],*p1=buf,*p2=buf; return p...
a.cc: In function 'int main()': a.cc:57:53: error: no matching function for call to 'max(int, long long int)' 57 | int jb=r[i]-l[i]+1,meiju=max(0,r[i-1]-l[i]+1); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s692187203
p03859
C++
#ifndef __INTMOD_H__0001__ #define __INTMOD_H__0001__ #include <vector> #include <iostream> #include <cassert> #include <iostream> /* Modulus must be less than 0x80000000, and not be 0. */ template <uint32_t Modulus> class IntMod { typedef int32_t Int; typedef uint32_t UInt; typedef int64_t Long; typedef uint64_t...
a.cc:10:11: error: 'uint32_t' has not been declared 10 | template <uint32_t Modulus> | ^~~~~~~~ a.cc:13:17: error: 'uint32_t' does not name a type 13 | typedef uint32_t UInt; | ^~~~~~~~ a.cc:7:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixa...
s678193914
p03859
C++
#ifndef __INTMOD_H__0001__ #define __INTMOD_H__0001__ #include <vector> #include <iostream> #include <cassert> #include <iostream> /* Modulus must be less than 0x80000000, and not be 0. */ template <uint32_t Modulus> class IntMod { typedef int32_t Int; typedef uint32_t UInt; typedef int64_t Long; typedef uint64_t...
a.cc:10:11: error: 'uint32_t' has not been declared 10 | template <uint32_t Modulus> | ^~~~~~~~ a.cc:13:17: error: 'uint32_t' does not name a type 13 | typedef uint32_t UInt; | ^~~~~~~~ a.cc:7:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixa...
s950033506
p03859
C++
#ifndef __INTMOD_H__0001__ #define __INTMOD_H__0001__ #include <vector> #include <iostream> #include <cassert> #include <iostream> /* Modulus must be less than 0x80000000, and not be 0. */ template <uint32_t Modulus> class IntMod { typedef int32_t Int; typedef uint32_t UInt; typedef int64_t Long; typedef uint64_t...
a.cc:10:11: error: 'uint32_t' has not been declared 10 | template <uint32_t Modulus> | ^~~~~~~~ a.cc:13:17: error: 'uint32_t' does not name a type 13 | typedef uint32_t UInt; | ^~~~~~~~ a.cc:7:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixa...
s688622827
p03859
C++
#ifndef __INTMOD_H__0001__ #define __INTMOD_H__0001__ #include <vector> #include <iostream> #include <cassert> #include <iostream> /* Modulus must be less than 0x80000000, and not be 0. */ template <uint32_t Modulus> class IntMod { typedef int32_t Int; typedef uint32_t UInt; typedef int64_t Long; typedef uint64_t...
a.cc:10:11: error: 'uint32_t' has not been declared 10 | template <uint32_t Modulus> | ^~~~~~~~ a.cc:13:17: error: 'uint32_t' does not name a type 13 | typedef uint32_t UInt; | ^~~~~~~~ a.cc:7:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixa...
s240138221
p03859
C++
#ifndef __INTMOD_H__0001__ #define __INTMOD_H__0001__ #include <vector> #include <iostream> #include <cassert> #include <iostream> /* Modulus must be less than 0x80000000, and not be 0. */ template <uint32_t Modulus> class IntMod { typedef int32_t Int; typedef uint32_t UInt; typedef int64_t Long; typedef uint64_t...
a.cc:10:11: error: 'uint32_t' has not been declared 10 | template <uint32_t Modulus> | ^~~~~~~~ a.cc:13:17: error: 'uint32_t' does not name a type 13 | typedef uint32_t UInt; | ^~~~~~~~ a.cc:7:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixa...
s994703329
p03859
C
#include<bits/stdc++.h> #define N 3005 using namespace std; const int mod=1e9+7; int n,m; int s[N],val[N],dp[2][N]; int main(){ scanf("%d%d",&n,&m); char t[2];gets(t); for(int i=1;i<=n;i++) s[i]=getchar()-'0'+s[i-1]; int cnt=0; for(int i=1,ml,mr;i<=m;i++) scanf("%d%d",&ml,&mr),val[ml]=max(val[ml],mr); for(int i...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s391232863
p03859
C++
#include<bits/stdc++.h> #define N 3005 using namespace std; const int mod=1e9+7; int n,m; int s[N],val[N],dp[2][N]; int main(){ scanf("%d%d",&n,&m); char t[2];gets(t); for(int i=1;i<=n;i++) s[i]=getchar()-'0'+s[i-1]; int cnt=0; for(int i=1,ml,mr;i<=m;i++) scanf("%d%d",&ml,&mr),val[ml]=max(val[ml],mr); for(int i...
a.cc: In function 'int main()': a.cc:9:19: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | char t[2];gets(t); | ^~~~ | getw
s543406000
p03859
C++
//#include <fstream> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; ifstream cin ("x.in"); ofstream cout ("x.out"); const int nmax = 3000; const int mod = 1e9 + 7; int n, m; int s[nmax + 1]; int d[nmax + 1][nmax + 1]; pair<int, int> w[nmax + 1]; vector< pair<int, ...
a.cc:9:14: error: variable 'std::ifstream cin' has initializer but incomplete type 9 | ifstream cin ("x.in"); ofstream cout ("x.out"); | ^ a.cc:6:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>' 5 | #include <algorithm> +++ |...
s601312976
p03859
C++
#include <bits/stdc++.h> using namespace std; typedef long long lli; lli n,m; string s; vector<lli> sum; vector<lli> rightend; vector<vector<lli> > dp; int main(){ cin >> n >> m; cin >> s; sum = vector<lli> (n+1); rightend = vector<lli> (n+1); for(lli i = 1;i <= n;i++){ rightend[i] = i; ...
a.cc: In function 'int main()': a.cc:23:24: error: expected ';' before '<=' token 23 | for(lli j = l,j <= r;j++) rightend[j] = max(rightend[j],r); | ^~~ | ; a.cc:23:25: error: expected primary-expression before '<=' token 23 | for(lli j = l...
s580471647
p03859
C++
#include <bits/stdc++.h> using namespace std; typedef long long lli; lli n,m; string s; vector<lli> sum; vector<lli> rightend; vector<vector<lli> > dp; int main(){ cin >> n >> m; cin >> s; sum = vector<lli> (n+1); rightend = vector<lli> (n+1); for(lli i = 1;i <= n;i++){ rightend[i] = i; ...
a.cc: In function 'int main()': a.cc:23:24: error: expected ';' before '<=' token 23 | for(lli j = l,j <= r;j++) rightend[j] = max(rightend[j],r); | ^~~ | ; a.cc:23:25: error: expected primary-expression before '<=' token 23 | for(lli j = l...
s365170860
p03859
C++
#include <iostream> #include <string> #include <set> using namespace std; const long long MOD=1000000007; void op(set<string> &sSet,int l,int r) { l--; r--; int strLen=r-l+1; set<string> tmpSet; set<string>::iterator sit; for (sit=sSet.begin();sit!=sSet.end();sit++){ char *S=(char*)(*sit).c_str(); int n=0; ...
a.cc: In function 'void op(std::set<std::__cxx11::basic_string<char> >&, int, int)': a.cc:19:25: error: 'memcpy' was not declared in this scope 19 | memcpy(S+l,S+l+1,strLen); | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fix...
s597923467
p03859
C++
#include<bits/stdc++.h> #define x first #define y second using namespace std; int N, M, mod, s[3009], rgt[3009], dp[3009][3009]; char sir[3009]; void ad (int &i, int j) { i += j; if (i >= mod) i -= mod; } int main () { //freopen ("input", "r", stdin); //freopen ("output", "w", stdout); scanf ("%d %d\n", &N...
a.cc: In function 'int main()': a.cc:22:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 22 | gets (sir + 1); | ^~~~ | getw
s426741466
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s, t, u; cin << s << t << u; char first = t.at(0); cout << 'A' + t.at(0) + 'C' << endl; }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 6 | cin << s << t << u; | ~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::ba...
s956724170
p03860
Java
import java.io.*; public class BoxesAndCandies { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String a = "AtCoder "; String b = " Contest"; String s = br.readLine(); String s1 = s.toLowe...
Main.java:3: error: class BoxesAndCandies is public, should be declared in a file named BoxesAndCandies.java public class BoxesAndCandies { ^ 1 error
s791904611
p03860
Java
import java.io.*; public class AtCodersContest { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s = br.readLine(); String s1 = s.toLowerCase(); String s2 = s1.substring(0,1).toUpper...
Main.java:3: error: class AtCodersContest is public, should be declared in a file named AtCodersContest.java public class AtCodersContest { ^ 1 error
s203581746
p03860
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in);  String x = input.nextLine(); String Splitt[] = x.split(" ");     for(String word : Splitt){ System.out.print(word.charAt(0));       ...
Main.java:8: error: illegal character: '\u00a0' ?String x = input.nextLine(); ^ Main.java:9: error: illegal character: '\u00a0' String Splitt[] = x.split(" "); ? ? ^ Main.java:9: error: illegal character: '\u00a0' String Splitt[] = x.split(" "); ? ? ...
s852348081
p03860
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner in = new Scanner(System.in); String x = in.nextLine(); String[] arr = x.split(" "); for (int i = 0; i < arr.length; i++) { String s = arr[i]; System.out.println(s.charA...
Main.java:2: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s140257268
p03860
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner input = new Scanner(System.in);  String Sentence = input.nextLine(); String splitSen[] = Sentence.split(" ");     for(String word : splitSen){ System.out.print(word.charAt(0));       ...
Main.java:6: error: illegal character: '\u00a0' ?String Sentence = input.nextLine(); ^ Main.java:7: error: illegal character: '\u00a0' String splitSen[] = Sentence.split(" "); ? ? ^ Main.java:7: error: illegal character: '\u00a0' String spli...
s803129846
p03860
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner input = new Scanner(System.in);  String x = input.nextLine(); String Splitt[] = x.split(" ");       for(String word : Splitt){ System.out.print(word.charAt(0));       } ...
Main.java:5: error: illegal character: '\u00a0' ?String x = input.nextLine(); ^ Main.java:6: error: illegal character: '\u00a0' String Splitt[] = x.split(" "); ? ? ? ^ Main.java:6: error: illegal character: '\u00a0' String Splitt[] = x.split(" "); ? ...
s964778917
p03860
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in);  String x = input.nextLine(); String Splitt[] = x.split(" ");       for(String word : Splitt){ System.out.print(word.charAt(0));       } ...
Main.java:8: error: illegal character: '\u00a0' ?String x = input.nextLine(); ^ Main.java:9: error: illegal character: '\u00a0' String Splitt[] = x.split(" "); ? ? ? ^ Main.java:9: error: illegal character: '\u00a0' String Splitt[] = x.split(" "); ? ...
s396994440
p03860
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); String s; s = input.nextLine(); switch (s) { case "AtCoder Beginner Contest": System.out.println("ABC"); ...
Main.java:23: error: reached end of file while parsing } ^ 1 error
s533653774
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string x, y, z; cin >> x >> y >> z; char c; c = y.at(0); cout << "A" + c + "C" << endl; }
a.cc: In function 'int main()': a.cc:10:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 10 | cout << "A" + c + "C" << endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s450585395
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string x, y, z; cin >> x >> y >> z; char c; c = y.at(0); cout << "A" + c + "C" << endl; }
a.cc: In function 'int main()': a.cc:10:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 10 | cout << "A" + c + "C" << endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s783338407
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; char c; c = s.at(9); cout << "A" + c + "C" << endl; }
a.cc: In function 'int main()': a.cc:11:19: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 11 | cout << "A" + c + "C" << endl; | ~~~~~~~ ^ ~~~ | | | | | const char [2] | const char*
s649045054
p03860
C++
#include<bits/stdc++.h> using namespace std; #define ll long long void shakespeare() { string a,b,c; cin >> a >> b >> c; cout << a.at(0) << b.at(0) << c.at(0) << endl; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s903576972
p03860
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> "AtCoder" >> s >> "Contest"; cout << "A" << s[0] << "C" << "\n"; }
a.cc: In function 'int main()': a.cc:7:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const char [8]') 7 | cin >> "AtCoder" >> s >> "Contest"; | ~~~ ^~ ~~~~~~~~~ | | | | | const char [8] |...
s488454419
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin >> a >> b >> c; cout << a[0] << b[0] << c[0] << end; }
a.cc: In function 'int main()': a.cc:7:34: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | cout << a[0] << b[0] << c[0] << end; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, ...
s647798853
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string str; char A,C; char c = str at.size(0); cin>>str>>A>>C>>c; cout<< A+c+C <<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization 6 | char c = str at.size(0); | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>}
s676952104
p03860
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; char c = s at.size(0); cin>>s>>c; cout<< A+c+C <<endl; }
a.cc: In function 'int main()': a.cc:5:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization 5 | char c = s at.size(0); | ^ | | | std::string {aka std::__cxx11::basic_string<char>} a.cc:7:9: error: 'A' was not de...
s059204794
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { char A,B,C; cin >> A >> B >> C; cout << "A"<< B.at(0) <<"C"<< endl; // a }
a.cc: In function 'int main()': a.cc:9:19: error: request for member 'at' in 'B', which is of non-class type 'char' 9 | cout << "A"<< B.at(0) <<"C"<< endl; // a | ^~
s672053624
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string B; cin >> B; string answer = B.at(0); cout << 'A' << answer << 'C' << endl; }
a.cc: In function 'int main()': a.cc:8:23: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 8 | string answer = B.at(0); | ~~~~^~~
s514771056
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string B; cin >> B; string answer = B.st(0); cout << 'A' << answer << 'C' << endl; }
a.cc: In function 'int main()': a.cc:8:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'st'; did you mean 'at'? 8 | string answer = B.st(0); | ^~ | at
s144431047
p03860
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; getline(cin, S) ; cout << "A" + S.at(8) + "C" << endl; }
a.cc: In function 'int main()': a.cc:8:23: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+' 8 | cout << "A" + S.at(8) + "C" << endl; | ~~~~~~~~~~~~~ ^ ~~~ | | | | const char* const char [2]