submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s356070126
p01447
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s023830827
p01447
C++
#include<iostream> using namespace std; int main(){ int n,i=0,a=0; cin>>n; while(n/3!=0){ flag=0; if(n%3!=0) a+=n%3; n=n/3; if(a>=3) n++; i++; } cout<<i<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'flag' was not declared in this scope 7 | flag=0; | ^~~~
s841798005
p01447
C++
#include<iostream> using namespace std; int main(){ int n,i=1,; cin>>n; while(n/3!=0){ if(n%3==1) n++; n=n/3; i++; } cout<<i<<endl; return 0; }
a.cc: In function 'int main()': a.cc:4:19: error: expected unqualified-id before ';' token 4 | int n,i=1,; | ^
s741715288
p01447
C++
#include<iostream> using namespace std; int main(){ int n,i=0; cin>>n; while(1){ if(n==2){ i++ break; } n=n/3; i++; if(n%3==1) n++; if(n==1) break; } cout<<i<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:28: error: expected ';' before 'break' 8 | i++ | ^ | ; 9 | break; | ~~~~~
s910858611
p01447
C++
#include<iostream> using namespace std; int main(){ int n,i=0; cin>>n; while(1){ if(n==2){ i++; break; } i++; if(n%3==1){ n=(n+1)/3; else n=n/3; if(n==1) break; } cout<<i<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:17: error: expected '}' before 'else' 14 | else | ^~~~ a.cc:12:27: note: to match this '{' 12 | if(n%3==1){ | ^
s207512986
p01448
C
#include <stdio.h> #include<stdlib.h> int main() { int a[100002]={0}; int b[100002]={0}; int N; int i,k; int answer=0; int p[100002]={0}; scanf("%d",&N); for(i=1;i<=N;i++) scanf("%d %d",&a[i],&b[i]); for(k=N+1;k>=1;k--) { p=0; for(i=1;i<=N;i++) { if(a[i]<=k&&k<=b[i]) p++; } if(p==k) { ...
main.c: In function 'main': main.c:17:18: error: assignment to expression with array type 17 | p=0; | ^ main.c:20:34: error: lvalue required as increment operand 20 | p++; | ^~ main.c:22:21: warning: comp...
s894980783
p01448
C
#include <stdio.h> int main(void) { int N; int a[100001]; int b[100001]; int cnt[1000000]; int i,j; int max; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d %d",&a[i],&b[i]); } for(i=0;i<N;i++){ for(j=a[i];j<b[i];j++){ cnt[j]++; if (cnt[j] > m...
main.c: In function 'main': main.c:23:21: error: expected ';' before '}' token 23 | printf("%d",max) | ^ | ; 24 | } | ~
s005334555
p01448
C
#include <stdio.h> int main(void) { int N; int a[100001]; int b[100001]; int cnt[1000000]; int i,j; int max=0; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d %d",&a[i],&b[i]); } for(i=0;i<N;i++){ for(j=a[i];j<b[i];j++){ cnt[j]++; if (cnt[j] >...
main.c: In function 'main': main.c:23:21: error: expected ';' before '}' token 23 | printf("%d",max) | ^ | ; 24 | } | ~
s381090764
p01448
C
#include <iostream> #include <map> #include <algorithm> using namespace std; int main(){ int n,a,b; map<int,int> m; cin >> n; for(int i=0;i<n;i++){ cin >> a >> b; m[a]++; m[b]--; } map<int,int>::iterator it = m.begin(), jt; int cnt=1; int ret=-1; while(it !...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s460587242
p01448
C
int main(){ while(1) }
main.c: In function 'main': main.c:5:1: error: expected expression before '}' token 5 | } | ^
s783842652
p01448
C++
include <iostream> using namespace std; int main() { int N, a, b, res; signed int invite[100000] = {0}; cin >> N; for(int i = 0; i < N; i++) { cin >> a >> b; invite[a-1]++; invite[b-1]--; } signed int sum = 0; for(int i = 0; i < N; i++) { sum += invite[i]; if(i == sum) res = i...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not declared in this scope 8 | cin >> N; | ^~~ a.cc:21:3: error: 'cout' was not declared in this scope 21 | cout << res << endl; | ^~~~ a.cc:21...
s498233026
p01448
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<pair<int,int> > P(N); for (auto &i : P) cin >> i.first >> i.second; int l = 0, r = N + 1; while (r - l > 1) { int m = (r + l) / 2; int count = 0; for (int i = 0; i < N; i++) { ...
a.cc:29:2: error: stray '#' in program 29 | }#include <bits/stdc++.h> | ^ a.cc:29:3: error: 'include' does not name a type 29 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:32:5: error: redefinition of 'int main()' 32 | int main() { | ^~~~ a.cc:4:5: note: 'int main()' previously defined he...
s734844967
p01448
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(), (x).end() using namespace std; template <typename T> T &chmin(T &a, const T &b) {return a = min(a, b);} template <typename T> T &chmax(T &a, const T &b) {return a = max(a, b);} using ll = long long; using ld = long dou...
a.cc: In function 'int main()': a.cc:31:20: error: expected primary-expression before '?' token 31 | REP(i, N+1)???if(num[i]+1 > i) res = max(res, i); | ^ a.cc:31:21: error: expected primary-expression before '?' token 31 | REP(i, N+1)???if(num[i]+1 > i) res = max(res, i);...
s349948128
p01448
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> using namespace std; typedef long long ll; typedef pair<int,int> pint; typedef vector<int> vint; typedef vector<pint> vpint; #define mp make_pair #d...
a.cc: In function 'int main()': a.cc:47:35: error: 'asn' was not declared in this scope; did you mean 'ans'? 47 | ans = max(asn, i - 1); | ^~~ | ans
s911445947
p01448
C++
#include<iostream> #include<queue> #include<vector> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define MP make_pair #define PII pair<int,int> int main() { int N; int ans = 0; cin >> N; vector <PII> friends; queue <PII> q; REP(i, N) { int t1, t2; cin >> t1 >> t2; friends.push_back(MP(t1, ...
a.cc: In function 'int main()': a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(friends.begin(), friends.end()); | ^~~~ | short
s409581809
p01448
C++
#include <iostream> #include <cstdlib> int main(void){ int n; std::cin >> n; int endmax = 0; int* pn = new int[100000]; memset(pn, 0, 100000 * sizeof(int)); for(int i=0; i<n; i++){ int beg, end; std::cin >> beg >> end; for(int i = beg; i <= end; i++) pn[i]++; if(end > endmax) endmax = end; } int mps...
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(pn, 0, 100000 * sizeof(int)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdlib> +++ |+#inc...
s593024541
p01448
C++
#include <iostream> #include <stdlib.h> int main(void){ int n; std::cin >> n; int endmax = 0; int* pn = new int[100000]; memset(pn, 0, 100000 * sizeof(int)); for(int i=0; i<n; i++){ int beg, end; std::cin >> beg >> end; for(int i = beg; i <= end; i++) pn[i]++; if(end > endmax) endmax = end; } int mp...
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(pn, 0, 100000 * sizeof(int)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <stdlib.h> +++ |+#in...
s336097786
p01448
C++
#include <iostream> #include <string> using namespace std; int a[100002], b[100002]; int cumsum[100003]; int main() { int N; cin >> N; for(int i=0;i<N;i++) { cin >> a[i] >> b[i]; } memset(cumsum, 0, sizeof(cumsum)); for(int i=0;i<N;i++) { cumsum[a[i]] += +1; cumsum[b[i] + 1] -= 1; } int ans = 0; f...
a.cc: In function 'int main()': a.cc:18:9: error: 'memset' was not declared in this scope 18 | memset(cumsum, 0, sizeof(cumsum)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#incl...
s904206253
p01448
C++
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #define REP(i,a,b) for(int i=a;i<b;i++) #define rep(i,n) REP(i,0,n) using namespace std; using ll = long long; int main(){ int N; cin >> N; int arr[N + 1]; memset(arr, 0, sizeof(arr)); for (int i = 0; i < N; ++i) { ...
a.cc: In function 'int main()': a.cc:17:5: error: 'memset' was not declared in this scope 17 | memset(arr, 0, sizeof(arr)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <vector> +++ |+#include <cstring> ...
s187532340
p01448
C++
#define REP(i, n) for (int i = 0; i < (n); ++i) #include <cstdio> #include <cstring> int data[100002]; int main() { int n; scanf("%d", &n); memset(data, 0, sizeof(data)); int b_max = 0; REP(i, n) { int a, b; scanf("%d%d", &a, &b); data[a]++; data[b + 1]--; if (b > b_max) b_max = b; }...
a.cc: In function 'int main()': a.cc:30:9: error: expected primary-expression at end of input 30 | return | ^ a.cc:30:9: error: expected ';' at end of input 30 | return | ^ | ; a.cc:30:9: error: expected '}' at end of input a.cc:6:12: note: to match this '{' 6 | i...
s862516850
p01448
C++
//#include "bits/stdc++.h" #include <iostream> #include <array> // #include <map> // #include <string> // #include <algorithm> // #include <numeric> // #include <limits> using namespace std; array<int, 100002> box; // use key 100001 int n; int np; int min_; int max_; int solve() { cin >> n; np = n + 1; for (int...
a.cc: In function 'int main()': a.cc:46:21: error: no matching function for call to 'std::basic_istream<char>::tie(bool)' 46 | std::cin.tie(false); | ~~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/ostream:40, from...
s534206487
p01448
C++
#include <iostream> #include <vector> #include <algorithm> ?? using std::cin; using std::cout; using std::endl; ?? int main(void) { ????????int N; ????????cin >> N; ????????std::vector<int> frimin(N); ????????std::vector<int> frimax(N); ????????for (int i = 0; i < N; i++) { ????????????????cin >> frimin[i] >> frimax[i]...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^ a.cc:8:1: error: expected unqualified-id before '?' token 8 | ?? | ^
s215855888
p01448
C++
#include<bits/stdc++.h> using namespace std; #define lp(i,n) for(int i=0;i<n;i++) #define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];} int main(){ int n; cin>>n; int a[100002]; lp(i,100002){ a[i]=1; } lp(i,n){ int x,y; cin>>x>>y; for(int i=x;i<=y && i<=n;i++){ a[i]+=1; } } int ...
a.cc:29:1: error: expected declaration before '}' token 29 | } | ^
s575362843
p01448
C++
#include<bits/stdc++.h> using namespace std; int data[100001][100002] = {0}; int main(){ int n; cin >> n; //init /* for(int i = 0; i < 100001; i++){ for(int j = 0; j < 100002; j++) data[i][j] = 0; }*/ //input for(int i = 1; i <= n; i++){ int r, l; cin >> r >> l; for(int j = r; j <= l; j++) data[i][j...
a.cc: In function 'int main()': a.cc:20:45: error: reference to 'data' is ambiguous 20 | for(int j = r; j <= l; j++) data[i][j] = 1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, ...
s292571559
p01448
C++
#include<bits/stdc++.h> using namespace std; int data[100001][100002] = {0}; int main(){ int n; cin >> n; //init /* for(int i = 0; i < 100001; i++){ for(int j = 0; j < 100002; j++) data[i][j] = 0; }*/ //input for(int i = 1; i <= n; i++){ int r, l; cin >> r >> l; for(int j = r; j <= l; j++) data[i][j...
a.cc: In function 'int main()': a.cc:20:45: error: reference to 'data' is ambiguous 20 | for(int j = r; j <= l; j++) data[i][j] = 1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, ...
s754648905
p01448
C++
#include<bits/stdc++.h> using namespace std; int data[100001][100002]; int main(){ int n; cin >> n; //input for(int i = 1; i <= n; i++){ int r, l; cin >> r >> l; for(int j = r; j <= l; j++) data[i][j] = 1; } vector<int> v; for(int i = 1; i <= n; i++){ int ok = 0; for(int j = 1; j <= n; j++){ if(...
a.cc: In function 'int main()': a.cc:14:45: error: reference to 'data' is ambiguous 14 | for(int j = r; j <= l; j++) data[i][j] = 1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, ...
s235167257
p01448
C++
#include<bits/stdc++.h> using namespace std; bool data[100001][100002]; int main(){ int n; cin >> n; //input for(int i = 1; i <= n; i++){ int r, l; cin >> r >> l; for(int j = r; j <= l; j++) data[i][j] = true; } vector<int> v; for(int i = 1; i <= n; i++){ int ok = 0; for(int j = 1; j <= n; j++){ ...
a.cc: In function 'int main()': a.cc:14:45: error: reference to 'data' is ambiguous 14 | for(int j = r; j <= l; j++) data[i][j] = true; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, ...
s339192086
p01448
C++
#include<iostream> #include<map> #include<algorithm> #include<functional> #define all(c) c.begin(),c.end() #include<vector> #define MAX 100010 using namespace std; typedef pair<int,int> P; int main(){ int n; cin>>n; int ans=0; //int a[MAX],b[MAX]; int a,b; vector<P> box; for(int i=0;i<n;i++){ //cin>>a[i]>>b[i]...
a.cc: In function 'int main()': a.cc:43:24: error: 'uppwer_bound' was not declared in this scope 43 | int s=(uppwer_bound(vec.begin(),vec.end(),i,greater<int>())-vec.begin()); | ^~~~~~~~~~~~
s104938954
p01448
C++
#include<iostream> #include<map> #include<queue> #include<algorithm> using namespace std; #define fs first #define sc second typedef pair<int,int> P; int n; P p[200100]; int main(){ cin >> n; for(int i=0;i<n;i++)cin >> p[i].fs >> p[i].sc; p[n] = P(1,100001); sort(p,p+n+1); priority_queue<int, vector<int>,...
a.cc: In function 'int main()': a.cc:26:60: error: no matching function for call to 'max(int&, std::priority_queue<int, std::vector<int>, std::greater<int> >::size_type)' 26 | if(p[i].fs <= q.size() && q.size() <= q.top())ans = max(ans,q.size()); | ~~...
s391550797
p01448
C++
#include<iostream> #include<map> #include<queue> #include<algorithm> using namespace std; #define fs first #define sc second typedef pair<int,int> P; int n; P p[200100]; int main(){ cin >> n; for(int i=0;i<n;i++)cin >> p[i].fs >> p[i].sc; p[n] = P(1,100001); sort(p,p+n+1); priority_queue<int, vector<int>,...
a.cc: In function 'int main()': a.cc:26:60: error: no matching function for call to 'max(unsigned int&, std::priority_queue<int, std::vector<int>, std::greater<int> >::size_type)' 26 | if(p[i].fs <= q.size() && q.size() <= q.top())ans = max(ans,q.size()); | ...
s626226455
p01448
C++
#include<iostream> #include<map> #include<queue> #include<algorithm> using namespace std; #define fs first #define sc second typedef pair<int,int> P; int n; P p[200100]; int main(){ cin >> n; for(int i=0;i<n;i++)cin >> p[i].fs >> p[i].sc; p[n] = P(1,100001); sort(p,p+n+1); priority_queue<int, vector<int>,...
a.cc: In function 'int main()': a.cc:26:60: error: no matching function for call to 'max(unsigned int&, std::priority_queue<int, std::vector<int>, std::greater<int> >::size_type)' 26 | if(p[i].fs <= q.size() && q.size() <= q.top())ans = max(ans,q.size()); | ...
s441197991
p01448
C++
#include <iostream> #include <algorithm> using namespace std; int main() { const int MAX = 100001; int n, a, b; int dp[MAX+1] = {}; cin >> n; for(int i=0; i<n; i++) { cin >> a >> b; dp[a] ++; dp[b+1] --; } for(int i=2 i<MAX; i++) { dp[i+1] += dp[i]; } int mx = 0; for(int ...
a.cc: In function 'int main()': a.cc:17:14: error: expected ';' before 'i' 17 | for(int i=2 i<MAX; i++) { | ^~ | ;
s271846907
p01449
C
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; #define INF 1<<29 typedef int Weight; struct Edge{ int src; int dst; Weight weight; Edge(int src, int dst, Weight weight): src(src), dst(dst), weight(weight){ } }; struct Node{ int index; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s984381208
p01449
C
#include<iostream> #include<algorithm> #include<vector> #include<string> #define all(c) c.begin(),c.end() #define INF 100000000 using namespace std; vector<int> dp; int n; vector<int> v; int ans; void ret(int pos,int cnt){ //cout<<pos<<endl; //cout<<" "<<dp[pos]<<endl; if(pos>=n-1){ ans=min(cnt,ans); //cout<<"...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s168780157
p01449
C++
#include <iostream> #include <vector> #include <map> #include <queue> #include <stack> #include <algorithm> #include <cmath> #include <climits> #include <set> using namespace std; #define repn(i,s,n) for (int i=int(s); i < int(n); i++) #define rep(i,n) repn(i,0,n) #define repd(i,n) for (int i=int(n)-1; i >= 0; i--) ty...
a.cc: In function 'int main()': a.cc:27:3: error: 'function' was not declared in this scope 27 | function<int(int)> dfs = [&](int v) -> int { | ^~~~~~~~ a.cc:10:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>' 9 | #include <set> ...
s110117604
p01449
C++
#include<vector> #include<algorithm> using namespace std; int main() { int N,SR[200001],now,mi,len=0,M[200001]; vector<int> V; cin>>N; for(int i=0;i<N;i++)cin>>SR[i]; for(int i=0;i<N;i++)M[i]=1000002; M[0]=0; for(int i=1;i<=6;i++){ for(int j=i;j<N;j++){ for(int k=1;k<=i;k++){ if(SR[j-k]...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope 9 | cin>>N; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<algorithm> +++ |+#include <iostream> 3 | using namespace std...
s421429707
p01449
C++
# include <iostream> # include <vector> # include <queue> const int MAX_N = 100000; const int INF = 1000000; int n; int p[MAX_N]; std::vector<int> G[MAX_N]; bool f[MAX_N]; int func(int s) { if (f[s]) return -1; if (p[s] == 0) { return s; } else { f[s] = true; return func(s + p[s]); } } int d[MAX_N]; ...
a.cc: In function 'int main()': a.cc:60:54: error: 'memset' is not a member of 'std'; did you mean 'wmemset'? 60 | std::memset(f, false, sizeof(f)); | ^~~~~~ | ...
s182101041
p01449
C++
# include <iostream> # include <vector> # include <queue> const int MAX_N = 100000; const int INF = 1000000; int n; int p[MAX_N]; std::vector<int> G[MAX_N]; bool f[MAX_N]; int func(int s) { if (f[s]) return -1; if (p[s] == 0) { return s; } else { f[s] = true; return func(s + p[s]); } } int d[MAX_N]; ...
a.cc: In function 'int main()': a.cc:60:54: error: 'memset' is not a member of 'std'; did you mean 'wmemset'? 60 | std::memset(f, false, sizeof(f)); | ^~~~~~ | ...
s040695429
p01449
C++
#include <bits/stdc++.h> using namespace std; #define mk make_pair int main(){ int n; cin>>n; int a[n]; bool ch[n] for(int i=0;i<n;i++){cin>>a[i];ch[i]=0;} queue<pair<int,int> >q; q.push(mk(0,0)); ch[0]=1; while(!q.empty()){ pair<int,int>b=q.front();q.pop(); int d=b.first,c=b.second; if(d=...
a.cc: In function 'int main()': a.cc:9:3: error: expected initializer before 'for' 9 | for(int i=0;i<n;i++){cin>>a[i];ch[i]=0;} | ^~~ a.cc:9:15: error: 'i' was not declared in this scope 9 | for(int i=0;i<n;i++){cin>>a[i];ch[i]=0;} | ^ a.cc:12:3: error: 'ch' was not declared in t...
s652644256
p01449
C++
#include <bits/stdc++.h> using namespace std; #define mk make_pair int main(){ int n; cin>>n; int a[n]; bool ch[n+100]; for(int i=0;i<n;i++){cin>>a[i];} for(int i=0;i<n+100;i++)ch[i]=0; queue<pair<int,int> >q; q.push(mk(0,1)); ch[0]=1; while(!q.empty()){ pair<int,int>b=q.front();q.pop(); i...
a.cc: In function 'int main()': a.cc:32:4: error: expected '}' at end of input 32 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s626054753
p01449
C++
/* ????????????????????? */ #include <cstdio> #include <vector> #include <algorithm> #include <functional> constexpr int INF=1<<29; int main() { size_t n; scanf("%zu", &n); std::vector<int> p(n); for (size_t i=0; i<n; ++i) scanf("%d", &p[i]); std::vector<int> dst(n, -2); dst[0] = 0; dst[n-1] = n-...
a.cc: In lambda function: a.cc:28:22: error: 'rec' was not declared in this scope 28 | return (dst[k] = rec(k+p[k])); | ^~~
s534001332
p01449
C++
#include <bits/stdc++.h> using namespace std; using vi=vector<int>; using vvi=vector<vi>; using vs=vector<string>; using msi=map<string,int>; using mii=map<int,int>; using pii=pair<int,int>; using vlai=valarray<int>; using ll=long long; #define rep(i,n) for(int i=0;i<n;i++) #define range(i,s,n) for(int i=s;i<n;i++) #...
a.cc: In function 'int main()': a.cc:65:29: error: expected unqualified-id before '[' token 65 | que.push(uf.[c+d]); | ^
s627326458
p01449
C++
N = gets.to_i P = N.times.map{gets.to_i} + [0]*6 move = [nil]*(N+6) dfs1 = lambda do |i| if move[i] == -1 move[i] = false return false end return move[i] = move[i] if move[i] != nil return move[i] = i if P[i] == 0 move[i] = -1 res = dfs1.call(i+P[i]) return move[i] = ...
a.cc:1:1: error: 'N' does not name a type 1 | N = gets.to_i | ^ a.cc:2:28: error: expected unqualified-id before '+' token 2 | P = N.times.map{gets.to_i} + [0]*6 | ^
s496232983
p01450
Java
import java.util.Arrays; import java.util.Scanner; public class My_Friends_Are_Small { public static void main(String[] args) { new My_Friends_Are_Small().solver(); } final long MOD = 1_000_000_000 + 7; void solver() { Scanner sc = new Scanner(System.in); int N = sc.nextInt();// the number of friends int...
Main.java:4: error: class My_Friends_Are_Small is public, should be declared in a file named My_Friends_Are_Small.java public class My_Friends_Are_Small { ^ 1 error
s003433046
p01450
C++
//////////////////// /// template /// //////////////////// #include <cassert> #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #include <s...
a.cc: In function 'void solve()': a.cc:493:65: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 493 | int ret = dfs(we, wesum, memo, n - 2, w, n - 1, vector<int>()); | ...
s334690464
p01450
C++
#include <iostream> #include <algorithm> #include <utility> #include <vector> #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.re...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s150590879
p01450
C++
25 10000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 25 10000 | ^~
s859677954
p01450
C++
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().solver(); } final long MOD = 1_000_000_000 + 7; void solver() { Scanner sc = new Scanner(System.in); int N = sc.nextInt();// the number of friends int W = sc.nextInt();// the capacit...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ 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 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s358942300
p01450
C++
#include <bits/stdc++.h> using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define mp(a,b) make_pair((a),(b)) #define pb(a) push_back((a)) #define all(x) (x).begin(),(x).end() #define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x)) #define fi first #define se...
a.cc: In function 'int main()': a.cc:32:47: error: no matching function for call to 'std::vector<std::vector<long int> >::vector(int, std::vector<int>)' 32 | vector<vector<long>> dp(w+1,vector<int>(n,0)); | ^ In file included from /usr/include/c++/14/vector:66, ...
s592895448
p01450
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cfloat> #include <ctime> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include...
a.cc:99:2: error: stray '#' in program 99 | }#include <cstdio> | ^ a.cc:99:3: error: 'include' does not name a type 99 | }#include <cstdio> | ^~~~~~~ a.cc:137:25: error: redefinition of 'template<class T> void max_swap(T&, const T&)' 137 | template <class T> void max_swap(T& a, const T& b) { a = ...
s783946243
p01450
C++
#include <cstdio> #include <algorithm> #define MOD (1000000007) using namespace std; int N, W; int Wdown, Wup; int w[256]; int dp[202][10001]; int main() { scanf("%d %d", &N, &W); for (int i = 0; i < N; i++){ scanf("%d", &w[i]); } sort(w, w + N); reverse(w, w + N); dp[0][0] = 1; for (int i = 0; i < N; ...
a.cc: In function 'int main()': a.cc:25:17: error: 'memcpy' was not declared in this scope 25 | memcpy(dp[i + 1], dp[i], sizeof(dp[i])); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <...
s766428187
p01450
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n,w; int dp[201][10001]; int mod=1000000007; int main(void){ scanf("%d%d",&n,&w); for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); reverse(a,a+n); dp[0][0]=1; for (int i=0;i<n;i++){ memcpy(dp[i+1],dp[i],sizeof...
a.cc: In function 'int main()': a.cc:12:41: error: 'a' was not declared in this scope 12 | for(int i=0;i<n;i++)scanf("%d",&a[i]); | ^ a.cc:13:14: error: 'a' was not declared in this scope 13 | sort(a,a+n); | ^ a.cc:19:36: error: inva...
s758494087
p01450
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n,w; int a[201]; int dp[201][10001]; int mod=1000000007; int main(void){ scanf("%d%d",&n,&w); for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); reverse(a,a+n); dp[0][0]=1; for (int i=0;i<n;i++){ memcpy(dp[i+1],...
a.cc: In function 'int main()': a.cc:20:36: error: invalid types 'int[int]' for array subscript 20 | dp[i+1][j+w[i]]=(dp[i+1][j+w[i]]+dp[i][j]%mod; | ^ a.cc:20:53: error: invalid types 'int[int]' for array subscript 20 | dp[i...
s106867738
p01450
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n,w; int a[201]; int dp[201][10001]; int mod=1000000007; int main(void){ scanf("%d%d",&n,&w); for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); reverse(a,a+n); dp[0][0]=1; for (int i=0;i<n;i++){ memcpy(dp[i+1],...
a.cc: In function 'int main()': a.cc:20:36: error: invalid types 'int[int]' for array subscript 20 | dp[i+1][j+w[i]]=(dp[i+1][j+w[i]]+dp[i][j])%mod; | ^ a.cc:20:53: error: invalid types 'int[int]' for array subscript 20 | dp[...
s336149888
p01450
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n,w; int a[201]; int dp[201][10001]; int mod=1000000007; int main(void){ scanf("%d%d",&n,&w); for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); reverse(a,a+n); dp[0][0]=1; for(int i=0;i<n;i++){ memcpy(dp[i+1],d...
a.cc: In function 'int main()': a.cc:30:23: error: invalid types 'int[int]' for array subscript 30 | all+=w[i]; | ^ In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::rev...
s734526690
p01450
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n,w; int a[201]; int dp[201][10001]; int mod=1000000007; int main(void){ scanf("%d%d",&n,&w); for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); reverse(a,a+n); dp[0][0]=1; for(int i=0;i<n;i++){ memcpy(dp[i+1],d...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::reverse(_BIter, _BIter) [with _BIter = int]': a.cc:23:9: required from here 23 | reverse(w,w+n); | ~~~~~~~^~~~~~~ /usr/include/c++/14/bits/...
s094314530
p01450
C++
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n,w; int a[201]; int dp[201][10001]; int mod=1000000007; int main(void){ scanf("%d%d",&n,&w); for(int i=0;i<n;i++)scanf("%d",&a[i]); sort(a,a+n); reverse(a,a+n); dp[0][0]=1; for(int i=0;i<n;i++){ memcpy(dp[i+1],dp[i],sizeof(dp[i]))...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::reverse(_BIter, _BIter) [with _BIter = int]': a.cc:22:9: required from here 22 | reverse(w,w+n); | ~~~~~~~^~~~~~~ /usr/include/c++/14/bits/...
s479698088
p01451
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 vector<int> vi; typedef vector<string> vs; typedef pair<int, int> pii; typedef l...
a.cc:33:21: error: conflicting declaration 'typedef long double ld' 33 | typedef long double ld; | ^~ a.cc:12:16: note: previous declaration as 'typedef double ld' 12 | typedef double ld; | ^~
s629117986
p01451
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 vector<int> vi; typedef vector<string> vs; typedef pair<int, int> pii; typedef l...
a.cc: In function 'std::vector<Line> tangent_cc(Circle, Circle)': a.cc:212:23: error: 'tangent_cp' was not declared in this scope; did you mean 'tangent_cc'? 212 | res = tangent_cp(c1, center); | ^~~~~~~~~~ | tangent_cc a.cc:217:37: error: 'tange...
s673501311
p01451
C++
#include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<cstdio> #define f first #define s second #define INF (1<<29) using namespace std; typedef pair<double,double>pii; double dist(pii a,pii b){ return sqrt(pow(a.f-b.f,2)+pow(a.s-b.s,2)); } int main(void){ int na,nb; cin >> na >>...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s654162956
p01452
C
#include <stdio.h> #include <string.h> #define MOD (1000000007) typedef __int64 ll; ll memo[220001]; void initTable(ll n) { ll i; memo[1] = 1; for (i = 2; i <= n; i++){ memo[(int)i] = (i * memo[(int)(i - 1)]) % MOD; } } ll extgcd(ll a, ll b, ll *x, ll *y) { ll d = a; if (b != 0){ ...
main.c:6:9: error: unknown type name '__int64'; did you mean '__int64_t'? 6 | typedef __int64 ll; | ^~~~~~~ | __int64_t
s983029800
p01452
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
s658520792
p01452
C++
#include <stdio.h> #define mod 1000000007 int H, W, K, fact[100001], inv[100001], factiv[100001]; int ncr(int n, int r) { return r < 0 ? 0 : 1LL * fact[n] * factinv[r] % mod * factinv[n - r] % mod; } int main() { scanf("%d%d%d", &H, &W, &K); fact[0] = 1; for(int i = 1; i <= 100000; i++) fact[i] = 1LL * fact...
a.cc: In function 'int ncr(int, int)': a.cc:4:60: error: 'factinv' was not declared in this scope; did you mean 'factiv'? 4 | int ncr(int n, int r) { return r < 0 ? 0 : 1LL * fact[n] * factinv[r] % mod * factinv[n - r] % mod; } | ^~~~~~~ | ...
s853806329
p01452
C++
#include<iostream> using namespace std; #define MOD 1000000007 long long fact[500000]; long long inv[500000]; long long factinv[500000]; long long ncr(int a,int b){ if(b<0 || a<b)return 0; return 1LL*fact[a]*factinv[b]%MOD*factinv[a-b]%MOD; } long long ktrn(int a,int b){ return (ncr(a+b,b)-ncr(a+b,b-1)+MOD)%MOD; } ...
a.cc: In function 'int main()': a.cc:28:9: error: 'dp' was not declared in this scope 28 | dp[0][0]=1; | ^~ a.cc:29:34: error: 'p' was not declared in this scope 29 | for(int i=0;i<=1500;i++){p[i][0]=1;p[i][i]=1;} | ^ a.cc:35:33: error: 'p' was ...
s083932462
p01452
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loo...
a.cc: In function 'int main()': a.cc:70:5: error: 'd' was not declared in this scope; did you mean 'vd'? 70 | d=vector<ll>(210000); | ^ | vd
s239365884
p01453
Java
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { public static final int[] vs = {1, 0, -1, 0}; public static final double EPS = 1e-10; ...
Main.java:93: error: illegal character: '\' while(upper - lower > EPS){\ ^ 1 error
s718917668
p01453
C
#include<iostream> #include<string> #include<vector> #include<queue> #include<string.h> using namespace std; class C{ public: int x,y; C(int x,int y):x(x),y(y){} }; const int dx[]={1,0,-1,0}; const int dy[]={0,1,0,-1}; int w,h; bool in(int x,int y){ if(x<0 || y<0 || x>=w || y>=h) return false; return true; } ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s527508489
p01453
C
#include<iostream> #include<string> #include<vector> #include<queue> #include<string.h> #include<algorithm> using namespace std; class C{ public: int x,y; C(int x,int y):x(x),y(y){} }; const int dx[]={1,0,-1,0}; const int dy[]={0,1,0,-1}; int w,h; bool in(int x,int y){ if(x<0 || y<0 || x>=w || y>=h) return false;...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s109790269
p01453
C++
#include<cstdio> #include<queue> #include<vector> #include<algorithm> using namespace std; const int dx[]={1,0,-1,0},dy[]={0,1,0,-1}; char field[550][550]; int H,W; int dis[550][550],dis2[550][550]; vector<int> si,sj; void bfs(int res[550][550]){ for(int i=0;i<H;i++) for(int j=0;j<W;j++) res[i][j]=-1; queue<int>...
a.cc: In function 'bool check(double)': a.cc:60:14: error: 'tmp' was not declared in this scope 60 | sort(tmp.begin(),tmp.end()); | ^~~
s348297603
p01453
C++
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { public static final int[] vs = {1, 0, -1, 0}; public static final double EPS = 1e-10; ...
a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.lang.*; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1...
s330618134
p01453
C++
import java.math.BigDecimal; import java.util.*; class Point { public int x, y; public Point(int x, int y){ this.x = x; this.y = y; } } class State{ public int x, y, cnt; State(int x, int y, int cnt){ this.x = x; this.y = y; this.cnt = cnt; } } /** * ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.math.BigDecimal; | ^~~~~~ 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 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'...
s227264940
p01453
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; vector<vector<int>>fi; vector<vector<int>>spt, got; struct aa { int y; int x; int time; }; const int dx[4] = { -1,0,1,0 }; const int dy[4] = { 0,1,0,-1 }; class Compare { public: //keiroが昇順に並ぶ bool operator()(c...
a.cc: In function 'int main()': a.cc:126:56: error: expected primary-expression before 'long' 126 | timesum += min(long double(got[y][x]), spt[y][x] + amid); | ^~~~ a.cc:137:31: error: expected primary-expression befo...
s883172759
p01453
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; vector<vector<int>>fi; vector<vector<int>>spt, got; struct aa { int y; int x; int time; }; const int dx[4] = { -1,0,1,0 }; const int dy[4] = { 0,1,0,-1 }; class Compare { public: //keiroが昇順に並ぶ bool operator()(c...
a.cc: In function 'int main()': a.cc:137:31: error: expected primary-expression before 'long' 137 | long double ans = min(long double(got[sy][sx]), spt[sy][sx] + amin); | ^~~~
s434888871
p01453
C++
#include<bits/stdc++.h> /* */ using namespace std; typedef pair<long long int, pair<long long int, long long int>>one; #define mod 1000000007LL int main() { long long int W, H; cin >> W >> H; vector<string>D( H ); long long int counttile = 0; pair<long long int, long long int>start, goal; vector<pair<long long...
In file included from /usr/include/c++/14/queue:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157, from a.cc:1: /usr/include/c++/14/bits/stl_queue.h: In instantiation of 'void std::queue<_Tp, _Sequence>::pop() [with _Tp = std::pair<long long int, std::pair<long long int, ...
s444611942
p01453
C++
#include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/rational.hpp> #include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) typedef long long LL; struct poLL{ LL x; LL y; LL count; }; int main(){ LL houkou[5]={0,1,0,-1,0}; LL w,h; c...
a.cc:1:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_dec_float.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s944386454
p01453
C++
#include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) typedef long long LL; struct poLL{ LL x; LL y; LL count; }; int main(){ LL houkou[5]={0,1,0,-1,0}; LL w,h; cin >> w >> h; vector<vector<LL>> field(h,vector<LL>(w)); list<struct poLL> s...
a.cc:100:82: warning: integer constant is so large that it is unsigned 100 | boost::multiprecision::number<boost::multiprecision::cpp_dec_float<100>> right=10000000000000000000; | ^~~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main(...
s463701503
p01453
C++
#include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> #include <boost/rational.hpp> #include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) typedef long long LL; struct poLL{ LL x; LL y; LL count; }; int main()...
a.cc:1:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_dec_float.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s789696205
p01453
C++
#include <boost/multiprecision/cpp_int.hpp> #include <boost/rational.hpp> #include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) typedef long long LL; struct poLL{ LL x; LL y; LL count; }; int main(){ LL houkou[5]={0,1,0,-1,0}; LL w,h; cin >> ...
a.cc:1:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s515773196
p01453
C++
#include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> #include <boost/rational.hpp> #include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) typedef long long LL; struct poLL{ LL x; LL y; LL count; }; int main()...
a.cc:1:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory 1 | #include <boost/multiprecision/cpp_dec_float.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s000686121
p01454
C++
import java.io.File; import java.io.FileNotFoundException; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { new Main().run(); } void run() throws FileNotFoundException { solver(); } @Supp...
a.cc:16:9: error: stray '@' in program 16 | @SuppressWarnings("unchecked") | ^ a.cc:35:25: error: stray '@' in program 35 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.io.File; | ^~~~~~ a.cc:1:1:...
s499754536
p01457
C
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int n; long long ans; int main() { //freopen("1", "r", stdin); while (~scanf("%d", &n)) { ans = 0; while (n--) { long long a, b; char ch; scanf("%lld %c %lld", &a, &ch...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s701419162
p01457
C++
#include<iostream> using namespace std; int main() { int n; cin >> n; long lon cnt = 0; for(int i=0;i<n;i++) { int a,b; char c; cin >> a >> c >> b; c == '('?cnt += b:cnt -= b; !cnt?cout << "Yes" << endl:cout << "No" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: expected initializer before 'cnt' 9 | long lon cnt = 0; | ^~~ a.cc:14:16: error: 'cnt' was not declared in this scope; did you mean 'int'? 14 | c == '('?cnt += b:cnt -= b; | ^~~ | int
s827888470
p01457
C++
#include <cstdio> #include <cstring> void counts(int n, int &one, int &two, int staone) { one=0; two=0; staone=0; statwo=0; int tot=2; while (n) { one+=(n%3==1); two+=(n%3==2); n/=3; if (n%3==1) staone+=tot; if (n%3==2) statwo+=tot; tot*=2; } } int edgev[20][20]; double prab[200]; double p...
a.cc: In function 'void counts(int, int&, int&, int)': a.cc:11:9: error: 'statwo' was not declared in this scope; did you mean 'static'? 11 | statwo=0; | ^~~~~~ | static a.cc: In function 'int main()': a.cc:35:39: error: expected ')' before ';' token 35 | memset(edgev, ...
s897561857
p01457
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <assert.h> //assert螳?#include <sstream> #define PI 3.1415926535898 #define MAXN 10+1000 using namespace std; int i,j,k; int comp ( const void *a, const void *b ) { return * ( int * ) a - * ( int * ) b; ...
a.cc: In function 'int comp(const void*, const void*)': a.cc:21:1: error: a function-definition is not allowed here before '{' token 21 | { | ^ a.cc:37:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 37 | int main() | ^~ a.cc:37:9: note: remove paren...
s070921404
p01457
C++
#include<utility> //pair #include<vector> #include<stdio.h> #include<math.h> #include<string> #include<iostream> #include<algorithm> //find逧?、エ譁?サカ string逕ィfind逧?慮蛟吩シ夊ソ泌屓蟄礼ャヲ荳イ逧?ヲ門慍蝮?#include<iterator> #include<string.h> #include<deque> //蜿悟髄豺サ蜉?焚蟄礼噪謨ー扈? 蜿ッ莉・蛻?勁謌冶?豺サ蜉?ャャ荳?クェ #include<queue> #include<set> //諤...
a.cc: In function 'int main()': a.cc:19:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 19 | while(cin>>n) | ^~~ | std::cin In file included from a.cc:6: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s568953421
p01458
C++
#include <bits/stdc++.h> #define GET_MACRO(_1,_2,_3,_4,_5,_6,NAME,...) NAME #define pr(...) cerr<< GET_MACRO(__VA_ARGS__,pr6,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__) <<endl #define pr1(a) (#a)<<"="<<(a)<<" " #define pr2(a,b) pr1(a)<<pr1(b) #define pr3(a,b,c) pr1(a)<<pr2(b,c) #define pr4(a,b,c,d) pr1(a)<<pr3(b,c,d) #define pr5...
a.cc:27:39: warning: use of 'auto' in template argument only available with '-fconcepts-ts' 27 | ostream& operator<<(ostream& o,vector<auto> &a){Int i=0;for(auto t:a)o<<(i++?" ":"")<<t;return o;} | ^~~~ a.cc:28:39: warning: use of 'auto' in template argument only available...
s139025424
p01458
C++
#include <iostream> #include <string> #include <array> #include <vector> using namespace std; array<array<array<unsigned long long,2>,26>,2001> dp; struct Node { vector<Node*> next; bool terminal, deadend; Node() { next.resize(26, NULL); terminal = false; deadend = true; } ...
a.cc: In function 'bool solve()': a.cc:109:28: error: 'remove_if' was not declared in this scope; did you mean 'remove'? 109 | auto end = remove_if(cur_list.begin(), cur_list.end(), [](const Node *n) { | ^~~~~~~~~ | remove
s572767930
p01459
C++
#include<stdio.h> #include<algorithm> #include<queue> using namespace std; char str[110][110]; int dx[]={1,0,0,-1}; int dy[]={0,1,-1,0}; int bfs[110][110][11][11][4]; struct wolf{ int r,c,a,b,d; wolf(){} wolf(int R,int C,int A,int B,int D){r=R;c=C;a=A;b=B;d=D;} }; int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); ...
a.cc: In function 'int main()': a.cc:38:73: error: 'td' was not declared in this scope; did you mean 'tc'? 38 | if((tr!=sr||tc!=sc)&&at.a<c&&!bfs[tr][tc][at.a+1][at.b][td]){ | ^~ | ...
s429429669
p01459
C++
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <string> #include <queue> #define INF 100 using namespace std; struct data{ int x,y,p,q,dir; data(){} data(int yy,int xx,int dd,int pp,int qq){ x=xx; y=yy; p=pp; q=qq; dir=dd; } bool operator<(const data &d)const{ r...
a.cc: In function 'int dijk()': a.cc:42:28: error: template argument 1 is invalid 42 | priority_queue<data> que; | ^ a.cc:42:28: error: template argument 2 is invalid a.cc:42:28: error: template argument 3 is invalid a.cc:43:13: error: request for member 'push' in 'que', whic...
s216886729
p01459
C++
#include <bits/stdc++.h> using namespace std; ?? //h, w, dir, P, Q typedef struct _State{ ????????int h, w, dir; ????????vector<int> pq; }State; ?? int N, M, A; int Sh, Sw, Gh, Gw; vector<string> field; ?? //south is 0 int dh[] = {1, -1, 0, 0}; int dw[] = {0, 0, 1, -1}; ?? int table[2][4] = {{2, 3, 0, 1}, {3, 2, 1, 0}}...
a.cc:24:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 24 | ????????//map<State, int> dist; a.cc:52:39: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 52 | ????????????????????????????????????????//cout << v.h << " " << v.w << " " << dist[v.h][v.w][v.dir][v.pq[0]][...
s800041877
p01459
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
s590704870
p01459
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; const int INF = 1e8; using namespace std; const int N = 105; int h, w, a; char m[N][N]; bool dis[N][N][15...
a.cc: In function 'int main()': a.cc:90:51: error: no matching function for call to 'std::tuple<int, int, int, int, int, int>::tuple(<brace-enclosed initializer list>)' 90 | if(m[i][j] == 'S') s = T{i,j,0,0,0}; | ^ In file included from /usr/inc...
s124429201
p01459
C++
#include<queue> #include<cstdio> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; const int dx[]={1,0,-1,0},dy[]={0,-1,0,1}; struct stat{ int y,x,dir,n1,n2; // n1, n2 : 鏡 /, \ の残り枚数 }; int main(){ int h,w,n; scanf("%d%d%d",&h,&w,&n); char B[100][101]; rep(i,h) scanf("%s",B[i]); int sx,sy; rep(i,...
a.cc: In function 'int main()': a.cc:23:9: error: 'memset' was not declared in this scope 23 | memset(dp,-1,sizeof dp); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring>...
s074904616
p01461
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip>...
a.cc:82:1: error: ISO C++ forbids declaration of '_main' with no type [-fpermissive] 82 | _main(){ | ^~~~~ a.cc:103:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 103 | main(){ | ^~~~
s655249551
p01461
C++
#include<cstdio> #include<iostream> #define REP(i,s,n) for(register int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define MAX 500010 using namespace std; long long depth[MAX],L[MAX],R[MAX],N,noSaveDp[MAX],saveDp[MAX],leaf[MAX]; int main(){ scanf("%d",&N); depth[0] = leaf[N-1] = 1; rep(i,N-1){ scanf("%d %d"...
a.cc: In function 'int main()': a.cc:15:7: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | rep(i,N-1){ | ^ a.cc:4:37: note: in definition of macro 'REP' 4 | #define REP(i,s,n) for(register int i=s;i<n;i++) | ^ a.cc:15:...
s660314865
p01462
C++
#include<bits/stdc++.h> using namespace std; int V,E; double P,Q; vector<int> G[15]; void printbit(int S){ for(int i=0;i<V;i++){ cout<<(S>>i&1)<<' '; } cout<<endl; } double func(int S,int U){ double res=1; for(int i=0;i<V;i++){ if(S>>i&1){ for(int j=0;j<(int)G[i].size();j++){ int...
a.cc:53:16: error: extended character ⊃ is not valid in an identifier 53 | sub=(sub-1)⊃ | ^ a.cc: In function 'double rec(int)': a.cc:53:16: error: expected ';' before '\U00002283' 53 | sub=(sub-1)⊃ | ^ | ;
s254789704
p01462
C++
#include<bits/stdc++.h> using namespace std; int V,E; double P,Q; vector<int> G[15]; void printbit(int S){ for(int i=0;i<V;i++){ cout<<(S>>i&1)<<' '; } cout<<endl; } double func(int S,int U){ double res=1; for(int i=0;i<V;i++){ if(S>>i&1){ for(int j=0;j<(int)G[i].size();j++){ int...
a.cc:53:16: error: extended character ⊃ is not valid in an identifier 53 | sub=(sub-1)⊃ | ^ a.cc: In function 'double rec(int)': a.cc:53:16: error: expected ';' before '\U00002283' 53 | sub=(sub-1)⊃ | ^ | ;
s346399885
p01462
C++
#include<bits/stdc++.h> using namespace std; int V,E; double P,Q; vector<int> G[15]; void printbit(int S){ for(int i=0;i<V;i++){ cout<<(S>>i&1)<<' '; } cout<<endl; } double func(int S,int U){ double res=1; for(int i=0;i<V;i++){ if(S>>i&1){ for(int j=0;j<(int)G[i].size();j++){ int...
a.cc:53:16: error: extended character ⊃ is not valid in an identifier 53 | sub=(sub-1)⊃ | ^ a.cc: In function 'double rec(int)': a.cc:53:16: error: expected ';' before '\U00002283' 53 | sub=(sub-1)⊃ | ^ | ;
s782402937
p01462
C++
#include <cstdlib> #include <iostream> #include <vector> using namespace std; #include "dump.hpp" int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(10); int n, m; double p; cin >> n >> m >> p; p /= 100; vector<vector<int>> G(n); for(int i = 0; i < m; ++i) { ...
a.cc:6:10: fatal error: dump.hpp: No such file or directory 6 | #include "dump.hpp" | ^~~~~~~~~~ compilation terminated.
s578092560
p01462
C++
#include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #define _rep(i,n) _range(i,0,n) #define _range(i,a,b) for(int i=int(a);i<int(b);++i) #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__) #define bit(x) (1<<(x)) using namespace std; int n,m,p; int a[15][15]; using R=long double; R dp[1<<...
a.cc: In function 'int main()': a.cc:27:48: error: 'limit' was not declared in this scope 27 | for(int add=(mask-1)&mask;add>=limit;add=(add-1)&mask){ | ^~~~~