submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s976760960
p03839
C++
#pragma once #include "Macro.h" namespace AGC008B { void Run(void) { ll n, k; cin >> n >> k; vector<ll> a(n); rep(i, 0, n) cin >> a[i]; ll l = 0; ll r = k - 1; vector<ll> ans_w(1); rep(i, 1, n) ans_w[0] += (0 < a[i] && k <= i) ? a[i] : 0; while (1) { // 白く塗ったKマスをスライドさせて累積 l++; r++; if...
a.cc:1:9: warning: #pragma once in main file 1 | #pragma once | ^~~~ a.cc:3:10: fatal error: Macro.h: No such file or directory 3 | #include "Macro.h" | ^~~~~~~~~ compilation terminated.
s468959515
p03839
C++
// https://atcoder.jp/contests/agc008/tasks/agc008_b #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> PII; typedef pair<ll, ll> PLL; #define EPS (1e-9) #define INF (1e9) #define INFL (1e18) #define MOD (1000000007) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #defi...
a.cc: In function 'int main()': a.cc:68:22: error: no matching function for call to 'max(int, ll&)' 68 | cout << sum + max(0, minv) << endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s496128992
p03839
C++
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i,s,l) for(lli i=s;i<l;i++) #define DEBUG 0 #define INF (1LL<<50) #define MOD 1000000007 signed main(){ lli n,k; cin>>n>>k; lli flag=0; vector<lli> a(n); REP(i,0,n){ cin>>a[i]; if(a[i]>=0)flag++; } /*data[i], a0からaiまで...
a.cc: In function 'int main()': a.cc:30:13: error: redeclaration of 'long long int flag' 30 | lli flag=0; | ^~~~ a.cc:16:13: note: 'long long int flag' previously declared here 16 | lli flag=0; | ^~~~
s144492962
p03839
C++
#include<bits/stdc++.h> using namespace std; #define REP(i,k,n) for(int i=k;i<n;i++) #define INF 1844674407370955161 #define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0])) #define MOD 1000000007 int lcm(int a,int b){ return a/__gcd(a,b) * b; } void clear( std::queue<pair<int,int> > &q ) { std::queue...
a.cc:170:2: error: stray '#' in program 170 | }#include<bits/stdc++.h> | ^ a.cc:170:3: error: 'include' does not name a type 170 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:183:5: error: redefinition of 'int lcm(int, int)' 183 | int lcm(int a,int b){ | ^~~ a.cc:14:5: note: 'int lcm(int, int...
s786782172
p03839
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; //template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } //template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } /* attention long longのシフト演算には気をつけよう タイ...
a.cc: In function 'int main()': a.cc:20:52: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 20 | for(int i=1; i<=N; i++) cum2[i] = cum2[i-1]+max(0, a[i]); | ~~~^~~~~~~~~ ...
s986814357
p03839
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define tr(container, it) \ for (auto it = container.begin(); it != container.end(); it++) #define scontains(c, x) ((c).find(x) != (c).end()) //O(log n) #define contains(c, x) (find((c).begin(),(c).end(),x) != (c).end()) //O(n) #define pll p...
a.cc: In function 'void solve()': a.cc:290:24: error: no matching function for call to 'max(int, ll&)' 290 | _for(i,N)sum += max(0,A[i]),S[i+1] = S[i] + max(0, A[i]),SS[i+1] = SS[i] - min(0,A[i]); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from...
s067448880
p03839
C++
//Relive your past life. //Face your demons. //The past is never dead,it is not even past. //The memories are not only the key to the past but...also to the future. //coded in Rusty Lake #include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<c...
a.cc: In function 'int main()': a.cc:73:41: error: no matching function for call to 'max(long long int, int)' 73 | for(int i=k;i<=n;++i)ans=max(ans,max(s[i]-s[i-k],0)+l[i-k]+r[i+1]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, ...
s662784928
p03839
C++
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << (x) << '\n'; typedef int64_t Int; Int mod = 1e9+7; Int INF = 1e9+18; int main() { ios::sync_with_stdio(false); Int n, k; cin >> n >> k; vector<Int> a(n); vector<Int> b(n + 1, 0); vector<Int> c(n + 1, 0); Int sum = 0; ...
a.cc: In function 'int main()': a.cc:27:21: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type)' 27 | Int ma = max(0LL, b[i + k] - b[i]); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c+...
s095485747
p03839
C++
#include <bits/stdc++.h> #define INF 10000000000000007 using namespace std; int main() { int n, k; cin >> n >> k; long a[n]; for (int i = 0; i < n; i++) cin >> a[i]; long acc[n + 1]; acc[0] = 0; for (int i = 1; i <= n; i++) { acc[i] = acc[i - 1] + a[i - 1]; } long ...
a.cc: In function 'int main()': a.cc:31:38: error: no matching function for call to 'max(int, long int&)' 31 | acc[i] = acc[i - 1] + max(0, a[i - 1]); | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_...
s019234788
p03839
C++
#include <iostream> #include <vector> #include <algorithm> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT...
a.cc:6:15: error: 'int_fast64_t' does not name a type 6 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:7:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 7 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:7...
s933403866
p03839
C++
#include <iostream> #include <vector> #include <algorithm> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT...
a.cc:6:15: error: 'int_fast64_t' does not name a type 6 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:7:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 7 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:7...
s629252545
p03839
C++
#include <iostream> #include <vector> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio...
a.cc:5:15: error: 'int_fast64_t' does not name a type 5 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:6:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 6 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:6...
s998889049
p03839
C++
#include <iostream> #include <vector> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio...
a.cc:5:15: error: 'int_fast64_t' does not name a type 5 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:6:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 6 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:6...
s928485527
p03839
C++
#include <iostream> #include <vector> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio...
a.cc:5:15: error: 'int_fast64_t' does not name a type 5 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:6:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 6 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:6...
s208280169
p03839
C++
#include <iostream> #include <vector> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio...
a.cc:5:15: error: 'int_fast64_t' does not name a type 5 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:6:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 6 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:6...
s553189065
p03839
C++
#include <iostream> #include <vector> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio...
a.cc:5:15: error: 'int_fast64_t' does not name a type 5 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:6:19: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 6 | using PAIR = pair<int64, int64>; | ^~~~~ | int64_t a.cc:6...
s114462454
p03839
C++
#include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define maxs(x,y) (x = max(x,y)) #d...
a.cc: In function 'int main()': a.cc:121:30: error: expected ';' before '}' token 121 | b[i][0] -= a[i-1] | ^ | ; 122 | }else{ | ~
s355660457
p03839
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include <bits/stdc++.h> #include <utility> #include <iomanip> ...
a.cc: In function 'int main()': a.cc:51:20: error: no matching function for call to 'max(long long int&, int)' 51 | s[i]=s[i-1]+max(a,0); | ~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from...
s844108467
p03839
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define z (ll) int main(){ ll n,k,d=0,e=0,r=0,s=0,t=0,u=0; cin>>n>>k; ll a[n]; for(int i=0;i<n;i++){ cin>>a[i]; if(i<k){ s+=a[i]; r+=max(z 0,a[i]); t=s; u=r; }else{ s-=a[i-k]; s+=a[i]; r-=max(...
a.cc: In function 'int main()': a.cc:40:2: error: expected '}' at end of input 40 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s927703491
p03839
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define z (ll) int main(){ ll n,k,d=0,e=0,r=0,s=0,t=0,u=0; cin>>n>>k; ll a[n]; for(int i=0;i<n;i++){ cin>>a[i]; if(i<k){ s+=a[i]; r+=max(z 0,a[i]); t=s; u=r; }else{ s-=a[i-k]; s+=a[i]; r-=max(...
a.cc: In function 'int main()': a.cc:19:14: error: 'z0' was not declared in this scope; did you mean 'y0'? 19 | r-=max(z0,a[i-k]); | ^~ | y0 a.cc:32:33: error: 'z0' was not declared in this scope; did you mean 'y0'? 32 | for(int i=0;i<e;i++) u+=max(z0,a[i]); |...
s404311642
p03839
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define z (ll) int main(){ ll n,k,d=0,e=0,r=0,s=0,t=0,u=0; cin>>n>>k; ll a[n]; for(int i=0;i<n;i++){ cin>>a[i]; if(i<k){ s+=a[i]; r+=max(z0,a[i]); t=s; u=r; }else{ s-=a[i-k]; s+=a[i]; r-=max(z...
a.cc: In function 'int main()': a.cc:13:14: error: 'z0' was not declared in this scope; did you mean 'y0'? 13 | r+=max(z0,a[i]); | ^~ | y0 a.cc:19:14: error: 'z0' was not declared in this scope; did you mean 'y0'? 19 | r-=max(z0,a[i-k]); | ^~ ...
s210892932
p03839
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define 0 (ll)0 int main(){ ll n,k,d=0,e=0,r=0,s=0,t=0,u=0; cin>>n>>k; ll a[n]; for(int i=0;i<n;i++){ cin>>a[i]; if(i<k){ s+=a[i]; r+=max(0,a[i]); t=s; u=r; }else{ s-=a[i-k]; s+=a[i]; r-=max(0...
a.cc:4:9: error: macro names must be identifiers 4 | #define 0 (ll)0 | ^ a.cc: In function 'int main()': a.cc:13:13: error: no matching function for call to 'max(int, long long int&)' 13 | r+=max(0,a[i]); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s260600206
p03839
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ll n,k,d=0,e=0,r=0,s=0,t=0,u=0; cin>>n>>k; ll a[n]; for(int i=0;i<n;i++){ cin>>a[i]; if(i<k){ s+=a[i]; r+=max(0,a[i]); t=s; u=r; }else{ s-=a[i-k]; s+=a[i]; r-=max(0,a[i-k]); ...
a.cc: In function 'int main()': a.cc:12:13: error: no matching function for call to 'max(int, long long int&)' 12 | r+=max(0,a[i]); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s085875384
p03839
C++
#include<bits/stdc++.h> #define pb push_back #define mp make_pair #define fi first #define se second typedef long long ll; using namespace std; const int MAXN = 1e5 + 5 * 1e2; ll n, k, a[MAXN]; ll pref[MAXN], dp1[MAXN], dp2[MAXN]; int main(){ cin >> n >> k; for(int i=1;i<=n;i++){ cin >> a[i]; pref[i] += ...
a.cc: In function 'int main()': a.cc:38:14: error: no matching function for call to 'max(int&, ll)' 38 | ans = max(ans, dp1[i - 1] + dp2[i + k] + max(0ll, pref[i + k - 1] - pref[i])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/...
s271740134
p03839
C++
#include<iostream> using namespace std; typedef long long ll; #define fr(i,n) for(int i=0;i<n;i++) int main(){ ll n,k,a[100010],s[100010],m[100010],t=0; cin>>n>>k; fr(i,n) cin>>a[i]; fr(i,n){ s[i+1]=s[i]+a[i]; m[i+1]=m[i]+max(a[i],0); } fr(i,n-k+1){ t=max(t,m[i]+m[n]-m[i+k]+max(0,s[i+k]-s[i]));...
a.cc: In function 'int main()': a.cc:12:20: error: no matching function for call to 'max(ll&, int)' 12 | m[i+1]=m[i]+max(a[i],0); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s638362306
p03839
C++
/* Author: QAQ-Automaton LANG: C++ PROG: b.cpp Mail: cnyalilk@vip.qq.com */ #include<bits/stdc++.h> #define debug(...) fprintf(stderr,__VA_ARGS__) #define DEBUG printf("Passing [%s] in LINE %lld\n",__FUNCTION__,__LINE__) #define Debug debug("Passing [%s] in LINE %lld\n",__FUNCTION__,__LINE__) #define all(x) x.begin(),x...
a.cc: In function 'int main()': a.cc:124:31: error: no matching function for call to 'mmax(ll, int)' 124 | chkmax(ans,max(a[i+k]-a[i],0)+b[i]+b[n]-b[i+k]); | ^ a.cc:24:20: note: candidate: 'template<class T> T mmax(T, T)' 24 | template<class T>T mmax(T a,T b){ret...
s893825095
p03839
C++
#include <iostream> #include <string> #include <vector> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <map> #include <stack> #include <queue> #include <set> #include <cstring> using namespace std; // ascending order #define vsort(v) sort(v.begin(), v.end()) // descending order #de...
a.cc: In function 'int main()': a.cc:41:27: error: no matching function for call to 'max(ll&, int)' 41 | b[i] = max(a[i], 0); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s025456285
p03839
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 mp make_pair #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) for...
a.cc: In constructor 'Comb::Comb(int)': a.cc:47:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 47 | UPTO(i,1,n) { | ^ a.cc:17:49: note: in definition of macro 'UPTO' 17 | #define UPTO(var, from, to) for (register int var = (from); var <= ((int)to...
s114549390
p03839
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 mp make_pair #define fi first #define se second #define all(n) n.begin(), n.end() #define FROMTO(var, from, to) for...
a.cc: In constructor 'Comb::Comb(int)': a.cc:47:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 47 | UPTO(i,1,n) { | ^ a.cc:17:49: note: in definition of macro 'UPTO' 17 | #define UPTO(var, from, to) for (register int var = (from); var <= ((int)to...
s038954022
p03839
C++
#include <bits/stdc++.h> #define INF 1e9 using namespace std; typedef long long ll; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; vector<ll> a(n), b(n); for (int i = 0; i < n; i++) { cin >> a[i]; b[i] = max(a[i], 0); } vector<ll> ...
a.cc: In function 'int main()': a.cc:17:19: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int)' 17 | b[i] = max(a[i], 0); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s305322302
p03839
C++
#include <iostream> #include <iomanip> #include <algorithm> #include <functional> #include <vector> #include <map> #include <stack> #include <string> #include <list> #include <set> #include <queue> #include <deque> #include <math.h> using namespace std; typedef pair<int, int> P; #define ll long long #define int ll #de...
a.cc: In function 'int main()': a.cc:70:17: error: no matching function for call to 'max(int, long long int&)' 70 | mi = max(0, mi); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /...
s768960293
p03839
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<utility> #include<numeric> #include<vector> #include<MAP> #include<unordered_MAP> #include<set> #include<tuple> #include<stack> #include<queue> #include<functional> #include<iterator> #include<cmath> #include<cctype> using namespace std;...
a.cc:8:9: fatal error: MAP: No such file or directory 8 | #include<MAP> | ^~~~~ compilation terminated.
s201341022
p03839
C++
10 5 5 -4 -5 -8 -4 7 2 -4 0 7
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 5 | ^~
s970002385
p03839
C++
#include <bits/stdc++.h> #define mod 1000000007 #define pb push_back #define ll long long using namespace std; int main(){ int n,k; cin>>n>>k; vector<ll> a(n+2),psum(n+2),ksum(n+2); for(int i=1;i<=n;i++){ cin>>a[i]; psum[i] = psum[i-1] + max(a[i],0); } for(int i=1;i<=k;i++){ ksum[1]+=a[i]; } for(int i=k+1...
a.cc: In function 'int main()': a.cc:12:42: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int)' 12 | psum[i] = psum[i-1] + max(a[i],0); | ~~~^~~~~~~~ In file included from ...
s294444570
p03839
C++
/* URL https:// SCORE 0 AC false WA false TLE false MLE false TASK_TYPE FAILURE_TYPE NOTES */ #include <iostream> #include <cstdint> #include <utility> #include <tuple> #include <vector> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <map> #include <set> #include <algorithm...
a.cc:939:12: error: redefinition of 'struct internal::tuple_utils::seq<<anonymous> >' 939 | struct seq {}; | ^~~ a.cc:80:12: note: previous definition of 'struct internal::tuple_utils::seq<<anonymous> >' 80 | struct seq {}; | ^~~ a.cc:942:12: error: redefinition of 'struct...
s582478271
p03839
C++
#include "bits/stdc++.h" using namespace std; #define ll long long int #define rep(i,n) for( int i = 0; i < n; i++ ) #define rrep(i,n) for( int i = n; i >= 0; i-- ) #define REP(i,s,t) for( int i = s; i <= t; i++ ) #define RREP(i,s,t) for( int i = s; i >= t; i-- ) #define dump(x) cerr << #x << " = " << (x) << endl; #de...
a.cc: In function 'int main()': a.cc:24:33: error: no matching function for call to 'max(int, long long int&)' 24 | rep(i, N - K) tmp += max(0, a[i]); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/...
s813411929
p03839
C++
10 5 5 -4 -5 -8 -4 7 2 -4 0 7
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 5 | ^~
s116676395
p03839
C++
#include <bits/stdc++.h> using namespace std; int N, K; int A[100001]; long long res; long long around, center; int main() { cin >> N >> K; for(int i = 0; i < N; ++i) cin >> A[i]; for(int i = K; i < N; ++i) around += max(0LL, A[i]); for(int i = 0; i < K; ++i) center += A[i]; for(int i = 0; i < N - K; ++i) {...
a.cc: In function 'int main()': a.cc:12:43: error: no matching function for call to 'max(long long int, int&)' 12 | for(int i = K; i < N; ++i) around += max(0LL, A[i]); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/i...
s891641852
p03839
C++
#include <bits/stdc++.h> using namespace std; int N, K; long long res, sub; int main() { cin >> N >> K; for(int i = 0; i < N; ++i) { int a; cin >> a; if(i < K && (N - i) <= K) sub += a; else res += min(0, a); } res += min(0, sub); cout << res; }
a.cc: In function 'int main()': a.cc:14:13: error: no matching function for call to 'min(int, long long int&)' 14 | res += min(0, sub); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s133705469
p03839
C++
#include <iostream> #include <cmath> using namespace std; typedef long long ll; int N,K; ll A[100010] = {0},S[100010] = {0},T[100010] = {0}; int main(){ cin >> N >> K; for(int i=1;i<=N;i++){ cin >> A[i]; S[i] = S[i-1] + A[i]; T[i] = T[i-1] + max(0,A[i]); } ll ans = 0; for(int i=1;i<=N-K+1;i++){ ans = max...
a.cc: In function 'int main()': a.cc:14:36: error: no matching function for call to 'max(int, ll&)' 14 | T[i] = T[i-1] + max(0,A[i]); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes....
s724557672
p03839
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:38:35: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type&)' 38 | l[i+1] += l[i]+max(0LL, a[i]); | ~~~^~~~~~~~~~~ In file included from /usr/inc...
s099290790
p03839
C++
# include <iostream> # include <algorithm> #include <array> # include <cassert> #include <cctype># include <iostream> # include <algorithm> #include <array> # include <cassert> #include <cctype> #include <climits> #include <numeric> # include <vector> # include <string> # include <set> # include <map> # include <cmath>...
a.cc:5:18: warning: extra tokens at end of #include directive 5 | #include <cctype># include <iostream> | ^ a.cc:102:21: error: redefinition of 'constexpr const long long int MOD' 102 | constexpr long long MOD = 1000000000 + 7; | ^~~ a.cc:37:21: note: 'constexpr co...
s431314400
p03839
C++
#include<iostream> #include<algorithm> #include<string> #define LL long long int N, K; LL ans; LL a[100010]; bool D[100010]; int main() { std::cin >> N >> K; for (int i = 0; i < N; i++) { std::cin >> a[i]; } for (int i = 0; i < N - K; i++) { if (a[i] > 0) { ans += a[i]; } } LL add = 0; LL bdd = 0; for ...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s425506308
p03839
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define mp(a,b) make_pair(a,b) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x...
a.cc:49:2: error: unterminated argument list invoking macro "maxch" 49 | } | ^ a.cc: In function 'int main()': a.cc:45:5: error: 'maxch' was not declared in this scope 45 | maxch(res,max(0LL,sum[i]+sum[n]-sum[i+k]); | ^~~~~ a.cc:45:10: error: expected '}' at end of input 45 | maxch(res...
s317703765
p03839
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int N, K; cin >> N >> K; vector<ll> a(N), sum(N + 1), good(N + 1); for (int i = 0; i < N; i++) { cin >> a[i]; sum[i + 1] = sum[i] + a[i]; good[i + 1] = good[i] + max(a[i], 0); } ll res = 0; for (int i = 0; i <= N - K; i++) { ...
a.cc: In function 'int main()': a.cc:13:44: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int)' 13 | good[i + 1] = good[i] + max(a[i], 0); | ~~~^~~~~~~~~ In file included...
s078962319
p03839
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <stdio.h> #include <string.h> #include <math.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; vector<int64_t> s(n + 1), t(n + 1); for (int i = 0; i < n; ...
a.cc: In function 'int main()': a.cc:27:24: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type, long long int)' 27 | int64_t u = max(s[i + k] - s[i], 0LL); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/incl...
s368839219
p03839
C++
// 簡易競プロテンプレ #include <bits/stdc++.h> #define ll long long using namespace std; ll n, k; ll a[114514]; int main(void){ cin >> n >> k; for(int i=0;i<n;i++) cin >> a[i]; ll ans = 0, ans2 = 0; for(int i=0;i<n;i++){ if (i>=k && a[i]>0) ans += a[i]; if (i<k) ans += a[i]; if (i+1==k) ans = max(ans, 0); } for(int ...
a.cc: In function 'int main()': a.cc:14:24: error: no matching function for call to 'max(long long int&, int)' 14 | if (i+1==k) ans = max(ans, 0); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h...
s304830080
p03839
C++
#include <bits/stdc++.h> using namespace std; typedef long long int lli; int main(){ int n,k; scanf("%d%d",&n,&k); if(n<k){ printf("0"); return 0; } lli qsp[n+1],qsn[n+1],a; for(int i=1;i<=n;++i){ scanf("%lld",&a); qsp[i]=qsp[i-1]; qsn[i]=qsn[i-1]; if(a>0) qsp[i]+=a; else qsn[i]+=a; } lli mi...
a.cc: In function 'int main()': a.cc:31:31: error: 'qs' was not declared in this scope; did you mean 'qsn'? 31 | printf("%lld",qs[n]-min); | ^~ | qsn a.cc:33:31: error: 'qs' was not declared in this scope; did you mean 'qsn'? ...
s423508965
p03839
C++
#include<bits/stdc++.h> using namespace std; long long qsum[100010]; long long best[100010]; int main() { int n,k; long long a; cin >> n >> k; for ( int c=1 ; c<=n ; c++ ) { cin >> a; qsum[c] = qsum[c-1] + a; if ( a > 0 ) best[c] = best[c-1] + a; else best[...
a.cc:34:11: error: redefinition of 'long long int qsum [100010]' 34 | long long qsum[100010]; | ^~~~ a.cc:5:11: note: 'long long int qsum [100010]' previously declared here 5 | long long qsum[100010]; | ^~~~ a.cc:36:11: error: redefinition of 'long long int best [100010]' 36 | ...
s090226084
p03839
C++
#include<iostream> #include<iomanip> #include<map> #include<unordered_map> #include<set> #include<unordered_set> #include<vector> #include<array> #include<string> #include<stack> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<random> #include<complex> #include<bitset> #include<chron...
a.cc: In function 'int main()': a.cc:62:22: error: no matching function for call to 'max(int64_t&, int)' 62 | int ans = max(ksummax,0); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s322008839
p03839
C++
#include <iostream> #include <cstring> #include <algorithm> #define MAX_N 100000 using namespace std; #define debug(x) cout << #x << "==" << x << endl; //入力 int K; int N; int a[MAX_N + 1]; typedef long long ll; int main() { cin >> N >> K; for(int i = 0; i < N; i++) { cin >> a[i]; } ll cumsum[MAX_N...
a.cc: In function 'int main()': a.cc:43:30: error: 'black' was not declared in this scope 43 | mx = max(mx, other + max(black, white)); | ^~~~~ a.cc:43:37: error: 'white' was not declared in this scope; did you mean 'fwrite'? 43 | mx = max(mx, other + max(black, white));...
s216295911
p03839
C++
#include <iostream> #include <cstring> #include <algorithm> #define MAX_N 100000 using namespace std; #define debug(x) cout << #x << "==" << x << endl; //入力 int K; int N; int a[MAX_N + 1]; typedef long long ll; int main() { cin >> N >> K; for(int i = 0; i < N; i++) { cin >> a[i]; } ll cumsum[MAX_N...
a.cc: In function 'int main()': a.cc:41:30: error: 'k' was not declared in this scope 41 | ll other = (cumsum_pos[N-k] - cumsum_pos[i+K-1]) + cumsum_pos[i-1]; | ^
s396109675
p03839
C++
#include <bits/stdc++.h> using namespace std; using namespace placeholders; using ll = long long; class sum_class{ vector<ll> v; public: sum_class(const vector<ll>& vv){ v.resize(vv.size() + 1, 0); partial_sum(begin(vv), end(vv), begin(v) + 1); } ll operator()(const ll x, const ll y){ return v[y+1] - v[x]; } ...
a.cc: In lambda function: a.cc:23:74: error: no matching function for call to 'max(const ll&, int)' 23 | transform(begin(v), end(v), begin(pv), [](const ll x){ return max(x, 0); }); | ~~~^~~~~~ In file included from /usr/include/c++/...
s049701594
p03839
C++
#include<cstdio> #include<algorithm> using std::max; const int N=1e5+3; int i,n,k,a[N]; long long x,r,l[N],s[N]; int main() { scanf("%d%d",&n,&k); for(i=1;i<=n;++i) { scanf("%d",a+i); s[i]=s[i-1]+a[i]; l[i]=l[i-1]+max(0,a[i]); } for(i=n;i>=k;x+=max(0,a[i--])) r=max(r,x+l[i-k]+max(0ll,s[i]-s[i-k])); for(i=...
a.cc: In function 'int main()': a.cc:18:33: error: 'j' was not declared in this scope 18 | for(i=0;i<20000;++i)for(j=0;j<i;++j); | ^
s746349695
p03839
C++
#include<cstdio> #include<algorithm> using std::max; const int N=1e5+3; int i,n,k,a[N]; long long x,r,l[N],s[N]; int main() { scanf("%d%d",&n,&k); for(i=1;i<=n;++i) { scanf("%d",a+i); s[i]=s[i-1]+a[i]; l[i]=l[i-1]+max(0,a[i]); } for(i=n;i>=k;x+=max(0,a[i--])) r=max(r,x+l[i-k]+max(0,s[i]-s[i-k])); printf("...
a.cc: In function 'int main()': a.cc:17:37: error: no matching function for call to 'max(int, long long int)' 17 | r=max(r,x+l[i-k]+max(0,s[i]-s[i-k])); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /u...
s731591011
p03839
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define lim 10000007 #define mod 1000000007 #define mp make_pair #define sd(n) scanf("%lld",&n) #define pb push_back #define FIO() freopen("in.txt","r",stdin) #define F first #define S second #define db double #define INF 1e12 #define pd(n) printf("%lld\...
a.cc: In function 'int main()': a.cc:27:10: error: 'x' was not declared in this scope 27 | cin>>x; | ^
s223400461
p03839
C++
#include <iostream> #include <vector> using namespace std; typedef long long int ll; int main(void){ // Here your code ! int n,k; cin >> n >> k; vector<ll> a(n+10); vector<ll> rui(n+10); vector<ll> rui2(n+10); for(int i = 1; i <= n; i++){ cin >> a[i]; rui[i] = rui...
a.cc: In function 'int main()': a.cc:35:18: error: no matching function for call to 'max(int&, ll&)' 35 | res = max(tmp,res); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/...
s871759475
p03839
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #include <math.h> using namespace std; long long int a[111111]; long long int kuro[111111]; long long int b[111111]; int main(void){ int N,K,x,i,j,k; long long int res,tmp; res=tmp=0; scanf("%d %d",&N,&K); for(i=1;i<=N;i++){ sc...
a.cc: In function 'int main()': a.cc:26:11: error: no matching function for call to 'max(int, long long int&)' 26 | b[1]=max(0,a[1]); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'tem...
s833907721
p03839
C++
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define mp make_pair #define pb push_back #define CLEAR(a) memset(a,0,sizeof a) #define REP(i,n) for(int i=0;i<n;i++) #define FOR(i,a,b) for(int i=a;i<=b;i++) #define fr freopen("input.txt", "r", stdin); #define fw freopen("output.txt", "w",...
a.cc:19:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 19 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:27:34: error: no matching function for call to 'max(int, long long int&)' 27 | lfft[i] = lfft[i-1] + max(0, a[i]); | ...
s843381507
p03839
C++
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <queue> #include <algorithm> #include <utility> #include <cmath> #define INF_LL 9000000000000000000 #define INF 2000000000 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) using namespace...
a.cc: In function 'int main()': a.cc:69:9: error: 'memset' was not declared in this scope 69 | memset(sum_k, 0, sizeof(sum_k)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include <cmath> +++ |+#include <...
s704507435
p03839
C++
10 5 5 -4 -5 -8 -4 7 2 -4 0 7
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 5 | ^~
s975667603
p03839
C++
#include <iostream> #include <vector> #include <numeric> #include <limits> #define int long long signed main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int n, k; std::cin >> n >> k; std::vector<int> pts(n), positive(n); for (int i = 0; i < n; i++) { std::cin >> pts[i]; positi...
a.cc: In function 'int main()': a.cc:24:22: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 24 | result = std::max({result, range_sum + other_sum, other_sum}); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/stri...
s113146690
p03839
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,k; long long int a[100000]; cin >> n >> k; for(int i = 0;i < n;i++) cin >> a[i]; sort(a,a + n,greater<long long int>()); long long int res = 0; for(int i = 0;i < n;i++){ if(a[i] >= 0) res += a[i]; else{ if(k % 2 == 1) res += ...
a.cc: In function 'int main()': a.cc:19:20: error: no matching function for call to 'max(int, long long int&)' 19 | cout << max(0,res) << endl; | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s821312331
p03839
C++
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long int64; const int64 INF = 1LL << 58; struct CumulativeSum { vector< int64 > data; CumulativeSum(int sz) : data(++sz, 0) {}; inline void add(int k, int x) { data[k] += x; } void build() { for(int i = 1;...
a.cc: In function 'int main()': a.cc:56:19: error: no matching function for call to 'max(int, long long int&)' 56 | sum.add(i, max(0, A[i])); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s184537411
p03839
C++
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long int64; const int64 INF = 1LL << 58; struct CumulativeSum { vector< int64 > data; CumulativeSum(int sz) : data(++sz, 0) {}; inline void add(int k, int x) { data[k] += x; } void build() { for(int i = 1; i < d...
a.cc:49:1: error: '::main' must return 'int' 49 | int64 main() | ^~~~~ a.cc: In function 'int main()': a.cc:56:19: error: no matching function for call to 'max(int, long long int&)' 56 | sum.add(i, max(0, A[i])); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60,...
s974322126
p03839
C++
#include <bits/stdc++.h> #define fin(i, n) for (int i = 0; i < n; i++) #define fin2(i, a, b) for (int i = a; i < b; i++) #define ll long long using namespace std; int main() { ll n, k; scanf("%lld%lld", &n, &k); vector<ll> t(n); fin(i, n) scanf("%lld", &t[i]); ll sum = 0; fin(i, k) sum += t[i]; ll summ = sum; ...
a.cc: In function 'int main()': a.cc:25:59: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 25 | fin(i, n) if (i < ind || i >= ind + k) sump += max(0, t[i]); | ...
s410408514
p03840
C++
#include<bits/stdc++.h> using namespace std; const int N = 2e5+7; int ans[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); long long I, O, J, L, temp; cin>>I>>O>>temp>>J>>L>>temp>>temp; long long ans = O + (I/2)*2 + (J/2)*2 + (L/2)*2; if (I && J && L) { I--, J--, L--; ans...
a.cc: In function 'int main()': a.cc:16:18: error: no matching function for call to 'min(long long int)' 16 | ans = min( O + (I/2)*2 + (J/2)*2 + (L/2)*2 + 3); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/inc...
s254884435
p03840
C
#include <bits/stdc++.h> using namespace std; int ai, ao, at, al, aj, as, az, k; int main() { cin >> ai >> ao >> at >> al >> aj >> as >> az; k += ao; k += ai - ai % 2; ai = ai % 2; k += min(min(al, aj), ai) * 3; int minn = min(min(al, aj), ai); al -= minn; aj -= minn; ai -= mi...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s965451151
p03840
C
#include <iostream> using namespace std; int ai, ao, at, al, aj, as, az, k; int main() { cin >> ai >> ao >> at >> al >> aj >> as >> az; k += ao; k += ai - ai % 2; ai = ai % 2; k += min(min(al, aj), ai) * 3; int minn = min(min(al, aj), ai); al -= minn; aj -= minn; ai -= minn; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s423381491
p03840
Java
import java.util.*; import java.io.*; import java.math.*; public class Main{ //Don't have to see. start------------------------------------------ static class InputIterator{ ArrayList<String> inputLine = new ArrayList<String>(1024); int index = 0; int max; String read; InputIterator(){ BufferedReader br = ne...
Main.java:73: error: array required, but ArrayList<Integer> found int ai = one[0]; ^ Main.java:74: error: array required, but ArrayList<Integer> found int ao = one[1]; ^ Main.java:75: error: array required, but ArrayList<Integer> found int at = one[2]; ^ Main.java:76: err...
s527968674
p03840
C++
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int, int> pi; #define debug(x) cerr << #x << ": " << x << endl #define debug2(x, y) debug(x), debug(y) #define repn(i, a, b) for(int i ...
a.cc: In function 'int main()': a.cc:45:41: error: 'tot2' was not declared in this scope; did you mean 'tot'? 45 | cout << max({tot1 / 2, tot / 2, tot2 / 2}) << endl; | ^~~~ | tot a.cc:45:20: error: no matching functi...
s010015627
p03840
C++
#include<bits/stdc++.h> using namespace std; #define int ll #define ll long long #define I32_MAX 2147483647 #define I64_MAX 9223372036854775807LL #define I64_MAX2 1223372036854775807LL #define INF I64_MAX2 #define MOD 1000000007 // #define MOD 998244353 #define MEM_SIZE 101010 #define DEBUG_OUT true #define ALL(x) (x...
a.cc: In function 'void solve()': a.cc:46:20: error: expected ';' before ':' token 46 | res += vec[0]/2*2: | ^ | ;
s754912281
p03840
C++
v#include <bits/stdc++.h> using namespace std; int main(){ long long I, O, T, J, L, S, Z; cin >> I >> O >> T >> J >> L >> S >> Z; long long ans = I / 2 * 2 + O + J / 2 * 2 + L / 2 * 2; if (I % 2 == 1 (J >= 2 || L >= 2)){ ans++; } cout << ans << endl; }
a.cc:1:2: error: stray '#' in program 1 | v#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> I >> O >> T >> J >> L >> S >> Z; | ^~~ a...
s579313419
p03840
C++
#include<cmath> #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<utility> #include<map> #include<set> #include<queue> #include<functional> #define INF 1e16 #define N (1000000007) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef pair<ll,P> Q; ll a[7]; int ma...
a.cc: In function 'int main()': a.cc:23:5: error: expected ',' or ';' before 'll' 23 | ll k = min(a[0],min(a[3],a[4])); | ^~ a.cc:28:8: error: 'k' was not declared in this scope 28 | if(k%2==0){ | ^
s736345100
p03840
C++
#include<cmath> #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<utility> #include<map> #include<set> #include<queue> #include<functional> #define INF 1e16 #define N (1000000007) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef pair<ll,P> Q; ll a[7]; int ma...
a.cc: In function 'int main()': a.cc:23:5: error: expected ',' or ';' before 'll' 23 | ll k = min(a[0],min(a[3],a[4])); | ^~ a.cc:28:8: error: 'k' was not declared in this scope 28 | if(k%2==0){ | ^
s851660174
p03840
C++
#include<cmath> #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<utility> #include<map> #include<set> #include<queue> #include<functional> #define INF 1e16 #define N (1000000007) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef pair<ll,P> Q; ll a[7]; int ma...
a.cc: In function 'int main()': a.cc:23:5: error: expected ',' or ';' before 'll' 23 | ll k = min(a[0],min(a[3],a[4])); | ^~ a.cc:24:12: error: 'k' was not declared in this scope 24 | ans+=3*k; | ^
s472225600
p03840
C++
#include <bits/stdc++.h> using namespace std; long long a, b, c, d, e, f, g; int main() { cin >> a >> b >> c >> d >> e >> f; long long res = b; for (int i = 0; i <= min({a, d, e, 4}); ++i) res = max(res, 3 * i + 2 * ((a - i) / 2 + (d - i) / 2 + (e - i) / 2) + b); cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:27: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 9 | for (int i = 0; i <= min({a, d, e, 4}); ++i) | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x...
s482726596
p03840
C++
#include <bits/stdc++.h> using namespace std; #define int long long //0oooo0 //000000 signed main() { int I,O,T,J,L,S,Z; cin >> I >> O >> T >> J >> L >> S >> Z; int ans = I/2*4+O*2+J/2*4+L/2*4)/2; int cnt = I%2+J%2+L%2; if(cnt == 3) { ans+=6; } if(cnt == 2) { ans+=2; } ...
a.cc: In function 'int main()': a.cc:9:36: error: expected ',' or ';' before ')' token 9 | int ans = I/2*4+O*2+J/2*4+L/2*4)/2; | ^
s921354211
p03840
C++
#include <bits/stdc++.h> using namespace std; int i, o, t, j, l, s, z; long long ans; int main() { cin >> i >> o >> t >> j >> l >> s >> z; ans = o; ans += i / 2 * 2; ans += j / 2 * 2; ans += l / 2 * 2; ans += max(((i & 1) + (j & 1) + (l & 1)) * 2 - 3, 0) cout << ans << endl; }
a.cc: In function 'int main()': a.cc:13:61: error: expected ';' before 'cout' 13 | ans += max(((i & 1) + (j & 1) + (l & 1)) * 2 - 3, 0) | ^ | ; 14 | cout << ans << en...
s352104079
p03840
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <queue> #include <stack> #include <set> #include <map> #include <iomanip> #include <utility> #include <tuple> #include <functional> #include <bitset> #include <cassert> #include <complex> #include <time.h> #define ll ...
a.cc: In function 'int main()': a.cc:55:13: error: 'B' was not declared in this scope 55 | ans+=A[3]-B[3]%2; | ^
s174222916
p03840
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <fstream> #include <set> #include <cmath> #include <array> #include <iomanip> #include <cassert> using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); int64_t answer = 0; in...
a.cc: In lambda function: a.cc:45:72: error: inconsistent types 'long long int' and 'long int' deduced for lambda return type 45 | return 6 * mag + ((a_i - mag) / 2) * 4 + ((y_1 - mag) / 2) * 4 + ((y_2 - mag) / 2) * 4; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~...
s432383013
p03840
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=x;i<y;i++) #define print(A,x,n) rep(I,0,n){cout<<(I ? " ":"")<<A[I]x;}cout<<endl; #define pprint(A,y,m,n) rep(J,0,m){print(A[J],y,n);} const long mod=1e9+7; const int size=1e5; const int inf=1e9; int main(){ long A[7]; rep(i,0,7) cin>>A[i]; lo...
a.cc: In function 'int main()': a.cc:13:9: error: expected ',' or ';' before 'long' 13 | long b = (A[0]-1)/2*2 + A[1] + (A[3]-1)/2*2 + (A[4]-1)/2*2 + 4 | ^~~~ a.cc:15:22: error: 'b' was not declared in this scope 15 | cout<<max(a, b)<<endl; | ^
s303781603
p03840
C++
#include<bits/stdc++.h> using namespace std; long long ai, ao, at, aj, al, as, az; int main(int argc, char const *argv[]) { cin >> ai >> ao >> at >> aj >> al >> as >> az; long long ans = ao; if(!ai||!aj||!al){ long long ans += ai/2*2+aj/2*2+al/2*2; } else{ ans += ai + aj + al; ...
a.cc: In function 'int main(int, const char**)': a.cc:8:23: error: expected initializer before '+=' token 8 | long long ans += ai/2*2+aj/2*2+al/2*2; | ^~
s891871525
p03840
C++
#include <bits/stdc++.h> using namespace std; int main(){ int ans; int I,O,T,J,L,S,Z; cin >> I >> O >> T >> J >> L >> S >> Z; if(!((T!=0)||(S!=0)||(Z!=0)||(I%2==1)||(J%2==1)||(L%2==1))) ans += O + I + J + L; } cout << ans << endl; }
a.cc:10:3: error: 'cout' does not name a type 10 | cout << ans << endl; | ^~~~ a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
s506616559
p03840
C++
#include <bits/stdc++.h> using namespace std; int main(){ int I,O,T,J,L,S,Z; cin >> I >> O >> T >> J >> L >> S >> Z; if((T!=0)||(S!=0)||(Z!=0)||(I%2==1)||(J%2==1)||(L%2==1)) const int ans = 0; else{ int ans = 0; ans += O + I + J + L; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | cout << ans << endl; | ^~~ | abs
s509530898
p03840
C++
#include <bits/stdc++.h> using namespace std; int main(){ int I,O,T,J,L,S,Z; cin >> I >> O >> T >> J >> L >> S >> Z; if((T!=0)||(S!=0)||(Z!=0)||(I%2==1)||(J%2==1)||(L%2==1)) const int ans = 0; else{ int ans = 0; ans += O + I + J + L; } cout << and << endl; }
a.cc: In function 'int main()': a.cc:12:15: error: expected identifier before '<<' token 12 | cout << and << endl; | ^~
s800595265
p03840
C
#include <bits/stdc++.h> using namespace std; int main(){ int I,O,T,J,L,S,Z; cin >> I >> O >> T >> J >> L >> S >> Z; if((T!=0)||(S!=0)||(Z!=0)||(I%2==1)||(J%2==1)||(L%2==1)) const int ans = 0; else{ int ans = 0; ans += O + I + J + L; } cout << and << endl; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s135061298
p03840
C++
#include<iostream> #include<vector> using namespace std; typedef long long li; #define rep(i,n) for(int i=0;i<(n);i++) #define df 0 template<class T> void print(const T& t){ cout << t << "\n"; } template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts....
a.cc:33:24: error: redefinition of 'template<class T> void print(const T&)' 33 | template<class T> void print(const T& t){ cout << t << "\n"; } | ^~~~~ a.cc:7:24: note: 'template<class T> void print(const T&)' previously declared here 7 | template<class T> void print(const T& t){ cou...
s578292929
p03840
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n); i++) #define ALL(v) (v).begin(),(v).end() using ll = long long; using P = pair<int, int>; const int INF = 1e9; const long long LINF = 1e18; const long long MOD = 1e9 + 7; signed main(){ ll i, o, t, j, l, s, z; cin >> i >> o ...
In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Com...
s553168308
p03840
C++
//Zory-2020 #include<bits/stdc++.h> using namespace std; typedef long long ll; // typedef __int128 ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define FR first #define SE second #define MP make_pair #define PB push_back #define vc vector #define db double #define all(x) (x).begin(),(x).end() #define sz(x) (...
a.cc: In function 'void mine::main()': a.cc:70:91: error: 'j' was not declared in this scope 70 | write((I/2)*2+O+(J/2)*2+(L/2)*2+(I&1 and J&1 and L&1)+(I%2==0 and I>0 and j&1 and L&1)+(I&1 and J%2==0 and J>0 and L&1)+(I&1 and J&1 and L%2==0 and L>0)); | ...
s623168457
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(i,a,n) for(ll i=(ll)a;i<(ll)n;i++) #define RFOR(i,a,n) for(ll i=(ll)n-1;i >= (ll)a;i--) #define rep(i,n) FOR(i,0,n) #define rrep(i,n) RFOR(i,0,n) #define ALL(v) v.begin(), v.end() #define bra(first,second) '(' << first << ',' << second << ...
a.cc: In function 'int main()': a.cc:47:2: error: expected '}' at end of input 47 | } | ^ a.cc:25:11: note: to match this '{' 25 | int main(){ | ^
s002171528
p03840
C++
/** * author: otera **/ #include<iostream> #include<string> #include<cstdio> #include<cstring> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<deque> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bi...
a.cc: In function 'void solve()': a.cc:61:28: error: 'aj' was not declared in this scope; did you mean 'a'? 61 | cout << a[1] + 2 * aj << endl; | ^~ | a a.cc:64:8: error: 'aj' was not declared in this scope; did you mean 'a'? 64 | if(aj...
s123193913
p03840
C++
#include<bits/stdc++.h> using namespace std; int f(int x) { if (x % 2) return x - 1; return x; } int main() { int I, O, J, L; { int x; cin >> I >> O >> x >> J >> L; } long r = 0; if (I && J && L) { r = 3ll + f(I-1) + f(J-1) + f(L-1); } r = max(r, f(I) + f(J) + f(L)); cout << r + O << endl;...
a.cc: In function 'int main()': a.cc:18:10: error: no matching function for call to 'max(long int&, int)' 18 | r = max(r, f(I) + f(J) + f(L)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51...
s429979843
p03840
C++
#define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" #define rep(i, n) for(int i=0; i<(n); ++i) #define FOR(i, m, n) for(int i=(m); i<(n); ++i) #define rrep(i, n) for(int i=(n)-1; i>=0; --i) #define rfor(i, m, n) for(int i=(m); i>=(n); --i) #define sz(x) ((int)(x).size()) #define all(x) (x).begin(),(x).end() #defin...
a.cc: In function 'int main()': a.cc:167:69: error: 'K' was not declared in this scope 167 | if (I && J && L)ans.pb((I - 1) / 2 * 2 + (J - 1) / 2 * 2 + (K - 1) / 2 * 2 + 3); | ^
s295879646
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef set<int> si; typedef pair<int,int> pii; #define rep(i,a,b) for(int i=(a); i<(b); ++i) #define per(i,a,b) for(int i=(b)-1; i>=(a); --i) #define all(x) (x).begin(),(x).end() #define sz(x) (int)(x).si...
a.cc: In function 'int main()': a.cc:30:24: error: no matching function for call to 'min(int, ll&)' 30 | x = min(1, x); | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s921158126
p03840
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pint = pair<int, int>; using pll = pair<ll, ll>; using edge = pair<int, ll>; using graph = vector<vector<int>>; using WeightedGraph = vector<vector<edge>>; const ll INF = 1LL << 60; const int INF32 = 1 << 29; const ll MOD...
a.cc: In function 'int main()': a.cc:19:17: error: no matching function for call to 'min(int, const long long int&)' 19 | ll tmp = min(1, min(i, min(j, l))); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/...
s812350992
p03840
C++
#include <bits/stdc++.h> using namespace std; #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; typedef long double lb; typedef pair<int,int> P; const int MOD = 1000000007; const ll INF = 1e10; const double EPS = 1e-10; const double PI = 3.141592653589793; template<class T...
a.cc: In function 'int main()': a.cc:39:16: error: lvalue required as decrement operand 39 | ans += 3;a--;b--; | ^ a.cc:39:20: error: 'b' was not declared in this scope; did you mean 'lb'? 39 | ans += 3;a--;b--; | ^ | lb
s732939465
p03840
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll aI, aO, aT, aJ, aL, aS, aZ; cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ; if(aI%2 == aJ%2 && aJ%2 == aL%2){ cout << aI + aJ + aL + aO << endl; } else{ if((aI + aJ + aL) % 2 == 0 && min(min(aI, aJ), aL) == 0){ cout << aI + aJ + ...
a.cc: In function 'int main()': a.cc:12:35: error: no matching function for call to 'max(int, ll)' 12 | }else{ cout << max(0, aI + aJ + aL + aO - 1) << endl; } | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s198824101
p03840
C++
#include<bits/stdc++.h> using namespace std; int main(){ ll aI, aO, aT, aJ, aL, aS, aZ; cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ; if(aI%2 == aJ%2 && aJ%2 == aL%2){ cout << aI + aJ + aL + aO << endl; } else{ if((aI + aJ + aL) % 2 == 0 && min(min(aI, aJ), aL) == 0){ cout << aI + aJ + aL + aO - 2 << endl; ...
a.cc: In function 'int main()': a.cc:5:9: error: 'll' was not declared in this scope 5 | ll aI, aO, aT, aJ, aL, aS, aZ; | ^~ a.cc:6:16: error: 'aI' was not declared in this scope 6 | cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ; | ^~ a.cc:6:22: error: 'aO' was...
s037258832
p03840
C++
#include<bits/stdc++.h> using namespace std; int main(){ int aI, aO, aT, aJ, aL, aS, aZ; cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ; if(aI%2 == aJ%2 && aJ%2 == aL%2) cout << aI + aJ + aL + aO << endl; else{ if((aI + aJ + aL) % 2 == 0 && min(min(aI, aJ), aL) == 0) cout << aI + aJ + aL + aO - 2 << endl; }e...
a.cc: In function 'int main()': a.cc:11:18: error: 'else' without a previous 'if' 11 | }else cout << max(0, aI + aJ + aL + aO - 1) << endl; | ^~~~ a.cc: At global scope: a.cc:13:9: error: expected unqualified-id before 'return' 13 | return 0; | ^~~~~~ a...