結果
問題 | No.123 カードシャッフル |
ユーザー | pyranine |
提出日時 | 2020-12-16 13:58:41 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 1,716 ms |
コンパイル使用メモリ | 171,276 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-20 09:34:31 |
合計ジャッジ時間 | 4,551 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | RE | - |
testcase_02 | WA | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector<int> A(M + 1); for (int i = 1; i <= M; i++) cin >> A[i]; for (int i = 0; i < M; i++) { int a; cin >> a; a--; int t = A[a]; A.erase(A.begin() + a); A.insert(A.begin(), t); } cout << A[0] << endl; return 0; }