結果
| 問題 | No.123 カードシャッフル |
| コンテスト | |
| ユーザー |
めうめう🎒
|
| 提出日時 | 2016-01-19 22:14:03 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 13 ms / 5,000 ms |
| + 703µs | |
| コード長 | 532 bytes |
| 記録 | |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 97,488 KB |
| 実行使用メモリ | 9,776 KB |
| 最終ジャッジ日時 | 2026-09-01 16:39:55 |
| 合計ジャッジ時間 | 1,698 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
めうめう🎒