結果
問題 | No.26 シャッフルゲーム |
ユーザー | Shirakami4LFE |
提出日時 | 2022-12-28 15:24:23 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 2,009 ms |
コンパイル使用メモリ | 164,800 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-05-02 21:31:27 |
合計ジャッジ時間 | 2,625 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 2 ms
5,376 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N,M; cin >> N >> M; int a,b; for(int i=0; i<M; i++){ cin >> a >> b; if(a==N) N=b; if(b==N) N=a; } cout << N << endl; return 0; }