Submission #183270


Source Code Expand

#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cassert>
#include <iostream>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <complex>
#include <algorithm>
#include <numeric>
#include <exception>
using namespace std;
typedef pair<int,int> Pii;
typedef long long ll;
typedef unsigned long long ull;
const int INFI = 1<<28;
const long long int INFL = 1LL<<60;
const double INFD = 1e+300;
const double EPS = 1e-8;
//> ^ < v
//int dx[] = {1,0,-1,0};
//int dy[] = {0,-1,0,1};
//struct P { 
//    int id, cost; 
//    P () {}
//    P (int i, int c) : id(i), cost(c) {}
//    bool operator < (const P &p) const { return cost > p.cost; } 
//};
int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
cin >> b[i];
}
for (int i = 0; i < n; i++) {
ans += max(a[i],b[i]);
}
cout << ans << endl;

    return 0;
}

Submission Info

Submission Time
Task A - ゴールドラッシュ
User inuhiroshi
Language C++ (G++ 4.6.4)
Score 0
Code Size 1174 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:51:1: error: ‘ans’ was not declared in this scope
./Main.cpp:53:9: error: ‘ans’ was not declared in this scope