結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-16 19:51:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 305 bytes |
| コンパイル時間 | 586 ms |
| コンパイル使用メモリ | 56,284 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-08 04:26:19 |
| 合計ジャッジ時間 | 968 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 4 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
int n, m, p[200], q[200];
cin >> n >> m;
int ans = n;
for(int i=0; i<m; i++) {
cin >> p[i] >> q[i];
if(p[i] == ans) ans = q[i];
}
cout << ans << endl;
return 0;
}