結果

問題 No.26 シャッフルゲーム
ユーザー kyuridenamidakyuridenamida
提出日時 2016-02-11 08:16:45
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 506 bytes
コンパイル時間 1,269 ms
コンパイル使用メモリ 160,052 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 22:51:41
合計ジャッジ時間 1,932 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i) = 0 ; (i) < (int)(n) ; (i)++)
#define REP(i,a,b) for(int (i) = a ; (int)(i) <= (int)(b) ; (i)++)
#define all(n) (n).begin(),(n).end()
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int,int> Pii;
typedef vector<Pii> VPii;

int main(){
	int N;
	cin >> N;
	int A[4] = {0,1,0,0};
	int M;
	cin >> M;
	for(int i = 0 ; i < M ; i++){
		int x,y;
		cin >> x >> y;
		swap(A[x],A[y]);
	}
	
	cout << find(A,A+4,1) - A << endl;
	
}
0