結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
shimashima_k
|
| 提出日時 | 2015-04-27 12:12:47 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 1,237 ms |
| コンパイル使用メモリ | 159,048 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-05 04:51:20 |
| 合計ジャッジ時間 | 1,760 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 1 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
int main() {
int n, a, b,c, f=0;
cin >> n;
n--;
cin >> a>>b;
c = b-a;
if (c < 0) f=1;
while (n--) {
cin>>a>>b;
if (b-a != c){
f=1;
}
}
if(f==1) cout<<-1<<endl;
else cout << c <<endl;
return 0;
}
shimashima_k