submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s686675805
p01540
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> pii; int main(){ int n, m, x, y, xx, yy, ans; std::cin >> n >> m; vector<pii> t(n + 1) t[n].first = t[n].second = 1e9 + 7; for (int i = 0; i < n; i++) { scanf("%d %d", &tx[i], &ty[i]); } sort(t.begin(), t.end()); for (int i = 0; i ...
a.cc: In function 'int main()': a.cc:9:3: error: expected ',' or ';' before 't' 9 | t[n].first = t[n].second = 1e9 + 7; | ^ a.cc:11:21: error: 'tx' was not declared in this scope; did you mean 't'? 11 | scanf("%d %d", &tx[i], &ty[i]); | ^~ | t a.c...
s560363367
p01540
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int n, m; pair<int, int> x[10000]; int a, b, c, d, e, f, sum, l, r, m; int main() { cin >> n >> m; for (int i = 0; i < n; i++) { scanf("%d %d", &x[i].first, &x[i].second); } sort(x, x + n); for (int i = 0; i < m; i++) { scanf("%d %d %...
a.cc:7:34: error: redefinition of 'int m' 7 | int a, b, c, d, e, f, sum, l, r, m; | ^ a.cc:5:8: note: 'int m' previously declared here 5 | int n, m; | ^
s316371879
p01540
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n, m; cin >> n >> m; vector<int> A(n*n, 0); vector<int> x(n); vector<int> y(n); vector<int> xb(m); vector<int> yb(m); vector<int> xe(m); vector<int> ye(m); vector<int> xs; ...
a.cc: In function 'int main()': a.cc:79:2: error: expected '}' at end of input 79 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s646464356
p01540
C++
#include <iostream> #include <algorithm> using namespace std; int n, q, x1, y1, x2, y2, x[5555], y[5555]; pair<int, int> p[5555]; int main() { scanf("%d%d", &n, &q); for(int i = 0; i < n; i++) scanf("%d%d", &p[i].first, &p[i].second); sort(p, p + n); for(int i = 0; i < n; i++) x[i] = p[i].first, y[i] = p[i].second;...
a.cc:4:15: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch] 4 | int n, q, x1, y1, x2, y2, x[5555], y[5555]; pair<int, int> p[5555]; | ^~ a.cc: In function 'int main()': a.cc:12:36: error: invalid conversion from 'int*' to 'int' [-fpermissive] 12 | ...
s854748244
p01540
C++
#include <iostream> #include <algorithm> using namespace std; int n, q, xa, ya, xb, yb, x[5555], y[5555]; pair<int, int> p[5555]; int main() { scanf("%d%d", &n, &q); for(int i = 0; i < n; i++) scanf("%d%d", &p[i].first, &p[i].second); sort(p, p + n); for(int i = 0; i < n; i++) x[i] = p[i].first, y[i] = p[i].second;...
a.cc: In function 'int main()': a.cc:12:36: error: invalid conversion from 'int*' to 'int' [-fpermissive] 12 | int l = lower_bound(x, x + n, xa); | ~~~~~~~~~~~^~~~~~~~~~~~~~ | | | int* a.cc...
s462596233
p01540
C++
#include <iostream> #include <algorithm> using namespace std; int n, q, xa, ya, xb, yb, xc[5555], yc[5555], xd[5555], yd[5555]; pair<int, int> p1[5555], p2[5555]; int main() { scanf("%d%d", &n, &q); for(int i = 0; i < n; i++) scanf("%d%d", &p1[i].first, &p1[i].second), p2[i] = make_pair(p1[i].second, p1[i].first); s...
a.cc: In function 'int main()': a.cc:12:56: error: 'x' was not declared in this scope 12 | int l1 = lower_bound(xc, xc + n, xa) - x; | ^ a.cc:14:56: error: 'y' was not declared in this scope 14 | int l2 = lower_bound(yc, ...
s839719110
p01540
C++
#ifndef ___Class_RangeTree #define ___Class_RangeTree // ------ Includes ------ // #include <limits> #include <vector> #include <algorithm> template<typename Type> class RangeTree { private: int size_; std::vector<std::vector<Type> > dat; inline int query_(int a, int b, Type x, int k, int l, int r) { // Find rang...
a.cc:74:2: error: expected '}' at end of input 74 | } | ^ a.cc:9:41: note: to match this '{' 9 | template<typename Type> class RangeTree { | ^ a.cc: In constructor 'RangeTree<Type>::RangeTree(T, T)': a.cc:31:141: error: expected ')' before '{' token 31 | ...
s219634513
p01540
C++
#include <bits/stdc++.h> using namespace std; #define for_(i,a,b) for(int i=(a);i<(b);++i) #define allof(a) (a).begin(),(a).end() void uniqueVector(vector< int >& vec) { sort(allof(vec)); vec.erase(unique(allof(vec)), vec.end()); } void solve( int n, int m, const vector< int >& tx, const vector< int >& ty ) { ...
a.cc: In function 'void solve(int, int, const std::vector<int>&, const std::vector<int>&)': a.cc:32:17: error: expected initializer before 'scanf' 32 | scanf("%d %d %d %d", &lft, &bot, &rgt, &top); | ^~~~~ a.cc:37:53: error: 'top' was not declared in this scope 37 | ...
s266418879
p01540
C++
#include <iostream> #include <vector> using namespace std; struct Pos{ int x; int y; }; int Count(vector<Pos> pos, int x1, int y1, int x2, int y2){ int count = 0; for(int i = 0; i < pos.size(); i++){ Pos now = pos[i]; if(x1 <= now.x && now.x <= x2 && y1 <= now.y && now.y <= y2){ count++; } } return c...
a.cc: In function 'int main()': a.cc:41:22: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>') 41 | cout << treasure << "\n"; | ~~~~ ^~ ~~~~~~~~ | | | | | ...
s896833877
p01540
C++
#include <iostream> #include <vector> #include <string> #include <list> using namespace std; struct Pos{ int x; int y; }; int Count(list<Pos> pos, int x1, int y1, int x2, int y2){ int count = 0; list<int>::iterator itr = pos.begin(); for(int i = 0; i < pos.size(); i++,itr++){ Pos now = *itr; if(x1 <= now.x ...
a.cc: In function 'int Count(std::__cxx11::list<Pos>, int, int, int, int)': a.cc:15:44: error: conversion from '_List_iterator<Pos>' to non-scalar type '_List_iterator<int>' requested 15 | list<int>::iterator itr = pos.begin(); | ~~~~~~~~~^~ a.cc:17:27: error: conversi...
s632687967
p01540
C++
#include <bits/stdc++.h> #define int long long using namespace std; using pii=pair<int,int>; #define REPF(i,a,n) for(int i=(a);i<(int)(n);++i) #define REP(i,n) REPF(i,0,n) #define ALL(c) begin(c),end(c) #include "../tools/debug_local.hpp" int sum[5100][5100]; signed main() { int n,m; cin>>n>>m; vector<int...
a.cc:9:10: fatal error: ../tools/debug_local.hpp: No such file or directory 9 | #include "../tools/debug_local.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s873996347
p01540
C++
#include<iostream> #include<utility> #include<cstdio> #define F first #define S second using namespace std; int main(){ int n,m;cin>>n>>m; vector<pair<int,int> > pii(n); for(int i=0;i<n;i++) cin>>pii[i].first>>pii[i].second; for(int i=0;i<m;i++){ int x1,y1,x2,y2; cin>>x1>>y1>>x2>>y2; int cnt=0; ...
a.cc: In function 'int main()': a.cc:9:3: error: 'vector' was not declared in this scope 9 | vector<pair<int,int> > pii(n); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include<cstdio> +++ |+#include <vector> ...
s317037609
p01540
C++
#include<iostream> #include<cstdio> #define F first #define S second #define LIM 1000000010 #define pb push_back #define all(n) n.begin(),n.end() using namespace std; typedef pair<int,int> P; int dp[5002][5002]; int main(){ int n,m; vector<int> X,Y; while(cin >> n >> m){ for(int i=0;i<5000;i++)for(int j=...
a.cc: In function 'int main()': a.cc:14:3: error: 'vector' was not declared in this scope 14 | vector<int> X,Y; | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include<cstdio> +++ |+#include <vector> 3 | #define F...
s549865035
p01540
C++
#include <iostream> #include <sstream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> using namespace std; #define FOR(i,k,n) for(int i=(k); i<(int)(n);...
a.cc: In function 'int main()': a.cc:44:70: error: 'INT_MIN' was not declared in this scope 44 | vector<P>::iterator it = lower_bound(p.begin(), p.end(), P(x1, INT_MIN)); | ^~~~~~~ a.cc:15:1: note: 'INT_MIN' is defined in header '<climi...
s283169445
p01540
C++
#include <stdio.h> #include <map> #include <algorithm> #include <vector> using namespace std; #define rep(i,n) for(int i = 0; i < (int)n; i++) //FILE *in = freopen("input.txt", "r", stdin); struct BIT{ vector<int> bit; int size; BIT(int n){ size=n;bit=vector<int>(n+1); } void add(int i,int x){ i+=1; ...
a.cc: In function 'void input()': a.cc:67:32: error: reference to 'data' is ambiguous 67 | scanf("%d%d", &data[i][0], &data[i][1]); | ^~~~ In file included from /usr/include/c++/14/map:65, from a.cc:2: /usr/include/c++/14/bits/range_access.h:344:5...
s995117578
p01541
C++
#include<stdio.h> #include<hamakou.h> int main(){ return "意味がわからん"; }
a.cc:2:9: fatal error: hamakou.h: No such file or directory 2 | #include<hamakou.h> | ^~~~~~~~~~~ compilation terminated.
s695804347
p01541
C++
#include<stdio.h> int main(){ return "意味がわからん"; }
a.cc: In function 'int main()': a.cc:3:10: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 3 | return "意味がわからん"; | ^~~~~~~~~~~~~~~~ | | | const char*
s344064036
p01541
C++
#include<iostream> using namespace std; int main(){ fusei(); } int fusei(){ return fusei(); }
a.cc: In function 'int main()': a.cc:4:2: error: 'fusei' was not declared in this scope 4 | fusei(); | ^~~~~
s141707227
p01542
C++
#include<bits/stdc++.h> #define range(i,a,b) for(int i = (a); i < (b); i++) #define rep(i,b) for(int i = 0; i < (b); i++) #define all(a) (a).begin(), (a).end() #define show(x) cerr << #x << " = " << (x) << endl; using namespace std; template<typename T> ostream& operator << (ostream& os, vector<T>& v){ rep(i,v.size(...
a.cc: In function 'int dfs(std::string, int)': a.cc:151:39: error: continue statement not within a loop 151 | if(ans.first >= 1024) continue; | ^~~~~~~~
s806119558
p01542
C++
#include<iostream> #include<algorithm> using namespace std; string s; int n; char c[7] = {'0','1','+','-','*','(',')'}; const int up = 1<<10; int parse(int l,int r,int p){ if(r<=l)return -1; int k=0,a,b; for(int i=r-1;i>=l;i--){ if(s[i]=='(')k++; else if(s[i] == ')')k--; if(k>0)return -1; if(!k)...
a.cc: In function 'int parse(int, int, int)': a.cc:37:18: error: 'Darsein' was not declared in this scope; did you mean 'parse'? 37 | return a*b;Darsein | ^~~~~~~ | parse
s251309985
p01542
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<algorithm> #include<cstring> #include<sstream> #include<vector> #include<queue> #include<stack> #include<string> #include<climits> #include<map> #include<set> #include<cassert> #include<deque> #define REP(i,s,n) for(int i=s;i<n;i++) #define ...
a.cc: In member function 'int Parsing::expression()': a.cc:171:15: error: expected ';' before 'if' 171 | if(!(0<=p && p<1024))return FAILED; | ^~
s225183662
p01542
C++
#include<iostream> #include<vector> using namespace std; string in; vector<int> V; string wild = "01+-*()"; int ans = -1; bool isnum(string s){ for(int i = 0; i < s.length(); i++) if(s[i] != '0' && s[i] != '1') return false; return true; } bool ispara(string s){ int p = 1; if(s[0] != '(') return false;...
a.cc: In function 'int tob(std::string)': a.cc:64:3: error: 'reverse' was not declared in this scope 64 | reverse(s.begin(),s.end()); | ^~~~~~~ a.cc: In function 'int get(std::string)': a.cc:93:1: warning: control reaches end of non-void function [-Wreturn-type] 93 | } | ^
s206929802
p01542
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; string::iterator end; string::iterator begin; bool perseExpression(string::iterator & it, int * result); // bool perseNumber(string::iterator & it, int * result){ if(*it!='0' && *it!='1') return false; int max_length...
a.cc: In function 'bool perseVaule(std::__cxx11::basic_string<char>::iterator&, int*)': a.cc:39:3: error: 'perseValue' was not declared in this scope; did you mean 'perseVaule'? 39 | perseValue(temp, &v); | ^~~~~~~~~~ | perseVaule a.cc: In function 'bool perseTerm(std::__cxx11::basic_string<char>::...
s431860403
p01543
C++
//-------------------- typedef int Cost; struct Edge{int to,cap,rev;Cost cost;}; typedef vector<Edge> Edges; typedef vector<vector<Edge> > Graph; void add_edge(Graph &g,int from,int to,int cap,Cost cost=0){ g[from].pb((Edge){to,cap,g[to].size(),cost}); g[to].pb((Edge){from,0,g[from].size()-1,-cost}); } Cost INF=1e...
a.cc:4:9: error: 'vector' does not name a type 4 | typedef vector<Edge> Edges; | ^~~~~~ a.cc:5:9: error: 'vector' does not name a type 5 | typedef vector<vector<Edge> > Graph; | ^~~~~~ a.cc:7:6: error: variable or field 'add_edge' declared void 7 | void add_edge(Graph &g,int from...
s917419675
p01543
C++
#include <iostream> #include <vector> #include <cassert> #include <queue> #include <fstream> #include <set> #define VARNAME(x) #x #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = long long; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; class CostFlow { public:...
a.cc:14:19: error: 'numeric_limits' was not declared in this scope 14 | constexpr T INF = numeric_limits<T>::max() / 10; | ^~~~~~~~~~~~~~ a.cc:14:35: error: expected primary-expression before '>' token 14 | constexpr T INF = numeric_limits<T>::max() / 10; | ...
s228492948
p01543
C++
#include <iostream> #include <vector> #include <cassert> #include <queue> #include <fstream> #include <set> using namespace std; using ll = long long; template <typename T> constexpr T INF = numeric_limits<T>::max() / 10; class CostFlow { public: using Cost = ll; using Ind = int; using Capacity = ll; ...
a.cc:11:19: error: 'numeric_limits' was not declared in this scope 11 | constexpr T INF = numeric_limits<T>::max() / 10; | ^~~~~~~~~~~~~~ a.cc:11:35: error: expected primary-expression before '>' token 11 | constexpr T INF = numeric_limits<T>::max() / 10; | ...
s795512424
p01543
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s501746456
p01543
C++
#include <iostream> #include <algorithm> #include <queue> #define REP(i,n) for(int i=0; i<(int)(n); i++) #include <cstdio> inline int getInt(){ int s; scanf("%d", &s); return s; } #include <set> using namespace std; struct Edge{ int cap; // capacity int to; int rev; // reverse edge id Edge(){} Edge(int c,...
a.cc:56:71: error: 'fal' was not declared in this scope 56 | int minCostFlow(Graph<E> &graph, int s, int t, int f, bool negative = fal | ^~~ a.cc:57:3: error: expected ',' or '...' before 'typedef' 57 | typedef pair<int, int> P; |...
s433054290
p01543
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; struct Edge{ int src, dst, cap, cost, rev; Edge() {} Edge(int s, int d, int c, int cs, int r) : src(s), dst(d), cap(c), cost(cs), rev(r) {} }; struct MinCostFlow{ typedef pair...
/usr/bin/ld: /tmp/ccqbh7EC.o: warning: relocation against `_ZN11MinCostFlow3INFE' in read-only section `.text._ZN11MinCostFlow13min_cost_flowEiii[_ZN11MinCostFlow13min_cost_flowEiii]' /usr/bin/ld: /tmp/ccqbh7EC.o: in function `MinCostFlow::min_cost_flow(int, int, int)': a.cc:(.text._ZN11MinCostFlow13min_cost_flowEiii[_...
s160654738
p01544
C++
#include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 99999999999999999 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; typedef pair<int,int> P; #define NUM 4001 struct Edge{ Edge(int arg_to,int arg_rank){ to = arg_to;...
a.cc: In function 'int main()': a.cc:178:76: error: no matching function for call to 'max(short int&, int)' 178 | MAX_DIVIDE[next_loc][in_rank] = max(MAX_DIVIDE[next_loc][in_rank],left_div_num+1); | ~...
s590227571
p01544
C++
#include<cstdio> #include<cassert> #include<vector> #include<algorithm> using namespace std; const long long inf=1e13; struct RMQ{ int N; long long dat[8192]; void init(int N_){ N=1; while(N<N_) N*=2; for(int i=1;i<=N*2-1;i++) dat[i]=-inf; } void update(int i,long long x){ i+=N; while(i>0){ dat[i]=...
In file included from /usr/include/c++/14/cassert:44, from a.cc:2: a.cc: In function 'int main()': a.cc:104:24: error: 'flg' was not declared in this scope 104 | assert(flg); | ^~~
s690904874
p01544
C++
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } static int N; static int[] A; static int[] cum; void run() { Scanner sc = new Scanner(System.in); N = sc.nextInt(); A = ...
a.cc:91:17: error: stray '@' in program 91 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayList; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | i...
s422905102
p01544
C++
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } static int N; static int[] A; static int[] cum; void run() { Scanner sc = new Scanner(System.in); N = sc.nextInt(); A =...
a.cc:92:17: error: stray '@' in program 92 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayList; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | i...
s556628020
p01545
C
long long BIT[100010], bit_size; // long long は 64bit 整数. void bit_init(int n){ memset(BIT,0,n*(sizeof(long long))); bit_size = n; } long long bit_max(int n){ // [1,n] の最大値 long long ans = 0; while(n > 0){ ans = max(ans, BIT[n]); n &= n-1; } return ans; } void bit_setmax(int n, long long v){ // # [1,n] の最大値を ...
main.c: In function 'bit_init': main.c:3:9: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 3 | memset(BIT,0,n*(sizeof(long long))); | ^~~~~~ main.c:1:1: note: include '<string.h>' or provide a declaration of 'memset' +++ |+#include <string.h> 1 | long ...
s813816452
p01545
C++
#include <iostream> #include <algorithm> #include <utility> #include <vectortor> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <string> #include <sstream> #include <cstring> #include <cstdlib> using namespace std; #define ALL(c) c.begin(),c.end() #define RALL(c) c.rbegin(),c...
a.cc:4:10: fatal error: vectortor: No such file or directory 4 | #include <vectortor> | ^~~~~~~~~~~ compilation terminated.
s805889795
p01545
C++
#include <iostream> #include <vector> #include <map> #include <tuple> using namespace std; const int MAX_N = 1<<17; int n; int64_t dat[2*MAX_N-1]; void init(int n_){ n = 1; while(n<n_)n*=2; for(int i=0;i<2*n-1;i++) dat[i]=INT_MAX; } //0-indexed, k-th to a void update(int k, int64_t a){ k+=n-1; d...
a.cc: In function 'void init(int)': a.cc:15:37: error: 'INT_MAX' was not declared in this scope 15 | for(int i=0;i<2*n-1;i++) dat[i]=INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' ...
s499929041
p01545
C++
#include <iostream> #include <vector> #include <map> #include <tuple> using namespace std; const int MAX_N = 1<<17; int n; int64_t dat[2*MAX_N-1]; void init(int n_){ n = 1; while(n<n_)n*=2; for(int i=0;i<2*n-1;i++) dat[i]=1e12; } //0-indexed, k-th to a void update(int k, int64_t a){ k+=n-1; dat[...
a.cc: In function 'int64_t query(int, int, int, int, int)': a.cc:30:27: error: 'INT_MAX' was not declared in this scope 30 | if(r<=a||b<=l) return INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'...
s070641233
p01545
C++
#include <iostream> #include <vector> #include <map> #include <tuple> #include <climits> using namespace std; const int MAX_N = 1<<17; int n; int64_t dat[2*MAX_N-1]; void init(int n_){ n = 1; while(n<n_)n*=2; for(int i=0;i<2*n-1;i++) dat[i]=LLONG_MAX; } //0-indexed, k-th to a void update(int k, int64_t ...
a.cc: In function 'int main()': a.cc:53:5: error: 'sort' was not declared in this scope; did you mean 'short'? 53 | sort(V.begin(), V.end()); | ^~~~ | short
s112311946
p01545
C++
#include<bits/stdc++.h> #define int long long #define MAX 100001 using namespace std; int n,p,A[MAX*2],N; void Segtree(int n_){ n=1; while(n<n_)n*=2; } void update(int k,int x){ k+=n-1; A[k]=x; while(k>0){ k=(k-1)/2; A[k]=max(A[k*2+1],A[k*2+2]); } } int find(int a,int b,int k,int l,int r){ if(r<=a...
cc1plus: error: '::main' must return 'int'
s514689648
p01545
C++
#include <bits/stdc++.h> #define ALL(a) (a).begin(). (a).end() typedef long long ll; using namespace std; int main(){ int n; cin >> n; vector<ll> dp(n,0); vector<ll> sum(n,0); vector<ll> a(n); for(auto &e : a)cin >> e; for(auto itr = a.rbegin(); itr != a.rend(); ++itr){ int idx = distance(dp.begin(),lower_b...
a.cc: In function 'int main()': a.cc:3:29: error: expected unqualified-id before '(' token 3 | #define ALL(a) (a).begin(). (a).end() | ^ a.cc:16:59: note: in expansion of macro 'ALL' 16 | int idx = distance(dp.begin(),lower_bound(ALL(dp), a))-1; | ...
s104875859
p01545
C++
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <climits> using namespace std; long long bit[100010] = {}; void add(int x,int v){ for(int i = x ; i < 100010 ; i += i & -i ){ bit[i] = max(bit[i],v); } } long long get(int x){ long long ans = 0; for(int i = x ; i > 0 ; i -= i...
a.cc: In function 'void add(int, int)': a.cc:12:29: error: no matching function for call to 'max(long long int&, int&)' 12 | bit[i] = max(bit[i],v); | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/local...
s297203519
p01545
C++
#include<iostream> #include<vector> #include<algorithm> #include<climits> const int MAX_N=100000; using namespace std; int n,dat[2*MAX_N-1]; void init(int n_){ n=1; while(n<n_)n*=2; for(int i=0;i<2*n-1;i++)dat[i]=0; } void update(int k,int a){ k+=n-1; dat[k]=a; while(k>0){ k=(k-1)/2; dat[k]=max(dat[2*k...
a.cc: In function 'int main()': a.cc:48:24: error: no matching function for call to 'max(long long int&, int&)' 48 | ans=max(ans,dat[in+n-1]); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_cl...
s956648004
p01545
C++
#include<iostream> #include<algorithm> using namespace std; typedef long long Int; Int bit[105000]; void setnum(int pos, int val){ while(pos < 105000){ bit[pos] = max(val, bit[pos]); pos += pos & -pos; } } Int maxnum(int pos){ Int res = 0; while(pos){ res = max(res, bit[pos]); } return res; } int main...
a.cc: In function 'void setnum(int, int)': a.cc:12:31: error: no matching function for call to 'max(int&, Int&)' 12 | bit[pos] = max(val, bit[pos]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bit...
s453084620
p01545
C++
#include<iostream> #include<algorithm> using namespace std; typedef long long Int; Int bit[105000]; void setnum(int pos, Int val){ while(pos < 105000){ bit[pos] = max(val, bit[pos]); pos += pos & -pos; } } Int maxnum(int pos){ Int res = 0; while(pos){ res = max(res, bit[pos]); pos -= pos &-pos } retu...
a.cc: In function 'Int maxnum(int)': a.cc:21:33: error: expected ';' before '}' token 21 | pos -= pos &-pos | ^ | ; 22 | } | ~
s823376356
p01546
C++
#include <bits/stdc++.h> using namespace std; const int logMaxStep = 30; typedef long long ll; typedef vector< vector<ll> > Graph; int GetLogStep(int S) { int res; for (res = 0; (1 << res) <= S; ++res); return res; } Graph nextG(const Graph& g1, const Graph& g2) { int N = g1.size(); Graph res(N, vector<ll>(N, ...
a.cc: In function 'int main()': a.cc:104:22: error: 'check1000Step' was not declared in this scope; did you mean 'check200Step'? 104 | int result = check1000Step(G, K); | ^~~~~~~~~~~~~ | check200Step
s120090434
p01546
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; const ld eps=1e-9; //// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa...
a.cc: In function 'int main()': a.cc:109:26: error: too few arguments to function 'bool check(const type&, long long int, int, bool)' 109 | if (check(times,amid, K)) { | ~~~~~^~~~~~~~~~~~~~~ a.cc:73:6: note: declared here 73 | bool check(const type &ts,const long long int ...
s019241840
p01546
C++
#include<cstdio> #include<vector> #include<algorithm> #define bigas(a,b) if(a<b){a=b;} using namespace std; int main(void){ int h=0,i=0,j=0,m=0,ex=0,ans=0,V,E,K,x,y,z; static int ya[18][150][150]={0};//ya[i][x][y]???x??????y???2^i??¬???????????´????????¢??°????????? static int gen[150]={0};//gen[x]???x??´???????????...
a.cc: In function 'int main()': a.cc:45:41: error: 'bigas' was not declared in this scope 45 | bigas{ya[h][i][j],ya[h-1][i][m]+ya[h-1][m][j]}; | ^~~~~
s747678297
p01546
C++
//stl???????????? //I don't know STL??? //I plactice now??? //OH! WRONG ANSWER!! #include<cstdio> #include<vector> #include<algorithm> #define bigas(a,b) if(a<b){a=b;} using namespace std; int main(void){ int h=0,i=0,j=0,m=0,ex=0,ans=0,V,E,K,x,y,z; static int ya[18][150][150]={0};//ya[i][x][y]???x??????y???2^i??¬???...
a.cc: In function 'int main()': a.cc:87:70: error: expected '}' at end of input 87 | if(ans+500<(1<<18)){printf("%d\n",ans);}else{printf("-1\n");} | ^ a.cc:11:15: note: to match this '{' 11 | int main(void){ | ^...
s791051236
p01546
C++
#include <bits/stdc++.h> #define FOR(i,k,n) for(int i=(k);i<int(n);++i) #define REP(i,n) FOR(i,0,n) #define ALL(x) begin(x),end(x) using namespace std; constexpr int64_t INF = INT64_C(1000000000000000000); using Array = vector<int64_t>; using Matrix = vector<Array>; Matrix mul(const Matrix& lhs, const Matrix& rhs) {...
a.cc: In function 'int main()': a.cc:42:12: error: no matching function for call to 'max(int, int64_t&)' 42 | REP(i,max(100,v)) { | ~~~^~~~~~~ a.cc:2:40: note: in definition of macro 'FOR' 2 | #define FOR(i,k,n) for(int i=(k);i<int(n);++i) | ^ a.cc:42:...
s811648588
p01547
C++
#include <algorithm> #include <cassert> #include <cmath> #include <cstdlib> #include <iostream> #include <vector> #ifdef LOCAL #include "dump.hpp" #elif #define dump(...) #endif using namespace std; template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } // * geometry library typedef double Real...
a.cc:10:6: error: #elif with no expression 10 | #elif | ^ a.cc:47:25: error: invalid use of incomplete type 'struct std::array<point, 2>' 47 | struct segment : public array<point, 2> { | ^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, ...
s888908343
p01547
C++
#include <algorithm> #include <cassert> #include <cmath> #include <cstdlib> #include <iostream> #include <vector> #ifdef LOCAL #include "dump.hpp" #else #define dump(...) #endif using namespace std; template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } // * geometry library typedef double Real...
a.cc:47:25: error: invalid use of incomplete type 'struct std::array<point, 2>' 47 | struct segment : public array<point, 2> { | ^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, fro...
s430114455
p01547
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s392639660
p01547
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for (int i=0; i < (n); i++) typedef double D; typedef complex<D> P; typedef pair<P, P> L; typedef vector<P> VP; typedef vector<VP> Vcon; const D EPS = 1e-7; #define X real() #define Y imag() #define LE(n,m) ((n) < (m) + EPS) #define GE(n,m) ((n) + EPS > (m)...
a.cc: In function 'VP convexHull(VP)': a.cc:71:47: error: 'i' was not declared in this scope 71 | while (k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k; | ^
s508834218
p01547
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for (int i=0; i < (n); i++) typedef double D; typedef complex<D> P; typedef pair<P, P> L; typedef vector<P> VP; typedef vector<VP> Vcon; const D EPS = 1e-7; #define X real() #define Y imag() #define LE(n,m) ((n) < (m) + EPS) #define GE(n,m) ((n) + EPS > (m)...
a.cc: In function 'VP convexHull(VP)': a.cc:71:47: error: 'i' was not declared in this scope 71 | while (k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k; | ^ a.cc:73:17: error: 't' was not declared in this scope 73 | while (k >= t && ccw(ch[k-2], ch[k-1...
s742955395
p01548
C++
2#include <iostream> #include <cstdio> #include <cassert> #include <algorithm> #include <vector> #include <cmath> using namespace std; const int MAX_M = 2000; const int MAX_N = 2000; const double EPS = 1e-8; bool EQ(double a, double b) { return abs(a - b) < EPS; } double P1[MAX_M + 1][MAX_M + 1]; // P1[m][x] ::...
a.cc:1:2: error: stray '#' in program 1 | 2#include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2#include <iostream> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, ...
s403846201
p01548
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(a) a.begin(), a.end() #define MS(m,v) memset(m,v,sizeof(m)) typedef long long ll; typedef long double double; typedef vector<int> vi; typedef vector<string> vs; typedef pair<...
a.cc:8:14: error: multiple types in one declaration 8 | typedef long double double; | ^~~~~~ a.cc:8:21: error: declaration does not declare anything [-fpermissive] 8 | typedef long double double; | ^~~~~~ a.cc:14:7: error: 'ld' does not name a type; did you mean 'll'...
s624351919
p01549
C
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <bitset> #include <string> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <algorithm> #define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i) #define REP(i,n) FOR(i,0,n) #define FORIT(i,c) for(__t...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s361489829
p01549
C++
#[allow(unused_imports)] use std::cmp::*; #[allow(unused_imports)] use std::collections::*; use std::io::Read; #[allow(dead_code)] fn getline() -> String { let mut ret = String::new(); std::io::stdin().read_line(&mut ret).ok().unwrap(); ret } fn get_word() -> String { let mut stdin = std::io::stdin(); ...
a.cc:1:2: error: invalid preprocessing directive #[ 1 | #[allow(unused_imports)] | ^ a.cc:3:2: error: invalid preprocessing directive #[ 3 | #[allow(unused_imports)] | ^ a.cc:6:2: error: invalid preprocessing directive #[ 6 | #[allow(dead_code)] | ^ a.cc:32:2: error: invalid preprocessi...
s636326514
p01549
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned char uc; int main(){ int m; cin>>m; int l[m],r[m]; map<string,int> ms; for(int i=0;i<m;i++){ string s; cin>>s>>l[i]>>r[i]; ms[s]=i; } int n; cin>>n; string ss[n]; for(int i=0;i<n;i++) cin>>ss[i]; bool f=0; time_t start=clo...
a.cc: In function 'int main()': a.cc:20:9: error: cast from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'unsigned int' loses precision [-fpermissive] 20 | srand(unsigned(time)); | ^~~~~~~~~~~~~~
s337472187
p01549
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned char uc; int main(){ int m; cin>>m; int l[m],r[m]; map<string,int> ms; for(int i=0;i<m;i++){ string s; cin>>s>>l[i]>>r[i]; ms[s]=i; } int n; cin>>n; string ss[n]; for(int i=0;i<n;i++) cin>>ss[i]; bool f=0; time_t start=clo...
a.cc: In function 'int main()': a.cc:20:9: error: cast from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'unsigned int' loses precision [-fpermissive] 20 | srand(unsigned(time)); | ^~~~~~~~~~~~~~
s754920311
p01549
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned char uc; int main(){ int m; cin>>m; int l[m],r[m]; map<string,int> ms; for(int i=0;i<m;i++){ string s; cin>>s>>l[i]>>r[i]; ms[s]=i; } int n; cin>>n; string ss[n]; for(int i=0;i<n;i++) cin>>ss[i]; bool f=0; time_t start=clo...
a.cc: In function 'int main()': a.cc:20:9: error: cast from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'unsigned int' loses precision [-fpermissive] 20 | srand(unsigned(time)); | ^~~~~~~~~~~~~~
s868277975
p01549
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned char uc; int main(){ int m; cin>>m; int l[m],r[m]; map<string,int> ms; for(int i=0;i<m;i++){ string s; cin>>s>>l[i]>>r[i]; ms[s]=i; } int n; cin>>n; string ss[n]; for(int i=0;i<n;i++) cin>>ss[i]; bool f=0; time_t start=clo...
a.cc: In function 'int main()': a.cc:20:9: error: cast from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'unsigned int' loses precision [-fpermissive] 20 | srand(unsigned(time)); | ^~~~~~~~~~~~~~
s772576608
p01549
C++
#include<iostream> #include<vector> #include<string> #include<map> #include<stack> #include<array> using namespace std; #define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++) #define rep(i,n) FOR((i),0,(n)) typedef long long ll; map<string,array<int,256> >data; const int INF=1e9+7; int main(){ int m; bool f=true; cin>>...
a.cc: In function 'int main()': a.cc:25:25: error: reference to 'data' is ambiguous 25 | data[str][i]=1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/inc...
s501793237
p01549
C++
#include <algorithm> #include <iostream> #include <map> #include <cstdio> inline int getInt(){ int s; scanf("%d", &s); return s #define REP(i,n) for(int i=0; i<(int)(n); i++) #include <queue> #include <set> #include <stack> using namespace std; struct Number{ vector<int> cand; Number(int s, int e){ for(int i...
a.cc: In function 'int getInt()': a.cc:5:54: error: expected ';' before 'namespace' 5 | inline int getInt(){ int s; scanf("%d", &s); return s | ^ | ; In file included from /usr/include/c++/14/bits/s...
s695843961
p01549
C++
#include<iostream> #include<cstdio> #include<functional> #include<cstdlib> #include<stdexcept> #include<numeric> #include<cmath> #include<fstream> #include<memory> #include<algorithm> #include<cstring> #include<ctime> #include<deque> #include<sstream> #include<iomanip> #include<sstream> #include<vector> #include<queue>...
a.cc: In function 'bool calc(std::set<int>&, std::set<int>&, std::string, std::stack<std::set<int> >&)': a.cc:78:8: error: invalid types '<unresolved overloaded function type>[const char [13]]' for array subscript 78 | index[My] = C; | ^
s629304390
p01549
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <cassert> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include...
a.cc:25:2: error: stray '#' in program 25 | &#160;&#160;&#160; | ^ a.cc:25:8: error: stray '#' in program 25 | &#160;&#160;&#160; | ^ a.cc:25:14: error: stray '#' in program 25 | &#160;&#160;&#160; | ^ a.cc:27:2: error: stray '#' in program 27 | &#160;&#160;&#160; ...
s884822238
p01550
C
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <cassert> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s219719219
p01550
C
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <cassert> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s961594600
p01551
C++
// BEGIN CUT HERE #ifdef _MSC_VER #include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <numeric> #include <cctype> #include <tuple>...
a.cc: In function 'int main()': a.cc:101:24: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 101 | auto &x = parse(str); | ~~~~~^~~~~
s737673290
p01551
C++
#include <cstdio> #include <string> #include <iostream> #include <vector> #include <map> #include <cctype> #include <cstring> #include <sstream> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef string::const_iterator State; typedef pair<int,int> P; int n[4]; int m; string str[51]; map<strin...
a.cc:19:17: error: 'std::map<std::__cxx11::basic_string<char>, int> index' redeclared as different kind of entity 19 | map<string,int> index; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:7: /usr/include...
s346716689
p01551
C++
#include <cstdio> #include <string> #include <iostream> #include <vector> #include <map> #include <cctype> #include <cstring> #include <sstream> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef string::const_iterator State; typedef pair<int,int> P; int n[4]; int all; int m; string str[51]; ...
a.cc: In function 'int main()': a.cc:129:41: error: expected ')' before ':' token 129 | printf("%lld\n",all==rule.size():dp[n[0]][n[1]][n[2]][n[3]]?0); | ~ ^ | )
s662962535
p01551
C++
#include<bits/stdc++.h> using namespace std; typedef vector<ll> vi; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef vector<vvvi> vvvvi; #define ll long long; const ll MOD=1e9+7; string get_str(int& p,string& s){ string res=""; while(isalpha(s[p])){ res+=s[p]; p++; } return res; } const int M...
a.cc:3:16: error: 'll' was not declared in this scope 3 | typedef vector<ll> vi; | ^~ a.cc:3:16: note: the macro 'll' had not yet been defined a.cc:7:9: note: it was later defined here 7 | #define ll long long; | ^~ a.cc:3:18: error: template argument 1 is invalid 3 | type...
s553073944
p01551
C++
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> #include <time.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 100000...
a.cc: In function 'int main()': a.cc:229:64: error: invalid types 'll {aka long long int}[int]' for array subscript 229 | if(dp[CURRENT][a][g][c][t] == 0)continue; | ^
s952211066
p01551
C++
table= {} DP = [-1]*200 def solve(dict,key): global table if key in table: # print('key=',key) return table[key] ret = [] #print(key) for i in dict[key]: if i[0] == '[': ret.append(i[1:-1]) else: ret += (solve(dict, i)) if len(ret) > 200: ...
a.cc:6:10: error: invalid preprocessing directive #print 6 | # print('key=',key) | ^~~~~ a.cc:9:6: error: invalid preprocessing directive #print 9 | #print(key) | ^~~~~ a.cc:17:22: error: empty character constant 17 | table[i]='' | ^...
s940607152
p01551
C++
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream>s #include <queue> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cs...
a.cc:12:10: fatal error: sstream>: No such file or directory 12 | #include <sstream>s | ^~~~~~~~~~ compilation terminated.
s012179428
p01551
C++
#include<cstdio> #include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) class Rule{ public: bool isempty(char c){ return c==':' || c==' ' || c=='\n' || c==0; } Rule(char* str){ int ...
a.cc: In constructor 'Rule::Rule(char*)': a.cc:19:27: error: 'strlen' was not declared in this scope 19 | int len = strlen(str); | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include...
s017269355
p01551
C++
#include<cstdio> #include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<cstring> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) class Rule{ public: bool isempty(char c){ return c==':' || c==' ' || c=='\n' || c==0; } Rule(...
a.cc: In function 'void make_state_req(int)': a.cc:85:44: error: 'nb' was not declared in this scope; did you mean 'nt'? 85 | if(state.size()>na+nb+nc+nd)continue; | ^~ | nt a.cc:85:50: error: 'n...
s261176683
p01552
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; import static java.lang.Integer.parseInt; /** * YAML */ public class P2438 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(S...
Main.java:11: error: class P2438 is public, should be declared in a file named P2438.java public class P2438 { ^ 1 error
s333796950
p01552
Java
import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; /** * YAML */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new ...
Main.java:1: error: package com.sun.istack.internal does not exist import com.sun.istack.internal.NotNull; ^ Main.java:2: error: package com.sun.istack.internal does not exist import com.sun.istack.internal.Nullable; ^ 2 errors
s271862156
p01552
C
#include <stdio.h> #include <string.h> #include <stdlib.h> char* F(char *b,int n,FILE *f){char *r=fgets(buf,n,f);if(!r)return NULL;buf[strlen(b)-1]=0;return r;} char Q[29999],*q[9],L[29999]; int n; dfs(old_indent,depth){ int indent=0; if(!F(L,sizeof(L),stdin)){puts("no such property");exit(0);} for(;L[indent]==' ';i...
main.c: In function 'F': main.c:4:46: error: 'buf' undeclared (first use in this function) 4 | char* F(char *b,int n,FILE *f){char *r=fgets(buf,n,f);if(!r)return NULL;buf[strlen(b)-1]=0;return r;} | ^~~ main.c:4:46: note: each undeclared identifier is reported only...
s839359392
p01552
C++
hoge
a.cc:1:1: error: 'hoge' does not name a type 1 | hoge | ^~~~
s525348908
p01552
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc:45:16: error: declaration of 'value* mapping_item::value' changes meaning of 'value' [-Wchanges-meaning] 45 | value *value; | ^~~~~ a.cc:45:9: note: used here to mean 'struct value' 45 | value *value; | ^~~~~ a.cc:39:8: note: declared here 39 | struct val...
s394243924
p01553
C
#include<stdio.h> #define Prime 1000000007 int main(void){ int n,i,j; char c[202]; long long dp[202][202]={{1}}; scanf("%d",&n); for(i=0;i<n;i++) scanf("%s",&c[i]); for(i=0;i<n;i++){ for(j=0;j<n+1;j++){ if(c[i]=='D'){ dp[i+1][j]+=dp[i][j]*j; if(j)dp[i+1][j-1]+=dp[i][j]*i*j; dp[...
main.c: In function 'main': main.c:19:15: warning: comparison between pointer and integer 19 | }else if(c=='U'){ | ^~ main.c:27:3: error: expected declaration or statement at end of input 27 | return 0;} | ^~~~~~
s589910128
p01553
C
#include<stdio.h> #define Prime 1000000007 int main(void){ int n,i,j; char c[202][20]; long long dp[202][202]={{1}}; scanf("%d",&n); for(i=0;i<n;i++) scanf("%s",&c[i]); for(i=0;i<n;i++){ for(j=0;j<n+1;j++){ if(c[i][0]=='D'){ dp[i+1][j]+=dp[i][j]*j; if(j)dp[i+1][j-1]+=dp[i][j]*i*j; ...
main.c: In function 'main': main.c:27:3: error: expected declaration or statement at end of input 27 | return 0;} | ^~~~~~
s274307616
p01553
C++
#include <iostream> using namespace std; typedef long long ll; const int MN = 220; const ll MD = 1e9+7; int n; int d[MN]; ll dp[MN][MN]; ll solve(int i, int j) { if (i == 0) { if (j == 0) return 1; return 0; } if (dp[i][j] != -1) return dp[i][j]; ll &res = dp[i][j]; if (d[i-1] ==...
a.cc: In function 'int main()': a.cc:31:5: error: 'memset' was not declared in this scope 31 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s360015992
p01553
C++
#include<stdio.h> #define Prime 1000000007 int main(void){ int n,i,j; char c[202][20]; long long dp[202][202]={{1}}; scanf("%d",&n); for(i=0;i<n;i++) scanf("%s",&c[i]); for(i=0;i<n;i++){ cnt=0; for(j=0;j<n+1;j++){ if(c[i][0]=='D'){ dp[i+1][j-cnt]+=dp[i][j-cnt]*(j-cnt); if(j)dp[i+1][j...
a.cc: In function 'int main()': a.cc:13:1: error: 'cnt' was not declared in this scope; did you mean 'int'? 13 | cnt=0; | ^~~ | int
s595080912
p01553
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll mod=1e9+7; ll add(ll a,ll b){ return (a+b+mod+mod)%mod; } ll mul(ll a,ll b){ return (a*b)%mod; } map< vector<int> , ll > dp[201][201]; string S; ll rec(int dep,int cnt,vector<int> v){ for(int i=0;i<(int)v.size();i++){ if(v[i]<0)return 0...
a.cc: In function 'll rec(int, int, std::vector<int>)': a.cc:42:22: error: a function-definition is not allowed here before '{' token 42 | int solve(string str){ | ^ a.cc:53:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 53 | int main(){ ...
s627030538
p01553
C++
#include <iostream> #include <algorithm> using namespace std; const long long int MOD = 1000000007LL; long long int dp[210][210]; int main() { int N; cin >> N; dp[0][0] = 1; for(int i=0; i<N; i++) { char c; cin >> c; for(int j=0; j<=i; j++) { if(c == '-') { dp[i+1][j] = dp[i][j]; } ...
a.cc:41:1: error: expected unqualified-id before numeric constant 41 | 5 | ^
s159387100
p01553
C++
#include <iostream> #include <algorithm> using namespace std; const long long int MOD = 1000000007LL; long long int dp[210][210]; int main() { int N; cin >> N; dp[0][0] = 1; for(int i=0; i<N; i++) { char c; cin >> c; for(int j=0; j<=i+1; j++) { if(c == '-') { dp[i+1][j] = dp[i][j]; ...
a.cc:66:1: error: expected unqualified-id before numeric constant 66 | 8 | ^
s331865643
p01553
C++
#include <iostream> #include <algorithm> using namespace std; const long long int MOD = 1000000007LL; long long int dp[210][210]; int main() { int N; cin >> N; dp[0][0] = 1; for(int i=0; i<N; i++) { char c; cin >> c; for(int j=0; j<=i+1; j++) { if(c == '-') { dp[i+1][j] = dp[i][j]; ...
a.cc:72:1: error: expected unqualified-id before numeric constant 72 | 8 | ^
s824654325
p01553
C++
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; const long long int MOD = 1000000007LL; long long int dp[210][210]; int main() { int N; cin >> N; dp[0][0] = 1; for(int i=0; i<N; i++) { char c; cin >> c; for(int j=0; j<=i+1; j++) { if(c == '-') { dp[i+1][j] ...
a.cc:75:1: error: expected unqualified-id before numeric constant 75 | 8 | ^
s461704126
p01554
Java
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { solve2440(); } public static void solve2440() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); HashSe...
Main.java:29: error: reached end of file while parsing } ^ 1 error
s078361307
p01554
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ run(); } public void run() { try { // インプットデータ取得 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int cardNo = Integer.parse...
Main.java:8: error: non-static method run() cannot be referenced from a static context run(); ^ 1 error
s125150670
p01554
Java
import java.util.*; public class MainTwo { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int lock = 0; int n = sc.nextInt(); String[] u = new String[n]; for (int i = 0; i < n; i++) u[i] = sc.next(); int m = sc.nextInt(); String t; for (int i = 0; i < m; i++) { t =...
Main.java:3: error: class MainTwo is public, should be declared in a file named MainTwo.java public class MainTwo { ^ 1 error
s125768953
p01554
C
#include <stdio.h> #include <stdlib.h> #include <string.h> enum{ OPEN, CLOSE }; typedef struct{ char id[20]; } ID; int isID(char id[], ID* reg, int regSize){ int i; for(i = 0; i < regSize; i++){ if(strcmp(id, reg[i].id)!){ return 1; } } return 0; } int main(void){ ...
main.c: In function 'isID': main.c:14:33: error: expected ')' before '!' token 14 | if(strcmp(id, reg[i].id)!){ | ~ ^ | )
s812935853
p01554
C
#include<stdio.h> #include<string.h> int main(){ int n,d=1,m,i; char s[300][20],c[20],w[][20]={"Opened by","Closed by","Unknown"}; scanf("%d",&n);#include<stdio.h> #include<string.h> int main(){ int n,d=1,m,i; char s[300][20],c[20],w[][20]={"Opened by","Closed by","Unknown"}; scanf("%d",&n); for(i=0;i<n;i...
main.c: In function 'main': main.c:6:18: error: stray '#' in program 6 | scanf("%d",&n);#include<stdio.h> | ^ main.c:6:19: error: 'include' undeclared (first use in this function) 6 | scanf("%d",&n);#include<stdio.h> | ^~~~~~~ main.c:6:19: note: each undeclared...
s469765402
p01554
C
int main() { int N, M, i, lock; char U[300][11]; char s[11]; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%s", U[i]); } scanf("%d", &M); lock = 1; while (m--) { scanf("%s", s); for (i = 0; i < N; i++) { if (strcmp(s, U[i]) == 0 && lock) { ...
main.c: In function 'main': main.c:6:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d", &N); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main() { main.c:6:5: warning: incompat...
s809587428
p01554
C
#include <stdio.h> #include <string.h> int main() { int N, M, i, lock; char U[300][11]; char s[11]; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%s", U[i]); } scanf("%d", &M); lock = 1; while (m--) { scanf("%s", s); for (i = 0; i < N; i++) { if (str...
main.c: In function 'main': main.c:17:12: error: 'm' undeclared (first use in this function) 17 | while (m--) { | ^ main.c:17:12: note: each undeclared identifier is reported only once for each function it appears in
s718865379
p01554
C
#include<iostream> #include<set> #include<string> using namespace std; set<string> ids; bool open = false; int main(){ int N,M; cin >> N; for(int i = 0;i < N;i++){ string str; cin >> str; ids.insert(str); } cin >> M; for(int i = 0;i < M;i++){ string str; cin >> str; if(ids.find(str)...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s184191560
p01554
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; i++) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc:41:6: error: 'bool close' redeclared as different kind of entity 41 | bool close = true; | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/14/csignal:42, from /usr/in...