結果
問題 | No.26 シャッフルゲーム |
ユーザー | pyranine |
提出日時 | 2020-12-14 18:12:27 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 1,628 ms |
コンパイル使用メモリ | 165,840 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-20 05:08:05 |
合計ジャッジ時間 | 2,379 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N; cin >> M; for (int i = 0; i < M; i++) { int P, Q; cin >> P >> Q; if (M == P) { M = Q; } else if (M == Q) { M = P; } } cout << M << endl; return 0; }