Submission #183334
Source Code Expand
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <assert.h>
#include <sys/time.h>
#include <fstream>
#include <iomanip>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) FOR(i,0,n)
#define REP(i,n) FOR(i,0,n)
#define each(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define EACH(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define deb(x) cerr << #x << " = " << (x) << " , ";
#define debl cerr << " (L" << __LINE__ << ")"<< endl;
#define sz(s) (int)((s).size())
#define clr(a) memset((a),0,sizeof(a))
#define nclr(a) memset((a),-1,sizeof(a))
#define pb push_back
#define INRANGE(x,s,e) ((s)<=(x) && (x)<(e))
#define MP(x,y) make_pair((x),(y))
double pi=3.14159265358979323846;
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;
template<typename T> std::ostream& operator<<(std::ostream& os, const vector<T>& z){
os << "[ ";
REP(i,z.size())os << z[i] << ", " ;
return ( os << "]" << endl);
}
template<typename T> std::ostream& operator<<(std::ostream& os, const set<T>& z){
os << "set( ";
EACH(p,z)os << (*p) << ", " ;
return ( os << ")" << endl);
}
template<typename T,typename U> std::ostream& operator<<(std::ostream& os, const map<T,U>& z){
os << "{ ";
EACH(p,z)os << (p->first) << ": " << (p->second) << ", " ;
return ( os << "}" << endl);
}
template<typename T,typename U> std::ostream& operator<<(std::ostream& os, const pair<T,U>& z){
return ( os << "(" << z.first << ", " << z.second << ",)" );
}
double get_time(){
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec + tv.tv_usec*1e-6;
}
typedef unsigned int uint32_t;
struct RND{
uint32_t x;
uint32_t y;
uint32_t z;
uint32_t w;
RND(){
x=123456789;
y=362436069;
z=521288629;
w=88675123;
}
void init(int seed){
x=123456789;
y=362436069;
z=521288629;
w=seed+100;
REP(i,10)get();
}
uint32_t get(){
uint32_t t;
t=x^(x<<11);
x=y;y=z;z=w;
w=(w^(w>>19))^(t^(t>>8));
return w;
}
};
RND rnd;
ll double_to_ll(double d){
if(d>0)return d+0.5;
return d-0.5;
}
void _main(istream &inp){
cout << fixed << setprecision(12);
vl a(7),b(7);
rep(j,7) inp >> a[j];
rep(j,7) inp >> b[j];
ll ret = 0;
rep(j,7) ret += max(a[j], b[j]);
cout << ret << endl;
while(true){
break;
}
}
int main(){
if(0){
ifstream ifs("test.txt");
_main(ifs);
}
else{
_main(cin);
}
return 0;
}
Submission Info
Submission Time |
|
Task |
A - ゴールドラッシュ |
User |
hirosegolf |
Language |
C++11 (GCC 4.8.1) |
Score |
100 |
Code Size |
3167 Byte |
Status |
AC |
Exec Time |
22 ms |
Memory |
932 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
100 / 100 |
Status |
|
|
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 |
22 ms |
920 KB |
subtask0_sample-02.txt |
AC |
20 ms |
796 KB |
subtask0_sample-03.txt |
AC |
21 ms |
924 KB |
subtask0_sample-04.txt |
AC |
21 ms |
796 KB |
subtask1_01.txt |
AC |
20 ms |
924 KB |
subtask1_02.txt |
AC |
20 ms |
932 KB |
subtask1_03.txt |
AC |
20 ms |
932 KB |
subtask1_04.txt |
AC |
20 ms |
676 KB |
subtask1_05.txt |
AC |
20 ms |
928 KB |
subtask1_06.txt |
AC |
20 ms |
932 KB |
subtask1_07.txt |
AC |
20 ms |
756 KB |
subtask1_08.txt |
AC |
21 ms |
800 KB |
subtask1_09.txt |
AC |
21 ms |
804 KB |
subtask1_10.txt |
AC |
20 ms |
676 KB |
subtask1_11.txt |
AC |
20 ms |
800 KB |
subtask1_12.txt |
AC |
21 ms |
924 KB |
subtask1_13.txt |
AC |
21 ms |
928 KB |
subtask1_14.txt |
AC |
20 ms |
796 KB |
subtask1_15.txt |
AC |
22 ms |
928 KB |