結果
問題 |
No.26 シャッフルゲーム
|
ユーザー |
![]() |
提出日時 | 2019-10-23 21:31:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 466 ms |
コンパイル使用メモリ | 64,868 KB |
最終ジャッジ日時 | 2025-01-08 00:51:33 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <iostream> using namespace std; int n,m,p,q,t,x[4]; int main(){ cin>>n>>m; x[n]=1; for(int i=0;i<m;i++){ cin>>p>>q; t=x[p]; x[p]=x[q]; x[q]=t; } for(int i=1;i<=3;i++){ if(x[i]==1){ cout<<i<<endl; } } return 0; }