結果
問題 |
No.904 サメトロ
|
ユーザー |
![]() |
提出日時 | 2019-10-11 23:25:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 425 bytes |
コンパイル時間 | 1,486 ms |
コンパイル使用メモリ | 165,940 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 09:49:36 |
合計ジャッジ時間 | 2,595 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 14 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i,n) for(int i = 0;i < (int)(n);i++) template<class T>inline bool CHMAX(T&a,T b){if(a<b){a = b;return true;}return false;} template<class T>inline bool CHMIN(T&a,T b){if(a>b){a = b;return true;}return false;} signed main(){ int N; cin >> N; int a=0,b=0; REP(i,N-1){ int aa,bb; cin>>aa>>bb; a+=aa;b+=bb; } cout<<min(a,b)+1<<endl; }