submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s058869820
p04039
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace st...
a.cc: In function 'int main()': a.cc:110:23: error: expected ';' before ')' token 110 | for(int i=n;i<100000){ | ^ | ;
s190762119
p04039
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) const double PI = acos(-1); const double EPS = 1e-15; long long INF=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace st...
a.cc: In function 'int main()': a.cc:98:9: error: overloaded function with no contextual type information 98 | index=0; | ^ a.cc:100:13: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<' 100 | if(index<k && i==d[index]){ | ~~~~...
s936366813
p04039
C++
#include<bits/stdc++.h> #define mins(a,b) a=min(a,b) #define maxs(a,b) a=max(a,b) template < typename T > std::string to_string( const T& n ) { std::ostringstream stm ; stm << n ; return stm.str() ; } } using namespace std; const long long INF=9000000000000000; int main(){ int n,x...
a.cc:10:1: error: expected declaration before '}' token 10 | } | ^
s285119970
p04039
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define repo(i,o,n) for(int i=o;i<(int)(n);i++) #define repm(i,n) for(int i=(int)(n)-1;i>=0;i--) #define all(v) (v).begin(),...
a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 20 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:27:50: error: expected primary-expression before ')' token 27 | if (*itr == tmp%10 || itr == v.end();) goto hoge; | ...
s034699567
p04039
C++
#include <iostream> #include <string> #include <vector> #include <utility> #include <functional> #include <numeric> #include <list> #include <set> #include <map> #include <algorithm> #include <cmath> #include <limits> #include <iomanip> #include <bitset> #include <queue> using namespace std; typedef long long ll; tem...
a.cc: In function 'int main()': a.cc:50:23: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 50 | if(usable[stoi(n[i])]){ | ~~~~^~~~~~ In file included from /usr/include/c++/14/string:54, from /usr/incl...
s667298109
p04039
C++
#include <iostream> #include<vector> using namespace std; /* #include <boost/multiprecision/cpp_int.hpp> using namespace boost::multiprecision; using cint = cpp_int; */ // Define using ll = long long; using ull = unsigned long long; using ld = long double; const ll dx[4] = {1, 0, -1, 0}; const ll dy[4] = {0, 1, 0, -1...
a.cc:21:17: error: 'ULONG_MAX' was not declared in this scope 21 | const ull MAX = ULONG_MAX; | ^~~~~~~~~ a.cc:3:1: note: 'ULONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<vector> +++ |+#include <climits> 3 | using names...
s216717953
p04039
C++
#include <iostream> #include <vector> #include <climits> using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) #define FOR(i, m, n) for(int i=(m);i<(n);i++) #define INF INT_MAX typedef vector<int> VI; int n, k; VI d(11); bool check(int n) { bool flag = true; int keta = 0; for (int i = n; i > 0; i = i / 1...
a.cc: In function 'bool check(int)': a.cc:18:35: error: 'pow' was not declared in this scope 18 | int x = n / (int)(pow(10, i - 1)) % 10; | ^~~
s338405492
p04039
C++
#include<iostream> #include<cinttypes> #include<vector> #include<algorithm> #include<string> using ui = std::uint16_t; using si = std::int32_t; class number { si x[4]; public: number(si v) :x{si{v % 10 } , si{(v % 100) / 10} , si{(v % 1000)} / 100 , si{v / 1000}} {} auto& operator[](si v)const { re...
a.cc: In function 'int main()': a.cc:70:67: error: 'pow' is not a member of 'std' 70 | n = number(n.as_si()+std::pow(10,i)); | ^~~
s713030769
p04039
C++
#include<iostream> #include<cinttypes> #include<vector> #include<algorithm> #include<string> using ui = std::uint16_t; template<class T> auto begend(T&&t) { return std::make_pair( std::begin(t) ,std::end(t) ); } template<class Container, class ITP > auto f(ui x,Container &vn,ITP& vitp)->bool { vn.c...
a.cc: In function 'bool f(ui, Container&, ITP&)': a.cc:27:43: error: 'nsitp' was not declared in this scope 27 | const auto it = std::find(nsitp.first, nsitp.second, str[i]); | ^~~~~
s403618693
p04039
C++
#include<iostream> #include<cinttypes> #include<vector> #include<algorithm> #include<string> using ui = std::uint16_t; template<class T> auto begend(T&&t) { return std::make_pair( std::begin(t) ,std::end(t) ); } template<class Container, class ITP > auto f(ui x,Container &vn,ITP& vitp)->bool { vn.c...
a.cc: In function 'bool f(ui, Container&, ITP&)': a.cc:27:43: error: 'nsitp' was not declared in this scope 27 | const auto it = std::find(nsitp.first, nsitp.second, str[i]); | ^~~~~
s085246612
p04039
C++
#include<iostream> #include<cinttypes> #include<vector> #include<algorithm> #include<string> using ui = std::uint16_t; template<class T> auto begend(T&&t) { return std::make_pair( std::begin(t) ,std::end(t) ); } template<class Container, class ITP > auto f(ui x,Container &vn,ITP& vitp)->bool { vn.c...
a.cc: In function 'bool f(ui, Container&, ITP&)': a.cc:27:43: error: 'nsitp' was not declared in this scope 27 | const auto it = std::find(nsitp.first, nsitp.second, str[i]); | ^~~~~
s428879766
p04039
C++
#include<iostream> #include<cinttypes> #include<vector> #include<algorithm> #include<string> using ui = std::uint16_t; template<class T> auto begend(T&&t) { return std::make_pair( std::begin(t) ,std::end(t) ); } template<class Container> auto f(ui x,Container &vn)->bool { vn.clear(); std::string s...
a.cc: In function 'bool f(ui, Container&)': a.cc:27:43: error: 'nsitp' was not declared in this scope 27 | const auto it = std::find(nsitp.first, nsitp.second, str[i]); | ^~~~~ a.cc:36:43: error: 'vitp' was not declared in this scope 36 | ...
s222791679
p04039
C++
using namespace std; int N,K; int num[11]; int main(){ cin >> N >> K; for(int i=0; i<K; i++) { int x; cin >> x; num[x]++; } int ans = 0; int cnt = 0; while( N ) { int n = N % 10; for(int i=0; i<11; i++){ if ( num[i] == 0 && i >= n) { ...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> N >> K; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:26:5: erro...
s537292917
p04039
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(0); cin.sync_with_stdio(0); int n, k; cin >> n >> k; vector<bool> a(10); while (k--) { int x; cin >> x; a[x] = true; } auto f = [&](int x) { while (x) { if (a[x % 10]) return true; x /=...
a.cc: In function 'int main()': a.cc:24:10: error: 'is_bad' was not declared in this scope; did you mean 'si_band'? 24 | while (is_bad(n)) n++; | ^~~~~~ | si_band
s292426355
p04039
C++
#include<bits/stdc++.h> using namespace std; int main() { long long n; int k; int a[10]={0}; for(int i=0;i<k;i++) { int x;xin>>x;a[x]=1; } long long ans=n; while(1) { long long v=ans; int y=1; while(v>0) { if(a[v%10]) {y=0;break;} v/=10; } if(y) break; ans+=n; } cout<<ans; }
a.cc: In function 'int main()': a.cc:10:7: error: 'xin' was not declared in this scope; did you mean 'sin'? 10 | int x;xin>>x;a[x]=1; | ^~~ | sin
s189130744
p04039
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <math.h> using namespace std; int main() { int N, K; cin >> N >> K; string d = ""; for (int i = 0; i < K; i++) { char c; cin >> c; d += c; } for (int i = N; i < N*10; i++) { string s = to_string(i); bool f = true...
a.cc: In function 'int main()': a.cc:38:25: error: return-statement with no value, in function returning 'int' [-fpermissive] 38 | return; | ^~~~~~
s243690406
p04039
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> using namespace std; int d[12]; int main(){ int n,k,a=-1,b=...
a.cc: In function 'int main()': a.cc:21:11: error: invalid types 'int[int]' for array subscript 21 | cin>>d[i]; | ^ a.cc:29:18: error: invalid types 'int[int]' for array subscript 29 | if ((a == d[j]) or (b == d[j]) or (c == d[j]) or (d == d[j])) | ^ a.cc:29:33: er...
s490175031
p04039
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <queue> #include <sstream> #include <stack> #include <time.h> #include <vector> #include <complex> using namespace std; int d[12]; int main(){ int n,k,pos=0,c...
a.cc: In function 'int main()': a.cc:39:2: error: expected '}' at end of input 39 | } | ^ a.cc:22:12: note: to match this '{' 22 | while (1){ | ^ a.cc:39:2: error: expected '}' at end of input 39 | } | ^ a.cc:17:11: note: to match this '{' 17 | int main(){ | ...
s614528138
p04039
C++
#include <iostream> int n,k,g = 0,s = 0,b = 0,q = 0,w = 0; cin >> n >> k; int d[k]; for(int c = 0;c < k;c++){ cin >> d[c]; for(int a = n;a <= 10000;a++){ g = a % 10; s = a % 100 / 10; b = a % 1000 / 100; q = a % 10000 / 1000; ...
a.cc:4:5: error: 'cin' does not name a type 4 | cin >> n >> k; | ^~~ a.cc:5:11: error: size of array 'd' is not an integral constant-expression 5 | int d[k]; | ^ a.cc:6:5: error: expected unqualified-id before 'for' 6 | for(int c = 0;c < k;c++){ | ^~~ a.cc:6:1...
s192489683
p04039
C++
/************************************************* ************************************************* ************************************************* *** _________________ | | | /*** *** | | | | / *** *** | | | | / *** *** |...
a.cc: In function 'll powmod(ll, ll)': a.cc:76:45: error: 'assert' was not declared in this scope 76 | inline ll powmod(ll a,ll b){ll res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;} | ^~~~~~ a.cc:23:1: note: 'assert' is defined in...
s180717649
p04039
C++
/************************************************* ************************************************* ************************************************* *** _________________ | | | /*** *** | | | | / *** *** | | | | / *** *** |...
a.cc:85:10: fatal error: windows.h: No such file or directory 85 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s208737498
p04039
C++
#include<string.h> #include<map> #include<math.h> #include<string> #include<algorithm> #include<queue> #include<vector> #include<stdio.h> using namespace std; int main(){ int g[10000]; int n,k,w,d; d=0; w=0; cin>>n>>k; for(int j=1;j<=k;j++) cin>>g[j]; for(int i=n;d<i.size;i++){ for(int l=1;l<=i.size();l++) for(int f=1...
a.cc: In function 'int main()': a.cc:15:1: error: 'cin' was not declared in this scope 15 | cin>>n>>k; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include<queue> +++ |+#include <iostream> 7 | #include<vector> a.cc:1...
s635352747
p04039
C++
#include<string.h> #include<map> #include<math.h> #include<string> #include<algorithm> #include<queue> #include<vector> #include<stdio.h> using namespace std; int main(){ int g[10000]; int n,k,w,d; d=0; w=0; cin>>n>>k; for(int j=1;j<=k;j++) cin>>g[j]; for(int i=n;d<i.size;i++){ for(int l=1;l<=i.size();l++) for(int f=1...
a.cc: In function 'int main()': a.cc:15:1: error: 'cin' was not declared in this scope 15 | cin>>n>>k; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include<queue> +++ |+#include <iostream> 7 | #include<vector> a.cc:1...
s639602085
p04039
C++
#include<iostream> #include<cstdio> #include<cmath> #include<string.h> using namespace std; char getnum(int n,int c) { char s[6]; sprintf(s,"%d",n); return (s[c-1]); } void plusnum(int &n,int c) { char s[6]; sprintf(s,"%d",n); n+=pow(10,strlen(s)-c); } template<size_t s> bool pass(int n,int c,int (&d)[s]) { int num; nu...
a.cc: In function 'bool pass(int, int, int (&)[s])': a.cc:23:5: error: 'i' was not declared in this scope 23 | for(i=0;i<s;i++) | ^ a.cc: In function 'int main()': a.cc:39:9: error: no matching function for call to 'pass(int&, int&, int&)' 39 | if(!pass(n,i,k))plusnum(n,i); | ~~~~^~~~~~~ a.cc:...
s619778431
p04039
C++
#include<iostream> #include<cstdio> #include<cmath> #include<string.h> using namespace std; char getnum(int n,int c) { char s[6]; sprintf(s,"%d",n); return (s[c-1]); } void plusnum(int &n,int c) { char s[6]; sprintf(s,"%d",n); n+=pow(10,strlen(s)-c); } template<size_t s> bool pass(int n,int c,int (&d)[s]) { int num; nu...
a.cc: In function 'bool pass(int, int, int (&)[s])': a.cc:23:5: error: 'i' was not declared in this scope 23 | for(i=0;i<s;i++) | ^ a.cc: In function 'int main()': a.cc:39:9: error: no matching function for call to 'pass(int&, int&, int&)' 39 | if(!pass(n,i,k))plusnum(n,i); | ~~~~^~~~~~~ a.cc:...
s258409716
p04039
C++
#include<bits\stdc++.h> using namespace std; int n, k, a[100500], res; map<int, int> m; vector<int> v; int main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> n >> k; for(int i=1;i<=k;i++){ cin >> a[i]; m[a[i]] = 1; } for(int i=9;i>=0;i--){ if(!m[i])v.push_back(i); } while(res <= n){ res += v[0]; ...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s912105185
p04039
C++
#include<bits\stdc++.h> using namespace std; int n, k, a[100500], res; map<int, int> m; vector<int> v; int main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> n >> k; for(int i=1;i<=k;i++){ cin >> a[i]; m[a[i]] = 1; } for(int i=9;i>=0;i--){ if(!m[i])v.push_back(i); } while(res <= n){ res += v[0]; ...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s582451058
p04039
C++
#include<bits\stdc++.h> using namespace std; int n, k, a[100500], res; map<int, int> m; vector<int> v; int main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> n >> k; for(int i=1;i<=k;i++){ cin >> a[i]; m[a[i]] = 1; } for(int i=9;i>=0;i--){ if(!m[i])v.push_back(i); } while(res <= n){ res += v[0]; ...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s659224022
p04039
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<bitset> using namespace std; typedef unsigned long long ull; const int N=2005; int n,m,p[N],q[N],a[1002005],f[N],len[N],now,sz; ull hash[1002005]; bitset<10005> arr[N],bit; char str[1000005]; bool cmp(int x,int y) {...
a.cc: In function 'bool cmp(int, int)': a.cc:24:21: error: reference to 'hash' is ambiguous 24 | if (hash[p[x]+mid]==hash[p[y]+mid]) l=mid+1; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, ...
s654350126
p04039
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { string n; int k; cin >> n >> k; vector<bool> b(10); for(int i = 0; i < k; i++) { int a; cin >> a; b[a] = true; } vector<int> c; for(int i = 0; i < 10; i++) if(!b[i]) c.push_back(i); auto it = upper_bou...
a.cc: In function 'int main()': a.cc:19:47: error: 'i' was not declared in this scope; did you mean 'it'? 19 | auto it = upper_bound(c.begin(), c.end(), n[i] - '0'); | ^ | it a.cc:19:13: error: 'upper_bound' was...
s927309921
p04039
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i,n) for(int i=0;i<n;++i) #define SORT(name) sort(name.begin(), name.end()) #define ZERO(p) memset(p, 0, sizeof(p)) #define MINUS(p) memset(p, -1, sizeof(p)) #if 1 # define DBG(fmt, ...) printf(fmt, __VA_ARGS__) #else # define DBG(fmt, ...
a.cc:21:1: error: expected initializer before 'bool' 21 | bool okDigit[10] = {}; | ^~~~ a.cc: In function 'int main()': a.cc:25:17: error: 'K' was not declared in this scope 25 | cin >> N >> K; | ^ a.cc:26:18: error: 'okDigit' was not declared in this scope 26 | REP(i, 10) {...
s789208675
p04039
C
#include<stdio.h> #include<math.h> #include<string.h> #include<iostream> using namespace std; int a[20]; int main() { int n,k; while(~scanf("%d%d",&n,&k)) { memset(a,0,sizeof(a)); for(int i=0; i<k; i++) { int q; scanf("%d",&q); a[q]=1; } ...
main.c:5:9: fatal error: iostream: No such file or directory 5 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s821573642
p04039
C++
n, _ = map(int, raw_input().split()) d = set(map(int, raw_input().split())) while len(set(map(int, str(n))) & d) > 0: n += 1 print n
a.cc:1:1: error: 'n' does not name a type 1 | n, _ = map(int, raw_input().split()) | ^
s676210747
p04039
C++
#include <bits/stdc++.h> using namespace std; int main() { string a; int b,c[10],A = 0,B = 0,C = 0,D = 0,E = 0,F = 0,G = 0,H = 0,I = 0,J = 0; cin >> a >> b; for(int S = 0; S < b;S++){ cin >> c[S]; if(c[S] == 0){J = 1;} else if(c[S] == 1){A = 1;} else if(c[S] == 2){B = 1;} else if(c[S] == 3){C = 1;} else if(c[S] ...
a.cc: In function 'int main()': a.cc:15:33: error: expected ';' before ':' token 15 | else if(c[S] == 4){D = 1:} | ^ | ; a.cc:16:33: error: expected ';' before ':' token 16 | else if(c[S] == 5){E = 1:} | ...
s513199639
p04039
C++
#include <bits/stdc++.h> using namespace std; main(){ int n,k,d[10]={},tmp; vector <int> dl; for(cin>>n>>k;;cin>>tmp;dl.push_back(tmp)); for(;;n++){ for(int a=n;a;a/=10) for(int i=0;i<dl.size();i++) if(dl[i]==a%10) goto end; cout<<n<<endl; return 0; end:; } }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:26: error: expected ')' before ';' token 6 | for(cin>>n>>k;;cin>>tmp;dl.push_back(tmp)); | ~ ^ | ) a...
s862758455
p04039
C++
#include <bits/stdc++11.h> using namespace std; main(){ int n,k,d[10]={},tmp; vector <int> dl; for(cin>>n>>k;;cin>>tmp;dl.push_back(tmp)); for(;;n++){ for(int a=n;a;a/=10) for(int i=0;i<dl.size();i++) if(dl[i]==a%10) goto end; cout<<n<<endl; return 0; end:; } }
a.cc:1:10: fatal error: bits/stdc++11.h: No such file or directory 1 | #include <bits/stdc++11.h> | ^~~~~~~~~~~~~~~~~ compilation terminated.
s544088142
p04039
C++
#include <iostream> using namespace std; main(){ int n,k,d[10]={},tmp; vector <int> dl; for(cin>>n>>k;;cin>>tmp;dl.push_back(tmp)); for(;;n++){ for(int a=n;a;a/=10) for(int i=0;i<dl.size();i++) if(dl[i]==a%10) goto end; cout<<n<<endl; return 0; end:; } }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'vector' was not declared in this scope 5 | vector <int> dl; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is p...
s528302408
p04039
C++
#include<iostream> #include<algorithm> #include<vector> std::vector<int> f; bool fig[10]; int N, K; int mods[5] = {10000,1000,100,10,1 }; int ans; int main() { std::cin >> N >> K; for (int i = 0; i < K; i++) { int tmp; std::cin >> tmp; fig[tmp] = true; } for (int i = 0; i < 10; i++) { if (!fig[i]) { f.pu...
a.cc: In function 'int main()': a.cc:28:44: error: expected primary-expression before '=' token 28 | else ans + =f[0] * mods[i-1]; | ^
s163423992
p04039
C++
#include <assert.h> #include <ctype.h> #include <errno.h> #include <float.h> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <locale> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <wchar.h> #include <wctype.h> #include <algor...
a.cc:53:10: fatal error: conio.h: No such file or directory 53 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s223341024
p04039
C++
#include <bits\stdc++.h> using namespace std; int n,m,i,j,a[15]; string st; char s[15]; bool check(int x) { sprintf(s,"%d",x); st=s; for (i=1;i<=m;i++) { if ((int)st.find(a[i]+'0')!=-1) { return 0; } } return 1; } int main() { cin>>n>>m; for (i=1;i<=m;i++) cin>>a[i]; while (!check(n)) n++; cout<<n...
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s614754000
p04039
C++
#include <iostream> #include <cstdio> #include <vector> #define _USE_MATH_DEFINES #include <math.h> #include <cstring> #include <numeric> #include <algorithm> #include <stdlib.h> #include <functional> #include <string> #include <array> #include <map> #include <queue> #include <limits.h> #include <set> #include <stack> ...
a.cc: In function 'int main()': a.cc:69:17: error: 'itoa' was not declared in this scope 69 | itoa(n, str, 10); | ^~~~
s198759852
p04039
C++
#include <iostream> #include <cstdio> #include <vector> #define _USE_MATH_DEFINES #include <math.h> #include <cstring> #include <numeric> #include <algorithm> #include <stdlib.h> #include <functional> #include <string> #include <array> #include <map> #include <queue> #include <limits.h> #include <set> #include <stack> ...
a.cc: In function 'int main()': a.cc:69:17: error: 'itoa' was not declared in this scope 69 | itoa(n, str, 10); | ^~~~
s030620518
p04039
C++
#include <iostream> #include <cstdio> #include <vector> #define _USE_MATH_DEFINES #include <math.h> #include <cstring> #include <numeric> #include <algorithm> #include <stdlib.h>> #include <functional> #include <string> #include <array> #include <map> #include <queue> #include <limits.h> #include <set> #include <stack>...
a.cc:9:20: warning: extra tokens at end of #include directive 9 | #include <stdlib.h>> | ^ a.cc: In function 'int main()': a.cc:69:17: error: 'itoa' was not declared in this scope 69 | itoa(n, str, 10); | ^~~~
s700822083
p04039
C++
#include <iostream> #include <cstdio> #include <vector> #define _USE_MATH_DEFINES #include <math.h> #include <cstring> #include <numeric> #include <algorithm> #include <functional> #include <string> #include <array> #include <map> #include <queue> #include <limits.h> #include <set> #include <stack> #include <random> #i...
a.cc: In function 'int main()': a.cc:68:17: error: 'itoa' was not declared in this scope 68 | itoa(n, str, 10); | ^~~~
s999208537
p04039
Java
//Do what you can't. import java.io.*; import java.util.*; import java.math.BigInteger; public class Main { static long mod = (long)1e9 + 7; public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter w = new PrintWriter(System.out); long n = in.nextLong(); int...
Main.java:28: error: cannot find symbol w.println(rev(s).parseLong()); ^ symbol: method parseLong() location: class String 1 error
s239736295
p04039
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> #include <iostream> #include <set> #include <map> using namespace std; typedef long long ll; int N, K; int main(int argc, char const *argv[]) { cin >> N >> K; int a; vector<int> v; for (int i = 0; i < K...
a.cc: In function 'int main(int, const char**)': a.cc:21:31: error: expected ';' before '}' token 21 | v.push_back(a) | ^ | ; 22 | } | ~
s270334176
p04039
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String kirai[] = new String[k]; for (int i = 0; i < k; i++) { kirai[i] = sc.next(); } String number[]; number = String.valueOf(n)...
Main.java:3: error: illegal character: '\u3000' public class?Main { ^ 1 error
s394621342
p04039
Java
package xml1115; import java.util.Scanner; public class A { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int knum = scan.nextInt(); int[] hateNums = new int[knum]; for(int i = 0; i < knum; i++){ hateNums[i] = scan.nextInt(); } char[] ...
Main.java:5: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s072881063
p04039
Java
import java.util.Scanner; public class A { public static void main(String[] at){ Scanner scanner = new Scanner(System.in); int mon = scanner.nextInt(); String[] hate = new String [scanner.nextInt()]; for (int i = 0; i < hate.length; i++){ hate[i] = scanner.next(); ...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s761728937
p04039
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String kirai[] = new String[k]; for (int i = 0; i < k; i++) { kirai[i] = sc.next(); } String number[]; number = String.valueOf(n)...
Main.java:3: error: illegal character: '\u3000' public class?Main { ^ 1 error
s413584180
p04039
C++
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <sstream> #include <iostream> #include <vector> #include <map> #include <set> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef vector<int> vi; typedef vector<long> vl; int main() { cin.tie(0); ...
a.cc: In function 'int main()': a.cc:33:25: error: 'INT_MAX' was not declared in this scope 33 | for (int i = n; i < INT_MAX; ++i) { | ^~~~~~~ a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 9 | #include <set> ...
s987209945
p04039
C++
#include<iostream> using namespace std; #include<vector> int main() { // get a integer int amt; int k; int bit_wise_d = 0; cin >> amt >> k; for(int i = 0; i < k; i++){ cin >> d; bit_wise_d |= 1 << d; } int ret = 0; while(amt > 0){ ret *= 10; int min_d...
a.cc: In function 'int main()': a.cc:12:16: error: 'd' was not declared in this scope 12 | cin >> d; | ^
s198113201
p04039
C++
/* template.cpp [[[ */ #include <bits/stdc++.h> using namespace std; #define get_macro(a, b, c, d, name, ...) name #define rep(...) get_macro(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__) #define rrep(...) get_macro(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__) #define rep1(n) rep2(i_, n) #define rep2(i, n)...
a.cc: In function 'int dfs(int, int)': a.cc:41:21: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'll' {aka 'long long int'} 41 | int &res = dp[i][j]; | ~~~~~~~^
s591480234
p04039
Java
/** * Created by iainws on 4/09/16. */ import java.io.InputStreamReader; import java.io.IOException; import java.io.BufferedReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.InputStream; public class IrohasObsession { public static void main(String...
Main.java:13: error: class IrohasObsession is public, should be declared in a file named IrohasObsession.java public class IrohasObsession { ^ 1 error
s222119280
p04039
Java
import java.util.*; public class Main { int N, K; boolean[] D; int A; public static boolean isOK() { int a = A; while(A > 0) { if(D[a % 10]) return false; a = a / 10; } return true; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = s...
Main.java:10: error: non-static variable A cannot be referenced from a static context int a = A; ^ Main.java:11: error: non-static variable A cannot be referenced from a static context while(A > 0) { ^ Main.java:12: error: non-static variable D cannot be referenced from a static context ...
s904898872
p04039
C++
#include<iostream> #include<algorithm> #include<utility> #include<vector> #include<queue> #include<stack> #include<map> #include<set> #include<string> #include<stack> #include<cstdio> #include<cmath> #include<iomanip> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typede...
a.cc: In function 'int main()': a.cc:50:10: error: 'f' was not declared in this scope 50 | if(f[t%10]) break; | ^
s762696088
p04039
C++
#include <stdio.h> #include <iostream> using namespace std; bool like(char p,int *L,int len) { int d= p - '0'; for (int i=0;i<len;i++){ if (L[i]==d){ return true; } } return false; } int getMin(char p,int *L,int len) { int d= p - '0'; for (int i=0;i<len;i++){ if (L[i]>d){ return L[i]; } } return -...
a.cc: In function 'int main(int, char**)': a.cc:59:43: error: 'strlen' was not declared in this scope 59 | j=strlen(S); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#incl...
s767633522
p04039
C++
#include <stdio.h> #include <iostream> using namespace std; bool like(char p,int *L,int len) { int d= p - '0'; for (int i=0;i<len;i++){ if (L[i]==d){ return true; } } return false; } int getMin(char p,int *L,int len) { int d= p - '0'; for (int i=0;i<len;i++){ if (L[i]>d){ return L[i]; } } return -...
a.cc: In function 'int main(int, char**)': a.cc:59:43: error: 'strlen' was not declared in this scope 59 | j=strlen(S); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#incl...
s107298062
p04039
C++
//ここからテンプレート //#define PLASMA_NO_BOOST #if 1 #include<iostream> #include<list> #include<algorithm> #include<utility> #include<type_traits> #include<tuple> #include<memory> #include<iterator> #include<string> #include<functional> #include<list> #include<array> #include<complex> #include<numeric> #include<iomanip> #incl...
a.cc:29:9: fatal error: boost/optional.hpp: No such file or directory 29 | #include<boost/optional.hpp> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
s156513793
p04039
C++
#include<cstdio> #include<set> #include<algorithm> using namespace std; int len,k; char c[10]; int bit[10]; int dis[10],to[10]; int fir; void go() {//puts("__"); int wei=len; for(int i=1;i<=wei;i++) { if(to[bit[i]]==-1) { bit[i]=fir,bit[i+1]++; if(i==len)wei=len+1; ...
a.cc: In function 'int main()': a.cc:29:13: error: 'strlen' was not declared in this scope 29 | len=strlen(c+1); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#include <cstring>...
s660988655
p04039
C
#include<stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int main() { int n; int k; int d1; int d2; int d3; int d4; int d5; int d6; int d7; int d8; int d9; int d10; int i; int cnt0; ...
main.c: In function 'main': main.c:49:1: error: stray '\343' in program 49 | <U+3000><U+3000><U+3000><U+3000>} | ^~~~~~~~ main.c:49:3: error: stray '\343' in program 49 | <U+3000><U+3000><U+3000><U+3000>} | ^~~~~~~~ main.c:49:5: error: stray '\343' in program 49 | <U+3000><U+3000><U+3000><U...
s453794371
p04039
C
#include<stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int main() { int n; int k; int d1; int d2; int d3; int d4; int d5; int d6; int d7; int d8; int d9; int d10; int i; int cnt0; ...
main.c: In function 'main': main.c:36:23: error: '$n' undeclared (first use in this function); did you mean 'n'? 36 | scanf("%d %d",$n,&k); | ^~ | n main.c:36:23: note: each undeclared identifier is reported only once for each function it appears in
s362379892
p04039
C++
import java.io.InputStreamReader; import java.util.Scanner; public class Main { public static void main(String[] args) { try(Scanner scan = new Scanner(new InputStreamReader(System.in))){ int N = scan.nextInt(); int K = scan.nextInt(); boolean[] D = new boolean[10]; int min = 0; int minNot0 ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStreamReader; | ^~~~~~ 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 '-f...
s674892765
p04039
C++
9999 9 0 1 2 3 4 5 6 7 9
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9999 9 | ^~~~
s800707445
p04039
C++
#include <stdio.h> #include <cstdlib> #include <string.h> #include <math.h> #include <string> #include <vector> #include <list> #include <set> #include <iostream> #include <fstream> #include <map> #include <algorithm> #include "windows.h" //#include "../../gmp_int.h" //#include "../../common.h" #define MAX(a, b) ((a)>...
a.cc:13:10: fatal error: windows.h: No such file or directory 13 | #include "windows.h" | ^~~~~~~~~~~ compilation terminated.
s908153596
p04039
Java
import java.io.*; import java.util.*; public class tmp { public static InputReader in; public static PrintWriter out; public static final int MOD = (int) (1e9 + 7); public static void main(String[] args) { in = new InputReader(System.in); out = new PrintWriter(System.out); ...
Main.java:4: error: class tmp is public, should be declared in a file named tmp.java public class tmp { ^ 1 error
s539105770
p04039
Java
import java.io.*; import java.util.*; public class tmp { public static InputReader in; public static PrintWriter out; public static final int MOD = (int) (1e9 + 7); public static void main(String[] args) { in = new InputReader(System.in); out = new PrintWriter(System.out); ...
Main.java:4: error: class tmp is public, should be declared in a file named tmp.java public class tmp { ^ 1 error
s087278058
p04039
Java
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class IrohasObsession { public static void main(String[] args) { InputReader r = new InputReader(System.in); int n = r.nextIn...
Main.java:8: error: class IrohasObsession is public, should be declared in a file named IrohasObsession.java public class IrohasObsession { ^ 1 error
s201597543
p04040
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll mod=1000000007; ll fact[200002]; ll ncr[200003]; ll power(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res=(res*a)%mod; b>>=1; a=(a*a)%mod; } return res; } ll solve(ll x, ll y...
a.cc: In function 'll solve(ll, ll)': a.cc:27:8: error: 'rc' was not declared in this scope 27 | return rc; | ^~
s536854793
p04040
C++
#include <bits/stdc++.h> #pragma warning (disable:4996) using namespace std; using ll = long long; using LL = ll; using ull = unsigned long long; using uLL = ull; #define clean_0(A) memset((A),0,sizeof(A)) #define clean_1(A) memset((A),-1,sizeof(A)) #define For(i,a,b) for(int (i)=(a);(i)<=b;++(i)) #define Max_(a,b) ((...
a.cc:162:23: in 'constexpr' expansion of 'Combinator2((((int)Combinator2::Maxn) - 1))' a.cc:149:17: error: 'constexpr' loop iteration count exceeds limit of 262144 (use '-fconstexpr-loop-limit=' to increase the limit) 149 | for (int i = 1; i < n; ++i) | ^~~
s599361687
p04040
C++
#include <bits/stdc++.h> #pragma warning (disable:4996) using namespace std; using ll = long long; using LL = ll; using ull = unsigned long long; using uLL = ull; #define clean_0(A) memset((A),0,sizeof(A)) #define clean_1(A) memset((A),-1,sizeof(A)) #define For(i,a,b) for(int (i)=(a);(i)<=b;++(i)) #define Max_(a,b) ((...
a.cc: In lambda function: a.cc:91:42: error: 'poww' was not declared in this scope; did you mean 'powl'? 91 | auto inv2 = [](auto a, auto Mod) {return poww<ll>(a, Mod - 1, Mod); }; | ^~~~ | powl a.cc:91:49: error: expected ...
s556142762
p04040
C++
#include <bits/stdc++.h> #pragma warning (disable:4996) using namespace std; using ll = long long; using LL = ll; using ull = unsigned long long; using uLL = ull; #define clean_0(A) memset((A),0,sizeof(A)) #define clean_1(A) memset((A),-1,sizeof(A)) #define For(i,a,b) for(int (i)=(a);(i)<=b;++(i)) #define Max_(a,b) ((...
a.cc: In instantiation of '<lambda(auto:32, auto:33)> [with auto:32 = long long int; auto:33 = long long int]': a.cc:180:15: required from here 180 | Inv[N] = inv2(Fact[N], Mod - 2LL);//poww(Fact[N], Mod - 2LL); | ~~~~^~~~~~~~~~~~~~~~~~~~ a.cc:91:46: error: 'poww' was not declared in ...
s306296952
p04040
C++
#include<bits/stdc++.h> using namespace std; typedef long long LL; const int P = 1000000007; LL f[1000001], v[1000001]; LL rp(LL now, int k) { LL will = 1; for (; k; k >>= 1, now *= now, now %= P) { if (k & 1) will *= now, will %= P; } return will; } LL C(int n, int m) { ...
a.cc: In function 'int main()': a.cc:35:38: error: '\U000000b7' was not declared in this scope 35 | for(int i = b + 1; i <= w; i++) {· | ^ a.cc:39:22: error: 'tmp' was not declared in this scope; did you mean 'tm'? 39 | ans = (ans + tmp) % P; | ...
s560663719
p04040
C++
#include<iostream> #include<cstring> using namespace std; const int maxn = 1e5 + 5; const int mod = 1e9 + 7; int dp[maxn][maxn]; int h, w, a, b; bool range(int i, int j) { return i <= h - 1 && i >= h - a && j >= 0 && j < b; } int main() { memset(dp, 0, sizeof(dp)); cin >> h >> w >> a >> b; for(int i = 0; i < h; ...
/tmp/ccT85Zcu.o: in function `range(int, int)': a.cc:(.text+0xc): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/ccT85Zcu.o a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/ccT85Zcu.o a.cc:(.text+0x1d): reloca...
s651758784
p04040
C++
#include<bits/stdc++.h> #define Mod 1000000007 #define Val(x) (((long long)x) % Mod) #define maxn 200005 using namespace std; int fac[maxn]; int Pow(int a,int n) { int ret = 1; int base = a; while(n) { if(n&1) ret = Val(ret*base); base = Val(base*base); n >>= 1; } return ret; } int cal(int n,int m) { return...
a.cc: In function 'int main()': a.cc:24:32: error: 'a' was not declared in this scope 24 | for(int i=1;i<maxn;i++)a | ^
s672094405
p04040
C++
#include<bits/stdc++.h> using namespace std; long long f[2000000],n[2000000]; long long p=1000000007; long long mi(long long x,long long y,long long c) { long long ans=1; while(y) { if(y&1) ans=ans*x%c; x=x*x%c; y>>=1; } return ans; } long long mo(int x,int y) { if(x==y||y==0) { return 1; } return ((f[...
a.cc: In function 'int main()': a.cc:30:21: error: too few arguments to function 'long long int mi(long long int, long long int, long long int)' 30 | n[200000]=mi(f[200000],p-2); | ~~^~~~~~~~~~~~~~~ a.cc:5:11: note: declared here 5 | long long mi(long long x,long long y,long long ...
s096188941
p04040
C++
#include <iostream> #include <vector> using namespace std; //combinationを作る前処理 vector<pair<long long, long long> > prime_factorize(long long n) { vector<pair<long long, long long> > res; for (long long p = 2; p * p <= n; ++p) { if (n % p != 0) continue; int num = 0; while (n % p == 0...
a.cc: In function 'int main()': a.cc:55:60: error: expected ';' before 'ans' 55 | ans += (com(A+W-B-i,A)*com(H-A-1+B+i,H-A-1))%1000000007 | ^ | ; 56 | ans %= 1000000007; ...
s015555335
p04040
C
#include<cstdio> #include<iostream> #define int long long const int mod=1e9+7; const int maxn=1e5+10; int h,w,a,b,ans; int f[maxn<<1]; inline int read(){ char ch=getchar();int x=0,f=1; while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=getchar();} while(ch<='9'&&ch>='0'){x=x*10+ch-'0';ch=getchar();} return x*...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s531838337
p04040
C++
#include<bits/stdc++.h> using namespace std; //#define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(i...
a.cc: In function 'int main()': a.cc:95:2: error: expected '}' at end of input 95 | } | ^ a.cc:75:14: note: to match this '{' 75 | signed main(){ | ^
s460479882
p04040
C++
/* #include <cstdio> #define ll long long #define mod 1000000007 using namespace std; int h, w, a, b; ll ans; inline ll c(int a, int b) { } int main() { scanf("%d %d %d %d", &h, &w, &a, &b); for (int i = 1; i <= h - a; ++i) ans = (ans + c(b + i - 1, i) * c(h - i + w - b - 1, h - i)) % mod; printf("%lld", ans)...
/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
s900037255
p04040
C++
#include<bits/stdc++.h> using namespace std; int fact[ MAXH + MAXW ]; int int_pow( int x, int p ){ int res = 1; while( p ){ if( p & 1 ) res = 1LL * res * x % MOD; x = 1LL * x * x % MOD; p >>= 1; } return res; } int mod_inv( int x ){ return int_pow( x, MOD - 2 ); } int get_...
a.cc:3:11: error: 'MAXH' was not declared in this scope 3 | int fact[ MAXH + MAXW ]; | ^~~~ a.cc:3:18: error: 'MAXW' was not declared in this scope 3 | int fact[ MAXH + MAXW ]; | ^~~~ a.cc: In function 'int int_pow(int, int)': a.cc:8:43: error: 'MOD' was not declared in th...
s622463332
p04040
C++
#include <bits/stdc++.h> #define LL long long using namespace std; const int mod = 1000 * 1000 * 1000 + 7; const int MAX = 200001; int mult(int a , int b) { return (a * (LL)b) % mod; } int add(int a , int b) { return a + b < mod ? a + b : a + b - mod; } int sub(int a , int b) { return a - b >= 0 ? a - b : a - b + mo...
a.cc: In function 'int c(int, int)': a.cc:33:56: error: expected ')' before ';' token 33 | return mult(fact[n] , mult(inv[n - k] , inv[k]); | ~ ^ | )
s860356016
p04040
C++
#include <bits/stdc++.h> #define LL long long using namespace std; const int mod = 1000 * 1000 * 1000 + 7; const int MAX = 200001; int mult(int a , int b) { return (a * (LL)b) % mod; } int add(int a , int b) { return a + b < mod ? a + b : a + b - mod; } int sub(int a , int b) { return a - b >= 0 ? a - b : a - b + mo...
a.cc: In function 'int c(int, int)': a.cc:33:56: error: expected ')' before ';' token 33 | return mult(fact[n] , mult(inv[n - k] , inv[k]); | ~ ^ | ) a.cc: In function 'int main()': a.cc:52...
s730776307
p04040
C++
#include <bits/stdc++.h> #define LL long long using namespace std; const int mod = 1000 * 1000 * 1000 + 7; const int MAX = 200001; int mult(int a , int b) { return (a * (LL)b) % mod; } int add(int a , int b) { return a + b < mod ? a + b : a + b - mod; } int sub(int a , int b) { return a - b >= 0 ? a - b : a - b + mo...
a.cc: In function 'int c(int, int)': a.cc:32:21: error: 'fact' was not declared in this scope 32 | return mult(fact[n] , mult(inv[n - k] , inv[k]); | ^~~~ a.cc:32:36: error: 'inv' was not declared in this scope; did you mean 'int'? 32 | return mult(fact[n] , mult(inv[n - ...
s167179067
p04040
C
#include <bits/stdc++.h> using namespace std; #define countof(a) (sizeof(a)/sizeof(*a)) #define vi vector<int> #define vvi vector<vector<int> > #define vpi vector<pi > #define pi pair<int,int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) for (register int var = ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s441798791
p04040
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; long long fact[1000000]; long long fact_in[1000000]; //出力 void Yes(){ cout << "Yes" << endl; } void yes(){ cout << "yes" << endl; } void No(){ cout << "No" << endl; } void no(){ cout << "no" << endl; } void Possible(){ cout << "Possible" << endl; } vo...
a.cc: In function 'll combination_mod(ll, ll, ll)': a.cc:50:92: error: expected ',' or ';' before ')' token 50 | long long res = (((fact[n] % mod) * (fact_in[r] % mod)) % MOD) * (fact_in[n - r] % mod)) % mod; | ^
s597960564
p04040
C++
/** * * AtCoder Regular Contest 058 - Problem D: Iroha and the Grid * * Count the number of ways Iroha can travel from (1,1) to (H, W) in a H x W grid with bottom A * rows and leftmost B columns blocked. * * Combinatorial solution: compute the number of ways that we can move from O = (1, 1) to * Pk = (k, B) a...
a.cc: In function 'int main()': a.cc:103:35: error: 'h' was not declared in this scope 103 | for (int k = 1; k <= H - A; ++h) | ^
s030431275
p04040
C++
include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> using namespace std; #define MOD 10000000007 #define ADD(X,Y) ((X)=((X)+(Y)%MOD)%MOD) typedef long long i64;typedef vector<i...
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, fr...
s311171060
p04040
C++
#include"stdafx.h" #include<iostream> #include<algorithm> #include<functional> #include <string> #include<iomanip> #include<cstdio> #include<math.h> #include<stack> #include<queue> #include<cstring> #include<vector> #define FOR(i,a,b) for(ll i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define EREP(i,n) for(int i=(n-1...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s493644997
p04040
C++
//code by 27. #include<stdio.h> #include<cstdio> #include<iostream> #include<algorithm> #include<string> #include<math.h> #include<vector> #include<queue> #include<map> #include<stack> #include<fstream> #include<stdlib.h> #include<set> #include<cassert> #include<climits> #include<cmath> #include<memory.h> #include<coni...
a.cc:19:9: fatal error: conio.h: No such file or directory 19 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s096177015
p04040
C++
#define SIZE 200005 #define MOD 1000000007 using namespace std; typedef long long int ll; typedef pair <int,int> P; ll inv[SIZE],fac[SIZE],finv[SIZE]; void make() { fac[0]=fac[1]=1; finv[0]=finv[1]=1; inv[1]=1; for(int i=2;i<SIZE;i++) { inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD; fac[i]=fac[i-1]*(ll) i%MOD; finv[...
a.cc:6:9: error: 'pair' does not name a type 6 | typedef pair <int,int> P; | ^~~~ a.cc: In function 'int main()': a.cc:30:9: error: 'scanf' was not declared in this scope 30 | scanf("%d %d %d %d",&H,&W,&A,&B);W--,H--; | ^~~~~ a.cc:39:9: error: 'printf' was not declared in this...
s892956939
p04040
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <functional> #include <utility> #define INF 0x3f3f3f3f #define MOD 1000000007 ...
a.cc: In function 'int main()': a.cc:54:9: error: expected primary-expression before '}' token 54 | } | ^ a.cc:66:9: error: expected primary-expression before '}' token 66 | } | ^
s428982606
p04040
C++
#include <iostream> #include <string.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define ull unsigned ll #define db double #define INF 0x3f3f3f3f #define MOD 1000000007 #define PII pair<int, int> int h,w,a,b; ll f[100010]; ll finv[100010]; ll c(ll n,ll m) { ll ret=f[n...
a.cc: In function 'int main()': a.cc:45:10: error: 'invf' was not declared in this scope 45 | f[0]=invf[0]=1; | ^~~~
s555771810
p04040
C++
#include<iostream> #include<vector> #include<algorithm> #include<numeric> #include<iomanip> #include<boost/multi_array.hpp> typedef unsigned long long uint64; typedef long long int64; template<uint64 Mod>class mod_t { uint64 val; public: mod_t(uint64_t v) :val(v%Mod) { } mod_t(int64 v) :val(v%Mod) { } mod_t(...
a.cc:6:9: fatal error: boost/multi_array.hpp: No such file or directory 6 | #include<boost/multi_array.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s919551064
p04040
C++
#include<iostream> #include<vector> #include<algorithm> #include<numeric> #include<iomanip> #include<boost/multi_array.hpp> typedef unsigned long long uint64; typedef long long int64; template<uint64 Mod>class mod_t { uint64 val; public: explicit mod_t(uint64_t v) :val(v%Mod) { } explicit mod_t(int64 v) :val(v%M...
a.cc:6:9: fatal error: boost/multi_array.hpp: No such file or directory 6 | #include<boost/multi_array.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s795197737
p04040
C++
#include<iostream> #include<vector> #include<algorithm> #include<numeric> #include<iomanip> #include<boost/multi_array.hpp> typedef unsigned long long uint64; typedef long long int64; template<uint64 Mod>class mod_t { uint64 val; public: mod_t(uint64_t v) :val(v%Mod) { } mod_t(int64 v) :val(v%Mod) { } mod_t(...
a.cc:6:9: fatal error: boost/multi_array.hpp: No such file or directory 6 | #include<boost/multi_array.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s527486724
p04040
C++
#include<iostream> #include<iomanip> #include<map> #include<set> #include<vector> #include<string> #include<stack> #include<array> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<numeric> #include<random> #define int int64_t #define REP(i, a, b) for (int64_t i = (int64_t)(a); i < (in...
a.cc: In function 'int main()': a.cc:151:33: error: cannot bind non-const lvalue reference of type 'modint<>&' to an rvalue of type 'modint<>' 151 | result += (ans1 * ans2); | ~~~~~~^~~~~~~ a.cc:42:48: note: initializing argument 1 of 'modint<MOD>& modint<MOD>::operat...
s790619251
p04040
C++
#include <iostream> using namespace std; #define MAX_H 100000 #define MAX_W 100000 #define MOD 1000000007 bool visited[MAX_H][MAX_W]; int memo[MAX_H][MAX_W]; int h,w,a,b,top; int solve(int y,int x){ if(x < b && top <= y) return 0; if(x == 0 || y == 0) return 1; if(visited[y][x]) return memo[y][x]; visited[y][x...
/tmp/cchIJVN7.o: in function `solve(int, int)': a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/cchIJVN7.o a.cc:(.text+0x1c): relocation truncated to fit: R_X86_64_PC32 against symbol `top' defined in .bss section in /tmp/cchIJVN7.o a.cc:(.text+0x8b): rel...
s811378529
p04040
C++
//ここからテンプレート //#define PLASMA_NO_BOOST #if 1 #include<iostream> #include<list> #include<algorithm> #include<utility> #include<type_traits> #include<tuple> #include<memory> #include<iterator> #include<string> #include<functional> #include<list> #include<array> #include<complex> #include<numeric> #include<iomanip> #incl...
a.cc:29:9: fatal error: boost/optional.hpp: No such file or directory 29 | #include<boost/optional.hpp> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
s671034869
p04040
C++
#include <bits/stdc++.h> // #include <iostream> // #include <algorithm> // #include <string> // #include <vector> // #include <queue> // #include <stack> // #include <set> // #include <map> #define rep(i,a,n) for(int i=a; i<n; i++) #define repr(i,a,n) for(int i=a;i >= n;i--) #define INF 999999999 #define pb(a) push_ba...
a.cc: In function 'int main()': a.cc:46:35: error: too few arguments to function 'll mod_pow(ll, ll, ll)' 46 | ll A = frac(x+b,MOD) * mod_pow(frac(x,MOD) * frac(b,MOD) % MOD, MOD-2); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:30:4: note: declared here 30 | ll mod_p...