結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2016-02-14 17:03:03 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 13 ms / 5,000 ms |
| + 56µs | |
| コード長 | 409 bytes |
| 記録 | |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 81,540 KB |
| 実行使用メモリ | 9,704 KB |
| 最終ジャッジ日時 | 2026-09-02 06:11:59 |
| 合計ジャッジ時間 | 1,543 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <list>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> as;
for (int i = 1; i <= n; i++)
as.push_back(i);
for (int i = 0; i < m; i++) {
int a, x;
cin >> a;
x = as[a-1];
as.erase(as.begin() + a-1);
as.insert(as.begin(),x);
}
cout << as[0] << endl;
return 0;
}
h_noson