結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
Lepton_s
|
| 提出日時 | 2015-04-19 23:21:54 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 759 bytes |
| 記録 | |
| コンパイル時間 | 389 ms |
| コンパイル使用メモリ | 103,172 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-11 07:30:35 |
| 合計ジャッジ時間 | 1,322 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 1 |
ソースコード
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<25;
typedef pair<int,int> P;
typedef long long ll;
typedef unsigned long long ull;
int main(){
int n;
cin>>n;
int res = -2;
for(int i = 0; i < n; i++){
int x, y;
cin>>x>>y;
if(res==-2) res = y-x;
else {
if(res==y-x && y-x>0) continue;
else res = -1;
}
}
cout<<res<<endl;
return 0;
}
Lepton_s