submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s018220252
p03972
C++
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <cstring> using namespace std; #define rep(l,n) for(int l = 0; l < (n); l++) #define rep2(i,k,n) for(int i = (k); i < (n); i++) inline void readInt2(int *a, int *b) { int c, p = 0; char s[20] = ""; for(int i = 0; (c = getchar())...
a.cc: In function 'void uf_init(int)': a.cc:73:31: error: reference to 'rank' is ambiguous 73 | rep(i,n+1) { parent[i] = i; rank[i] = 0; } | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, ...
s372673735
p03972
C++
#include <iostream> #include <vector> using namespace std; #define MAX 100000 int W,H; int numW=0,numH=0; int result=0; int p[100000],q[100000]; bool pairCompare(const std::pair<float, int>& firstElem, const std::pair<float, int>& secondElem) { return firstElem.second < secondElem.second; } int main(){ vector<...
a.cc: In function 'int main()': a.cc:29:3: error: 'sort' was not declared in this scope; did you mean 'short'? 29 | sort(begin(pq), end(pq), pairCompare); | ^~~~ | short
s688750642
p03972
C++
#include <iostream> #include <vector> using namespace std; #define MAX 100000 int W,H; int numW=0,numH=0; int result=0; int p[100000],q[100000]; bool pairCompare(const std::pair<float, int>& firstElem, const std::pair<float, int>& secondElem) { return firstElem.second < secondElem.second; } int main(){ vector<...
a.cc: In function 'int main()': a.cc:29:3: error: 'sort' was not declared in this scope; did you mean 'short'? 29 | sort(begin(pq), end(pq), pairCompare); | ^~~~ | short
s003598658
p03972
C++
#include <iostream> #include <vector> #include <functional> #include <algorithm> using namespace std; int main() { long long int w, h; cin >> w >> h; vector<long long int> p(w); vector<long long int> q(h); for (long long int i = 0; i < w; i++) { cin >> p[i]; } for (long long int i = 0; i < h; i++) { cin ...
a.cc: In function 'int main()': a.cc:28:14: error: conflicting declaration 'bool h' 28 | bool h = true; | ^ a.cc:9:26: note: previous declaration as 'long long int h' 9 | long long int w, h; | ^ a.cc:39:25: error: 'c' was not declared in this scop...
s684807019
p03972
C++
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<long long> vl; typedef pair<int,int> pii; typedef pair<long,long> pll; typedef long long ll; typedef vector<pii> vpii; #define reps(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) reps(i,0,n) #define all(g) (g).begin(),(g).end() #...
/tmp/ccnr0B6E.o: in function `solve()': a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccnr0B6E.o a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `z' defined in .bss section in /tmp/ccnr0B6E.o a.cc:(.text+0xba): relocation tru...
s701387400
p03972
C++
#include <iostream> #include <sstream> #include <string> #include <cmath> #include <cstdio> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <functional> #include <numeric> #include <iomanip> #include <climits> using namespace std; typedef unsigned int uin...
a.cc:33:1: error: expected unqualified-id before '{' token 33 | { | ^ a.cc:90:1: error: 'SegmentTreeWithIndex' does not name a type 90 | SegmentTreeWithIndex pseg; | ^~~~~~~~~~~~~~~~~~~~ a.cc:91:1: error: 'SegmentTreeWithIndex' does not name a type 91 | SegmentTreeWithIndex qseg; | ^~~~~~~~~~...
s967135460
p03972
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #define MAX_N 100010 using namespace std; int par[MAX_N]; int rank[MAX_N]; void init(int n){ for(int i=0;i<n;i++){ par[i]=i; rank[i]=0; } } int find(int x){ if(par[x]==x){ return x; } else { return par[x]=find(par[...
a.cc: In function 'void init(int)': a.cc:15:5: error: reference to 'rank' is ambiguous 15 | 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++/14/algorithm:60, ...
s505400601
p03972
C++
#include <iostream> #include <string> #include <vector> #include <queue> using namespace std; #define ll long long int struct node{ int x,y; ll val; bool operator <(const node & a) const{ return val>a.val; } node(int xx,int yy,int vall):x(xx),y(yy),val(vall){} }; int main(){ int W,H; cin>>W>>H; vector<ll> p(W...
a.cc: In function 'int main()': a.cc:26:55: error: 'INT_MAX' was not declared in this scope 26 | vector<vector<int>> visit(W+1,vector<int>(H+1,INT_MAX)); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable ...
s777965242
p03972
C++
#include <string> #include <sstream> #include <iostream> #include <vector> #include <math.h> #include <algorithm> #include <functional> #include <map> #include <unordered_map> #include <climits> using namespace std; #define int long #define rep(i,n) for (int i=0; i < int(n); i++) // 素集合データ構造 struct UnionFind { //...
cc1plus: error: '::main' must return 'int'
s958642828
p03972
C++
#include<bits/stdc++.h> using namespace std; int main() { pair<long long int, pair<long long int, long long int>>; long long int W, H; cin >> W >> H; vector<long long int>P( W ), Q( H ); for( size_t i = 0; i < W; i++ ) { cin >> P[i]; } for( size_t i = 0; i < H; i++ ) { cin >> Q[i]; } vector<vector<lo...
a.cc: In function 'int main()': a.cc:10:9: error: declaration does not declare anything [-fpermissive] 10 | pair<long long int, pair<long long int, long long int>>; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s875529819
p03972
C++
#include <iostream> #include <string> #include <vector> using namespace std; typedef struct point { int _x; int _y; int _cost; point(int x, int y, int cost) { _x = x; _y = y; _cost = cost; } } Point; int main() { int W, H; cin >> W >> H; vector<int> q_w, q_h; for (int i = 0; i < W; i++) { int q; ci...
a.cc: In function 'int main()': a.cc:37:48: error: no matching function for call to 'find(std::vector<point>&, Point)' 37 | if (i - 1 >= 0 && !find(fin, Point(i - 1, j, q_w[i - 1]))) seack.push_back(Point(i - 1, j, q_w[i - 1])); | ~~~~^~~~~~~~~...
s770736647
p03972
C++
#include <stdio.h> #include <stdlib.h> #define MAXNODE 100000*100000 #define MAXEDGE MAXNODE #define Max(a,b) ((a)>(b)?(a):(b)) #define Min(a,b) ((a)<(b)?(a):(b)) typedef struct{ int cost; int node[2]; } Edge; typedef struct{ int x,y; } Node; typedef struct unode{ int rank; struct unode *p; } UNo...
a.cc: In function 'int kruskal(Edge*, int*, int, int)': a.cc:4:23: warning: integer overflow in expression of type 'int' results in '1410065408' [-Woverflow] 4 | #define MAXNODE 100000*100000 | ~~~~~~^~~~~~~ a.cc:105:13: note: in expansion of macro 'MAXNODE' 105 | UNode un[MAXNODE]; ...
s262646036
p03972
C++
#include <iostream> #include <string> #include <vector> #include <stack> #include <ctime> #include <unordered_map> #include <unordered_set> #include <sstream> #include <set> #include <list> #include <queue> #include <utility> #include <algorithm> #include <functional> #include <bitset> #include <array> #include <stdlib...
a.cc: In function 'int main()': a.cc:69:12: error: 'INT_MAX' was not declared in this scope 69 | p[w] = INT_MAX; | ^~~~~~~ a.cc:25:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 24 | #include <fenv.h> +++ |+#include <climits> ...
s133914045
p03972
C++
#include <iostream> #include <vector> #include <cstdio> #include <string> using namespace std; int main(void) { int W, H; cin >> W >> H; vector<int> p(W), q(H); for(int i = 0; i < W; i++) cin >> p[i]; for(int i = 0; i < H; i++) cin >> q[i]; sort(p.begin(), p.end()); sort(q.begin(), q.end()); p.push_...
a.cc: In function 'int main()': a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(p.begin(), p.end()); | ^~~~ | short
s979761376
p03972
C++
#include <iostream> #include <algorithm> #include <vector> #define MAX 100010 using namespace std; int w,h; vector<pair<int,int> > v; long long a,b; long long ans; int main() { cin >> w >> h; for (int i = 0; i < w; i++) { int p; cin >> p; v.push_back(make_pair(p,0)); } for (in...
a.cc: In function 'int main()': a.cc:31:32: error: no matching function for call to 'max(long long int, int)' 31 | ans += c * (w - max(b-1,0)); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes...
s653780158
p03972
C++
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> using namespace std; long long int par[10000000010] = {0}; long long int rrank[10000000010] = {0}; void init(long long int n, long long int par[], long long int rank[]) { for (int i = 0; i < n; i++) { par[i] = i; rank[...
/tmp/ccNEyOAj.o: in function `kruskal(long long*, long long*)': a.cc:(.text+0x26c): relocation truncated to fit: R_X86_64_PC32 against symbol `es' defined in .bss section in /tmp/ccNEyOAj.o a.cc:(.text+0x27e): relocation truncated to fit: R_X86_64_PC32 against symbol `es' defined in .bss section in /tmp/ccNEyOAj.o a.cc...
s948428898
p03972
C++
#include <iostream> #include <string> #include <algorithm> #include <map> #include <vector> #include <limit.h> using namespace std; #define debug(x) cout<<#x<<": "<<x<<endl #define rep(i,a,b) for(int i=a;i<b;i++) #define PB push_back #define SORT(v) sort(v.begin(), v.end()) #define REVSORT(v) sort(v.begin(), v.end(), ...
a.cc:6:10: fatal error: limit.h: No such file or directory 6 | #include <limit.h> | ^~~~~~~~~ compilation terminated.
s826094943
p03972
C++
#include <vector> #include <queue> #include <algorithm> #include <iostream> #include <string> #include <tuple> #include <set> #include <map> #include <complex> #include <iomanip> #include <cmath> #include <complex> using namespace std; typedef long long ll; typedef int long long; typedef pair<ll,ll> P; typedef ll Weig...
a.cc:15:18: error: declaration does not declare anything [-fpermissive] 15 | typedef int long long; | ^~~~
s926376201
p03972
C++
#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<queue> #include<map> #include<cstring> #include<string> #include <math.h> #include<algorithm> // #include <boost/multiprecision/cpp_int.hpp> ...
a.cc: In function 'int main()': a.cc:77:38: error: expected ';' before '}' token 77 | ve.push_back(mp(z,0)) | ^ | ; 78 | } | ~ a.cc:81:38: error: expected ';' be...
s318171941
p03972
C++
#include <cstdio> #include <string> using namespace std; int n,m,i,c,d,a[200200]; long long x[2],r; int main() { for (i=0; i<2; i++) x[i]=1; scanf("%d%d",&n,&m); for (i=0; i<n; i++) { scanf("%d",&a[i]); a[i]*=2; } for (i=0; i<m; i++) { scanf("%d",&a[n+i]); a[n+i]=a[n+i]*2+1; } n+=m; sort...
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(a,a+n); | ^~~~ | short
s600405500
p03973
C
#include <bits/stdc++.h> using namespace std; #define B begin() #define E end() #define F first #define S second #define pub push_back #define mkp make_pair #define migmig ios::sync_with_stdio(0); cin.tie(0); cout.tie(0) typedef long double ld; typedef long long ll; typedef vector<ll> vll; typedef map<ll,ll> mll; cons...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s705814077
p03973
C++
#include <vector> #include <iostream> #include <algorithm> #include <utility> #include <set> #include <map> #include <cmath> using namespace std; template<typename T, typename S> istream& operator >> (istream& is, pair<T, S>& p) { is >> p.first >> p.second; return is; } template<typename T> istream& operator...
a.cc: In function 'int main()': a.cc:53:26: error: no matching function for call to 'max(int64_t&, long long int)' 53 | cur_bar = max(cur_bar, 1ll); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:62, from a.cc:1: /usr/include/c++/14/bits/...
s113724421
p03973
C++
15 3 1 4 1 5 9 2 6 5 3 5 8 9 7 9
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 15 | ^~
s351445712
p03973
C++
#include <iostream> #include <iomanip> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <cstdio> #include <utility> #include <string> #include <cmath> #include <cstdlib> #include <cstring> #include <deque> #include <numeric> using namespace std; typedef u...
a.cc:20:9: error: 'uint64_t' does not name a type 20 | typedef uint64_t u64; | ^~~~~~~~ a.cc:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 16 | #include <numeric> +++ |+#include <cstdint> 17 | a.cc:22:9: error: 'uint32_t' does ...
s199154274
p03973
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> #include<functional> #include<assert.h> #include<numeric> #include <bits/stdc++.h> using namespace s...
a.cc: In function 'int main()': a.cc:40:32: error: expected ';' before '}' token 40 | ans+=max((a[i]+x-1)/x-1,0L) | ^ | ; 41 | } | ~
s812600356
p03973
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> #include<functional> #include<assert.h> #include<numeric> #include <bits/stdc++.h> using namespace s...
a.cc: In function 'int main()': a.cc:40:13: error: no matching function for call to 'max(long int, long long int)' 40 | ans+=max((a[i]+x-1)/x-1,0LL) | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s427564414
p03973
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> #include<functional> #include<assert.h> #include<numeric> #include <bits/stdc++.h> using namespace s...
a.cc: In function 'int main()': a.cc:40:33: error: expected ';' before '}' token 40 | ans+=max((a[i]+x-1)/x-1,0LL) | ^ | ; 41 | } | ~
s589990463
p03973
C++
using namespace std; typedef long long ll; int main(){ int N; cin>> N; vector<ll> A(N); for(int i = 0; i < N; i++){ cin >> A[i];} sort(A.begin(),A.end()); vector<ll> kind; vector<ll> cnt; int head = 0; int tail = 0; while( head < N && tail < N){ while( A[head] == A[tail]){ t...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | int N; cin>> N; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:9:3: error: 'vector' was not...
s453207906
p03973
C++
ok
a.cc:1:1: error: 'ok' does not name a type 1 | ok | ^~
s479627330
p03973
C++
ok
a.cc:1:1: error: 'ok' does not name a type 1 | ok | ^~
s171114284
p03973
C++
include <iostream> #include <cstdio> #include <cstring> using namespace std; const int MAXN=100005; int n,p=1; int main() { cin>>n; long long ans=0; for(int i=1;i<=n;++i){ int x; scanf("%d",&x); if(x<p)continue; if(x==p)++p; else{ if(x%p==0)ans+=x/p-1; else ans+=x/p; } i...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope 9 | cin>>n; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <ios...
s991870044
p03973
C++
#include <iostream> #include <math.h> #include <string> #include <algorithm> using namespace std; int main(){ long long n,i,q; long long cnt = 0; cin >> n; long long a[100000]; for (long long i = 0; i < n; i++){ cin >> a[i]; } if (a[0]>1){ cnt+=a[0]-1; } i = 1; q = 1; while (i<n){ if (a[i] >(q+1)){...
a.cc:41:5: error: redefinition of 'int main()' 41 | int main(){ | ^~~~ a.cc:7:5: note: 'int main()' previously defined here 7 | int main(){ | ^~~~ a.cc:69:1: error: 'Submission' does not name a type 69 | Submission | ^~~~~~~~~~
s354542057
p03973
C++
N = int(input()) A = [int(input()) for i in range(N)] V = 1 ans = 0 for i in range(N): #print(V, ans) if(A[i] > V): t = (A[i]-1)//V ans += t A[i] -= V*t if(A[i]+1 > V): A[i] = 1 V = max(V,A[i]+1) print(ans)
a.cc:6:6: error: invalid preprocessing directive #print 6 | #print(V, ans) | ^~~~~ a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s228916347
p03973
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n,cnt,cmin; cmin=2; cnt=0; vector<int> a; cin>>n; for(int i=0;i<n;i++){ int c; cin>>c; a.push_back(c); } int i=0; int done =0; cnt+=a[i]-1; a[i]=1; while(i<n){ cou...
a.cc: In function 'int main()': a.cc:29:10: error: 'else' without a previous 'if' 29 | }else if(a[i]==cmin){ | ^~~~ a.cc: At global scope: a.cc:37:5: error: 'cout' does not name a type 37 | cout<<cnt<<endl; | ^~~~ a.cc:38:1: error: expected declaration before '}' token 38 |...
s205924183
p03973
Java
import java.util.*; public class Main1 { public static void main(String[] args) throws InterruptedException{ Scanner sc = new Scanner(System.in); int n_customer = sc.nextInt(); long sold = sc.nextInt() -1; int i = 1; int price = 2; ...
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s728245922
p03973
Java
import java.util.*; public class Main1 { public static void main(String[] args) throws InterruptedException{ Scanner sc = new Scanner(System.in); int n_customer = sc.nextInt(); long sold = sc.nextInt() -1; int i = 1; int price = 2; ...
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s471717133
p03973
Java
import java.util.*; public class Main1 { public static void main(String[] args) throws InterruptedException{ Scanner sc = new Scanner(System.in); int n_customer = sc.nextInt(); long sold = sc.nextInt() -1; int i = 1; int price = 2; ...
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s201794904
p03973
Java
import java.util.*; public class Main1 { public static void main(String[] args) throws InterruptedException{ Scanner sc = new Scanner(System.in); int n_customer = sc.nextInt(); long sold = sc.nextInt() -1; int i = 1; int price = 2; ...
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s404608115
p03973
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n,cnt,cmin; cmin=2; cnt=0; vector<int> a; cin>>n; for(int i=0;i<n;i++){ int c; cin>>c; a.push_back(c); } int i=0; int done =0; cnt+=a[i]-1; a[i]=1; while(i<n){ if(...
a.cc: In function 'int main()': a.cc:26:23: error: expected ';' before '}' token 26 | i=done | ^ | ; 27 | }else{ | ~
s193482268
p03973
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n,cnt,cmin; cmin=2; cnt=0; vector<int> a; cin>>n; for(int i=0;i<n;i++){ int c; cin>>c; a.push_back(c); } int i=0; cnt+=a[i]-1; a[i]=1; while(i<n){ if(a[i]>cmin){ ...
a.cc: In function 'int main()': a.cc:25:19: error: 'done' was not declared in this scope 25 | i=done; | ^~~~ a.cc:30:17: error: 'done' was not declared in this scope 30 | done=i+1; | ^~~~ a.cc:36:13: error: 'done' was not declared in th...
s519384344
p03973
C
#include <stdio.h> int main(void) { int n,i,j long max,cnt ; long a[100000] ; max = 1; cnt = 0 ; scanf("%d",&n) ; for(i=0 ; i<n ; i++){ scanf("%d", &a[i]) ; } for(i=0; i<n ; i++){ while(a[i] > max){ if(a[i] - max == max){ a[i] = 1 ; cnt++ ; break ; } a[i] = a[i] - max ; ...
main.c: In function 'main': main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'long' 6 | long max,cnt ; | ^~~~ main.c:9:9: error: 'max' undeclared (first use in this function) 9 | max = 1; | ^~~ main.c:9:9: note: each undeclared identifier is ...
s769667851
p03973
C++
#include<iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> using namespace std; int count = 0; int NextCustomer(int[] C,int N, int pos, int CP, int price) { if (C > price) { count++; return CP-price; } else if (C == price || pos = N-1)...
a.cc:10:24: error: expected ',' or '...' before 'C' 10 | int NextCustomer(int[] C,int N, int pos, int CP, int price) | ^ a.cc: In function 'int NextCustomer(int*)': a.cc:13:13: error: 'C' was not declared in this scope 13 | if (C > price) | ^ a.cc:13:17: erro...
s636029173
p03973
C++
#include <iostream> #include <algorithm> #include <string> #include <stack> #include <map> #include <queue> #include <vector> using namespace std; int main() { long long int i, x, sum, n, pri, start; pri = 1; sum = 0; cin >> n; vector<int> mon(n, 0); for (i = 0; i < n; i++) { cin >> mon[i]; } start = 0; whi...
a.cc: In function 'int main()': a.cc:38:42: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type, long long int&)' 38 | pri = max(mon[start] + 1, pri); | ~~~^~~~~~~~~~~~~~~~~~~~~ In fil...
s026341353
p03973
C++
#include <iostream> #include <string> #include <algorithm> #include <stdlib.h> #include <math.h> #define ll long long using namespace std; ll a[1000000010]; ll sum = 0; int main(){ int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; } sum += a[0] - 1; ll limit = 2; // ll limit = 1; for (int i = 1...
/tmp/ccguPPO7.o: in function `main': a.cc:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccguPPO7.o a.cc:(.text+0x74): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccguPPO7.o a.cc:(.text+0xf1): relocation t...
s221424295
p03973
C++
#include <iostream> #include <string> #include <algorithm> #include <stdlib.h> #include <math.h> #define ll long long using namespace std; int n; ll a[1000000010]; ll sum = 0; int main(){ cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; } sum += a[0] - 1; ll limit = 2; // ll limit = 1; for (int i = 1;...
/tmp/ccCBoiKq.o: in function `main': a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o a.cc:(.text+0x7a): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o a.cc:(.text+0xf7): relocation t...
s836102967
p03973
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i,a,b) for(int i=a;i<b;++i) #define rep(i,n) REP(i,0,n) #define ll long long #define ull unsigned ll typedef long double ld; #define ALL(a) begin(a),end(a) #define ifnot(a) if(not (a)) #define dump(x) cerr << #x << " = " <<...
a.cc: In function 'int main()': a.cc:39:36: error: no matching function for call to 'max(long long int&, int)' 39 | max_v = max(max_v,2); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linu...
s669722163
p03973
C++
#include <iostream> #include <string> #include <algorithm> #include <map> #include <vector> using namespace std; #define debug(x) cout<<#x<<": "<<x<<endl #define rep(i,a,b) for(int i=a;i<b;i++) #define PB push_back #define SORT(v) sort(v.begin(), v.end()) #define REVSORT(v) sort(v.begin(), v.end(), std::greater<int>()...
a.cc: In function 'int main()': a.cc:42:17: error: 'else' without a previous 'if' 42 | else{ | ^~~~
s809417166
p03973
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> //#include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <numeric> #include <list> #include <assert.h> #include <math.h> //#include <array> #inclu...
a.cc:107:1: error: '::main' must return 'int' 107 | llint main() | ^~~~~
s779217205
p03973
Java
import java.util.Scanner; public class codefes2016bc { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int a[] = new int[N]; int nowp = 1; for (int i = 0; i < a.length; i++) { a[i] = scanner.nextInt(); } long ans = 0; for (int i = 0; i...
Main.java:4: error: class codefes2016bc is public, should be declared in a file named codefes2016bc.java public class codefes2016bc { ^ 1 error
s237019745
p03973
C++
#include <iostream> #include <string> #include <algorithm> #include <map> #include <vector> using namespace std; #define debug(x) cout<<#x<<": "<<x<<endl #define rep(i,a,b) for(int i=a;i<b;i++) #define PB push_back #define SORT(v) sort(v.begin(), v.end()) #define REVSORT(v) sort(v.begin(), v.end(), std::greater<int>()...
a.cc: In function 'int main()': a.cc:32:19: error: 'o' was not declared in this scope 32 | a[o] = 1; | ^
s896259523
p03973
C++
// Standard I/O #include <iostream> #include <sstream> #include <cstdio> // Standard Library #include <cstdlib> #include <cstring> #include <ctime> #include <cmath> // Template Class #include <complex> #include <string> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> //...
a.cc: In function 'int main()': a.cc:92:30: error: no matching function for call to 'max(int, ll&)' 92 | min_val = max(A[i]+1, min_val); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_cl...
s357203159
p03973
C++
#include <iostream> #include <algorithm> #include <queue> #include <set> #include <cstdlib> using namespace std; typedef long long int ll; bool debug = false; #define show(x) if (debug) {cout << "" # x << " = " << x << endl;} #define rep(x, a, b) for (int x = a; x < b; x++) int main() { ll n; cin >> n; vecto...
a.cc: In function 'int main()': a.cc:35:16: error: no matching function for call to 'max(int, ll&)' 35 | low = max(2, low); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include...
s729109517
p03973
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<cstring> #include<vector> #include<cmath> #include<queue> #include<stack> using namespace std; #define INT(x) int x; scanf("%d",&x) #define INPUT(x) scanf("%d",&x) #define REP1(x,n) for(int x = 0; x < n; x++) #define REP2(x,s,e) for(int x...
a.cc: In function 'int main()': a.cc:42:27: error: no matching function for call to 'max(ll&, int&)' 42 | mini = max(mini,A[i]); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s069906565
p03973
C++
#include <bits/stdc++.h> using namespace std; int main() { long long N, tmp = 1, res = 0; cin >> N; for (int i = 0, a; i < N; i++) { cin >> a; if (a > tmp) { res += (a - 1) / tmp; tmp = max(tmp, 2); } else if(a == tmp) tmp++; } cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:34: error: no matching function for call to 'max(long long int&, int)' 12 | tmp = max(tmp, 2); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/...
s575866498
p03973
C
#include<stdio.h> #define MAX 100001 #define max2(a,b) a<b?b:a #define max3(a,b,c) max2((max2(a,b)),c) #define max4(a,b,c,d) max3((max2(a,b)),c,d) int main(){ int i,j,k; int ans = 0; int min = 0; int tmp,t; int flag = 0; int a[MAX]; int n; scanf("%d",&n); for(i = 0;i < n;i++){ scanf("%d",&a[i]); } for...
main.c:37:2: error: stray '#' in program 37 | }#include<stdio.h> | ^ main.c:37:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 37 | }#include<stdio.h> | ^
s705832778
p03973
C++
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> usin...
a.cc: In function 'int32_t main()': a.cc:39:17: error: no matching function for call to 'max(long long int&, int)' 39 | mx = max(mx, 1); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, fr...
s756056917
p03974
C++
#include <bits/stdc++.h> using namespace std; const int N = 100010; class Node { public: bool is_terminal; int cnt; Node *son[26]; Node() { is_terminal = false; cnt = 0; for (int i = 0; i < 26; i++) son[i] = nullptr; } }; class Trie { public: Node *root; Trie() { root = new Node(); } void inse...
a.cc: In function 'int main()': a.cc:59:41: error: reference to 'data' is ambiguous 59 | data[i][num][j] += cur->son[j]->cnt; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bit...
s865154149
p03974
C++
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,popcnt,avx,avx2,tune=native") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/rope> /* zet: find_by_order(k): k-...
In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:4: /usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Allo...
s037756199
p03974
C
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_STR_MAX 100000 // 最大文字列数 #define D_CHAR_MAX 500005 // 最大文字数 #define D_CHAR_KIND 27 // 文字種類数 // 内部構造体 - グループ情報 typedef struct Grp { int mi...
main.c:25:8: error: unknown type name 'Grp' 25 | static Grp sz1Grp[D_CHAR_MAX]; // グループ情報 | ^~~ main.c: In function 'fMain': main.c:101:17: error: unknown type name 'Grp'; use 'struct' keyword to refer to the type 101 | G...
s327064538
p03974
C++
#include <iostream> #include <iomanip> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <list> #include <stack> #include <queue> #include <bitset> #include <numeric> #include <cassert> #include <array> #inc...
a.cc: In member function 'std::tuple<std::shared_ptr<TrieTree<Val, ignore> >, long long int> TrieTree<Val, ignore>::compress(ll)': a.cc:197:74: error: there are no arguments to 'shared_from_this' that depend on a template parameter, so a declaration of 'shared_from_this' must be available [-fpermissive] 197 | ...
s619224621
p03974
C++
#include <iostream> #include <iomanip> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <list> #include <stack> #include <queue> #include <bitset> #include <numeric> #include <cassert> #include <array> #inc...
a.cc: In member function 'std::tuple<std::shared_ptr<TrieTree<Val, ignore> >, long long int> TrieTree<Val, ignore>::compress(ll)': a.cc:197:30: error: there are no arguments to 'shared_from_this' that depend on a template parameter, so a declaration of 'shared_from_this' must be available [-fpermissive] 197 | ...
s106863009
p03974
C++
#include <bits/stdc++.h> using namespace std; template <typename T> inline void read (T &x) { bool b = 0; char c; while (!isdigit (c = getchar()) && c != '-'); if (c == '-') c = getchar(), b = 1; x = c - 48; while (isdigit(c = getchar())) x = (x << 3) + (x << 1) + c - 48; if (b) x = -x; } template <typename T> inline v...
a.cc:12:12: error: 'int index [400011]' redeclared as different kind of entity 12 | int index[N]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, ...
s342232808
p03974
C++
#pragma once #include <iostream> #include <map> #include <memory> #include <vector> #include "misc/types.hpp" class patricia { public: struct node_t; using ptr_t = std::shared_ptr<node_t>; using const_ptr_t = std::shared_ptr<const node_t>; private: using pair = std::pair<std::shared_ptr<node_t>,...
a.cc:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ a.cc:7:10: fatal error: misc/types.hpp: No such file or directory 7 | #include "misc/types.hpp" | ^~~~~~~~~~~~~~~~ compilation terminated.
s573594325
p03974
C++
#include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <string> #include <math.h> #include <iomanip> #include <limits> #include <list> #include <queue> #include <tuple> #include <map> #include <stack> #include <set> using namespace std; #define MOD (long long int)(1e9+7) #define ll long...
a.cc: In function 'std::pair<std::__cxx11::basic_string<char>, int> saiki(int)': a.cc:65:41: error: 'i' was not declared in this scope 65 | pair<string,int> ret = saiki(G[now][i].second); | ^ a.cc: In function 'int count_size(int)': a.cc:88:5: error: reference to 'si...
s759944029
p03974
C++
めもだよー #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <string> #include <math.h> #include <iomanip> #include <limits> #include <list> #include <queue> #include <tuple> #include <map> #include <stack> #include <set> using namespace std; #define MOD (long long int)(1e9+7) #define ll...
a.cc:1:1: error: '\U00003081\U00003082\U00003060\U00003088\U000030fc' does not name a type 1 | めもだよー | ^~~~~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/...
s461617816
p03974
C++
#include <bits/stdc++.h> using namespace std; int n,c[100005][30][30],q,r[30],ans[100005]; string s[100005]; void dfs(vector<int> x,int l){ int o=0; vector<int>p[30]; for(int i=0;i<x.size();i++){ if(l<s[x[i]].size())p[s[x[i]][l]-'a'].PB(x[i]); else o++; } for(int i=0;i<x.size();i++){ if(s[x[i]].size()<=l)con...
a.cc: In function 'void dfs(std::vector<int>, int)': a.cc:9:55: error: 'class std::vector<int>' has no member named 'PB' 9 | if(l<s[x[i]].size())p[s[x[i]][l]-'a'].PB(x[i]); | ^~ a.cc: In function 'int main()': a.cc:26:31: error: 'class std:...
s329647887
p03974
C++
#include <algorithm> #include <iostream> #include <vector> #include <string> #include <unordered_map> using namespace std; unordered_map<char, int> currentOrder; struct comp { bool operator() (string a, string b) { int i = 0, j = 0; while (a[i] == b[j]) { ++i; ++j; if (i == a.length() || j == b.length(...
a.cc: In function 'int main()': a.cc:67:21: error: void value not ignored as it ought to be 67 | sort(str.begin(), str.end(), comp); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s695110375
p03974
C++
#include <iostream> #include <vector> #include <string> #include <unordered_map> using namespace std; unordered_map<char, int> currentOrder; struct comp { bool operator() (string a, string b) { int i = 0, j = 0; while (a[i] == b[j]) { ++i; ++j; } return currentOrder[a[i]] < currentOrder[b[j]]; } } co...
a.cc: In function 'int main()': a.cc:58:17: error: 'sort' was not declared in this scope; did you mean 'short'? 58 | sort(str.begin(), str.end(), comp); | ^~~~ | short
s879974569
p03974
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,string> P; typedef pair<int,int> PP; typedef pair<string,int> PPP; int N,Q,K,X,Y,Max,index,ans; const int A=400010,B=100010; const int INF=1000000009; char C[A]; int parent[A],Parent[A],node[A],Node[A],O[30]; int G[B]; PPP H[B]; int J[B]; int JJ[B]; vec...
a.cc:8:19: error: 'int index' redeclared as different kind of entity 8 | int N,Q,K,X,Y,Max,index,ans; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, ...
s707423725
p03974
C++
#include <bits/stdc++.h> using namespace std; #define fin "qualB_E.inp" #define fou "" #define ff(i, a, b) for(int i = a; i <= b; i ++) #define fd(i, a, b) for(int i = a; i >= b; i --) #define x first #define y second //#define endl '\n' typedef long long data; typedef pair<int,int> ii; typedef vector<int> vi; typedef ...
a.cc: In function 'void build()': a.cc:36:18: error: reference to 'next' is ambiguous 36 | if (!next[u][s[i][j - 1] - 'a']) | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/in...
s156345991
p03974
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; struct S_STRU{ int id; string s; }; string g_Rule; int compChar(char ch1,char ch2) { int ch1Pos=-1,ch2Pos=-1; for (int i=0;i<26;i++){ if (g_Rule[i] == ch1){ ch1Pos = i; } if (g_Rule[i] == ch2){ ch2Pos = i; ...
a.cc: In function 'int main(int, char**)': a.cc:80:50: error: reference to 'less' is ambiguous 80 | sort(S_Sort.begin(),S_Sort.end(),less); | ^~~~ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits...
s236852301
p03974
C++
#include <iostream> #include <cassert> #include <vector> // #include <algorithm> using namespace std; class TrieNode { public: void add(const char *p) { assert(*p); m_count++; if (m_count == 1) { m_pVal = p; m_isEnd = 1; return; } assert(*p == *m_pVal); if (m_next.empty()) { m_next.resize(26)...
a.cc: In function 'int main()': a.cc:103:21: error: 'N' was not declared in this scope 103 | if (N == 1) | ^
s551516195
p03974
C++
#include <iostream> #include <cassert> #include <vector> using namespace std; class TrieNode { public: void add(const char *p) { // assert(*p); m_count++; if (m_count == 1) { m_pVal = p; m_isEnd = 1; return; } if (m_next.empty()) { m_next.resize(26); const char *p1 = m_pVal + 1; if (*p1) ...
a.cc: In function 'int main()': a.cc:90:9: error: 'sort' was not declared in this scope; did you mean 'short'? 90 | sort(vs1.begin(), vs1.end()); | ^~~~ | short
s478022602
p03974
C++
#include<iostream> using namespace std; const int NQmax = 100000; int N,Q; string S[NQmax]; int prefix[NQmax]; int former[26][26][NQmax]; struct trie { int k; // index of this node int n; // number of children struct trie *c[26]; }; void init(struct trie *t){ t->k = -1; t->n = 0; for(int i=0; i<26; i++) t...
a.cc: In function 'int main()': a.cc:60:12: error: 'K' was not declared in this scope 60 | cin >> K[i]; | ^ a.cc:61:12: error: 'P' was not declared in this scope 61 | cin >> P[i]; | ^
s601145317
p03974
C++
#include <bits/stdc++.h> using namespace std; struct st{ st *linkk[27]; st *up; int cnt; int belong; int att; int val; int en; st(){ for (int i = 0; i < 27; i++){ linkk[i] = NULL; } cnt = 0; en = 0; } }; int n; int q; #define MAX 400002 char buf[MAX]; vector<string> v; st linkk2[MAX * 27];...
/tmp/ccWwktBX.o: in function `neww()': a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/ccWwktBX.o a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/ccWwktBX.o a.cc:(.text+0x15): relocation t...
s543904566
p03974
C++
#include <bits/stdc++.h> using namespace std; struct st{ st *linkk[27]; st *up; int cnt; int belong; int att; int val; int en; st(){ for (int i = 0; i < 27; i++){ linkk[i] = NULL; } cnt = 0; en = 0; } }; int n; int q; #define MAX 400002 char buf[MAX]; vector<string> v; st linkk2[MAX * 30];...
/tmp/cc99Z3Rs.o: in function `neww()': a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/cc99Z3Rs.o a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/cc99Z3Rs.o a.cc:(.text+0x15): relocation t...
s635602448
p03974
C++
#include <bits/stdc++.h> using namespace std; struct st{ st *linkk[27]; st *up; int cnt; int belong; int att; int val; int en; st(){ for (int i = 0; i < 27; i++){ linkk[i] = NULL; } cnt = 0; en = 0; } }; int n; int q; #define MAX 400002 char buf[MAX]; vector<string> v; st linkk2[MAX * 30];...
/tmp/cc00UJ73.o: in function `neww()': a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/cc00UJ73.o a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/cc00UJ73.o a.cc:(.text+0x15): relocation t...
s804932367
p03974
C++
#include <bits/stdc++.h> using namespace std; struct st{ st *linkk[27]; st *up; int cnt; int belong; int att; int val; int en; st(){ for (int i = 0; i < 27; i++){ linkk[i] = NULL; } cnt = 0; en = 0; } }; int n; int q; #define MAX 400002 char buf[MAX]; vector<string> v; st linkk2[MAX * 30];...
/tmp/ccDhXupw.o: in function `neww()': a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/ccDhXupw.o a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/ccDhXupw.o a.cc:(.text+0x15): relocation t...
s456178213
p03974
C++
#include <bits/stdc++.h> using namespace std; struct st{ st *linkk[27]; st *up; int cnt; int belong; int att; st(){ for (int i = 0; i < 27; i++){ linkk[i] = NULL; } cnt = 0; } }; int n; int q; #define MAX 400002 char buf[MAX]; vector<string> v; st linkk2[MAX * 30]; int ord = 0; st *neww(){ or...
/tmp/ccY0PNDe.o: in function `neww()': a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/ccY0PNDe.o a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/ccY0PNDe.o a.cc:(.text+0x15): relocation t...
s734502475
p03974
C++
#include <iostream> #include <string> using namespace std; int main() { int tangoNum; cin >> tangoNum; string tango[tangoNum]; int temp[tangoNum]; int tempFlag[tangoNum];//とったかとってないか int kotae = 0; for (int i = 0; i < tangoNum; ++i) { cin >> tango[i]; tempFlag[i] = 0; ...
a.cc: In function 'int main()': a.cc:39:39: error: invalid types 'int[int]' for array subscript 39 | if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){ | ^ a.cc:39:50: error: invalid types 'int[int]' for array subscript 39 | ...
s762387845
p03974
C++
#include <iostream> #include <string> using namespace std; int main() { int tangoNum; cin >> tangoNum; string tango[tangoNum]; int temp[tangoNum]; int tempFlag[tangoNum];//とったかとってないか int kotae = 0; for (int i = 0; i < tangoNum; ++i) { cin >> tango[i]; tempFlag[i] = 0; ...
a.cc: In function 'int main()': a.cc:32:34: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 32 | temp[j][l] = find(query[i].begin(),query[i].end()...
s858210177
p03974
C++
#include <iostream> #include <string> using namesqueryace std; int main() { int tangoNum; cin >> tangoNum; string tango[n]; int temp[tangoNum][]; int tempFlag[tangoNum];//とったかとってないか int kotae = 0; for (int i = 0; i < tangoNum; ++i) { cin >> tango[i]; tempFlag[i] = 0; ...
a.cc:3:7: error: expected nested-name-specifier before 'namesqueryace' 3 | using namesqueryace std; | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> tangoNum; | ^~~ | std::cin In file in...
s546235572
p03974
C
#include<stdio.h> #include<stdlib.h> #define MAX 100001 #define max2(a,b) a<b?b:a #define max3(a,b,c) max2((max2(a,b)),c) #define max4(a,b,c,d) max3((max2(a,b)),c,d) struct DATA{ char s[400001]; int num; }d[MAX],tmp[MAX]; int my_strcmp(const void *s1,const void *s2){ int i; for(i = 0;*(str1 + i) == *(str2 + i)...
main.c: In function 'my_strcmp': main.c:16:15: error: 'str1' undeclared (first use in this function); did you mean 's1'? 16 | for(i = 0;*(str1 + i) == *(str2 + i);i++){ | ^~~~ | s1 main.c:16:15: note: each undeclared identifier is reported only once for each function it appe...
s284696985
p03974
C++
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <cstring> #include <queue> #include <algorithm> #include <climits> #include <string> #include <cstdlib> #include <sstream> #include <cmath> #include <cassert> #include <iomanip> // cout << setp...
a.cc: In function 'int main()': a.cc:34:16: error: 's' was not declared in this scope 34 | cin >> s[j]; | ^ a.cc:45:21: error: 's' was not declared in this scope 45 | string cp = s[k[i]]; | ^
s642650268
p03974
C++
#include <iostream> #include <vector> #include <string> #include <random> #include <algorithm> #include <unordered_map> #include <map> #include <list> #define DBG #ifdef DBG #define PRINT_TIME(s,e) cout << (double)(e-s) << " CLOCK" << endl #define LOOP for ( int i=0; i<MAXIMUM; i++ ) #define START start = clock(); #de...
a.cc:26:61: error: 'dict' has incomplete type 26 | int comp ( const char x, const char y, const array<char,26> dict ){ | ~~~~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51, ...
s651820890
p03974
C++
#include <bits/stdc++.h> using namespace std; int n; int q; #define MAX 400002 char buf[MAX]; vector<string> v; struct st{ st *linkk[27]; int cnt; int belong; int att; st(){ for (int i = 0; i < 27; i++){ linkk[i] = NULL; } cnt = 0; } }; st linkk[MAX * 40]; int ord = 0; st *neww(){ ord++; return &...
/tmp/cczro9GT.o: in function `neww()': a.cc:(.text+0x6): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/cczro9GT.o a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ord' defined in .bss section in /tmp/cczro9GT.o a.cc:(.text+0x15): relocation t...
s669208111
p03974
C
#include <stdio.h> #define MAXN (400000) class TrieNode { public: bool exist; int son_count; TrieNode* nodes[26]={0}; TrieNode():son_count(0),exist(false){} TrieNode * & getNode(const char & chr) { return nodes[chr-'a']; } }nodes[MAXN]; int nodes_cnt = 0; class Trie { public: ...
main.c:4:1: error: unknown type name 'class' 4 | class TrieNode { | ^~~~~ main.c:4:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 4 | class TrieNode { | ^ main.c:14:2: warning: data definition has no type or storage class 14 | }nodes[MAXN]; | ^~...
s127929938
p03974
C++
#include <stdio.h> #define MAXN (400000) class TrieNode { public: bool exist; int son_count; TrieNode* nodes[26]={0}; TrieNode():son_count(0),exist(false){} TrieNode * & getNode(const char & chr) { return nodes[chr-'a']; } }nodes[MAXN]; int nodes_cnt = 0; class Trie { public: ...
a.cc: In function 'int main()': a.cc:78:16: error: 'strlen' was not declared in this scope 78 | ptr += strlen(ptr) + 1; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include ...
s242993053
p03974
C++
#include <iostream> #include <string> #include <cstdio> #include <cstdlib> #include <map> #include <algorithm> using namespace std; struct Node { Node* next[26]; int count; bool flag; Node() { count= 0; flag = false; memset(next, 0, sizeof(next)); } }; int n, q, id; string s; string arr[100010]; Node* ro...
a.cc: In constructor 'Node::Node()': a.cc:18:17: error: 'memset' was not declared in this scope 18 | memset(next, 0, sizeof(next)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <algor...
s428067076
p03974
C++
#include<stdio.h> #include<cstring> #include<algorithm> #include<cstdlib> #include<cmath> #include<ctime> #include<set> #include<map> #include<vector> #define pii pair<int,int> #define fi first #define se second #define pb push_back #define SZ(x) ((int)((x).size())) #define rep(i,j,k) for(int i=(int)j;i<=(int)k;i++) #d...
a.cc: In function 'int main()': a.cc:51:17: error: reference to 'end' is ambiguous 51 | end[now]++; | ^~~ In file included from /usr/include/c++/14/set:65, from a.cc:7: /usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<class _Tp> co...
s607133598
p03975
C++
#include <stdio.h> int main(int n,int a,int b,int ans=0,int t[1001]){ scanf("%d%d%d",&n,&a,&b); for(int i=1; i<=n; i++) scanf("%d",&t[i]); for(int i=1; i<=n; i++) ans+=((t[i]<a||t[i]>=b)?1:0); printf("%d\n",ans); }
a.cc:2:5: warning: second argument of 'int main(int, int, int, int, int*)' should be 'char **' [-Wmain] 2 | int main(int n,int a,int b,int ans=0,int t[1001]){ | ^~~~ a.cc:2:5: warning: third argument of 'int main(int, int, int, int, int*)' should probably be 'char **' [-Wmain] a.cc:2:5: warning: 'int main...
s997776180
p03975
C++
#include <stdio.h> int main(int n,int a,int b,int ans=0,int t[1001];){ scanf("%d%d%d",&n,&a,&b); for(int i=1; i<=n; i++) scanf("%d",&t[i]); for(int i=1; i<=n; i++) ans+=((t[i]<a||t[i]>=b)?1:0); printf("%d\n",ans); }
a.cc:2:49: error: expected ')' before ';' token 2 | int main(int n,int a,int b,int ans=0,int t[1001];){ | ~ ^ | ) a.cc:2:5: warning: second argument of 'int main(int, int, int, int, int*)' should be 'char **' [...
s078351020
p03975
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,a,b;cin>>n>>a>>b; int ans=0; rep(i,0,n){ int t;cin>>t; if(t<a||t>=b)ans++; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:6:7: error: 'i' was not declared in this scope 6 | rep(i,0,n){ | ^ a.cc:6:3: error: 'rep' was not declared in this scope 6 | rep(i,0,n){ | ^~~
s461454694
p03975
C++
#include<iostream> using namespace std; int main(){ int n , a , b , x,f; cin>>n>>a>>b; f = 0; for(int i = 0 ; i < n ; i++){ cin>>x; if(x>=b || x < a) f++ } cout<<f<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:38: error: expected ';' before '}' token 11 | if(x>=b || x < a) f++ | ^ | ; 12 | } | ~
s270120276
p03975
C++
#include <bits/stdc++.h> #include <fstream> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> //#define _debug #define FASTIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define sc(x) scanf("%d",&x) #define ll long long #define FOR(i,a,b) for(int i=a;i<b;i++) #define FORd(i,a,b) for...
a.cc: In function 'int main()': a.cc:44:15: error: expected primary-expression before '<' token 44 | if(x =< a || x >= b) ans++; | ^
s790690765
p03975
C++
#include <bits/stdc++.h> #include "../../../cpp/template/template.cpp" using namespace std; void solve(long long N, long long A, long long B, std::vector<long long> t){ int cnt = 0; rep(i,N){ if(t[i]<A || t[i]>=B) cnt++; } cout << cnt << endl; } int main(){ long long N; scanf("%lld",&N); long lon...
a.cc:2:10: fatal error: ../../../cpp/template/template.cpp: No such file or directory 2 | #include "../../../cpp/template/template.cpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s337060661
p03975
C++
# -*- coding: utf-8 -*- def main(): n, a, b = map(int, input().split()) count = 0 for i in range(n): ti = int(input()) if a <= ti < b: pass else: count += 1 print(count) if __name__ == '__main__': main()
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:19:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 19 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:4:1: error: 'def' does not name a type 4 | def main()...
s994443669
p03975
C++
#include <vector> #include <iostream> #include <string> #include <map> #include <fstream> #include <sstream> #include <set> using namespace std; #define FOR(i,a,b) for(int i=a;i<b;i++) #define rep(i,b) FOR(i,0,b) #define INF mugen #define dump(x) cerr<<#x<<"="<<x<<endl #define all(a) (a).begin(),(a).end() typedef vecto...
a.cc:23:16: error: 'LLONG_MAX' was not declared in this scope 23 | const ll mod = LLONG_MAX; | ^~~~~~~~~ a.cc:8:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 7 | #include <set> +++ |+#include <climits> 8 | using namespace...
s616380565
p03975
C++
#include<bits/stdc++.h> int main() { int a,b,c,i,ans=0; cin>>a>>b>>c; int s[a]; for(i=0;i<a;i++) { cin>>s[i]; if(s[i]<b||s[i]>=c) ans++; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: n...
s817602545
p03975
C++
#include <stdio.h> int main() { int a,b,c,i,ans=0;。 scanf("%d%d%d",&a,&b,&c); int s[a]; for(i=0;i<a;i++) { scanf("%d",&s[i]); if(s[i]<b||s[i]>=c) ans++; } printf("%d\n",ans); }
a.cc:4:23: error: extended character 。 is not valid in an identifier 4 | int a,b,c,i,ans=0;。 | ^ a.cc: In function 'int main()': a.cc:4:23: error: '\U00003002' was not declared in this scope 4 | int a,b,c,i,ans=0;。 | ^~