結果
問題 |
No.185 和風
|
ユーザー |
![]() |
提出日時 | 2020-03-22 14:45:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 250 bytes |
コンパイル時間 | 1,840 ms |
コンパイル使用メモリ | 172,696 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-24 17:35:54 |
合計ジャッジ時間 | 2,321 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; signed main(){ int n;cin>>n; set<int> s; while(n--){ int a,b;cin>>a>>b; s.insert(b-a); } if(s.size()>1||*s.begin()<0)cout<<-1<<endl; else cout<<*s.begin()<<endl; }