結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
rinrinta121
|
| 提出日時 | 2019-05-23 18:29:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 597 bytes |
| コンパイル時間 | 761 ms |
| コンパイル使用メモリ | 86,352 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-17 09:50:03 |
| 合計ジャッジ時間 | 3,307 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 10 |
ソースコード
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<stdio.h>
#include<queue>
#include <climits>
#include <map>
#include <set>
const int mod = 1e9 + 7;
const long long INF = 1LL << 60;
using namespace std;
typedef long long ll;
int main()
{
int n,m;
cin >> n >> m;
vector<int> a;
for(int i = 0; i < n; i++){
a[i] = (i+1);
}
for(int i = 0; i < m; i++){
int k;
cin >> k;
k--;
int tmp = a[k];
a.erase(a.begin()+k);
a.insert(a.begin(),tmp);
}
cout << a[0] << endl;
}
rinrinta121