Submission #183600


Source Code Expand

#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;

#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<(DUMP(),__VA_ARGS__).str()<<endl)

struct DUMP : ostringstream {
	template<class T> DUMP &operator,(const T &t) {
		if(this->tellp()) *this << ", ";
		*this << t;
		return *this;
	}
};

template<class T> inline void chmax(T &a, const T &b) { if(b > a) a = b; }
template<class T> inline void chmin(T &a, const T &b) { if(b < a) a = b; }

template<class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
	return os << '(' << p.first << ", " << p.second << ')';
}

template<class Tuple, unsigned Index>
void print_tuple(ostream &os, const Tuple &t) {}

template<class Tuple, unsigned Index, class Type, class... Types>
void print_tuple(ostream &os, const Tuple &t) {
	if(Index) os << ", ";
	os << get<Index>(t);
	print_tuple<Tuple, Index + 1, Types...>(os, t);
}

template<class... Types>
ostream &operator<<(ostream &os, const tuple<Types...> &t) {
	os << '(';
	print_tuple<tuple<Types...>, 0, Types...>(os, t);
	return os << ')';
}

template<class Iterator>
ostream &dump_range(ostream &, Iterator, const Iterator &);

template<class T>
ostream &operator<<(ostream &os, const vector<T> &c) {
	return dump_range(os, c.cbegin(), c.cend());
}

template<class Iterator>
ostream &dump_range(ostream &os, Iterator first, const Iterator &last) {
	os << '[';
	for(int i = 0; first != last; ++i, ++first) {
		if(i) os << ", ";
		os << *first;
	}
	return os << ']';
}

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	array<int, 7> a, b;
	for(auto &e : a) cin >> e;
	for(auto &e : b) cin >> e;

	int ans = 0;
	for(int i = 0; i < a.size(); ++i) {
		ans += max(a[i], b[i]);
	}
	cout << ans << endl;

	return EXIT_SUCCESS;
}

Submission Info

Submission Time
Task A - ゴールドラッシュ
User nisshy
Language C++11 (GCC 4.8.1)
Score 100
Code Size 2356 Byte
Status AC
Exec Time 21 ms
Memory 932 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 19
Set Name Test Cases
Sample subtask0_sample-01.txt, subtask0_sample-02.txt, subtask0_sample-03.txt, subtask0_sample-04.txt
All subtask0_sample-01.txt, subtask0_sample-02.txt, subtask0_sample-03.txt, subtask0_sample-04.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt
Case Name Status Exec Time Memory
subtask0_sample-01.txt AC 20 ms 800 KB
subtask0_sample-02.txt AC 20 ms 924 KB
subtask0_sample-03.txt AC 21 ms 924 KB
subtask0_sample-04.txt AC 20 ms 808 KB
subtask1_01.txt AC 21 ms 796 KB
subtask1_02.txt AC 21 ms 928 KB
subtask1_03.txt AC 21 ms 792 KB
subtask1_04.txt AC 21 ms 932 KB
subtask1_05.txt AC 21 ms 928 KB
subtask1_06.txt AC 21 ms 924 KB
subtask1_07.txt AC 20 ms 928 KB
subtask1_08.txt AC 21 ms 812 KB
subtask1_09.txt AC 21 ms 796 KB
subtask1_10.txt AC 20 ms 928 KB
subtask1_11.txt AC 20 ms 924 KB
subtask1_12.txt AC 20 ms 788 KB
subtask1_13.txt AC 20 ms 800 KB
subtask1_14.txt AC 20 ms 792 KB
subtask1_15.txt AC 21 ms 928 KB