結果
問題 | No.185 和風 |
ユーザー |
![]() |
提出日時 | 2015-11-04 01:05:48 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 288 bytes |
コンパイル時間 | 517 ms |
コンパイル使用メモリ | 55,004 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 12:21:25 |
合計ジャッジ時間 | 873 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 2 |
ソースコード
#include <iostream> #include <cstring> using namespace std; int main(int argc, char *argv[]) { int N; cin >> N; int x, y; cin >> x >> y; int ans = y - x; for (int i = 1; i < N; ++i) { cin >> x >> y; if ((y - x) != ans) { ans = -1; } } cout << ans << endl; return 0; }