結果

問題 No.26 シャッフルゲーム
コンテスト
ユーザー Maeda
提出日時 2025-03-07 15:07:47
言語 C
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 409 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 132 ms
コンパイル使用メモリ 36,448 KB
最終ジャッジ日時 2026-02-22 13:03:13
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

void main(void){
	int target = 0;
	int input = scanf("%d\n",&target);
	int shuffle = 0;
	int shuffleList[2];
	input = scanf("%d\n",&shuffle);
	for(int i = 0 ; i < shuffle ; i++){
		input = scanf("%d",shuffleList[0]);
		input = scanf("%d",shuffleList[1]);
		if(shuffleList[0] == target){
			target = shuffleList[1];
		}else if(shuffleList[1] == target){
			target = shuffleList[0];
		}
	}
}
0