結果
| 問題 |
No.904 サメトロ
|
| コンテスト | |
| ユーザー |
hipopo
|
| 提出日時 | 2020-01-11 19:36:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 2,333 ms |
| コンパイル使用メモリ | 191,692 KB |
| 最終ジャッジ日時 | 2025-01-08 17:08:29 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
int sum_a = 0, sum_b = 0;
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
sum_a += a;
sum_b += b;
}
if (sum_a == sum_b) cout << sum_a + 1 << endl;
cout << min(sum_a, sum_b) + 1 << endl;
}
hipopo