結果

問題 No.45 回転寿司
ユーザー Sounds_Of_Rain
提出日時 2015-08-09 11:07:05
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-24 10:15:53
合計ジャッジ時間 1,335 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 2 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <functional>
using namespace std;
typedef long long int llint;
const int INF = 1000000;
const llint LINF = 100000000;
int main() {
	int n;
	int v[1050];
	for (int i = 0; i < 1050; i++) {
		v[i] = 0;
	}
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> v[i];
	}
	int ans1 = 0, ans2 = 0;
	for (int i = 0; i < 500; i++) {
		ans1 += v[2 * i];
		ans2 += v[2 * i + 1];
	}
	cout << max(ans1, ans2) << endl;
	//cin >> n;
}
0