結果

問題 No.123 カードシャッフル
コンテスト
ユーザー ああ
提出日時 2026-10-14 22:42:38
言語 Rust
(1.99.0 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 34 ms / 5,000 ms
+ 409µs
コード長 434 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 549 ms
コンパイル使用メモリ 177,676 KB
実行使用メモリ 9,900 KB
最終ジャッジ日時 2026-10-14 22:42:45
合計ジャッジ時間 2,400 ms
ジャッジサーバーID
(参考情報)
judge6_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused import: `std::collections::HashMap`
 --> src/main.rs:2:5
  |
2 | use std::collections::HashMap;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

warning: unused import: `std::collections::BTreeSet`
 --> src/main.rs:3:5
  |
3 | use std::collections::BTreeSet;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `std::ops::ControlFlow::Break`
 --> src/main.rs:4:5
  |
4 | use std::ops::ControlFlow::Break;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unnecessary parentheses around `for` iterator expression
  --> src/main.rs:10:14
   |
10 |     for i in (0..n){
   |              ^    ^
   |
   = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
   |
10 -     for i in (0..n){
10 +     for i in 0..n {
   |

warning: unnecessary parentheses around `for` iterator expression
  --> src/main.rs:13:14
   |
13 |     for i in (0..m){
   |              ^    ^
   |
help: remove these parentheses
   |
13 -     for i in (0..m){
13 +     for i in 0..m {
   |

warning: unused variable: `i`
  --> src/main.rs:13:9
   |
13 |     for i in (0..m){
   |         ^ help: if this is intentional, prefix it with an underscore: `_i`
   |
   = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

use proconio::input;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::ops::ControlFlow::Break;
fn main(){
    input!{
        n:usize,mut m:usize,
    }
    let mut vec:Vec<usize>=Vec::new();
    for i in (0..n){
        vec.push(i+1);
    }
    for i in (0..m){
        input!{
            c:usize,
        }
        for j in (1..c).rev(){
            vec.swap(j,j-1);
        }
    }
    print!("{}",vec[0])
}
0