submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s736956278
p01701
C++
#include<iostream> #include<string> using namespace std; int main(){string s; while(cin>>s&&s!="#"){ int a=1,b=(s[0]=='w')?90:0,i; for(i=s.size()-1;i;i--){ if(s[i]=='n')a*=2,b=2*b-90; if(s[i]=='w')a*=2,b=2*b+90; }while(!a%2&&!b%2))a/=2,b/=2; cout<<b;if(a-1&&b)cout<<"/"<<a;cout<<endl; }return 0; }
a.cc: In function 'int main()': a.cc:10:35: error: expected primary-expression before ')' token 10 | }while(!a%2&&!b%2))a/=2,b/=2; | ^
s437313696
p01701
C++
concatenation
a.cc:1:1: error: 'concatenation' does not name a type 1 | concatenation | ^~~~~~~~~~~~~
s875383736
p01701
C++
concatenation
a.cc:1:1: error: 'concatenation' does not name a type 1 | concatenation | ^~~~~~~~~~~~~
s498362378
p01702
C++
def inv(bit,m) bs = bit.to_s(2) if bs.length < m bs = "0" * (m - bs.length) + bs end ret = "" bs.each_char do |c| ret << (c == "0" ? "1" : "0") end ret.to_i(2) end conv = ('0'..'9').to_a + ('A'..'Z').to_a loop do n, m, q = gets.split.map(&:to_i) break if n == 0 && m =...
a.cc:1:1: error: 'def' does not name a type 1 | def inv(bit,m) | ^~~
s656496919
p01702
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main() { int n, m, q; while (cin >> n >> m >> q && n != 0 || m != 0 || q != 0) { vector<string> S, B; for (int i = 0; i < q; i++) { char chars[40]; char charb[1100]; cin >> chars >> charb; S.push_back(chars); B.push_...
a.cc: In function 'int main()': a.cc:23:17: error: 'memset' was not declared in this scope 23 | memset(SL, -1, sizeof SL); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |...
s852912916
p01702
C++
#include <string> #include <iostream> #define to36(x) (x < 10 ? (char)(x + 48) : (char)(x + 55)) #ifdef _MSC_VER #define __builtin_popcount __popcnt #endif using namespace std; int N, M, Q; long long a[1009], b[1009]; string s[1009], t; int main() { while (cin >> N >> M >> Q, N) { fill(a, a + Q, 0); fill(b, b + M,...
a.cc: In function 'int main()': a.cc:22:79: error: 'log2' was not declared in this scope 22 | if (__builtin_popcount(b[i]) == 1) cout << to36((int)(log2(b[i]))); | ^~~~ a.cc:3:18: note: in definition of macro ...
s941083829
p01704
C
#include <iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<vector> using namespace std; const int maxn=100010; int n,W,vw[maxn],pf[maxn],vf[maxn],th[maxn]; double calc(double a) { double cost=0; for(int i=1;i<=n;i++) { double F=th[i]-a*vw[i]; if(F<=0) continue; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s202473937
p01704
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef double flt; const int MAXN = 100000 + 10; const flt eps = 1e-9; int vw[MAXN], pf[MAXN], vf[MAXN], th[MAXN]; int N, pw; flt calc(flt W) { flt cost = W * pw; for (int i = 0; i < N; ++ i) { flt need = th[i] - ...
a.cc: In function 'int main()': a.cc:37:33: error: expected ')' before ';' token 37 | printf("%.10f\n", calc(left); | ~ ^ | )
s051550515
p01704
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; const int My_Inf = 2147483647; const long long int My_LInf = 9223372036854775807; struct plant { double fertrate; double lovewater; double vital; }; double pw; vector<plant>plants; double getmon(const double water...
a.cc: In function 'int main()': a.cc:60:24: error: 'setprecison' was not declared in this scope 60 | cout <<setprecison(22)<<fixed<< ans << endl; | ^~~~~~~~~~~
s838306998
p01704
C++
d
a.cc:1:1: error: 'd' does not name a type 1 | d | ^
s772980865
p01704
C++
s
a.cc:1:1: error: 's' does not name a type 1 | s | ^
s716191810
p01704
C++
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ int n; cin >> n; if(!n) break; double pw; cin >> pw; vector<double> vw(n); vector<double> pf(n); vector<double> vf(n); vector<double> th(n); for(int i = 0; i < n; i++){ ci...
a.cc: In function 'int main()': a.cc:52:13: error: expected ';' before '}' token 52 | return 0 | ^ | ; 53 | } | ~
s148602501
p01706
Java
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main{ @SuppressWarnings("unchecked") public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt();// the number of cities int m = sc....
Main.java:212: error: reached end of file while parsing } ^ 1 error
s605474091
p01706
Java
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { @SuppressWarnings("unchecked") public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt();// the number of cities int m = sc...
Main.java:212: error: reached end of file while parsing } ^ 1 error
s070362642
p01706
Java
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { @SuppressWarnings("unchecked") public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt();// the number of cities int m = sc...
Main.java:30: error: non-static variable this cannot be referenced from a static context g[a].add(new Edge(a, b, 1)); ^ Main.java:31: error: non-static variable this cannot be referenced from a static context g_rev[b].add(new Edge(b, a, 1)); ^ Main.java:33: error: non-static variab...
s765858620
p01706
Java
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args) { new Reverse_a_Road_2().solver(); } @SuppressWarnings("unchecked") void solver(){ Scanner sc = new Scanner(System.in); while (true) { int n...
Main.java:8: error: cannot find symbol new Reverse_a_Road_2().solver(); ^ symbol: class Reverse_a_Road_2 location: class Main 1 error
s536236256
p01706
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<map> #include<set> #include<string> #include<stack> #include<cstdio> #include<cmath> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> P; typedef pair<int,P> P1; #define fr first #define sc second #...
a.cc: In member function 'void flow::add_edge(int, int, int)': a.cc:47:44: warning: narrowing conversion of '((flow*)this)->flow::G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing] 47 | edge a = {to,cap,G[to].size()}; | ...
s676297231
p01706
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<map> #include<set> #include<string> #include<stack> #include<cstdio> #include<cmath> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> P; typedef pair<int,P> P1; #define fr first #define sc second #...
a.cc: In member function 'void flow::add_edge(int, int, int)': a.cc:47:44: warning: narrowing conversion of '((flow*)this)->flow::G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing] 47 | edge a = {to,cap,G[to].size()}; | ...
s414460312
p01707
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <complex> #include <string> #include <sstream> #include <algorithm> #include <numeric> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> using namespace std; typede...
a.cc: In function 'int main()': a.cc:67:35: error: no matching function for call to 'min(ll&, int&)' 67 | for(int i=1;i<=min(D,N);i++) | ~~~^~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, ...
s833521976
p01707
C++
#include<stdio.h> #include<iostream> #include<queue> #include<algorithm> #include<map> #include<vector> #include<cstring> #include<cmath> inline long long Input(){ long long ret=0;bool isN=0;char c=getchar(); while(c<'0' || c>'9'){ if(c=='-') isN=1; c=getchar(); } while(c>='0' && c<='9')...
a.cc: In function 'int main()': a.cc:108:27: error: no matching function for call to 'min(int&, long long int&)' 108 | for(int i=1;i<=min(n,d);i++) | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s951328495
p01707
C++
#include<stdio.h> #include <iostream> #include <math.h> #include <numeric> #include <vector> #include <map> #include <functional> #include <stdio.h> #include <array> #include <algorithm> #include <string> #include <string.h> #include <assert.h> #include <stdio.h> #include <queue> #include<iomanip> #include<bitset> #inc...
a.cc: In function 'int main()': a.cc:362:37: error: 'n' was not declared in this scope 362 | for (int i = 0; i < n; ++i) { | ^
s932887625
p01707
C++
#include<iostream> using namespace std; typedef unsigned long long ll; const int mod=1000000007; int main(){ int n,d,x; while(cin>>n>>d>>x,n){ ll dp[2][2002]; memset(dp,0,sizeof(dp)); for(int i=0;i<x;i++){ dp[0][i]=1; } for(int da=1;da<d;da++){ for...
a.cc: In function 'int main()': a.cc:9:9: error: 'memset' was not declared in this scope 9 | memset(dp,0,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...
s489586880
p01707
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <complex> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <iomanip> #include <assert.h> #include <array> #include <cstdio> #include <cstring> #include <random>...
a.cc: In function 'int main()': a.cc:59:15: error: no matching function for call to 'min(int&, ll&)' 59 | rep(i, min(N, D)) { | ~~~^~~~~~ a.cc:25:39: note: in definition of macro 'REP' 25 | #define REP(i,a,b) for(int i=a;i<(int)b;i++) | ^ a.cc:59:5:...
s370135875
p01707
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n,d,x,dp[2001][2001]; const ll mod = 1e9+7; ll mod_pow(ll x,ll n){ ll res=1; while(n){ if(n%2) res=res*x%mod; x=x*x%mod; n/=2; } return res; } ll factorial(int i){ static vector<ll> k(1e6); if(!k[0]){k[0]=1;for(int i=1;...
a.cc: In function 'll nCr(ll, ll)': a.cc:26:26: error: expected ';' before '}' token 26 | return factorial(n) * a | ^ | ; 27 | } | ~
s127001034
p01708
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
s913096904
p01710
C++
#include <algorithm> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; } typedef vector<vector<int>> graph; // SCC Strongly Connected Component 強連結成分分解 struct SCC { int V; int cV...
a.cc: In function 'int main()': a.cc:134:44: error: 'class std::queue<int>' has no member named 'insert' 134 | if(in[v] == 0) que.insert(v); | ^~~~~~ a.cc:174:55: error: 'class std::queue<int>' has no member named 'insert' 174 | ...
s150054203
p01712
Java
public class Main { private static int[] a; private static int[] entranceIndex; private static int[] exitIndex; private static int[] boukaIndex; public static void main(String[] args) { Scanner sc = new Scanner(System.in); // ???????????±??° int w = sc.nextInt(); a = new int[w]; entranceIndex = n...
Main.java:11: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:11: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s976598720
p01712
C
#include <stdio.h> #define N_MAX 100000 #define W_MAX 100000 #define H_MAX 100000 int MIN(int a,int b){return a<b?a:b;} int MAX(int a,int b){return a<b?b:a;} int width[W_MAX+2] = {}; int height[H_MAX+2] = {}; int main(void){ int N,W,H,x,y,w; int i,j; int M; scanf("%d %d %d",&N,&W,&H)...
main.c: In function 'main': main.c:21:10: error: subscripted value is neither array nor pointer nor vector 21 | x[MAX(0,x-w)]++; | ^ main.c:22:10: error: subscripted value is neither array nor pointer nor vector 22 | x[MIN(H+1,x+w)]--; | ^ main.c:23:10: error: subscri...
s022098608
p01712
C++
#include<iostream> using namespace std; int main(){ int n, w, h; cin >> n >> w >> h; int wifi_x[w + 1], wifi_y[h + 1]; memset(wifi_x, 0, sizeof(wifi_x)); memset(wifi_y, 0, sizeof(wifi_y)); for (int i = 0; i < n; i++){ int x, y, w; cin >> x >> y >> w; wifi_x[x - w] += 1; wifi_x[x + w] ...
a.cc: In function 'int main()': a.cc:9:3: error: 'memset' was not declared in this scope 9 | memset(wifi_x, 0, sizeof(wifi_x)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> ...
s818515922
p01712
C++
#include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> #include <c...
a.cc:56:24: error: macro "REP" passed 3 arguments, but takes just 2 56 | REP(i, 0, N + 2) { | ^ a.cc:31:9: note: macro "REP" defined here 31 | #define REP(i,n) FOR(i,0,(n)-1) | ^~~ a.cc: In function 'int main()': a.cc:56:9: error: 'REP' was not declared in this s...
s530363281
p01712
C++
#include <cstdio> #include <algorithm> #include <vector> #include <cstring> #include <iostream> using namespace std; typedef pair<int,int> P; int tbl[100010]; bool chk(int w,vector<P> c){ int n = c.size(); memset(tbl,0,sizeof(tbl)); for(int i=0;i<n;++i){ tbl[c[i].first]++; tbl[c[i].second+1]--; } for(...
a.cc: In function 'bool chk(int, std::vector<std::pair<int, int> >)': a.cc:16:20: error: expected primary-expression before ';' token 16 | for(int i=0;i<=w;;+i) tbl[i+1]+=tbl[i]; | ^ a.cc:16:20: error: expected ')' before ';' token 16 | for(int i=0;i<=w;;+i) tbl[i+1]+=tbl[i]; | ...
s518702607
p01712
C++
#include <stdio.h> typedef struct { unsigned int a: 1; } OneBit_t; int main() { int N,W,H; int i,j,k; int start,end; char t_error, y_error; OneBit_t tate[100000] ={0}; OneBit_t yoko[100000] ={0}; int x,y,w; scanf("%d %d %d",&N,&W,&H); for (i = 0;i < N;i++) { scanf("%d %d %d",&x,&y,&w); ...
a.cc: In function 'int main()': a.cc:35:19: error: expected primary-expression before '.' token 35 | if (yoko[i] ==.a 0) { | ^ a.cc:35:21: error: expected ')' before numeric constant 35 | if (yoko[i] ==.a 0) { | ~ ^~ | )
s148517582
p01712
C++
#include <iostream> #include <algorithm> using namespace std; int N, W, H, x, y, w, ox[1 << 20], oy[1 << 20]; void main() { std::cin >> N >> W >> H; for (int i = 0; i < N; i++) { std::cin >> x >> y >> w; for (int j = 0; j <= w; j++) { ox[max(x - j, 0)] = 1; ox[min(x + j, W - 1)] = 1; oy[max(y - j...
a.cc:8:1: error: '::main' must return 'int' 8 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:29:41: error: return-statement with no value, in function returning 'int' [-fpermissive] 29 | printf("No\n"); return; | ^~~~~~ a.cc:3...
s212689849
p01712
C++
#include <iostream> #include <vector> #include <bitset> #include <map> #include <list> #include <string> #include <algorithm> #include <stack> #include <queue> #include <tuple> #include <utility> #include <cstdio> #include <cstdint> using namespace std; int main(void) { int n ,w, h; cin >> n >> w >> h; list<int>...
a.cc: In function 'int main()': a.cc:24:9: error: 'iota' was not declared in this scope 24 | iota(x_coords.begin(), x_coords.end(), 0); | ^~~~ a.cc:43:25: error: 'last' was not declared in this scope 43 | last = upper_bound(y_coords.begin(), y_coords.end(), max); ...
s180517849
p01712
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<cstdio> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define mp make_pair #define all(in) in.begin(),in.end() c...
a.cc: In function 'int main()': a.cc:43:12: error: could not convert 'h' from 'vi' {aka 'std::vector<int>'} to 'bool' 43 | if(h){ | ^ | | | vi {aka std::vector<int>}
s559632622
p01712
C++
#include <cstdio> #define MAX(X,Y) (((X)>(Y)) ? (X) : (Y)) #define MIN(X,Y) (((X)<(Y)) ? (X) : (Y)) int x[20000], y[20000]; int main(void) { int n,w,h; scanf("%d%d%d",&n,&w,&h); for(int i=0; i<n; i++) { int xi,yi,wi; scanf("%d%d%d",&xi,&yi,&wi); x[MAX(0,xi-wi)]++; x[MIN(xi+wi,w)+1...
a.cc: In function 'int main()': a.cc:23:5: error: expected initializer before 'for' 23 | for(int i=0; i<=h; i++) { | ^~~ a.cc:23:18: error: 'i' was not declared in this scope 23 | for(int i=0; i<=h; i++) { | ^ a.cc:27:21: error: 'flag2' was not declared in this scope; did ...
s854836030
p01712
C++
#include <iostream> #define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++) using namespace std; int N, W, H, X, Y, K; int vx[100010], vy[100010]; int main(void) { cin >> N >> W >> H; REP(i, 0, 100010) vx[i] = vy[i] = 0; REP(i, 0, N) { cin >> X >> Y >> K; vx[max(X - K, 0)]++; vx[min(X + K, W...
a.cc: In function 'int main()': a.cc:21:13: error: 'min_element' was not declared in this scope 21 | int mx = *min_element(vx, vx + W + 1); | ^~~~~~~~~~~
s098283015
p01712
C++
#include<iostream> #include<vector> #define Max 100000 using namespace std; int main(void){ int n,w,h; cin>>n>>w>>h; vector<int> x(n),y(n),r(n); vector<bool> xl(w+1,true),yl(h+1,true); for(int i=0;i<n;i++){ cin>>x[i]>>y[i]>>r[i]; for(int j=x[i]-r[i];j<=x[i]+r[i];j++){ if(j<=w&&j>=0) xl[j]=false; } for(int j=y[i]-...
a.cc:33:2: error: expected declaration before '}' token 33 | }} | ^
s825811407
p01713
C++
#include <cstdio> #include <cstring> #include <string> #include <vector> #define INF 1e7 using namespace std; vector<int> index; int w,n; int val[2][1<<18]; void init(){ n=1; while(n<w)n*=2; for(int i=0;i<2*n-1;i++)val[0][i]=val[1][i]=INF; } void update(int k,int a){ k+=n-1; val[0][k]=a-(k-(n-1)); val[1][k]=a-...
a.cc:8:13: error: 'std::vector<int> index' redeclared as different kind of entity 8 | vector<int> index; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:2: /usr/include/strings.h:50:20: note: previous declara...
s159579905
p01713
C++
#include<iostream> #define inf 100000001 using namespace std; int main() { int w,a[100001],b[100001],c[100001]; cin>>w; for(int i=0;i<w;i++)cin>>a[i]; for(int i=0;i<w;i++){ if(a[i]==0){ b[i]=inf; c[i]=inf; } else { b[i]=0; c[i]=0; } } for(int i=0;i<w-1;i++){ if(a...
a.cc: In function 'int main()': a.cc:51:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 51 | cout<<ans<<endl; | ^~~ | abs
s236961205
p01713
C++
#include<bits/stdc++.h> using namespace std; const int INF = 1 << 30; int W, A[100002]; int close[100002]; int main() { cin >> W; for(int i = 1; i <= W; i++) { cin >> A[i]; if(A[i] == 0) close[i] = INF; } for(int i = 1; i <= W; i++) { close[i] = max(close[i], close[i - 1] - 1); if(A[i] < 0) cl...
a.cc:6:17: error: 'int close [100002]' redeclared as different kind of entity 6 | int close[100002]; | ^ 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, ...
s590768194
p01715
Java
import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } long MODULO = 1_000_000_000 + 7; void run() { Scanner sc = new Scanner(System.in); int s = sc.nextInt(); int n = sc.nextInt(); int m = sc.nextInt(); int[] t = new int[n]; int...
Main.java:73: error: missing return statement } ^ 1 error
s061240661
p01717
C++
#include <bits/stdc++.h> #define ll long long #define INF (1LL << 60) #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto& (a): (b)) #define all(v) (v).beg...
a.cc: In function 'void dfs(vi&, int, int, bool&)': a.cc:50:5: error: reference to 'visit' is ambiguous 50 | visit[u] = true; | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14/variant:1855:5: note: candidates are: 'tem...
s925040367
p01718
C++
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} template<class T> inline T sqr(T x) {return x*x;} typedef vector<int> vi; typedef vector<vi> vvi; typed...
a.cc: In function 'void init(int)': a.cc:68:9: error: reference to 'size' is ambiguous 68 | size=1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, ...
s521197895
p01718
C++
#include <vector> #include <iostream> #define mod 1000000007 using namespace std; long long gcd(long long, long long); long long lcm(long long, long long); class SegTree { private: int size; vector<long long> lcmvalue; long long _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) { return 1; ...
a.cc: In function 'int mod_inv(int)': a.cc:99:17: error: 'm' was not declared in this scope 99 | return (m + x % m) % m; | ^
s161698473
p01718
C++
#include <vector> #include <iostream> #define mod 1000000007 using namespace std; long long gcd(long long, long long); long long lcm(long long, long long); int extgcd(int, int, int, int); int mod_inv(int a); class SegTree { private: int size; vector<long long> lcmvalue; long long _query(int a, int b, int k,...
a.cc: In function 'int extgcd(int, int, int&, int&)': a.cc:84:27: error: call of overloaded 'extgcd(int&, int, int&, int&)' is ambiguous 84 | d = extgcd(b, a % b, y, x); | ~~~~~~^~~~~~~~~~~~~~~~ a.cc:11:5: note: candidate: 'int extgcd(int, int, int, int)' 11 | int extgcd(...
s220257206
p01718
C++
#include <vector> #include <iostream> using namespace std; int gcd(int a, int b) { if (a == 0) { return b; } if (b == 0) { return a; } if (a > b) { return gcd(b, a % b); } return gcd(a, b % a); } int lcm(int a, int b) { return 1LL * a * b / gcd(a, b) % mod; } vector<int> G; // i --> G[i] Graph vector<bool> ...
a.cc: In function 'int lcm(int, int)': a.cc:18:42: error: 'mod' was not declared in this scope 18 | return 1LL * a * b / gcd(a, b) % mod; | ^~~ a.cc: In function 'int main()': a.cc:104:63: error: 'mod' was not declared in this scope 104 | ...
s889937579
p01718
C++
#include <vector> #include <iostream> #define mod 1000000007 using namespace std; int lcm(int a, int b) { return 1LL * a * b / __gcd(a, b) % mod; } vector<int> G; // i --> G[i] Graph vector<bool> visited; vector<vector<int> > cycles; void rec(int p) { visited[p] = true; cycles.back().push_bac...
a.cc: In function 'int lcm(int, int)': a.cc:10:26: error: '__gcd' was not declared in this scope 10 | return 1LL * a * b / __gcd(a, b) % mod; | ^~~~~
s501882381
p01718
C++
#include <vector> #include <iostream> using namespace std; class SegTree { private: int size; vector<long long> lcmvalue; long long _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) { return 1; } if (a <= l && r <= b) { return lcmvalue[k]; } long long vl = _query(a, b, 2 * k, l, (l + r) ...
a.cc: In member function 'long long int SegTree::_query(int, int, int, int, int)': a.cc:22:24: error: 'lcm' was not declared in this scope 22 | return lcm(vl, vr); | ^~~ a.cc: In member function 'void SegTree::update(int, long long int)': a.cc:44:39: error: 'lcm' was not ...
s943419040
p01718
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; struct Dscc { public: //belongs,newedges pair<vector<vector<int>>, vector<vector<int>>>get(const vector<vector<int>>&edges) { nums.resize(edges.size()); fill(nums.begin(), nums.end(), -1); vector<vector<int>>r...
a.cc: In function 'int main()': a.cc:234:40: error: expected primary-expression before '{' token 234 | roops[j] = roop{ long long int(belongs[i].size()),Mod(accumulate(belongs[i].begin(),belongs[i].end(),0)) }; | ^
s969163090
p01718
C++
#include <bits/stdc++.h> using namespace std; namespace { typedef double real; typedef long long ll; template<class T> ostream& operator<<(ostream& os, const vector<T>& vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs.size(); i++) os << " " << v...
a.cc: In function 'void {anonymous}::solve()': a.cc:88:17: error: 'C' was not declared in this scope 88 | C[k]++; | ^ In file included from /usr/include/c++/14/cassert:44, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106, from a.cc:1:...
s274014721
p01718
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,k,n) for(int i = (k); i < (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)) #define D10 fixed<<setprecision(10) typedef __int128 ll; typedef long double ld; typedef vector<int> vi; typedef vector<stri...
a.cc: In function 'int main()': a.cc:134:22: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'll' {aka '__int128'}) 134 | cout << seg.sum_query(a - 1, b) % MOD << endl; | ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
s939531257
p01718
C++
#define _USE_MATH_DEFINES #include <iostream> #include <queue> #include <vector> #include <math.h> #include <algorithm> #include <iomanip> #include <string> #include <stack> #include <cctype> #include <cstdlib> #include <string.h> #include <utility> #include <cstdio> #include <set> #include <boost/multiprecision/cpp_in...
a.cc:16:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 16 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s275165678
p01719
C++
#include <iostream> #include <algorithm> #pragma warning(disable : 4996) using namespace std; int n, d, x, p[10][10], r[9][10], dp[11][100001]; int main() { scanf("%d", &n); scanf("%d", &d); scanf("%d", &x); for (int i = 0; i < d; i++) { for (int j = 0; j < n; j++) { scanf("%d", &p[i][j]); } } for...
a.cc: In function 'int main()': a.cc:37:17: error: 'memset' was not declared in this scope 37 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +...
s383376597
p01719
C++
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2607 ''Invest Master'' ????§£?????? //????????????????????? 20 ?????§?????????????????? Wrong Answer, 2 ?????????????????§ AC (Debug 10 ????????????) //???????????£???????????¨????????¶????????±?????????????????????, i ??\?????§?????£???????????? j ??\?????§?£?...
a.cc: In function 'int main()': a.cc:19:16: error: 'diff' was not declared in this scope 19 | memset(diff, 0, sizeof(diff)); | ^~~~
s951899728
p01719
C++
#include <iostream> using namespace std; template<class T> T chmax(T& a, T b) { return a = max(a, b); } const int M = 100000; int dp[10][M + 1]; int main() { int n, d, x; cin >> n >> d >> x; int p[10][10]; for(int i = 0; i < d; i++) { for(int j = 0; j < n; j++) { cin >> p[i][j]; } } for(int i = 0;...
a.cc: In function 'int main()': a.cc:51:18: error: 'max_element' was not declared in this scope 51 | cout << *max_element(dp[n - 1], dp[n - 1] + M + 1) + x << endl; | ^~~~~~~~~~~
s213716941
p01719
C++
#include <iostream> using namespace std; template<class T> T chmax(T& a, T b) { return a = max(a, b); } const int M = 100000; int dp[10][M + 1]; int main() { int n, d, x; cin >> n >> d >> x; int p[10][10]; for(int i = 0; i < d; i++) { for(int j = 0; j < n; j++) { cin >> p[i][j]; } } for(int i = 0;...
a.cc: In function 'int main()': a.cc:51:18: error: 'max_element' was not declared in this scope 51 | cout << *max_element(dp[n - 1], dp[n - 1] + M + 1) + x << endl; | ^~~~~~~~~~~
s405771123
p01719
C++
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2607 #include<iostream> #include<fstream> #dfine fin cin using namespace std; int n = 0; int d = 0; int x = 0; int dp[100001] = {0, }; int fx[10][10];//?????????????????\????????? fx[d][n] int main() { // ifstream fin("in.txt"); //input fin >> n...
a.cc:4:2: error: invalid preprocessing directive #dfine; did you mean #define? 4 | #dfine fin cin | ^~~~~ | define a.cc: In function 'int main()': a.cc:20:5: error: 'fin' was not declared in this scope 20 | fin >> n >> d >> x; | ^~~
s213263959
p01719
C++
#include <bits/stdc++.h> using namespace std; using vi=vector<int>; using vvi=vector<vi>; #define range(i,a,n) for(int i=a;i<n;i++) #define rep(i,n) range(i,0,n) #define all(a) a.begin(),a.end() int main(){ int n,d,x; cin>>n>>d>>x; vvi v(d,vi(n)); for(auto&l:v)for(auto&i:l)cin>>i; rep(k,d-1){ //毎日 vi dp(x+1); //...
a.cc:28:9: error: expected unqualified-id before 'return' 28 | return 0; | ^~~~~~ a.cc:29:1: error: expected declaration before '}' token 29 | } | ^
s034972628
p01720
C++
#include<stdio.h> #include<stdlib.h> #include<algorithm> #include<vector> #include<utility> #include<queue> #define MAX 100009 using namespace std; typedef pair<int,int> P; typedef struct Node { int n; vector<int>e; }Node; Node G[MAX]; int SC[MAX], GC[MAX],N,M,s,t; int dijcstra(int s,int g) { int C[MAX]; memset(...
a.cc: In function 'int dijcstra(int, int)': a.cc:23:9: error: 'memset' was not declared in this scope 23 | memset(C,0x7f,sizeof(C)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<queue> +++ |+#inclu...
s718869517
p01720
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<climits> #include<iostream> #include<sstream> #include<utility> #include<map> #include<vector> #include<queue> #include<algorithm> #include<set> #include<stack> #define MAX 100009 using namespace std; typedef struct Node { int n; vector<i...
a.cc: In function 'void dijcstra(int, int, std::map<int, long long int>&)': a.cc:33:9: error: 'P' was not declared in this scope 33 | P tmp(0,s); | ^ a.cc:34:34: error: template argument 2 is invalid 34 | priority_queue<P,vector<P>,greater<P> >Q; | ...
s189858332
p01720
C++
#include<iostream> #include<string> #include<cstdio> #include<queue> #include<vector> #include<unordered_map> using namespace std; int n[100000], m[100000]; vector<int>rinsetu[100000]; signed main() { unordered_map<int, int>X, Y; int a, b, c, d; scanf("%d%d%d%d", &a, &b, &c, &d); c--; d--; for (int e = 0; e < b; e+...
a.cc: In function 'int main()': a.cc:20:9: error: 'memset' was not declared in this scope 20 | memset(n, -1, sizeof(n)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<unordered_map> +++ |+#include <...
s800569876
p01720
C++
#include<iostream> #include<string> #include<cstdio> #include<queue> #include<vector> #include<unordered_map> using namespace std; int n[100000], m[100000]; vector<int>rinsetu[100000]; signed main() { unordered_map<int, int>X, Y; int a, b, c, d; scanf("%d%d%d%d", &a, &b, &c, &d); c--; d--; for (int e = 0; e < b; e+...
a.cc: In function 'int main()': a.cc:20:9: error: 'memset' was not declared in this scope 20 | memset(n, -1, sizeof(n)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<unordered_map> +++ |+#include <...
s924946609
p01720
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> #define mk make_pair using namespace std; #define r(i,n) for(int i=0;i<n;i++) bool vis[100000]; int main()...
a.cc: In function 'int main()': a.cc:69:4: error: expected '}' at end of input 69 | } | ^ a.cc:17:11: note: to match this '{' 17 | int main(){ | ^
s735613639
p01720
C++
#include<bits/stdc++.h> #define mk make_pair #define int long long using namespace std; #define r(i,n) for(int i=0;i<n;i++) bool vis[100000]; int main(){ int n,m,s,t,x,y; cin>>n>>m>>s>>t; s--;t--; vector<int> v[100000]; set<pair<int,int> >ss; r(i,m){ cin>>x>>y; x--;y--; ss.insert(mk(x,y)); s...
cc1plus: error: '::main' must return 'int'
s856971402
p01720
C++
Something
a.cc:1:1: error: 'Something' does not name a type 1 | Something | ^~~~~~~~~
s907575573
p01720
C++
#include<bits/stdc++.h> using namespace std; #define INF 1000000000 // 🔴 // O(ElogE) // pq<pair> はfirstが大きい順に出てくるのですか? // s:= 開始ノード v:= 頂点数 adjlist:= 隣接リスト (first:= コスト second:= 行先) vector<int> dijk(int s, int v, vector<vector<pair<int, int> > > adjlist){ priority_queue <pair<int, int> > wait; vect...
a.cc: In function 'int main()': a.cc:69:34: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>') 69 | result_S = dijk(S, V, adjlist); | ^ In file included from /usr/include/c++/14/vector:72, from /usr/inclu...
s513549933
p01720
C++
#include<bits/stdc++.h> using namespace std; #define INF 1000000000 // 🔴 // O(ElogE) // pq<pair> はfirstが大きい順に出てくるのですか? // s:= 開始ノード v:= 頂点数 adjlist:= 隣接リスト (first:= コスト second:= 行先) vector<long long> dijk(int s, int v, vector<vector<pair<int, int> > > adjlist){ priority_queue <pair<int, int> > wait; ...
a.cc: In function 'std::vector<long long int> dijk(int, int, std::vector<std::vector<std::pair<int, int> > >)': a.cc:43:12: error: could not convert 'result' from 'vector<int>' to 'vector<long long int>' 43 | return result; //結果列を返す | ^~~~~~ | | | vector...
s673063496
p01721
C++
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; typedef long long ll; ll w,h,v,t,x,y,p,q,R,answer; inline ll getDist(ll dx,ll dy) { return dx*dx+dy*dy; } ll countValue(bool phase,ll coef_x){ ll enemy_x = p; if( coef_x >= 0 ) { if( ( coef_x...
a.cc: In function 'll countValue(bool, ll)': a.cc:48:7: error: 'E' was not declared in this scope 48 | E = enemy_y; | ^
s753829732
p01722
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define FOR(i, a, b) for(int i=(a);i<(b);i++) #define REP(i, n) FOR(i, 0, n) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define RREP(i, n) RFOR(i, n, 0) #define MFOR(i, m) for(auto i=(m).beg...
a.cc: In function 'll po(ll, ll, ll)': a.cc:72:1: warning: no return statement in function returning non-void [-Wreturn-type] 72 | } | ^ /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 returne...
s850041750
p01722
C++
import math def sieve (n): prime = [0,0] prime += [1 for i in range(n-1)] ub = math.sqrt(n) + 1 d = 2 while d <= ub: if prime[d] == 0: d += 1 continue prod = 2 while d * prod <= n: prime[d*prod] = 0 prod += 1 d += 1 return prime n = int(raw_input()) pn = 1 for i in range(n): pn *= 2 prime = s...
a.cc:1:1: error: 'import' does not name a type 1 | import math | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s860986781
p01722
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.beg...
a.cc: In function 'int main()': a.cc:41:29: error: expected '}' at end of input 41 | cout << ans << endl; | ^ a.cc:29:11: note: to match this '{' 29 | int main(){ | ^
s298260363
p01722
C++
#include<cstdio> #define a(b)printf("%d\n",b); main(){scanf("%d",&n);if(n==1){a(2);}else if(n<3){a(1);}else{a(0);}}
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){scanf("%d",&n);if(n==1){a(2);}else if(n<3){a(1);}else{a(0);}} | ^~~~ a.cc: In function 'int main()': a.cc:3:20: error: 'n' was not declared in this scope 3 | main(){scanf("%d",&n);if(n==1){a(2);}else if(n<3){a...
s327993826
p01722
C++
#include<cstdio> #define a(b)printf("%d\n",b);int n; main(){scanf("%d",&n);if(n==1){a(2);}else if(n<3){a(1);}else{a(0);}}
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){scanf("%d",&n);if(n==1){a(2);}else if(n<3){a(1);}else{a(0);}} | ^~~~ a.cc: In function 'int main()': a.cc:3:20: error: 'n' was not declared in this scope 3 | main(){scanf("%d",&n);if(n==1){a(2);}else if(n<3){a...
s469143718
p01722
C++
#include <iostream> using namespace std; int main() { cout<<(n>2 ? 0 : 1+(n==1))<<endl; }
a.cc: In function 'int main()': a.cc:6:12: error: 'n' was not declared in this scope 6 | cout<<(n>2 ? 0 : 1+(n==1))<<endl; | ^
s922896650
p01722
C++
#include <bits/stdc++.h> #define REP(i,n) for (int i=0;i<(n);i++) #define ALL(a) (a).begin(),(a).end() #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define ll long long #define ull unsigned long long int dx[4] = {1, 0, -1, 0}; int...
a.cc: In function 'int main()': a.cc:19:11: error: expected '(' before 'n' 19 | else if n=0; | ^ | (
s403727672
p01722
C++
#include <iostream> int main() { int n; cin>>n; if(n==0){ cout<<"1"<<endl; }else if(n==1){ cout<<"2"<<endl; }else if(n==2){ cout<<"1"<<endl; }else{ cout<<"0"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to stand...
s441338608
p01722
C++
#include <iostream> using namespace std; int main() { int n; cin>>n; if(n==0){ cout<<"1"<<endl; }else if(n==1){ cout<<"2"<<endl; }else if(n==2){ cout<<"1"<<endl; }else{ cout<<"0"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s541287105
p01722
C++
Last login: Mon Nov 21 13:34:48 on ttys001 wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ pwd /Users/wakabayashirika wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ ls Desktop Library Pictures play Documents Movies Public rippro Downloads Music class wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ cd Deskto...
a.cc:27:63: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 27 | class9-1.c:19:16: warning: incompatible pointer types passing 'char [3]' to | ^~~~~~~~~~ a.cc:28:25: warning: multi-character literal with 6 characters...
s535291665
p01722
C++
#include<bits/stdc++.h> int main(){ int n; cin>>n; if(n==0||n==2)cout<<1<<endl; else if(n==1)cout<<2<<endl; else cout<<0<<endl; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>n; | ^~~ | 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: note: 'std::cin' de...
s847114634
p01722
C++
#include<iostream> #include<stdio.h> #include<string.h> #include<algorithm> #include<vector> #include<queue> #include<map> #include<set> using namespace std; int main(){ cin >> x; if(x==0) cout << 1 << endl; else if(x==1) cout << 2 << endl; else if(x==2) cout << 1 << endl; else cout << 0 << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:16: error: 'x' was not declared in this scope 13 | cin >> x; | ^
s537369545
p01722
C++
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if(n == 0 || n == 2) cout<<1<<endl; else if(n == 1) cout<<2<<endl;; else cout<<0<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'else' without a previous 'if' 8 | else cout<<0<<endl; | ^~~~
s995115608
p01723
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner scan= new Scanner(System.in); boolean[][] trump = new boolean[4][13]; char[] head = {'S' , 'H' , 'C' , 'D'}; int n = scan.nextInt(); for (int i = 0; i < n ; i++ ) { char head_in = scan.next().charAt(0); ...
Main.java:10: error: cannot find symbol int num = Integer.parseInt(in.next()); ^ symbol: variable in location: class Main 1 error
s304953654
p01723
Java
import java.util.*; class Main{ public static void main(String[] args) { Scanner scan= new Scanner(System.in); boolean[][] trump = new boolean[4][13]; char[] head = {'S' , 'H' , 'C' , 'D'}; int n = scan.nextInt(); for (int i = 0; i < n ; i++ ) { char head_in = scan.next().charAt(0); in...
Main.java:10: error: cannot find symbol int num = Integer.parseInt(in.next()); ^ symbol: variable in location: class Main 1 error
s610994047
p01723
C++
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> using namespace std; using int64 = long long int; int N; vector<int> G[210]; int dpc[210][210][2], dpn[210][210][2]; vector<int64> merge(vector<int64> A, vector<int64> B) { fill(dpc[0][0], dpc[B.size()][0], 0); dpc[0][0][0] = 1; vecto...
a.cc:69:2: error: #error "four-t" 69 | #error "four-t" | ^~~~~ a.cc: In function 'std::vector<long long int> merge(std::vector<long long int>, std::vector<long long int>)': a.cc:22:46: error: 'MOD' was not declared in this scope 22 | (res[i + j - k + 1] += A[i] * B[j] % MOD * (dpc[j][k][0] + dpc[j]...
s730072017
p01723
C++
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> using namespace std; using int64 = long long int; constexpr int64 MOD = 1000000007; int N; vector<int> G[210]; int64 dpc[210][210][2], dpn[210][210][2]; vector<int64> merge(vector<int64> A, vector<int64> B) { fill(dpc[0][0], dpc[B.size()][...
a.cc:80:2: error: #error "uku" 80 | #error "uku" | ^~~~~
s765834752
p01723
C++
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> using namespace std; using int64 = long long int; constexpr int64 MOD = 1000000007; int N; vector<int> G[210]; int64 dpc[210][210][2], dpn[210][210][2]; vector<int64> merge(vector<int64> A, vector<int64> B) { fill(dpc[0][0], dpc[B.size()][...
a.cc:97:1: error: expected unqualified-id before numeric constant 97 | 3 | ^
s916163924
p01723
C++
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> using namespace std; using int64 = long long int; constexpr int64 MOD = 1000000007; int N; vector<int> G[210]; int64 dpc[210][210][2], dpn[210][210][2]; vector<int64> merge(vector<int64> A, vector<int64> B) { fill(dpc[0][0], dpc[B.size()][...
a.cc:97:1: error: 'solve' does not name a type 97 | solve: 6 | ^~~~~
s911562478
p01723
C++
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> using namespace std; using int64 = long long int; constexpr int64 MOD = 1000000007; int N; vector<int> G[210]; void dump_dp(int a, int b, int c, int d, int aa, int bb, int cc, int dd, int v) { if(a == 1 and b == 1 and c == 1) fprintf(std...
a.cc:112:2: error: #error "ukuku" 112 | #error "ukuku" | ^~~~~
s197894936
p01723
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; const int mod = 1000000007; struct Mod { public: int num; Mod() : num(0) { ; } Mod(long long int n) : num((n % mod + mod) % mod) { ; } Mod(int n) : num((n % mod + mod) % mod) { ; } operator int() { return num; } }; ...
a.cc: In function 'int main()': a.cc:142:33: error: 'a' was not declared in this scope 142 | map<int, Mod>ans(getans(a)); | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, f...
s326390015
p01724
C++
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; const int IINF = INT_MAX; const int h = 19; const int w = 15; struct Data { int x,y,bitmask,cost; bool operator < ( const Data& data ) const { if( cost != data.cost ) return cost < data.cost; ...
a.cc: In function 'void compute()': a.cc:58:21: error: 'inValid' was not declared in this scope; did you mean 'isValid'? 58 | } else if( !inValid(nx,ny) ) { | ^~~~~~~ | isValid a.cc: In member function 'bool Data::operator<(const Data&) const': a.cc:19:3: w...
s527071288
p01724
C++
#include <map> #include <queue> #include <string> #include <vector> #include <utility> #include <iostream> using namespace std; const int dx[8] = { 0, 1, 1, 1, 0, -1, -1, -1 }; const int dy[8] = { 1, 1, 0, -1, -1, -1, 0, 1 }; int BFS(vector<string> v) { map<vector<string>, int> d; d[v] = 1; queue<pair<vector<stri...
a.cc: In function 'int BFS(std::vector<std::__cxx11::basic_string<char> >)': a.cc:73:71: error: expected ';' before 'if' 73 | v2[y][x] = 'O' | ^ | ...
s332099831
p01724
C++
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <deque> #include <tuple> using namespace std; typedef pair<int,int> P; typedef tuple<int,int,int,int> T;//B,x,y typedef tuple<int,int,int,int> T4;//d,B,x,y vector<P> B; int board[15][20]; int main(){ fill(board[0],board[20],-1); ...
a.cc: In function 'int main()': a.cc:79:54: error: no matching function for call to 'std::tuple<int, int, int, int>::tuple(int&, int, int)' 79 | if(M.find(T(bbb,x+dx*l,y+dy*l))==M.end()){ | ^ In file included from /usr/include/c++/14/...
s219373479
p01724
C++
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <deque> #include <tuple> using namespace std; typedef pair<int,int> P; typedef tuple<int,int,int,int> T;//B,x,y typedef tuple<int,int,int,int> T4;//d,B,x,y vector<P> B; int board[15][20]; int main(){ fill(board[0],board[20],-1); ...
a.cc: In function 'int main()': a.cc:79:54: error: no matching function for call to 'std::tuple<int, int, int, int>::tuple(int&, int, int)' 79 | if(M.find(T(bbb,x+dx*l,y+dy*l))==M.end()){ | ^ In file included from /usr/include/c++/14/...
s238923682
p01724
C++
#include <iostream> #include <map> #include <vector> #include <algorithm> #include <deque> #include <tuple> using namespace std; typedef pair<int,int> P; typedef tuple<int,int,int,int> T;//B,x,y typedef tuple<int,int,int,int> T4;//d,B,x,y vector<P> B; int board[15][20]; int main(){ fill(board[0],board[20],-1); ...
a.cc: In function 'int main()': a.cc:78:54: error: no matching function for call to 'std::tuple<int, int, int, int>::tuple(int&, int, int)' 78 | if(M.find(T(bbb,x+dx*l,y+dy*l))==M.end()){ | ^ In file included from /usr/include/c++/14/...
s196377913
p01724
C++
#include <iostream> #include <algorithm> #include <queue> #include <map> #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; typedef pair<P,int>P2; string s[21]; int h=21,w=17,sx,sy; int dx[]={0,1,1,1,0,-1,-1,-1}; int dy[]={-1,-1,0,1,1,1,0,-1}; int d[21][19][1<<20]; map<pair<int,int>,in...
a.cc: In function 'int main()': a.cc:37:3: error: 'memset' was not declared in this scope 37 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <map> +++ |+#include <cstring> 5 | #defin...
s532182115
p01724
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; typedef pair<P,int>P2; string s[21]; int h=21,w=17,sx,sy; int dx[]={0,1,1,1,0,-1,-1,-1}; int dy[]={-1,-1,0,1,1,1,0,-1}; bool d[21][19][1<<20]; map<pair<int,int>,int>M1; map<int,pair<int,int> >M2; int cnt; int ...
a.cc: In function 'int main()': a.cc:67:2: error: expected '}' at end of input 67 | } | ^ a.cc:19:11: note: to match this '{' 19 | int main(){ | ^
s219108589
p01724
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; typedef pair<P,int>P2; string s[21]; int h=21,w=17,sx,sy; int dx[]={0,1,1,1,0,-1,-1,-1}; int dy[]={-1,-1,0,1,1,1,0,-1}; bool d[21][19][1<<20]; map<pair<int,int>,int>M1; map<int,pair<int,int> >M2; int cnt; int ...
a.cc: In function 'int main()': a.cc:67:2: error: expected '}' at end of input 67 | } | ^ a.cc:19:11: note: to match this '{' 19 | int main(){ | ^
s897884448
p01725
C++
#include<iostream> #include<string> #include<cctype> #include<array> #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; typedef long long Int; typedef string::const_iterator Itr; array<int,3> flag; Int ctoi(const char &c) { return c - '0'; } Int expression(Itr &); Int term(Itr &); Int term2(Itr &); Int fa...
a.cc: In function 'int main()': a.cc:151:24: error: 'LLONG_MIN' was not declared in this scope 151 | Int max_ans = -LLONG_MIN; | ^~~~~~~~~ a.cc:5:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include<array> ...
s968618333
p01725
C++
#!/usr/bin/env python import sys import math import itertools as it from collections import deque sys.setrecursionlimit(10000000) def calc(lst, pos, pr): ret = [] while True: if pos >= len(lst): break if lst[pos] == '(': val, pos = calc(lst, pos + 1, pr) re...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python | ^ a.cc:40:6: error: empty character constant 40 | ss = '' | ^~ a.cc:43:18: error: empty character constant 43 | if ss != '': | ^~ a.cc:46:14: error: empty character constant 46 |...