結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
FVRChan
|
| 提出日時 | 2017-07-27 09:48:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 327 bytes |
| コンパイル時間 | 430 ms |
| コンパイル使用メモリ | 56,656 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 20:40:22 |
| 合計ジャッジ時間 | 963 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<utility>
using namespace std;
int main(void){
int n,m,p,q;
cin>>n>>m;
n--;
bool b[3];
for(int i=0;i<3;i++)b[i]=false;
b[n]=true;
for(int i=0;i<m;i++){
cin>>p>>q;
p--;q--;
swap(b[p],b[q]);
}
for(int i=0;i<3;i++)
if(b[i]==true)cout<<i+1<<endl;
}
FVRChan