submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s984098426
p03893
C++
#include <iostream> using namespace std; int main() { f[0]=2; cin>>n; for(int i=1;i<=n;i++) f[n]=f[n-1]*2+2; cout<<f[n]<<endl; return 0; } //f[n]=f[n-1]*2+2
a.cc: In function 'int main()': a.cc:5:5: error: 'f' was not declared in this scope 5 | f[0]=2; | ^ a.cc:6:10: error: 'n' was not declared in this scope 6 | cin>>n; | ^
s615990511
p03893
C++
#include<iostream> using namespace std; const int MAXN=101;//好习惯:下标为常量 long long f[MAXN],X;//一定要用long long,我第一次 就因此WA了一次 int main(){ cin>>X; f[0]=2;/记住:赋初值 for(int i=1;i<=X;i++) f[i]=f[i-1]*2+2; //一个easy的递推,按照公式 cout<<f[X]<<endl;//输出 return 0;//快乐结束 }
a.cc: In function 'int main()': a.cc:7:12: error: expected primary-expression before '/' token 7 | f[0]=2;/记住:赋初值 | ^ a.cc:7:13: error: '\U00008bb0\U00004f4f\U0000ff1a\U00008d4b\U0000521d\U0000503c' was not declared in this scope 7 | f[0]=2;/记住:赋初值 | ^~~~~~~~~~~~ a.cc:...
s214158640
p03893
C++
#include<iostream> using nsmespace std; int a=2,n; int main() { cin>>n; for(int i=1;i<=n;i++) { a*=2; a+=2; } cout<<a<<endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nsmespace' 2 | using nsmespace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>n; | ^~~ | std::cin In file included fr...
s448488745
p03893
C++
#include<cstdio> #include<iostream> #include<cmath> using namespace std; int n; long long f[400] int main() { scanf("%d",&n); f[0]=2; for(int i=0;i<=n;i++) f[i]=f[i-1]*2+2; printf("%d\n",f[n]); return 0; }
a.cc:7:1: error: expected initializer before 'int' 7 | int main() | ^~~
s308322191
p03893
C++
#include<cstdio> #include<iostream> #include<cmath> using namespace std; int n; long long f[400] int main() { scanf("%d",&n); f[0]=2; for(int i=0;i<=n;i++) f[i]=f[i-1]*2+2; printf("%d",f[n]); return 0; }
a.cc:7:1: error: expected initializer before 'int' 7 | int main() | ^~~
s730102490
p03893
C++
2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^
s081381539
p03893
C++
#include <cstdio> int main() { int n,f[41] = {2}; scanf("%d",&n); for (int i = 1;<= n;i++) f[i] = f[i-1]*2+2; printf("%d",f[n]); return 0; }
a.cc: In function 'int main()': a.cc:5:20: error: expected primary-expression before '<=' token 5 | for (int i = 1;<= n;i++) f[i] = f[i-1]*2+2; | ^~
s447832985
p03893
C++
x=int(input()) j=2 for i in range(x): j*=2 j+=2 print(j)
a.cc:1:1: error: 'x' does not name a type 1 | x=int(input()) | ^
s390089579
p03894
C++
acm test
a.cc:1:1: error: 'acm' does not name a type 1 | acm test | ^~~
s766662744
p03894
C++
qwe
a.cc:1:1: error: 'qwe' does not name a type 1 | qwe | ^~~
s735428739
p03894
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:26:9: error: 'cur' was not declared in this scope 26 | cur=0; | ^~~
s669499520
p03894
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:26:9: error: 'cur' was not declared in this scope 26 | cur=0; | ^~~
s298159615
p03895
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> class tRMQ { vector<T> data; T unit; public: int n; function<T(const T &, const T &)> f; tRMQ(int _, T u, function<T(T, T)> bi) { unit = u; f = bi; n = 1; while (n < _) { n <<= 1; } data....
a.cc: In function 'int main()': a.cc:81:19: error: no matching function for call to 'tRMQ<long long int>::query(const int&, const int&)' 81 | ll b = q.query(max(-DAY + i, 0), max(-DAY + i + MOR + 1, 0)) + | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:53:5: note: candidate: 'T tRMQ...
s058162781
p03897
C++
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> #include <cmath> static const int MOD = 1000000007; using ll = long long; using u32 = unsigned; using u64 = unsigned long long; using namespace std; template...
a.cc: In function 'int main()': a.cc:64:47: error: expected ';' before '}' token 64 | printf("%d %d\n", k.first, k.second);4 | ^ | ; 65 | } | ~
s751465431
p03898
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using Pi = pair<int, int>; using Pl = pair<ll, ll>; using vint = vector<int>; using vvint = vector<vint>; using vvvint = vector<vvint>; using vll = vector<ll>; using uint = unsigned int; using ull = unsigned long long; template<typename T> using uset...
a.cc: In function 'int main()': a.cc:78:13: error: 'i' was not declared in this scope 78 | dfs(i, -1); | ^
s289633062
p03898
C++
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} template<typename F> struct FixPoint : F{ FixPoint(F&& f):F(forward<F>(f)){} template<type...
a.cc: In lambda function: a.cc:83:9: error: continue statement not within a loop 83 | continue; | ^~~~~~~~
s367674416
p03898
C++
#include <cstdio> #include <vector> using namespace std; const int N = 100000; vector<int> g[N]; int sz[N], dp[N]; void dfs(int u, int prev) { vector<int> len; for (auto v : g[u]) if (prev != v) { dfs(v, u); len.push_back(sz[v]); dp[u] = max(dp[u], dp[v]...
a.cc: In function 'void dfs(int, int)': a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(len.rbegin(), len.rend()); | ^~~~ | short
s523467426
p03898
C++
def dfs(z,c) r=[0,c] G[c].each{|e| next if e==z t=dfs(c,e) r=[r,[t[0]+(G[c].size==2 ? 1 : 0),t[1]]].max } r end N=gets.to_i G=N.times.map{[]} (N-1).times{ a,b=gets.split.map(&:to_i) G[a-1]<<b-1 G[b-1]<<a-1 } p dfs(-1,dfs(-1,0)[1])[0]+G.count{|e|e.size==1}
a.cc:1:1: error: 'def' does not name a type 1 | def dfs(z,c) | ^~~ a.cc:8:9: error: 'r' does not name a type 8 | r | ^ a.cc:12:3: error: expected ')' before '-' token 12 | (N-1).times{ | ~ ^ | ) a.cc:17:1: error: 'p' does not name a type 17 | p dfs(-1,dfs(-1,0)[1]...
s213581894
p03899
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define se second #define fi first #define mp make_pair #define pb push_back #define all(_v) _v.begin(), _v.end() const int mod = (int)1e9 + 7; const int INF = (int)1e9; const ll LINF = (ll)1e18; const int N = (int)1e5 + 100; const int MAXA = (int)3e6; ...
a.cc: In function 'int main()': a.cc:38:21: error: 'i' was not declared in this scope 38 | for(ll j = min(i, k);j >= 1;j--){ | ^
s086839508
p03899
C++
#include <bits/stdc++.h> using namespace std; using i64 = int_fast64_t; #define repeat(i, a, b) for(int i = (a); (i) < (b); ++(i)) #define rep(i, n) repeat(i, 0, n) const i64 CYCLES_PER_SEC = 2800000000; struct Timer { i64 start; Timer() { reset(); } void reset() { start = getCycle(); } inline doubl...
a.cc: In function 'void asaporo_d()': a.cc:104:58: error: no matching function for call to 'max(i64, long long int)' 104 | dp[i][j + 1] = (j + 1) * a[i] + seg.query(max(i - m, 0LL), i); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/...
s196441416
p03899
C++
#include <bits/stdc++.h> using namespace std; using i64 = int_fast64_t; #define repeat(i, a, b) for(int i = (a); (i) < (b); ++(i)) #define rep(i, n) repeat(i, 0, n) const i64 CYCLES_PER_SEC = 2800000000; struct Timer { i64 start; Timer() { reset(); } void reset() { start = getCycle(); } inline doubl...
a.cc: In function 'void asaporo_d()': a.cc:103:58: error: no matching function for call to 'max(i64, long long int)' 103 | dp[i][j + 1] = (j + 1) * a[i] + seg.query(max(i - m, 0LL), i); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/...
s407801189
p03899
C++
#include <bits/stdc++.h> typedef long long i64; using std::cout; using std::endl; using std::cin; struct SegmentTree { std::vector<i64> seg; int sz = 1; #include <bits/stdc++.h> typedef long long i64; using std::cout; using std::endl; using std::cin; struct Slide_Max { std::deque<int> deq; std::vector<i64> v; i...
a.cc:11:19: warning: declaration of 'typedef long long int SegmentTree::i64' changes meaning of 'i64' [-Wchanges-meaning] 11 | typedef long long i64; | ^~~ a.cc:8:21: note: used here to mean 'typedef long long int i64' 8 | std::vector<i64> seg; | ^~~ a.cc...
s464750234
p03899
C++
//左のパネルから順番に当てると考えられるので、以下の問題にできる。 //問題概要: //N個のうちK個のパネルを選びます。左のパネルから書かれている数を1,2,3,…,K倍し, 和を取ります。 //その値が最大になるようにパネルを選んでください。ただし、2つのパネルの距離は1以上M以下とします。 // //M = Nのときは、2つのパネルの距離の制約がないと考えてよく、選ぶパネルはスコアが大きいほうからK個にすべきです。 //↑これは嘘です。反例:{1, 1, 30, 5, 5}, K = 3. //{1, 1, 30}を選ぶと30が3倍され、{30,5,5}を選ぶと30が1倍される。←このように、何倍するかが変わってしまうので...
a.cc: In function 'int main()': a.cc:56:40: error: 'assert' was not declared in this scope 56 | if (wrong_dp[n][k] > dp[n][k]) assert(0); | ^~~~~~ a.cc:17:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' ...
s800984621
p03899
C++
//左のパネルから順番に当てると考えられるので、以下の問題にできる。 //問題概要: //N個のうちK個のパネルを選びます。左のパネルから書かれている数を1,2,3,…,K倍し, 和を取ります。 //その値が最大になるようにパネルを選んでください。ただし、2つのパネルの距離は1以上M以下とします。 // //M = Nのときは、2つのパネルの距離の制約がないと考えてよく、選ぶパネルはスコアが大きいほうからK個にすべきです。 //↑これは嘘です。反例:{1, 1, 30, 5, 5}, K = 3. //{1, 1, 30}を選ぶと30が3倍され、{30,5,5}を選ぶと30が1倍される。←このように、何倍するかが変わってしまうので...
a.cc: In function 'int main()': a.cc:43:30: error: 'assert' was not declared in this scope 43 | if (dp[n][k] >= INF) assert(0); | ^~~~~~ a.cc:17:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 16 | #include <fun...
s187019488
p03899
C++
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) #define all(x) x.begin(),x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast32_t; u...
a.cc: In function 'int main()': a.cc:103:62: error: no matching function for call to 'max(int, int32)' 103 | rmq[j+1].update(i+1, rmq[j].query(max(0, i-M+1), i+1)+A[i]*(j+1)); | ~~~^~~~~~~~~~ In file included from /usr/include/c++...
s385895483
p03899
C++
// need #include <iostream> #include <algorithm> // data structure #include <bitset> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #include <complex> //#include <deque> #include <valarray> // stream //#include <istream> //#include <sstream> //#i...
a.cc: In instantiation of 'SlideMinimum<T, Compare>::SlideMinimum(const std::vector<_Tp>&) [with T = long long int; Compare = std::greater<void>]': a.cc:173:45: required from here 173 | SlideMinimum<int, std::greater<>> sm(dp[i]); | ^ a...
s131398180
p03899
C++
#include <algorithm> int N, M, K, ptr[100009]; long long dp[309][100009]; int main() { scanf("%d %d %d", &N, &M, &K); for (int i = 0; i < N; i++) scanf("%lld", &dp[0][i]); for (int i = 1; i < K; i++) { int pl = 0, pr = 0; for (int j = 0; j < N; j++) { if (j >= i) dp[i][j] = dp[i - 1][ptr[pl]] + 1LL * (i + 1) ...
a.cc: In function 'int main()': a.cc:4:9: error: 'scanf' was not declared in this scope 4 | scanf("%d %d %d", &N, &M, &K); | ^~~~~ a.cc:15:9: error: 'printf' was not declared in this scope 15 | printf("%lld\n", *std::max_element(dp[K - 1], dp[K - 1] + N)); | ^~~~~~ a.c...
s088499613
p03899
C++
#include <iostream> #include <fstream> #include <cassert> #include <typeinfo> #include <vector> #include <stack> #include <cmath> #include <set> #include <map> #include <string> #include <algorithm> #include <cstdio> #include <queue> #include <iomanip> #include <cctype> #include <random> #define syosu(x) fixed<<setprec...
a.cc: In function 'int main()': a.cc:57:14: error: 'i' was not declared in this scope; did you mean 'vi'? 57 | for( i=1;i<k;i++){ | ^ | vi
s081679007
p03899
C++
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cstring> #include <iterator> #include <b...
a.cc: In constructor 'RMQ<T>::RMQ(std::vector<_Tp>&)': a.cc:128:122: error: expected ')' before ']' token 128 | block[i][j] = argMin(block[i][j - 1], block[min(i + (1 << (j - 1)), (int)block.size() - 1][j - 1]); | ...
s314444695
p03899
C++
#include "bits/stdc++.h" using namespace std; //諸機能 #pragma region MACRO #define putans(x) std::cerr << "[ answer ]: " ; cout << (x) << endl #define dputans(x) std::cerr << "[ answer ]: "; cout << setprecision(40) << (double)(x) << endl #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define RREP(i,n,a) for(int i...
a.cc: In function 'int dfs(int, int)': a.cc:66:34: error: no matching function for call to 'max(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 66 | ret = max(ret, a[i]); | ~~~^~~~~~~~~~~ In file included from /u...
s111387446
p03899
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> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb...
a.cc: In function 'int main()': a.cc:88:57: error: expected ';' before '}' token 88 | dp[j+1]=ma+(i+2)*in[j+1] | ^ | ; 89 | } | ...
s988394690
p03899
C++
#include "bits/stdc++.h" using namespace std; //諸機能 #pragma region MACRO #define putans(x) std::cerr << "[ answer ]: " ; cout << (x) << endl #define dputans(x) std::cerr << "[ answer ]: "; cout << setprecision(40) << (double)(x) << endl #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define RREP(i,n,a) for(int i...
a.cc:53:1: error: 'evtor' does not name a type 53 | evtor<ll> a; | ^~~~~ a.cc: In function 'int dfs(int, int)': a.cc:66:40: error: 'a' was not declared in this scope 66 | ret = max(ret, a[i]); | ^ a.cc:72:34: error: 'a' was not declared in...
s031585018
p03899
C
#include<stdio.h> long long MAX(long long a,long long b){return a<b?b:a;} long long d[310][100010]={}; int main(){ long long n,m,k,a[100010],i,j; scanf("%lld %lld %lld",&n,&m,&k); for(i=0;i<n;i++)scanf("%lld",&a[i]); for(i=0;i<k;i++){ for(j=i;j<n;j++)d[i+1][j+1]=MAX(d[i+1][j],d[i][j]+(i+1)*a[j]); } //fo...
main.c:14:10: error: expected declaration specifiers or '...' before string constant 14 | printf("%lld\n",d[k][n]); | ^~~~~~~~ main.c:14:19: error: expected declaration specifiers or '...' before 'd' 14 | printf("%lld\n",d[k][n]); | ^ main.c:15:3: error: expected identif...
s469660531
p03899
C++
#include <cstdio> #include <cstring> #include <string> #include <cmath> #include <cassert> #include <iostream> #include <algorithm> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <bitset> #include <functional> using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(in...
a.cc: In function 'int main()': a.cc:44:10: error: 'crni' was not declared in this scope; did you mean 'crnt'? 44 | fill(crni, crni+301, INF); | ^~~~ | crnt
s157326531
p03899
C++
#include <iostream> #include <queue> using namespace std; const int N = (int) 1e5; long long f[N], g[N + 1]; int a[N]; int main() { ios::sync_with_stdio(false); int n, m, k; cin >> n >> m >> k; for (int i = 0; i < n; ++i) cin >> a[i]; for (int t = k; t >= 1; --t) { for (int i = 0; i < n; ++i) ...
a.cc: In function 'int main()': a.cc:25:14: error: 'max_element' was not declared in this scope 25 | cout << *max_element(f, f + n) << endl; | ^~~~~~~~~~~
s344619764
p03899
C
#include<stdio.h> long long MAX(long long a,long long b){return a<b?b:a;} long long d[310][100010]={}; int main(){ long long n,m,k,a[100010],i,j; scanf("%lld %lld %lld",&n,&m,&k); for(i=0;i<n;i++)scanf("%lld",&a[i]); for(i=0;i<k;i++){ for(j=0;j<n;j++){ d[i+1][j+1]=MAX(d[i+1][j+1],d[i+1][j]); d[i...
main.c:17:10: error: expected declaration specifiers or '...' before string constant 17 | printf("%lld\n",d[k][n]); | ^~~~~~~~ main.c:17:19: error: expected declaration specifiers or '...' before 'd' 17 | printf("%lld\n",d[k][n]); | ^ main.c:18:3: error: expected identif...
s603714102
p03899
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <set> #include <string> #include <cstdlib> #include <ctime> #include <deque> using namespace std; int n, m, k; int a[1100000]; long long dp[1100000][310]; int q[1100000], h[1100000],...
/tmp/ccapwz16.o: in function `main': a.cc:(.text+0xd3): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/ccapwz16.o a.cc:(.text+0xee): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/ccapwz16.o a.cc:(.text+0x106): relocation trun...
s622698928
p03900
C++
import std.stdio, std.conv, std.string, std.container, std.typecons, std.algorithm; alias Tuple!(int,int) dat; int AlgoA(int N, int [] A, string S) { int cnt = 0; foreach(i;S) { if(i == 'M') cnt++; } BinaryHeap!(Array!dat) hq; foreach(i;0..cnt) { hq.insert(dat(A[i],i)); } int res = 100_000; foreach(i;cnt....
a.cc:11:19: error: too many decimal points in number 11 | foreach(i;0..cnt) { | ^~~~~~ a.cc:26:19: error: too many decimal points in number 26 | foreach(i;0..N) { | ^~~~ a.cc:52:19: error: too many decimal points in number 52 | foreach(i;1...
s507830192
p03900
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <utility> int main(){ int n; std::cin >> n; std::vector<int> a; std::vector<int> na(n - i - 1); a.resize(n); for(int i = 0; i < n; ++i){ std::cin >> a[i]; } std::string str; std::cin >> str...
a.cc: In function 'int main()': a.cc:11:29: error: 'i' was not declared in this scope 11 | std::vector<int> na(n - i - 1); | ^
s535962342
p03900
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<queue> #include<map> #include<algorithm> #include<complex> #include<string> #include<cstring> using namespace std; #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) #define INF 1000000 #define INF_MAX 100...
a.cc: In function 'void init(int)': a.cc:26:28: error: 'INT_MAX' was not declared in this scope 26 | rep(i,2*n-1)dat[i]=INT_MAX; | ^~~~~~~ a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 10 | #include<cst...
s127538239
p03900
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<queue> #include<map> #include<algorithm> #include<complex> #include<string> #include<cstring> using namespace std; #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) #define INF 1000000 #define debug(x) co...
a.cc: In function 'void init(int)': a.cc:25:28: error: 'INT_MAX' was not declared in this scope 25 | rep(i,2*n-1)dat[i]=INT_MAX; | ^~~~~~~ a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 10 | #include<cst...
s062882361
p03900
Java
import java.io.*; import java.math.*; import java.util.*; import static java.util.Arrays.*; public class Main2 { private static final int mod = (int)1e9+7; final Random random = new Random(0); final IOFast io = new IOFast(); /// MAIN CODE public void run() throws IOException { // int TEST_CASE = Integer.pars...
Main.java:8: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s280769747
p03900
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> PII; #define fi first #define se second #define mp make_pair #define pb push_back #define N 100010 int n, a[N]; deque<int> q; int m = 0; int S = 1e9; string s; bool cc() { for (int i = 0; i < n-1; i ++) if ((s[i] == 'M') !...
a.cc: In function 'void ff()': a.cc:29:33: error: return-statement with a value, in function returning 'void' [-fpermissive] 29 | if (n%2 == 0) return max(a[n/2-1], a[n/2]); else return a[n/2]; | ~~~^~~~~~~~~~~~~~~~~~ a.cc:29:70: error: return-statement with a value, in fun...
s284262813
p03900
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <set> #include <string> #include <cstdlib> #include <ctime> #include <deque> using namespace std; int n, a[110000]; char S[110000]; bitset<110000> B; bool ok(int x) { for (int i = ...
a.cc:17:1: error: 'bitset' does not name a type 17 | bitset<110000> B; | ^~~~~~ a.cc: In function 'bool ok(int)': a.cc:21:17: error: 'B' was not declared in this scope 21 | B.set(i, 0); | ^ a.cc:24:25: error: 'B' was not declared in this scope 24 | ...
s077567090
p03900
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <set> #include <string> #include <cstdlib> #include <ctime> #include <deque> using namespace std; int n, a[110000]; char S[110000]; bitset<110000> B; bool ok(int x) { for (int i = ...
a.cc:17:1: error: 'bitset' does not name a type 17 | bitset<110000> B; | ^~~~~~ a.cc: In function 'bool ok(int)': a.cc:21:17: error: 'B' was not declared in this scope 21 | B.set(i, 0); | ^ a.cc:24:25: error: 'B' was not declared in this scope 24 | ...
s446946902
p03900
C++
//sperse table const int SPT_MAX = 123456; const int SPT_lg = 20; template <class T> class SPT{ T x[SPT_MAX + 1][SPT_lg]; int lg[SPT_MAX + 1]; T eval(T a , T b){ return //*評価; } public: SPT(){ } SPT(int n , T a[]){ lg[1] = 0; for(int i = 2 ; i <= SPT_MAX ; ++i) lg[i] = lg[i / 2] + 1; for(int ...
a.cc:34:2: error: expected ';' after class definition 34 | } | ^ | ; a.cc: In member function 'T SPT<T>::eval(T, T)': a.cc:11:9: error: expected primary-expression before '}' token 11 | } | ^ a.cc:11:9: error: expected ';' before '}' token
s289658218
p03901
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); ll x; cin>>x; double p; cin>>p; if(p==100){ x++ cout << x/2 << endl; return 0; } p/=100.0; ...
a.cc: In function 'int main()': a.cc:17:10: error: expected ';' before 'cout' 17 | x++ | ^ | ; 18 | cout << x/2 << endl; | ~~~~
s424636013
p03901
C++
#include <stdio.h> int main(void) { int a, b; scanf("%d%d", &x, &p); printf("%.12f", (double)((x + 1) / 2) * 100.0 / (double)p); return 0; }
a.cc: In function 'int main()': a.cc:5:18: error: 'x' was not declared in this scope 5 | scanf("%d%d", &x, &p); | ^ a.cc:5:22: error: 'p' was not declared in this scope 5 | scanf("%d%d", &x, &p); | ^
s615200794
p03901
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long x; double p; cin>>x>>p; if(x%2){cout<<setprecision(20)<<((double)x+1)/2/p*100)<<endl;} else{ cout<<setprecision(20)<<((double)x)/2/p*100)<<endl;} }
a.cc: In function 'int main()': a.cc:7:56: error: expected ';' before ')' token 7 | if(x%2){cout<<setprecision(20)<<((double)x+1)/2/p*100)<<endl;} | ^ | ; a.cc:8:52: error: expected ';' before...
s647315488
p03901
C++
#include <iostream> #include <iomanip> using namespace std; double p int x; int main(){ cin >> x >> p; if(x%2==1) x++; cout << setprecision(8) << x/(2*p) << endl; }
a.cc:5:1: error: expected initializer before 'int' 5 | int x; | ^~~ a.cc: In function 'int main()': a.cc:8:10: error: 'x' was not declared in this scope 8 | cin >> x >> p; | ^ a.cc:8:15: error: 'p' was not declared in this scope 8 | cin >> x >> p; | ^
s860172407
p03901
C++
#include <iostream> using namespace std; double p,x; int main(){ cin >> x >> p; if(x%2==1) x++; cout << setprecision(8) << x/(2*p) << endl; }
a.cc: In function 'int main()': a.cc:7:7: error: invalid operands of types 'double' and 'int' to binary 'operator%' 7 | if(x%2==1) x++; | ~^~ | | | | | int | double a.cc:8:11: error: 'setprecision' was not declared in this scope 8 | cout << setprecision(8) << x/(2...
s317325770
p03901
C++
x = int(input()) p = int(input()) p *= 0.01 print((x+1)//2/p)
a.cc:1:1: error: 'x' does not name a type 1 | x = int(input()) | ^
s763890984
p03901
C++
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; using double = long double; const int INF=1<<29; const double EPS=1e-9; const ll MOD = 1000000...
a.cc:12:7: error: expected nested-name-specifier before 'double' 12 | using double = long double; | ^~~~~~
s123689973
p03901
C++
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; using double = long double; const int INF=1<<29; const double EPS=1e-9; const ll MOD = 1000000...
a.cc:12:7: error: expected nested-name-specifier before 'double' 12 | using double = long double; | ^~~~~~ a.cc: In function 'int main()': a.cc:52:12: error: expected '}' at end of input 52 | return 0; | ^ a.cc:46:11: note: to match this '{' 46 | int main(){ | ^
s556721034
p03901
C++
sx = input() sp = input() x = int(sx) p = int(sp) ret = 0 e = 0 cnt = x % 2 if p == 100: ret = int(x / 2) + cnt print(ret)
a.cc:1:1: error: 'sx' does not name a type 1 | sx = input() | ^~
s930108408
p03902
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
a.cc: In function 'int trial(std::vector<std::vector<int> >&)': a.cc:36:13: error: 'n' was not declared in this scope 36 | REP(i, 0, n - 1) { | ^ a.cc:25:47: note: in definition of macro 'REP' 25 | #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) | ...
s568010796
p03902
C++
#include <vector> #include <iostream> #include <algorithm> using namespace std; const int lim = 1000000001; int calc(vector<int> v1, vector<int> v2, bool flag_eq = false) { if(v1 < v2) return -calc(v2, v1, true) + 1; if((v1[1] - v2[1]) % v1[0] != 0) return (v1[1] - v2[1]) / v1[0] + 1; int ex = (v1[1] - v2[1]) / v1[0...
a.cc: In function 'int main()': a.cc:57:42: error: no matching function for call to 'max(long long int, int)' 57 | cur = max(cur + res, 0); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:62, from a.cc:1...
s607412660
p03902
C++
/*** Template Begin ***/ #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #incl...
a.cc:135:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 135 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s378540541
p03902
C++
#include <vector> #include <iostream> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t ...
a.cc: In function 'void solve()': a.cc:32:31: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<__int128>, __int128>::value_type' {aka '__int128'}) 32 | rep(i,0,n) rep(j,0,m) cin >> a[i][j]; In file included from /usr...
s068744064
p03902
C++
#include <vector> #include <iostream> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t ...
a.cc: In function 'void solve()': a.cc:32:31: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<__int128>, __int128>::value_type' {aka '__int128'}) 32 | rep(i,0,n) rep(j,0,m) cin >> a[i][j]; In file included from /usr...
s921490636
p03902
C++
#include <vector> #include <iostream> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t ...
a.cc: In function 'void solve()': a.cc:32:31: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<__int128>, __int128>::value_type' {aka '__int128'}) 32 | rep(i,0,n) rep(j,0,m) cin >> a[i][j]; In file included from /usr...
s873784846
p03902
C++
#include <vector> #include <iostream> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t ...
a.cc: In function 'void solve()': a.cc:31:19: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'? 31 | vector<vector<int128_t>> a(n,vector<int128_t>(m)); | ^~~~~~~~ | int8_t a.cc:31:19: error: template argument 1 is invalid a.cc:31:19: error: t...
s024486804
p03902
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; c...
a.cc: In function 'void solve()': a.cc:30:19: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'? 30 | vector<vector<int128_t>> a(n,vector<int128_t>(m)); | ^~~~~~~~ | int8_t a.cc:30:19: error: template argument 1 is invalid a.cc:30:19: error: t...
s434272323
p03902
C++
#include <algorithm> #include <iostream> #include <cstdio> #include <string> #include <vector> #include <cmath> #include <queue> #include <set> #include <map> using namespace std; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<vi> vvi; typedef long long ll; typedef long double ld; int n,m; int a[100...
a.cc: In function 'int main()': a.cc:46:64: error: expected ',' or ';' before ')' token 46 | ll k = max(0LL,ll(1+(b - y)/x))); | ^
s685344143
p03902
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; c...
a.cc: In function 'void solve()': a.cc:30:19: error: '__int12' was not declared in this scope; did you mean '__int128'? 30 | vector<vector<__int12>> a(n,vector<__int12>(m)); | ^~~~~~~ | __int128 a.cc:30:19: error: template argument 1 is invalid a.cc:30:19: error: t...
s301178974
p03902
C++
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author RiaD */ #include <iostream> #include <fstream> #include <iostream> #include <vector> #include <iterator> #include <string> #include <stdexcept> #ifndef SPCPPL_ASSERT #ifdef SPCPPL_DEBUG #define SPCPPL_ASSERT(c...
a.cc:48:36: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations] 48 | class IntegerIterator: public std::iterator<std::input_iterator_tag, T, std::ptrdiff_t, T*, T> { | ...
s234980106
p03903
C
//https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8 より macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); input_inner!{iter, $($r)*} }; ($($r:tt)*) => { let s = { use std::io::Read; let mut s = String::new(); ...
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '!' token 2 | macro_rules! input { | ^ main.c:19:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '!' token 19 | macro_rules! input_inner { | ^ main.c:28:12: error: expected '=', ',', '...
s528429811
p03903
C++
#include <cstdio> #include <iostream> #include <string> #include <vector> #include <sstream> #include <map> #include <set> #include <queue> #include <algorithm> #include <cmath> #include <cstring> #include <typeinfo> #include <numeric> #include <functional> #include <unordered_map> #include <bitset> #include <stack> #i...
/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
s772744524
p03903
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pll; ll unipar[4010]; ll unilen[4010]; struct edge{ int len,from,to; }; bool cmp(edge& a,edge& b){ return a.len<b.len; } void init(ll n){ for(ll i=1;i<=n;i++){ unipar[i]=i; unilen[i]=0; } } ll root(ll n){ if(unipar[...
a.cc: In function 'int main()': a.cc:40:24: warning: narrowing conversion of 'c' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing] 40 | v.push_back((edge){c,a,b}); | ^ a.cc:40:26: warning: narrowing conversion of 'a' from 'll' {aka 'long long int'} to 'int' [-Wnarrowing] 40 |...
s822143203
p03903
C++
#include <iostream> #include <queue> #include <tuple> #include <vector> using namespace std; using ll = long long; const int MAX_V = 5000; class UnionFind { public: // コンストラクタ explicit UnionFind(int N) : V_NUM(N) { for (int i = 0; i < V_NUM; ++i) { par[i] = i; } fill(rank...
a.cc: In function 'int main()': a.cc:65:5: error: 'sort' was not declared in this scope; did you mean 'short'? 65 | sort(edges, edges + M); | ^~~~ | short
s683232515
p03903
C
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <string> #include <sstream> #include <complex> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> using namespace std; #define mod 1000000007 #defin...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s782344712
p03903
Java
import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main implements Runnable { public static void main(String[] args) { new Thread(null, new Main(), "", Runtime.getRuntime().maxMemory()).start(); } public void run() ...
Main.java:120: error: cannot find symbol pw.println(ans - max[s][d]); ^ symbol: variable ans location: class Main Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s195246283
p03903
C++
#include<bits/stdc++.h> using namespace std; using Int = long long; struct edge{ Int from,to,cost,used; edge(){} edge(Int from,Int to,Int cost):from(from),to(to),cost(cost),used(0){} bool operator<(const edge& e) const{ return cost<e.cost; } }; struct Kruskal{ struct UnionFind{ Int n; vector...
a.cc: In member function 'void HLDecomposition::dfs(Int)': a.cc:105:23: error: cannot bind non-const lvalue reference of type 'Int&' {aka 'long long int&'} to a value of type 'int' 105 | Int &i=st.top().second; | ~~~~~~~~~^~~~~~
s840079280
p03903
C++
#include <algorithm> #include <cassert> #include <cfloat> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #inc...
a.cc: In function 'int main()': a.cc:83:24: error: expected ';' before 'vvi' 83 | scanf("%d%d", &n, &m) | ^ | ; 84 | vvi edge(m, vi(3)); | ~~~ a.cc:86:22: error: 'edge' was not declared in this scope 86 | scanf("%d%d%d...
s512173850
p03903
C++
w#include <cstdio> #include <vector> #include <algorithm> using namespace std; int n, m; struct uni { vector<int> p; uni(int n) : p(n, -1) {} int root(int a) { return p[a] < 0 ? a : (p[a] = root(p[a])); } bool find(int a, int b) { return root(a) == root(b); } bool merge(int a, int b) { ...
a.cc:1:2: error: stray '#' in program 1 | w#include <cstdio> | ^ a.cc:1:1: error: 'w' does not name a type 1 | w#include <cstdio> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++...
s023014503
p03903
C++
#include <vector> #include <queue> #include <cstdio> using namespace std; typedef long long Weight; struct Edge { int src, dst; Weight weight; Edge(int src, int dst, Weight weight) : src(src), dst(dst), weight(weight) { } }; bool operator < (const Edge &e, const Edge &f) { return e.weight != f.weight ? e.w...
a.cc: In function 'Weight minimumSpanningForest(const Graph&)': a.cc:47:70: error: no match for 'operator*' (operand type is 'const Edge') 47 | for(int u=0;u<n;u++) for(auto &e: g[u]) /*if (u < e->dst)*/ Q.push(*e); | ^~
s350119027
p03903
C++
#include "inspect.hpp" #include <vector> #include <queue> #include <cstdio> using namespace std; #define REP(i,n) for(int i=0;i<(int)n;++i) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(), (c).end() typedef long long Weight; struct Edge { int src, dst; Weight w...
a.cc:1:10: fatal error: inspect.hpp: No such file or directory 1 | #include "inspect.hpp" | ^~~~~~~~~~~~~ compilation terminated.
s039637549
p03903
C++
4 6 1 3 5 4 1 10 2 4 6 3 2 2 3 4 5 2 1 3 1 2 3
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 6 | ^
s101657597
p03903
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> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb...
a.cc:23:18: error: declaration does not declare anything [-fpermissive] 23 | typedef int long long; | ^~~~
s176397395
p03903
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; c...
a.cc:178:22: error: duplicate 'const' 178 | const lca_solver const* ls; | ^~~~~ | -----
s920219659
p03904
C++
#pragma GCC target("avx2,avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <atcoder/all> using namespace atcoder; //using mint = modint998244353; //using mint = modint1000000007; #include <bits/stdc++.h> using namespace std; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/t...
a.cc:4:10: fatal error: atcoder/all: No such file or directory 4 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s671675967
p03904
C++
#include <iostream> #include <set> #include <queue> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <climits> #include <sstream> #include <iomanip> #include <map> #include <stack> #include <numeric> using namespace std; /*------------------------------------------...
a.cc:223:1: error: stray '##' in program 223 | ### | ^~ a.cc:223:3: error: stray '#' in program 223 | ### | ^
s679719683
p03904
C++
#include <iostream> #include <set> #include <queue> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <climits> #include <sstream> #include <iomanip> #include <map> #include <stack> #include <numeric> using namespace std; /*------------------------------------------...
a.cc:175:1: error: stray '##' in program 175 | ### | ^~ a.cc:175:3: error: stray '#' in program 175 | ### | ^
s244543917
p03904
C++
#include <iostream> #include <set> #include <queue> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <climits> #include <sstream> #include <iomanip> #include <map> #include <stack> #include <numeric> using namespace std; /*------------------------------------------...
a.cc:177:1: error: stray '##' in program 177 | ### | ^~ a.cc:177:3: error: stray '#' in program 177 | ### | ^
s381085522
p03904
C++
#pragma GCC optimize ("O3") #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <set> #include <algorithm> #include <numeric> #include <list> using namespace std; usin...
a.cc:19:16: error: 'uint64_t' does not name a type 19 | using QWORD = uint64_t; | ^~~~~~~~ a.cc:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 16 | #include <list> +++ |+#include <cstdint> 17 | using namespace std; a.cc:2...
s616226337
p03904
C++
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto& (a): (b)) #define all(v) (v).begi...
a.cc: In function 'int main()': a.cc:569:12: error: 'K' was not declared in this scope 569 | cin >> K; | ^ a.cc:570:12: error: 's' was not declared in this scope; did you mean 'vs'? 570 | cin >> s; | ^ | vs a.cc:571:5: error: 'n' was not declared in this sc...
s639905768
p03904
C++
#include <bits/stdc++.h> using namespace std; #define fst(t) std::get<0>(t) #define snd(t) std::get<1>(t) #define thd(t) std::get<2>(t) using ll = long long; using P = std::tuple<int,int>; const int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}, dy[8] = {0, 0, -1, 1, -1, 1, -1, 1}; std::string S; int K; const std::string IN...
a.cc: In function 'int main()': a.cc:61:8: error: 'S_size' was not declared in this scope; did you mean 'dysize'? 61 | if(S_size <= 16){ | ^~~~~~ | dysize
s598216501
p03904
C++
##include <iostream> #include <vector> #include <cstdio> #include <sstream> #include <map> #include <string> #include <algorithm> #include <queue> #include <cmath> #include <functional> #include <set> #include <ctime> #include <random> #include <chrono> #include <cassert> #include <tuple> #include <utility> using names...
a.cc:1:1: error: stray '##' in program 1 | ##include <iostream> | ^~ a.cc:1:3: error: 'include' does not name a type 1 | ##include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:...
s133188880
p03904
C++
#include <cassert> #include <iostream> #include <string> #include <vector> #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef vector<int> VI; /* * Suffix Array. * Required Headers: algorithm, cassert, string, vector * Verified by: http://arc050.contest.atcoder.jp/submissions/818745...
a.cc: In function 'std::vector<int> create_sa(const std::string&)': a.cc:44:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 44 | std::sort(sa.begin(), sa.begin() + n + 1, cp); | ^~~~ | qsort
s814053255
p03904
C++
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Numerics; namespace PriorityQueue { class Program { static bool ok(string s, int k, BigInteger maxi) { ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Collectio...
s375258598
p03904
C++
#include <cstdio> #include <algorithm> #include <cmath> #include <queue> #include <vector> #include <map> #include <set> using namespace std; typedef pair<int , int> P2; typedef pair<pair<int , int> , int> P3; typedef pair<pair<int , int> , pair<int , int> > P4; #define Fst first #define Snd second #define PB(a) push...
a.cc: In function 'int main()': a.cc:36:41: error: 's' was not declared in this scope 36 | printf("%s\n" , s); | ^ a.cc:38:41: error: 's' was not declared in this scope 38 | printf("%s\n" , s[0] < s[1] ? s[0] : s[1]); ...
s549759033
p03904
C++
#include <stdio.h> #include <string.h> int ctoi(char c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; default: return -1; } } char S[5];...
a.cc: In function 'int main()': a.cc:35:20: error: 'atoi' was not declared in this scope; did you mean 'ctoi'? 35 | else{printf("%d¥n",atoi(S));} | ^~~~ | ctoi
s535828800
p03904
C++
#include <stdio.h> int ctoi(char c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; default: return -1; } } char S[5]; int K; int main(){...
a.cc: In function 'int main()': a.cc:27:4: error: 'strlen' was not declared in this scope 27 | if(strlen(S)==2){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstring> 2 | a.cc:34:...
s402194110
p03904
C++
#include <stdio.h> int ctoi(char c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; default: return -1; } } char S[5]; int K; int main(){...
a.cc: In function 'int main()': a.cc:23:15: error: expected ';' before 'scanf' 23 | scanf("%d",&K) | ^ | ; 24 | scanf("%s",&S); | ~~~~~ a.cc:27:4: error: 'strlen' was not declared in this scope 27 | if(strlen(S)==2){ | ^~~~~~ a.cc:2:1: note: 'str...
s722155038
p03905
C++
#include<bits/stdc++.h> using namespace std; const int maxn=100005; struct SHIT { int one,two; bool operator<(const SHIT &b)const { if(this->one!=b.one) return (this->one<b.one); return (this->two<b.two); } }shit[maxn]; bool cmp(SHIT a,SHIT b) { if(a.one+a.two!=b.one+b.two) retu...
a.cc: In function 'int main()': a.cc:65:17: error: 'ast' was not declared in this scope; did you mean 'last'? 65 | ast=shit[k].one; | ^~~ | last
s899976147
p03905
C++
#include <bits/stdc++.h> #define xx first #define yy second #define mp make_pair #define pb push_back #define fill( x, y ) memset( x, y, sizeof x ) #define copy( x, y ) memcpy( x, y, sizeof x ) using namespace std; typedef long long LL; typedef pair < int, int > pa; inline int read() { int sc = 0, f = 1; char ch = g...
a.cc: In function 'int main()': a.cc:69:147: error: expected primary-expression before 'continue' 69 | if( cnt.find( mp( c[ i ].xx - c[ i ].yy - 1, c[ i ].yy - 1 ) ) != cnt.end() ) ret -= now, last=c[i].yy,left=min(now,left),continue;; | ...
s558620935
p03905
C++
#include<bits/stdc++.h> using namespace std; const int maxn=100005; struct SHIT { int one,two; bool operator<(const SHIT &b)const { if(this->one!=b.one) return (this->one<b.one); return (this->two<b.two); } }shit[maxn]; bool cmp(SHIT a,SHIT b) { if(a.one+a.two!=b.one+b.two) return a...
a.cc: In function 'int main()': a.cc:101:75: error: lvalue required as left operand of assignment 101 | if(mp.count(tmp1)&&mp.count(tmp2)&&tmp1.one==shit[k-1].one&&tmp1.two=shit[k-1].two){ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
s880905463
p03907
C++
#include <vector> #include <cstdio> #include <algorithm> #include <map> using namespace std; int main() { int N; scanf("%d", &N); vector<pair<int, int> > A; for(int i=0; i<N; ++i) { int a, b; scanf("%d%d", &a, &b); A.emplace_back(a, b); } if(A[0].first!=0 || A[1].second!=0 || A[1].first!=A[0].second) { ...
a.cc: In function 'int main()': a.cc:88:44: error: 's' was not declared in this scope 88 | if(s.first!=beforeF+1) { | ^
s136986357
p03907
C++
#include <stdio.h> #include <string.h> #include <algorithm> long long int N; char A[1000000000000]; int f[12], ans = 0; int ctoi(char c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return ...
/tmp/ccjY87ua.o: in function `main': a.cc:(.text+0x11f): relocation truncated to fit: R_X86_64_PC32 against symbol `f' defined in .bss section in /tmp/ccjY87ua.o a.cc:(.text+0x148): relocation truncated to fit: R_X86_64_PC32 against symbol `f' defined in .bss section in /tmp/ccjY87ua.o a.cc:(.text+0x190): relocation tr...
s610159156
p03907
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:69:9: error: 'aseert' was not declared in this scope; did you mean 'assert'? 69 | aseert(0); | ^~~~~~ | assert