結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
めうめう🎒
|
| 提出日時 | 2016-01-19 22:14:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 20 ms / 5,000 ms |
| コード長 | 532 bytes |
| コンパイル時間 | 527 ms |
| コンパイル使用メモリ | 73,284 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 14:27:16 |
| 合計ジャッジ時間 | 1,431 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <sstream>
#include <math.h>
#include <stack>
#include <set>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <cstdio>
#include <vector>
using namespace std;
#define INF (1 << 30)
#define INFLL (1LL << 60)
int main() {
int yama[51];
for(int i = 0;i < 51;i++){
yama[i] = i;
}
int n,m,num;
cin >> n >> m;
for(int i = 0;i < m;i++){
cin >> num;
for(int j = num;j > 1;j--){
swap(yama[j],yama[j-1]);
}
}
cout << yama[1] << endl;
return 0;
}
めうめう🎒