Submission #1514020


Source Code Expand

#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) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9) + 7;
template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; }

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int I, O, T, J; cin >> I >> O >> T >> J;
	int L, S, Z; cin >> L >> S >> Z;
	int K = O;
	int k = 0;
	for (int x = 0; x < 1000; x++) {
		if (x > min(I, L, J))continue;
		chmax(k, (I - x) / 2 + (J - x) / 2 + (L - x) / 2 + x * 3);
	}
	K += k;
	cout << K << endl;
	return 0;
}

Submission Info

Submission Time
Task C - Tetromino Tiling
User minaminao
Language C++14 (GCC 5.4.1)
Score 0
Code Size 940 Byte
Status CE

Compile Error

In file included from /usr/include/c++/5/bits/char_traits.h:39:0,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/istream:38,
                 from /usr/include/c++/5/sstream:38,
                 from /usr/include/c++/5/complex:45,
                 from /usr/include/c++/5/ccomplex:38,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h: In instantiation of ‘constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]’:
./Main.cpp:26:22:   required from here
/usr/include/c++/5/bits/stl_algobase.h:246:17: error: ‘__comp’ cannot be used as a function
       if (__comp(__b, __a))
                 ^