結果
問題 |
No.185 和風
|
ユーザー |
![]() |
提出日時 | 2015-05-05 22:14:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 226 bytes |
コンパイル時間 | 374 ms |
コンパイル使用メモリ | 54,104 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 19:09:02 |
合計ジャッジ時間 | 835 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 3 |
ソースコード
#include <iostream> using namespace std; int main() { int n; cin>>n; int x, y; cin>>x>>y; int res=x-y; while (--n) { cin>>x>>y; if (x-y!=res) res=-1; } cout<<(res>0 ? res : -1)<<endl; }