結果

問題 No.26 シャッフルゲーム
ユーザー めうめう🎒めうめう🎒
提出日時 2016-01-16 18:04:58
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 651 ms
コンパイル使用メモリ 73,164 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 00:20:22
合計ジャッジ時間 1,268 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
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 -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <sstream>
#include <math.h>
#include <stack>
#include <set>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <cstdio>
#include <vector>
using namespace std;

#define INF (1 << 30)
#define INFLL (1LL << 60)

int main() {
	int n,num;
	int a,b;
	bool cup[3] = {};
	cin >> n >> num;
	cup[num-1] = 1;
	for(int i = 0;i < n;i++){
		cin >> a >> b;
		swap(cup[a-1],cup[b-1]);
	}
	for(int i = 0;i < 3;i++){
		if(cup[i]) cout << i+1 << endl;
	}
	return 0;
}
0