結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-31 17:15:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 459 bytes |
| コンパイル時間 | 2,007 ms |
| コンパイル使用メモリ | 194,092 KB |
| 最終ジャッジ日時 | 2025-02-20 18:08:16 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:24:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
24 | system("pause");
| ~~~~~~^~~~~~~~~
ソースコード
// コピーして使う!
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<long long>;
int main() {
ll n;
cin >> n;
vll x(n), y(n);
for (ll i = 0; i != n; i++) {
cin >> x.at(i) >> y.at(i);
}
ll a;
a = y[0] - x[0];
for (ll i = 1; i != n; i++) {
if (a != y[i] - x[i]) {
a = -1;
break;
}
}
cout << a << endl;
system("pause");
}