結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
re1ns
|
| 提出日時 | 2015-11-06 17:20:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 436 ms |
| コンパイル使用メモリ | 58,892 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 13:04:28 |
| 合計ジャッジ時間 | 874 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 1 |
ソースコード
#include<iostream>
#include<climits>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int n;
int ans;
cin >> n;
int x,y;
cin >> x >>y;
ans = y-x;
for(int i=0;i<n-1;i++){
cin >> x >> y;
if(y-x != ans)ans=-1;
}
if(ans<-1)ans=-1;
cout << ans <<endl;
}
re1ns