結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
hiragn
|
| 提出日時 | 2019-07-17 09:02:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 285 bytes |
| コンパイル時間 | 1,918 ms |
| コンパイル使用メモリ | 171,264 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-17 18:24:11 |
| 合計ジャッジ時間 | 2,117 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<int> st;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
st.insert(y - x);
}
cout << (st.size() == 1 ? *st.begin() : -1) << endl;
return 0;
}
hiragn