submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s096308096
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; int main(){ ll a[7]; for(int i=0; i<7; i++) cin >> a[i]; ll ans=a[1]; ll p=2*(a[0]/2+a[3]/2+a[4]/2); ll q=3+2*((a[0]-1)/2+(a[3]-1)/2+(a[4]-1)/2); if(a[0]>0 && a[3]>0 && a[4]>0) ans+=max({p, q}); else ans+=p; c...
a.cc:18:2: error: stray '#' in program 18 | }#include <bits/stdc++.h> | ^ a.cc:18:3: error: 'include' does not name a type 18 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:25:5: error: redefinition of 'int main()' 25 | int main(){ | ^~~~ a.cc:8:5: note: 'int main()' previously defined her...
s516548464
p03840
C++
#include <assert.h> #include <limits.h> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include...
a.cc: In function 'int main()': a.cc:79:53: error: expected ';' before 'return' 79 | chmax(ans,o+((i-1)/2)*2+((j-1)/2)*2+((l-1)/2)*2+2) | ^ | ; 80 | 81 | return 0; | ~~~~~~ ...
s567456423
p03840
C++
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <vector> #include <queue> #define inf 0x3f3f3f3f #define cases(t) for (int cas = 1; cas <= int(t); ++cas) typedef long long ll; typedef double db; us...
a.cc: In function 'int main()': a.cc:33:13: error: no matching function for call to 'max(ll, int)' 33 | mn = max(mn - 1, 0); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'templ...
s153899155
p03840
C++
#include <iostream> using namespace std; int main () { long long a, b, c, d, e, f, g; while (cin >> a >> b >> c >> d >> e >> f >> g) { long long res = 0 ; long long m = min (a, min (d, e)); for ( long long i = max (m- 2 , 0LL ); i <= m; ++ i) { long long tmp = i...
a.cc: In function 'int main()': a.cc:12:19: error: expected primary-expression before '=' token 12 | tmp + = na / 2 * 2 ; | ^ a.cc:13:19: error: expected primary-expression before '=' token 13 | tmp + = nd / 2 * 2 ; | ^ a.cc:14:19: error: exp...
s591794929
p03840
C++
#include <iostream> using namespace std; int main () { long long a, b, c, d, e, f, g; while (cin >> a >> b >> c >> d >> e >> f >> g) { long long res = 0 ; long long m = min (a, min (d, e)); for ( long long i = max (m- 2 , 0LL ); i <= m; ++ i) ( long long tmp = i...
a.cc: In function 'int main()': a.cc:10:14: error: expected primary-expression before 'long' 10 | long long tmp = i * 3 ; | ^~~~ a.cc:9:65: error: expected ')' before 'long' 9 | for ( long long i = max (m- 2 , 0LL ); i <= m; ++ i) ( | ...
s896958916
p03840
C++
#include<bits/stdc++.h> #include <math.h> #include <algorithm> #include <functional> #include<iostream> #include <string> using namespace std; typedef long long ll; int main() { int a,b,c,d,e,f,g,ans; cin >> a>> b>> c>> d>> e>> f >> g; int s=min({a,d,e}); a-=s; d-=s; e-=s; int k = a%2+d%2...
a.cc: In function 'int main()': a.cc:20:8: error: conflicting declaration 'll ans' 20 | ll ans=3*s+(a/2)*2+b+(d/2)*2+(e/2)*2+max(k-1,0); | ^~~ a.cc:11:23: note: previous declaration as 'int ans' 11 | int a,b,c,d,e,f,g,ans; | ^~~
s297061726
p03840
C++
#include<bits/stdc++.h> #include <math.h> #include <algorithm> #include <functional> #include<iostream> #include <string> using namespace std; typedef long long ll; int main() { int a,b,c,d,e,f,g,ans; cin >> a>> b>> c>> d>> e>> f >> g; int s=min({a,d,e}); a-=s; d-=s; e-=s; int k = a%2+d%2...
a.cc: In function 'int main()': a.cc:20:8: error: conflicting declaration 'll ans' 20 | ll ans=3*s+(a/2)*2+b+(d/2)*2+(e/2)*2+max(k-1,0) | ^~~ a.cc:11:23: note: previous declaration as 'int ans' 11 | int a,b,c,d,e,f,g,ans; | ^~~
s014396419
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);++i) const int mod=1000000007; const int mod1=998244353; int main(){ cin.tie(0); ios::sync_with_stdio(false); ll ai,ao,at,aj,al,as,az;cin >> ai ...
a.cc: In function 'int main()': a.cc:20:25: error: 'ans' was not declared in this scope; did you mean 'as'? 20 | ans+=4; | ^~~ | as a.cc:26:25: error: 'ans' was not declared in this scope; did you mean 'as'? 26 | ...
s185489635
p03840
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int i = Integer.parseInt(s...
Main.java:28: error: bad operand types for binary operator '&&' if(i=0 && l%2==1 && i%2==1){ ^ first type: int second type: boolean Main.java:28: error: incompatible types: int cannot be converted to boolean if(i=0 && l%2==1 && i%2==1){ ^ 2 errors
s358855387
p03840
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int i = Integer.parseI...
Main.java:22: error: bad operand types for binary operator '&&' if((j==0 && l%2==1 && i%2==1)||(l==0 && j%2==1 && i%2==1)||(i=0 && l%2==1 && i%2==1)){ ^ first type: int second type: boolean Main.java:22: error: bad operand types fo...
s553441222
p03840
C++
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <vector> static const int IINF = 1 << 30; static const long long LINF = 1LL << 60; static const long long MOD = 1.0e+9 + 7; template <typename T> std::vector<T> vectors(std::size_t n, T val) { return std::vector<T>(n, val); } templ...
a.cc: In function 'int main()': a.cc:75:13: error: redeclaration of 'long long int tmp' 75 | long long tmp = std::min({aI, aJ, aL}) - 1; | ^~~ a.cc:54:13: note: 'long long int tmp' previously declared here 54 | long long tmp = std::min({aI, aJ, aL}); | ^~~
s347846929
p03840
C++
#include <iostream> using namespace std; int main() { long long a, b, c, d, e, f, g; while (cin >> a >> b >> c >> d >> e >> f >> g) { long long res = 0; long long m = min(a, min(d, e)); for (long long i = max(m-2, 0); i <= m; ++i) { long long tmp = i * 3; long lo...
a.cc: In function 'int main()': a.cc:9:31: error: no matching function for call to 'max(long long int, int)' 9 | for (long long i = max(m-2, 0); i <= m; ++i) { | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/l...
s955099154
p03840
C++
#include<bits/stdc++.h> using namespace std; #define evn(a) (a<0?-1:(a)/2*2) int main(){ long I,O,J,L; cin>>I>>O>>J>>J>>L; cout<<max(O+max(evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3),0); return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: no matching function for call to 'max(long int, int)' 7 | cout<<max(O+max(evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3),0); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60,...
s913735900
p03840
C++
#include<bits/stdc++.h> using namespace std; #define evn(a) (a<0?-1:(a)/2*2) int main(){ long I,O,J,L; cin>>I>>O>>J>>J>>L; cout=max({evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3,0}); return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 7 | cout=max({evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3,0}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algor...
s070340770
p03840
C++
#include<bits/stdc++.h> using namespace std; #define evn(a) (a-a%2) int main(){ long res=0; vector<long> a(7); for(int i=0;i<7;++i)cin>>a[i]; cout<<max( evn(a[0])+evn(a[3])+evn(a[4]), evn(a[0]-1)+evn(a[3]-1)+evn(a[4]-1)+3, )+a[1]; return 0; }
a.cc: In function 'int main()': a.cc:11:3: error: expected primary-expression before ')' token 11 | )+a[1]; | ^
s143795514
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( J % 2 = 1 && L % 2 = 1){ cout << ( I + O + J + L ) * 2 - 2 << endl; } else { cout << I / 2 * 4 + O * 2 + J / 2 * 4 + L / 2 * 4 << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: lvalue required as left operand of assignment 7 | if( J % 2 = 1 && L % 2 = 1){ | ~~^~~~~~~~
s421805006
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( J % 2 = 1 && L % 2 = 1){ cout << ( I + O + J + L ) * 2 - 2 << endl; } else { cout << I / 2 * 4 + O * 2 + J / 2 * 4 + L / 2 * 4 << endl; }
a.cc: In function 'int main()': a.cc:7:17: error: lvalue required as left operand of assignment 7 | if( J % 2 = 1 && L % 2 = 1){ | ~~^~~~~~~~ a.cc:14:2: error: expected '}' at end of input 14 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s623821763
p03840
C++
v#include<bits/stdc++.h> using namespace std; #define int long long const int MOD = 1000000007LL; const int INF = LLONG_MAX; signed main(){ int a, b, c, d, e, f, g; cin >> a >> b >> c >> d >> e >> f >> g; int ans = 0; if(d >= 1 && e >= 1){ ans += a; ans += b; ans += 2 * min(d, ...
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:5:17: error: 'LLONG_MAX' was not declared in this scope 5 | const int INF = LLONG_MAX; | ^~~~~~~~~ a.cc:1:1: note: 'LLONG_...
s095188362
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; ll ans=(ai/2)*2+ao+(aj/2)*2+(al/2)*2<<endl; if(ai%2==1&&aj%2==1&&al%2==1)ans+=3; cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:6:39: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<' 6 | ll ans=(ai/2)*2+ao+(aj/2)*2+(al/2)*2<<endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
s648407668
p03840
C++
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1000000007 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long #define vi vector<ll> #define vvi vector<vi> #define substr(s,f,t) (s.substr(f-1,t-f+1)) #define ALL(a) (a).begin(),(a).end() #define Yes(hog...
a.cc: In function 'int main()': a.cc:33:11: error: expected primary-expression before '<' token 33 | cout<<<o+i/2+j/2+l/2<<endl; | ^ a.cc:33:25: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<' 33 | cout<<<o+i/2+j/2+l/2<<en...
s005988158
p03840
C++
/** SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj...
a.cc:36:13: error: '::main' must return 'int' 36 | #define int __int64_t | ^~~~~~~~~ a.cc:71:1: note: in expansion of macro 'int' 71 | int main() { | ^~~
s376050009
p03840
C++
#include <bits/stdc++.h> using namespace std; using ull = unsigned long long; using ll = long long; #define endl "\n" #define REP(i, n) for (ll i = 0; i < n; i++) #define REPR(i, n) for (ll i = n; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < n; i++) #define pb push_back #define fill(x, y) memset(x, y, sizeof(...
a.cc: In function 'int main()': a.cc:280:16: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 280 | ll k3 = min({a[0], a[3], a[4], 1}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-l...
s414884648
p03840
C++
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int i o,t,j,l,s,z,q; cin>>i>>o>>t>>j>>l>>s>>z; if (i>0&&j>0&&l>0)q=2*((i-1)/2+(j-1)/2+(l-1)/2)+o+3; else q=0; cout<<max(2*(i/2+j/2+l/2)+o,q); }
a.cc: In function 'int main()': a.cc:5:11: error: expected initializer before 'o' 5 | int i o,t,j,l,s,z,q; | ^ a.cc:6:10: error: 'i' was not declared in this scope 6 | cin>>i>>o>>t>>j>>l>>s>>z; | ^ a.cc:6:13: error: 'o' was not declared in this scope 6 | cin>>i>>o>...
s608233210
p03840
C++
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬██╬╬╬╬╬╬███ // ...
a.cc: In function 'int main()': a.cc:51:36: error: continue statement not within a loop 51 | if(a == 0 || c == 0 || d == 0) continue; | ^~~~~~~~
s327243917
p03840
C++
#include<cstdio> #include<algorithm> using namespace std; int main(){ long a[7],b; for(int i=0;i<7;i++) scanf("%ld",&a[i]); b=min(a[3] printf("%ld\n",a[0]/2*2+a[1]+min(a[3],a[4])/2*3); }
a.cc: In function 'int main()': a.cc:8:13: error: expected ')' before 'printf' 8 | b=min(a[3] | ~ ^ | ) 9 | printf("%ld\n",a[0]/2*2+a[1]+min(a[3],a[4])/2*3); | ~~~~~~
s434457702
p03840
C++
asd
a.cc:1:1: error: 'asd' does not name a type 1 | asd | ^~~
s086858387
p03840
C++
#include<iostream> using namespace std; int main(){ long long a[7]; for(int i=0;i<7;i++){ cin >> a[i]; } long long ans = a[0]/2 + a[1] + a[3]/2 + a[4]/2; if(a[0]%2 && a[3]%2 && a[4]%2)ans++; ans++; cout << ans << }
a.cc: In function 'int main()': a.cc:12:1: error: expected primary-expression before '}' token 12 | } | ^
s872532192
p03840
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; long long int i,o,t,j,l,s,z; int main(){ scanf("%lld%lld%lld%lld%lld%lld%lld",&i,&o,&t,&j,&l,&s,&z); printf("%lld",max(3+((i-1)/2)*2+max(0,min(j-1,l-1)*2)+o,(i/2)*2+2*min(j,l)+o)); return 0; }
a.cc: In function 'int main()': a.cc:8:44: error: no matching function for call to 'max(int, long long int)' 8 | printf("%lld",max(3+((i-1)/2)*2+max(0,min(j-1,l-1)*2)+o,(i/2)*2+2*min(j,l)+o)); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/str...
s905074756
p03840
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; long long int i,o,t,j,l,s,z; int main(){ scanf("%lld%lld%lld%lld%lld%lld%lld",&i,&o,&t,&j,&l,&s,&z); printf("%lld",max(3+((i-1)/2)*2+max(0,min(j-1,l-1)*2)+o,(i/2)*2+2*min(j,l)+o)); return 0; }
a.cc: In function 'int main()': a.cc:8:44: error: no matching function for call to 'max(int, long long int)' 8 | printf("%lld",max(3+((i-1)/2)*2+max(0,min(j-1,l-1)*2)+o,(i/2)*2+2*min(j,l)+o)); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/str...
s402893722
p03840
C++
#include <bits/stdc++.h> #define FOR(i, begin, end) for(int i=(begin);i<(end);i++) #define REP(i, n) FOR(i,0,n) #define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--) #define IREP(i, n) IFOR(i,0,n) #define SORT(a) sort(a.begin(), a.end()) #define REVERSE(a) reverse(a.begin(), a.end()) #define Lower_bound(v, x) d...
a.cc: In function 'int main()': a.cc:29:9: error: 'ans2' was not declared in this scope; did you mean 'ans'? 29 | ans2 = 3; | ^~~~ | ans
s204597861
p03840
C++
#include<algorithm> #include<iostream> #include<vector> #include<string> #include<cstring> #include<utility> #include<queue> using namespace std; #define REP(i, a,b) for(i=a;i<b;i++) #define REP1(i,b,a) for(i=b-1;i>=a;i--) #define output(x) cout<<x<<endl; #define pb(x) push_back(x); typedef long long int ll; const in...
a.cc: In function 'int main()': a.cc:67:25: error: redeclaration of 'll k' 67 | ll k = fmax(ans, ans1); | ^ a.cc:54:19: note: 'll k' previously declared here 54 | ll i, j, k, l, m,n, sum, flag, N, M, K, H, W, B,C,D; | ^ a.cc:67:2...
s815294969
p03840
C++
#include<cstdio> int I,O,T,J,L,S,Z,now; long long ans; int main() { scanf("%d%d%d%d%d%d%d",&I,&O,&T,&J,&L,&S,&Z); now=(I&1)+(J&1)+(L&1); if(now>2&&I&&J&&L) { --I,--J,--L; ans+=3; }return printf("%lld\n",(ll)ans+O+I/2*2+J/2*2+L/2*2); return 0; }
a.cc: In function 'int main()': a.cc:12:34: error: 'll' was not declared in this scope 12 | }return printf("%lld\n",(ll)ans+O+I/2*2+J/2*2+L/2*2); | ^~
s635634737
p03840
C++
#include <iostream> #include <limits.h> using namespace std; int main(void){ int ai, ao, at, aj, al, as, az; long long ans = 0; cin >> ai >> ao >> at >> aj >> al >> as >> az; //O型のみ ans += ao; while (ai > 0 && aj > 0 && al > 0) { ans += (min(ai, aj, al) * 3); ai -= min...
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...
s263985627
p03840
C++
#include <iostream> using namespace std; int main() { int i, o, t, j, l; cin >> i >> o >> t >> j >> l; ll ans = 0; ans += (i / 2) * 2; i %= 2; ans += o; ans += (j / 2) * 2; j %= 2; ans += (l / 2) * 2; l %= 2; if (i == j && j == l && l == 1) ans++; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'll' was not declared in this scope; did you mean 'l'? 7 | ll ans = 0; | ^~ | l a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans += (i / 2) * 2; i %= 2; | ^~~ | abs
s596944308
p03840
C++
main(I,O,J,L){ scanf("%d%d%*d%d%d",&I,&O,&J,&L); J=J<L?J:L; printf("%d",O+(J?I+J:I/2*2)); return 0; }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(I,O,J,L){ | ^
s927380836
p03840
C++
#include <iostream> int main(){ long long I,O,T,J,L,S,Z; long long ans; cin >> I >> O >> T >> J >> L >> S >> Z ; if(I==0){ ans = O + J/2 + L/2; } else if(I%2==1 && J%2==1 && L%2==1){ ans = O + I/2*2 + J/2*2 + L/2*2 + 3; } else{ ans = O + I/2*2 + J/2*2 + L/2*2 : } cout << ans << endl; }
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 >> I >> O >> T >> J >> L >> S >> Z ; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | ...
s138016426
p03840
C++
#include<bits/stdc++.h> using namespace std; #define LL long long int main() { LL I,O,T,J,L,S,Z; LL flag=0; LL K,K1,K2; while(~scanf("%lld%lld%lld%lld%lld%lld%lld",&I,&O,&T,&J,&L,&S,&Z)) { K=0; K1=0; K2=0; flag=0; LL MIN = min(I,min(L,J)); K+=((I/2)*4...
a.cc: In function 'int main()': a.cc:19:21: error: expected ';' before 'printf' 19 | K+=(O*2) | ^ | ; 20 | printf("%lld\n",K); | ~~~~~~
s181526547
p03840
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,x,m,b,c,d,e; cin >> a >> x >> m >> b >> c >> d >> e; long long sum= x*4; if(a%2==0&&b%2==0&&c%2==0){ sum+=(a+b+c)*4; } else if(a%2==0&&b%2==0&&c%2==1){ sum+=(a+b+c-1)*4; } else if(a%2==0&&b%2==1&&c%2==0){ sum+=(a+b+c-1)*4; } else if(a%2==0&&b%2==1&&c%2==1)...
a.cc:1:26: warning: extra tokens at end of #include directive 1 | #include <bits/stdc++.h> using namespace std; int main(){ int a,x,m,b,c,d,e; cin >> a >> x >> m >> b >> c >> d >> e; long long sum= x*4; if(a%2==0&&b%2==0&&c%2==0){ sum+=(a+b+c)*4; } else if(a%2==0&&b%2==0&&c%2==1){ sum+=(a+b+c-1)*4; } else if(a%2==0...
s964348264
p03840
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int i,o,t,j,l,s,z; scanf("%d %d %d %d %d %d %d",&i,&o,&t,&j,&l,&s,&z); int ans=0; ans+=(i/2)*4; ans+=2*o; int ll = l; int jj = j; if(i%2!=0&&jj!=0&&ll!=0) { ans+=6; jj--; li--; }...
a.cc: In function 'int main()': a.cc:19:9: error: 'li' was not declared in this scope; did you mean 'll'? 19 | li--; | ^~ | ll
s143820700
p03840
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int I,O,T,J,L,S,Z; long long int ans = -1; while(scanf("%lld%lld%lld%lld%lld%lld%lld",&I,&O,&T,&J,&L,&S,&Z) != EOF){ if(I > 0 && J > 0 && L > 0){ ans = O; int t1 = (I / 2) * 2 + (J / 2) * 2 + (L / 2) * 2; ...
a.cc: In function 'int main()': a.cc:12:13: error: expected ',' or ';' before 'int' 12 | int t = max(t1,t2); | ^~~ a.cc:13:20: error: 't' was not declared in this scope 13 | ans += t; | ^
s763588237
p03840
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int I,O,T,J,L,S,Z; long long int ans = -1; while(scanf("%lld%lld%lld%lld%lld%lld%lld",&I,&O,&T,&J,&L,&S,&Z) != EOF){ if(I > 0 && J > 0 && L > 0){ ans = O; int t1 = (I / 2) * 2 + (J / 2) * 2 + (L / 2) * 2; ...
a.cc: In function 'int main()': a.cc:12:13: error: expected ',' or ';' before 'int' 12 | int t = max(t1,t2); | ^~~ a.cc:13:20: error: 't' was not declared in this scope 13 | ans += t; | ^
s270885281
p03840
C++
#include <bits/stdc++.h> #define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++) #define rrep(i,a,b) for(long long int i=(a);i<(b);i++) #define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--) #define all(v) (v).begin(), (v).end() #define pb(q) push_back(q) #define Abs(a,b) max(a,b)-min(a,b) #define YES(condition...
a.cc: In function 'int main()': a.cc:136:1: error: expected ';' before 'return' 136 | return 0; | ^~~~~~
s248642798
p03840
C++
// IO library #include <cstdio> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> // container library #include <deque> #include <list> #include <map> #include <set> #include <string> #include <vector> // namespace using namespace std;...
a.cc: In function 'int main()': a.cc:77:26: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, bool)' 77 | if (a[0] % 2 > 0 && min(a[3], a[4] > 0)) { | ~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/...
s995754438
p03840
C++
#include<iostream> #include<algorithm> using namespace std; int main() { long long i, o, t, j, l, s, z; cin >> i >> o >> t >> j >> l >> s >> z; long long p = min(i, j, l); long long ans = o + p; ans += (i - p) / 2; ans += (j - p) / 2; ans += (l - p) / 2; cout << ans << endl; return 0; }
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...
s354777093
p03840
C++
const int MAX=1e5; int main(){ lli a[7]; rep(i,7)cin>>a[i]; lli ans=0; lli i=a[0]%2,j=a[3]%2,l=a[4]%2; if(i==0&&j==0&&l==0)ans=a[0]+a[1]+a[3]+a[4]; if(i==1&&j==0&&l==0)ans=a[0]+a[1]+a[3]+a[4]-1; if(i==0&&j==0&&l==1)ans=a[0]+a[1]+a[3]+a[4]-1; if(i==1&&j==0&&l==1)ans=a[0]+a[1]+a[3]+a[4]-2; if(i==0&&j==1&&l==0)a...
a.cc: In function 'int main()': a.cc:4:9: error: 'lli' was not declared in this scope 4 | lli a[7]; | ^~~ a.cc:5:13: error: 'i' was not declared in this scope 5 | rep(i,7)cin>>a[i]; | ^ a.cc:5:9: error: 'rep' was not declared in this scope 5 | rep(i,7)...
s282993808
p03840
C++
I,O,T,J,L,S,Z=[int(i) for i in input().split()] ans=O ans+=int(J/2)*2 J%=2 ans+=int(L/2)*2 L%=2 if J==1 and L==1 and I>=1: I-=1 J-=1 L-=1 ans+=3 ans+=int(I/2)*2 I%=2 print(ans)
a.cc:1:1: error: 'I' does not name a type 1 | I,O,T,J,L,S,Z=[int(i) for i in input().split()] | ^
s314980962
p03840
C++
#include <stdio.h> #include <bits/stdc++.h> #define pb push_back #define pf push_front #define pp pop_back #define sz(a) (int)(a.size()) #define mp make_pair #define F first #define S second #define next _next #define prev _prev #define left _left #define right _right #define y1 _y1 #define all(x) x.begin(), x.end(...
a.cc: In function 'int main()': a.cc:46:34: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 46 | for(int it = 0; it <= min({(int)1e8, a[1], a[4], a[5]}); it ++) { | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14...
s225958046
p03840
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int i,o,t,j,l,s,z; int main() { cin >>i>>o>>t>>j>>l>>s>>z; int result = 0; result += o; int v1 = 0; int v2 = 0; int cou; cou = i / 2; v1 += cou * 2; cou = l / 2; v1 += cou * 2; cou = j / 2; v1 += cou * 2; if(i > 0 &...
a.cc: In function 'int main()': a.cc:31:13: error: 'k' was not declared in this scope 31 | i--;j--;k--; | ^
s761330924
p03840
C++
#include <bits/stdc++.h> #define LL long long using namespace std; LL I, O, J, L; inline LL Min(LL x, LL y, LL z) { return min(x, min(y, z)); } int main() { #ifdef hk_cnyali freopen("C.in", "r", stdin); freopen("C.out", "w", stdout); #endif LL x; scanf("%lld%lld%lld%lld%lld", &I, &O, &x, &J, &L); LL Ans = O; Ans...
a.cc: In function 'int main()': a.cc:18:18: error: no matching function for call to 'max(long long int&, int)' 18 | Ans = max(Ans, Ans + I / 2 * 2 + J / 2 * 2 + L / 2 * 2 + (I % 2 && J % 2 && L % 2) ? 1 : 0); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s318591625
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll ai, ao, at, aj, al, as, az, ans; int main() { cin >> ai >> ao >> at >> aj >> al >> as >> az; if(ai & 1) { if(aj > 0 && al > 0) { aj--; al--; ans = max(ans, ai + ao + (aj / 2) * 2 + (al / 2) * ...
a.cc: In function 'int main()': a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:9:12: note: to match this '{' 9 | int main() { | ^
s610391869
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll ai, ao, at, aj, al, as, az, ans; int main() { cin >> ai >> ao >> at >> aj >> al >> as >> az; if(ai & 1) { if(aj > 0 && al > 0) { aj--; al--; ans = max(ans, ai + ao + (aj / 2) * 2 + (al / 2) * ...
a.cc: In function 'int main()': a.cc:21:14: error: no matching function for call to 'max(ll)' 21 | ans = max((ai / 2) * 2 + ao + (aj / 2) * 2 + (al / 2) * 2); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/...
s116866641
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll ai, ao, at, aj, al, as, az, ans; int main() { cin >> ai >> ao >> at >> aj >> al >> as >> az; if(ai & 1) { if(aj > 0 && al > 0) { aj--; al--; ans = max(ans, ai + ao + (aj / 2) * 2 + (al / 2) * ...
a.cc: In function 'int main()': a.cc:18:22: error: no matching function for call to 'max(ll)' 18 | ans = max(ai - 1 + ao + (aj / 2) * 2 + (al / 2) * 2); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /...
s568533504
p03840
C++
#include <iostream> #include <algorithm> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) #define FI first #define SE second #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #de...
a.cc: In function 'int main()': a.cc:35:10: error: lvalue required as left operand of assignment 35 | K+=A[4]/4*=6; | ~~~~^~
s810421904
p03840
C++
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif //#define int long long #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(c) begin(c),end(c) const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f...
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 = int; _Compare = int...
s778595646
p03840
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class L { public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String[] data = bf.readLine().split(" "); long rta = 0; long l,ai,...
Main.java:5: error: class L is public, should be declared in a file named L.java public class L { ^ 1 error
s984078427
p03840
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class L { public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String[] data = bf.readLine().split(" "); long rta = 0; rta +=Long...
Main.java:5: error: class L is public, should be declared in a file named L.java public class L { ^ 1 error
s889583820
p03840
C++
#include <bits/stdc++.h> using namespace std; #define forn(i, s, f) for(int i = (s); i <= (f); ++i) #define for1(i, f, s) for(int i = (f); i >= (s); --i) #define fora(i, x) for (auto i : x) #define show(x) cout << #x << " = " << x << " "; #define skip continue; #define pb push_back #define _1 first #define _2 second...
a.cc: In function 'int main()': a.cc:31:22: error: 'b' was not declared in this scope 31 | cin >> a[i], b[i] = a[i]; | ^ a.cc:35:11: error: 'b' was not declared in this scope 35 | res = b[1] - (b[1] % 2 == 1); | ^
s161627745
p03840
C++
#include <iostream> using namespace std; typedef long long lli; lli i,o,t,j,l,s,z; lli ans = 0; int main(){ cin >> i >> o >> t >> j >> l >> s >> z; ans = o; lli t = max({i,j,l}); lli s = (i - t) / 2 * 2 + (j - t) / 2 * 2 + (l - t) / 2 * 2 + t * 3; lli u = i / 2 * 2 + j / 2 * 2 + l / 2 * 2 + (i%2 && ...
a.cc: In function 'int main()': a.cc:9:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 9 | lli t = max({i,j,l}); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s230052189
p03840
C
#include<stdio.h> int* make_sequence(int*); int calculate(int*); int main(){ int sequence[7]; int K=(calculate(make_sequence(sequence)); printf("%d\n",K); } int* make_sequence(int *temp){ static int nsequence[4]; for(int i=0; i<7; i++) { scanf("%d",&temp[i]); if((i==0) || (i==1) || (i==3) || (i==4)...
main.c: In function 'main': main.c:8:44: error: expected ')' before ';' token 8 | int K=(calculate(make_sequence(sequence)); | ~ ^ | ) main.c:10:1: error: expected ',' or ';' before '}' token 10 | } | ^ main.c...
s907469086
p03840
Java
public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int xi = sc.nextInt(); int xo = sc.nextInt(); int xt = sc.nextInt(); int xj = sc.nextInt(); int xl = sc.nextInt(); int ans = 0; if( xj%2 == 1 && xl%2 == 1 && xi >= 1 ){ ans += 3; xj--; xl--; xi--; }...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s851699737
p03840
C++
#include <iostream> #include <vector> #include <cstdio> #include <algorithm> #define rep(i,n) for(int i = 0; i < n; i++) using namespace std; vector<string> split(const string &str, char sep){ std::vector<std::string> v; auto first = str.begin(); while(first != str.end()){ auto last = first; ...
a.cc:30:2: error: unterminated argument list invoking macro "rep" 30 | } | ^ a.cc: In function 'int main()': a.cc:25:5: error: 'rep' was not declared in this scope 25 | rep(i,min((long long)10,x+1){ | ^~~ a.cc:25:8: error: expected '}' at end of input 25 | rep(i,min((long long)10,x+1){...
s254441547
p03840
C++
#include <iostream> #include <ccomplex> #include <vector> #include <cassert> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <numeric> #include <list> #include <assert.h> #include <math.h> #incl...
a.cc:45:13: error: conflicting declaration 'typedef int LL' 45 | typedef int LL; | ^~ a.cc:32:23: note: previous declaration as 'typedef long long int LL' 32 | typedef long long int LL; | ^~
s009447865
p03840
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <algorithm> #include <utility> #include <functional> #include <cstring> #include <queue> #include <stack> #include <math.h> #include <iterator> #include <vector> #include <string> #include <set> #include <math.h> #include <iostream> #include<map> #include <i...
In file included from /usr/include/c++/14/algorithm:60, from a.cc:3: /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; _Compare = long long int]': a.cc:31:12: required from here 31 | ans ...
s033913753
p03840
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdio> using namespace std; int main() { int i,o,t,j,l,s,z; cin >> i >> o >> t >> j >> l >> s >> z; int a = 4 * (i / 2) + 2 * o + 4 * min(j,l); int b = //0;4 * ((i-1) / 2) + 2 * o + 4 * min(j-1,l-1) + 6; cout << max(a,b) / 2; return 0; }...
a.cc: In function 'int main()': a.cc:18:14: error: cannot convert 'std::basic_ostream<char>' to 'int' in initialization 18 | cout << max(a,b) / 2; | ~~~~~^~~~~~~~~~~~~~~ | | | std::basic_ostream<char>
s053732358
p03840
C++
#include <cstdio> #include <iostream> #include <iomanip> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <list> #include <bitset> #include <utility...
a.cc: In function 'void Main()': a.cc:61:48: error: 'al' was not declared in this scope; did you mean 'az'? 61 | int ans = ao + ai - ai % 2 + aj - aj % 2 + al - al % 2 + (ai % 2 and aj % 2 and ai % 2) * 3; | ^~ | ...
s930141096
p03840
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(ut i=(a);i<(ut)(b);i++) #define REP(i,b) FOR(i,0,b) using namespace std; LL N,K; LL A[SIZE]; int main(){ REP(i,7){ cin >> A[i]; } LL ans=A[1]+A[0]/2*2+A[3]/2*2+A[4]/2*2; if((A[0] && A[3] && A[4] )){ ans=max(ans,A[1]+(A[0]-1)/2*2+(A[3]-1)/2*2+(A[4]-1)/2*2+3); } ...
a.cc:5:1: error: 'LL' does not name a type 5 | LL N,K; | ^~ a.cc:6:1: error: 'LL' does not name a type 6 | LL A[SIZE]; | ^~ a.cc: In function 'int main()': a.cc:2:24: error: 'ut' was not declared in this scope 2 | #define FOR(i,a,b) for(ut i=(a);i<(ut)(b);i++) | ^~ a...
s137118018
p03840
C++
#include <bits/stdc++.h> using namespace std; LL N,K; LL A[SIZE]; int main(){ REP(i,7){ cin >> A[i]; } LL ans=A[1]+A[0]/2*2+A[3]/2*2+A[4]/2*2; if((A[0] && A[3] && A[4] )){ ans=max(ans,A[1]+(A[0]-1)/2*2+(A[3]-1)/2*2+(A[4]-1)/2*2+3); } cout << ans << endl; return 0; }
a.cc:3:1: error: 'LL' does not name a type 3 | LL N,K; | ^~ a.cc:4:1: error: 'LL' does not name a type 4 | LL A[SIZE]; | ^~ a.cc: In function 'int main()': a.cc:6:13: error: 'i' was not declared in this scope 6 | REP(i,7){ | ^ a.cc:6:9: error: 'REP' was not declared in ...
s707370643
p03840
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF 999999999 #define MOD 1000000007 int main() { int i,o,t,j,l,s,z; ll res=0; cin >> i; cin >> o; cin >> t; cin >> j; cin >> l; cin >> s; cin >> z; g = i%2 + j%2 + l%2; res += (i/2) * 4; res += o*2; res += (j/2) * 4; res += (l...
a.cc: In function 'int main()': a.cc:21:9: error: 'g' was not declared in this scope 21 | g = i%2 + j%2 + l%2; | ^ a.cc:27:25: error: expected ';' before '}' token 27 | res += 6 | ^ | ; 28 | } | ...
s256704290
p03840
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <vector> using namespace std; int a[10]; int main() { int sum = 0; for(int i = 1; i <= 7; i ++) cin >> a[i]; long long ans = 0; ans += a[1] / 2 * 2; ans += a[2]; ans += a[4] / 2 * 2; ans += a[5] / 2 * 2; if(a[1]-- && ...
a.cc: In function 'int main()': a.cc:21:49: error: no matching function for call to 'max(long long int&, int)' 21 | if(a[1]-- && a[4]-- && a[5]--) ans = max(ans, 3 + a[1]/2*2+a[4]/2*2+a[5]/2*2 + a[2]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In fil...
s811241569
p03840
C++
#include <iostream> #include <string> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <complex> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <bitset> #include <ctime> #include <map> #include <uno...
a.cc: In function 'int func1(std::map<char, long long int>)': a.cc:69:8: error: redeclaration of 'LL buf' 69 | LL buf = mp['L'] / 2; | ^~~ a.cc:67:8: note: 'LL buf' previously declared here 67 | LL buf = mp['I'] / 2; | ^~~ a.cc:71:8: error: redeclaration of 'LL buf' 71 | L...
s675324116
p03840
C++
#include <algorithm> #include <iostream> long long i, o, t, j, l, s, z; int main() { std::cin >> i >> o >> t >> j >> l >> s >> z; std::cout << std::max(i / 2 * 2 + o + j / 2 * 2 + l / 2 * 2), ((i - 1) / 2 * 2 + o + (j - 1) / 2 * 2 + (l - 1) / 2 * 2 + 1)) << std::endl; }
a.cc: In function 'int main()': a.cc:9:26: error: no matching function for call to 'max(long long int)' 9 | std::cout << std::max(i / 2 * 2 + o + j / 2 * 2 + l / 2 * 2), ((i - 1) / 2 * 2 + o + (j - 1) / 2 * 2 + (l - 1) / 2 * 2 + 1)) << std::endl; | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s512941596
p03840
C++
#include <bits/stdc++.h> using namespace std; long long i,o,t,j,l,s,z; int main(){ ios::sync_with_stdio(0); cin.tie(0); cin>>i>>o>>t>>j>>l>>s>>z; long long ans=0; ans=2*(int)(i/2)+o+2*(int)(j/2)+2*(int)(l/2); if(i-1>=0 && j-1>=0 && l-1>=0)2ans=max(ans,2*(int)((i-1)/2)+o+2*(int)((j-1)/2)+2*(in...
a.cc: In function 'int main()': a.cc:13:35: error: unable to find numeric literal operator 'operator""ans' 13 | if(i-1>=0 && j-1>=0 && l-1>=0)2ans=max(ans,2*(int)((i-1)/2)+o+2*(int)((j-1)/2)+2*(int)((l-1)/2)+3); | ^~~~
s022791393
p03840
C++
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include ...
a.cc: In function 'int main()': a.cc:72:11: error: 'f' cannot be used as a function 72 | ans += f(left); | ~^~~~~~
s352828958
p03840
C++
#include <iostream> #include <vector> #include <utility> #define DEB1(x) std::cout << (x) << std::endl; int n; std::pair<int, int> arr[501]; int cntl[501], cntr[501]; int main() { std::cin >> n; for(int i = 0; i < n; ++i) { cntl[i] = i; cntr[i] = n - i - 1; std::cin >> arr[i].first; ...
a.cc: In function 'int main()': a.cc:21:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 21 | std::sort(arr, arr + n); | ^~~~ | qsort
s339133160
p03840
C++
#include <algorithm> #include <iostream> #include <cstdio> #include <map> #include <numeric> #include <cmath> #include <set> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <complex> #include <string.h> #include <unordered_set> #include <unordered_map> #include <bitset>...
a.cc:34:24: error: 'ld' was not declared in this scope 34 | typedef vector< vector<ld> > matrix; | ^~ a.cc:34:26: error: template argument 1 is invalid 34 | typedef vector< vector<ld> > matrix; | ^ a.cc:34:26: error: template argument 2 is invalid a.cc:3...
s251396879
p03840
C
#include<stdio.h> int main(void){ unsigned long long int i,o,t,j,l,s,z,r=0; scanf("%llu%llu%llu%llu%llu%llu%llu",&i,&o,&t,&j,&l,&s,&z); r+=(o+i+t+j); printf("%llu\n",r-1) return 0; }
main.c: In function 'main': main.c:7:29: error: expected ';' before 'return' 7 | printf("%llu\n",r-1) | ^ | ; 8 | return 0; | ~~~~~~
s254947576
p03840
C++
#include <algorithm> #include <iostream> #include <cstdio> #include <map> #include <numeric> #include <cmath> #include <set> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <complex> #include <string.h> #include <unordered_set> #include <unordered_map> #include <bitset>...
a.cc:34:24: error: 'ld' was not declared in this scope 34 | typedef vector< vector<ld> > matrix; | ^~ a.cc:34:26: error: template argument 1 is invalid 34 | typedef vector< vector<ld> > matrix; | ^ a.cc:34:26: error: template argument 2 is invalid a.cc:3...
s063781122
p03840
C++
#include <bits/stdc++.h> using namespace std; long long a[7]; int main() { for (int i = 0; i < 7; i++){ cin >> a[i]; } long long m = min(min(a[0], a[3]), a[4]); /* a[0] -= m; a[3] -= m; a[4] -= m; */ long long ans = 0; for (int i = 0; i <= min(m, 100); i++){ ans = max(ans, 3 * i + (a[0] -...
a.cc: In function 'int main()': a.cc:19:27: error: no matching function for call to 'min(long long int&, int)' 19 | for (int i = 0; i <= min(m, 100); i++){ | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/b...
s468963611
p03840
C++
#include <iostream> #include <vector> #include <set> #include <algorithm> #include <assert.h> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define each(i,n) for(auto &i : n) #define int long long signed main() { int i, o, t, j, l, s, z; cin >> i >> o >> t >> j >> l >> s >> z; //t,s,z int ans...
a.cc: In function 'int main()': a.cc:23:13: error: redeclaration of 'long long int t' 23 | int t = min(i, j, l); | ^ a.cc:16:19: note: 'long long int t' previously declared here 16 | int i, o, t, j, l, s, z; | ^ In file included from /usr/include/c++/14/st...
s779348496
p03840
C++
#include <bits/stdc++.h> using namespace std; typedef long long int64; int main() { int64 a, b, c, d, e, f, g; cin >> a >> b >> c >> d >> e >> f >> g; // d, e, a int64 ret = 0; int64 get; get = d / 2; d -= get * 2; ret += get * 2; get = e / 2; e -= get * 2; ret += get * 2; get = a / 2; ...
a.cc:48:5: error: redefinition of 'int main()' 48 | int main() | ^~~~ a.cc:7:5: note: 'int main()' previously defined here 7 | int main() | ^~~~
s030777823
p03840
C++
#include <iostream> #define int long long using namespace std; int ai, ao, at, aj, al, as, az; signed main() { cin >> ai >> ao >> at >> aj >> al >> as >> az; int ans = ao; //i, j, l int IJL = min(ai, min(aj, al)); int remI = ai - IJL; int remJ = aj - IJL; int remL = al - IJL; if (remJ % 2 == 1 && remL ...
a.cc: In function 'int main()': a.cc:26:16: error: 'IJK' was not declared in this scope; did you mean 'IJL'? 26 | ans += IJK * 3 + (remJ / 2) * 2 + (remL / 2) * 2 + (remI / 2) * 2; | ^~~ | IJL
s308792420
p03840
C++
#include<cstdio> #include<iostream> #include<vector> #include<set> #include<algorithm> using namespace std; long long ans=0; int main(){ int i,o,t,j,l,s,z,t; cin>>i>>o>>t>>j>>l>>s>>z; t=min(i,j); t=min(t,l); ans+=6*t; i-=t; l-=t; j-=t; ans+=o*2; ans+=(i/2)*4; ans+=(j/2)*4; ans+=(l/2)*4; cout<<ans/2<<endl; ...
a.cc: In function 'int main()': a.cc:9:27: error: redeclaration of 'int t' 9 | int i,o,t,j,l,s,z,t; | ^ a.cc:9:17: note: 'int t' previously declared here 9 | int i,o,t,j,l,s,z,t; | ^
s338650786
p03840
C++
#include<bits/stdc++.h> using namespace std; int a, b; int main () { //freopen ("input", "r", stdin); //freopen ("output", "w", stdout); int a, b, nim, c, d; scanf ("%d %d %d %d %d", &a, &b, &nim, &c, &d); ans = 2 * (a / 2) + b + 2 * (c / 2 + d / 2) + 3 * (c % 2 == 1 && d % 2 == 1 && a % 2 == 1); if (a % 2 == 1 && ...
a.cc: In function 'int main()': a.cc:14:1: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | ans = 2 * (a / 2) + b + 2 * (c / 2 + d / 2) + 3 * (c % 2 == 1 && d % 2 == 1 && a % 2 == 1); | ^~~ | abs
s014255461
p03841
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define equals(a, b) (fabs((a) - (b)) < EPS) using namespace std; typedef long long ll; t...
a.cc: In function 'int main()': a.cc:77:15: error: expected ';' before 'return' 77 | cout << '\n' | ^ | ; ...... 87 | return 0; | ~~~~~~
s568974098
p03841
C++
#include <bits/stdc++.h> using namespace std; #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 all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define get_unique(x) x.erase(unique(all(x)), x.end()); typedef long long ll; typedef complex<do...
a.cc: In function 'int main()': a.cc:57:13: error: 'idx' was not declared in this scope 57 | tie(idx, num) = p; | ^~~ a.cc:57:18: error: 'num' was not declared in this scope; did you mean 'enum'? 57 | tie(idx, num) = p; | ^~~ | enum
s615124194
p03841
C++
mespace std; int main() { int n, mi = 0, ma = 0; cin >> n; vector<P> x(n); vector<int> ans(n*n, -1), a; rep(i, n){ cin >> x[i].first; x[i].second = i+1; ans[x[i].first-1] = i+1; } sort(all(x)); int p = 0, k = 0; rep(i, n){ rep(j, x[i].second-1){ ...
a.cc:1:1: error: 'mespace' does not name a type 1 | mespace std; | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> n; | ^~~ a.cc:6:5: error: 'vector' was not declared in this scope 6 | vector<P> x(n); | ^~~~~~ a.cc:6:...
s582289907
p03841
C++
#include<cstdio> #include<algorithm> #include<cctype> #include<cstring> #include<iostream> #include<vector> using namespace std; #define bomb exit(1) #define INF 1061109567 #define LINF 4557430888798830399ll #define pprint(x) print(x),putchar(' ') #define fprint(x) print(x),putchar('\n') #define EE(x); struct edge { ...
a.cc:19:19: error: 'acos' was not declared in this scope 19 | const double pi = acos(-1); | ^~~~
s707278716
p03841
C++
#include <bits/stdc++.h> #include <iomanip> using namespace std; #define reps(i,s,n) for(int i = s; i < n; i++) #define rep(i,n) reps(i,0,n) #define ALL(a) a.begin(), a.end() typedef long long ll; typedef vector<ll> vec; typedef vector<vec> mat; ll N,M,H,W,K,Q,A,B; int main(){ cin>>N; vec x(N), ans(0), ord(N)...
a.cc: In function 'int main()': a.cc:32:7: error: 'insert' was not declared in this scope; did you mean 'assert'? 32 | insert(ans.begin() + nx, num); | ^~~~~~ | assert a.cc:37:42: error: expected ':' before ';' token 37 | i == N*N - 1 ? cout<<endl ? cout<<' '; | ...
s011308312
p03841
C++
#include <iostream> #include <set> using namespace std; const int N = 502; int n, x[N], ans[N * N]; struct Item { int pre, x, y; // in pre, x show y times bool operator < (const Item & o) const{ return pre < o.pre; } } it[N]; int cnt[N]; void print() { bool ok = 1; for (int i = 1; i <= n...
a.cc: In function 'int main()': a.cc:47:5: error: 'sort' was not declared in this scope; did you mean 'short'? 47 | sort(it + 1, it + 1 + n); | ^~~~ | short
s272669769
p03841
C++
#include <bits/stdc++.h> using namespace std; class dsu { public: int n; vector<int> parent; dsu(int _n) : n(_n) { parent.resize(n); iota(parent.begin(), parent.end(), 0); } int find(int x) { if (x == -1 || x == n || x == parent[x]) { return x; } return parent[x] = find(parent[x...
a.cc: In function 'int main()': a.cc:47:9: error: 'a' was not declared in this scope 47 | if (a[i] != -1) { | ^
s156206574
p03841
C++
#include<bits/stdc++.h> int main(){ using namespace std; size_t N; cin >> N; deque<pair<size_t, size_t>> bef, aft; vector<size_t> ans(N * N), a(N); for(size_t i = !N, A; i < N;){ cin >> A; if(i)for(size_t j = i ^ i; j < i; ++j)bef.emplace_back(A, -~i); if(++i != N)for(si...
a.cc: In function 'int main()': a.cc:33:67: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 33 | copy(ans.cbegin(), ans.cend(), ostream_iterator<size_t>(cout, ' ')); | ^~~ | ...
s455863631
p03841
C++
#include<bits/stdc++.h> using namespace std; const int N=505; int ans[N*N],x[N],f[N],n; int cmp(int a,int b){ return x[a]<x[b]; } int main(){ scanf("%d",&n); for (int i=1;i<=n;i++)scanf("%d",&x[i]),f[i]=i; sort(f+1,f+n+1,cmp); int k=1; for (int i=1;i<=n;i++){ if (ans[x[f[i]]]){ puts("No"); return 0; } ...
a.cc: In function 'int main()': a.cc:28:13: error: redeclaration of 'int k' 28 | int k=n*n; | ^ a.cc:12:13: note: 'int k' previously declared here 12 | int k=1; | ^
s272615775
p03841
C++
#include <bits/stdc++.h> typedef long long ll; const int INF=1e9,MOD=1e9+7,ohara=1e6; const ll LINF=1e18; using namespace std; #define rep(i,n) for(ll (i)=0;(i)<(int)(n);(i)++) #define rrep(i,a,b) for(ll i=(a);i<(b);i++) #define rrrep(i,a,b) for(ll i=(a);i>=(b);i--) #define all(v) (v).begin(), (v).end() #define pb(q) ...
a.cc: In function 'int main()': a.cc:45:22: error: 'le' was not declared in this scope; did you mean 'll'? 45 | if(cntt==le)break; | ^~ | ll
s389230859
p03841
C++
#include <bits/stdc++.h> typedef long long ll; const int INF=1e9,MOD=1e9+7,ohara=1e6; const ll LINF=1e18; using namespace std; #define rep(i,n) for(ll (i)=0;(i)<(int)(n);(i)++) #define rrep(i,a,b) for(ll i=(a);i<(b);i++) #define rrrep(i,a,b) for(ll i=(a);i>=(b);i--) #define all(v) (v).begin(), (v).end() #define pb(q) ...
a.cc: In function 'int main()': a.cc:40:12: error: incompatible types in assignment of 'long long int' to 'll [1000000]' {aka 'long long int [1000000]'} 40 | tmp=p[i].second; | ~~~^~~~~~~~~~~~ a.cc:42:12: error: invalid conversion from 'll*' {aka 'long long int*'} to 'll' {aka 'long long int'} ...
s653886675
p03841
C++
#include<iostream> using namespace std; int main(){ int n;cin>>n; for(int i=0;i<n;i++){int a;cin>>a;} cout<<"No"<<endl; reutrn 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'reutrn' was not declared in this scope 7 | reutrn 0; | ^~~~~~
s633945701
p03841
C++
b#include<cstdio> #include<algorithm> using namespace std; int n,tot,now,x[510],b[510],a[250010]; bool cmp(int a,int b){ return x[a]<x[b]; } int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",x+i); if(a[x[i]]){ puts("No"); return 0; } a[x[i]]=i; b[++tot]=i; } sort(b+1,b+n+1,cmp); now=1;...
a.cc:1:2: error: stray '#' in program 1 | b#include<cstdio> | ^ a.cc:1:1: error: 'b' does not name a type 1 | b#include<cstdio> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c+...
s702432075
p03841
C++
#include <iostream> #include <utility> #include <algorithm> using namespace std; int i,j,n,x[510],a[300000],b[300000],y[510]; pair<int,int> p[510]; int main(){ cin >> n; for(i=1;i<=n;i++){ cin >> x[i]; a[x[i]] = i; b[x[i]] = 1; y[i]=n-i; p[i]=make_pair(x[i],i); } for(i=1;i<=n*n;i++){ if(b[i]==1){ ...
a.cc: In function 'int main()': a.cc:22:31: error: 'd' was not declared in this scope 22 | for(j=d;j<=i;j++){ | ^
s445212146
p03841
C++
#include <iostream> #include <vector> #include <utility> using namespace std; using P = pair<int, int>; int main() { int N; cin >> N; vector<P> xi(N); vector<int> x(N); for (int i = 0; i < N; i++) { cin >> x[i]; x[i]--; xi[i] = {x[i], i + 1}; } sort(xi.begin(), xi...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(xi.begin(), xi.end()); | ^~~~ | short
s778782541
p03841
C++
#include<bits/stdc++.h> #define N 505 using namespace std; int n,x[N],a[N*N],cnt[N],b[N],top; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%d",&x[i]); a[x[i]]=i; } for(int i=1;i<=n*n;i++)if(a[i])b[++top]=a[i]; for(int i=1;i<=n;i++)cnt[i]=i-1; for(int i=1;i<=n*n...
a.cc: In function 'int main()': a.cc:28:16: error: 'now' was not declared in this scope; did you mean 'pow'? 28 | int flag=0;now=n; | ^~~ | pow
s431062379
p03841
C++
#include<bits/stdc++.H> using namespace std; using pii = pair<int, int>; const int N = 505; pii p[N]; int n, vis[N * N]; int main () { scanf("%d", &n); for (int i = 1; i <= n; ++i) scanf("%d", &p[i].first), p[i].second = i; sort(p + 1, p + n + 1); for (int i = 1, j = 1, k; i <= n; ++i) { k = p[i].second; for ...
a.cc:1:9: fatal error: bits/stdc++.H: No such file or directory 1 | #include<bits/stdc++.H> | ^~~~~~~~~~~~~~~ compilation terminated.