結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
latte0119
|
| 提出日時 | 2015-04-27 00:18:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 290 bytes |
| コンパイル時間 | 1,378 ms |
| コンパイル使用メモリ | 163,540 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-05 03:15:48 |
| 合計ジャッジ時間 | 1,780 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
set<int>S;
for(int i=0;i<N;i++){
int x,y;
cin>>x>>y;
S.insert(y-x);
}
if(S.size()!=1||*(S.begin())<0){
cout<<-1<<endl;
}
else cout<<*(S.begin())<<endl;
}
latte0119