結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
Jikky1618
|
| 提出日時 | 2024-12-29 06:12:47 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 517 bytes |
| コンパイル時間 | 4,552 ms |
| コンパイル使用メモリ | 244,548 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 06:12:53 |
| 合計ジャッジ時間 | 3,946 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...)
#endif
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
int N, M;
cin >> N >> M, N--;
vector<int> A(3);
A[N] = 1;
for (int i = 0; i < M; i++) {
int P, Q;
cin >> P >> Q, P--, Q--;
swap(A[P], A[Q]);
}
for (int i = 0; i < 3; i++) {
if (A[i]) cout << i + 1 << '\n';
}
}
Jikky1618