結果

問題 No.185 和風
ユーザー zaichu
提出日時 2015-12-18 23:54:18
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 241 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 54,020 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-16 08:42:17
合計ジャッジ時間 900 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
	int n;
	cin >> n;
	int x,y;
	cin >> x >> y;
	int check = y - x;
	while(cin >> x >> y){
		if(check != y - x) check = -1; break;
	}
	cout << (check < 0 ? -1 : check) << endl;
	return 0;
}
0