結果
問題 |
No.185 和風
|
ユーザー |
![]() |
提出日時 | 2015-12-18 23:58:53 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 371 ms |
コンパイル使用メモリ | 54,604 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-16 08:42:23 |
合計ジャッジ時間 | 818 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 3 |
ソースコード
#include <iostream> using namespace std; int main(){ int n; cin >> n; int x,y; cin >> x >> y; int check = y - x; for(int i = 0; i < n - 1; i++){ cin >> y >> x; if(check != y - x){ check = -1; break; } } cout << (check < 0 ? -1 : check) << endl; return 0; }