結果
| 問題 |
No.123 カードシャッフル
|
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-09-28 00:15:57 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 572 bytes |
| コンパイル時間 | 833 ms |
| コンパイル使用メモリ | 114,172 KB |
| 実行使用メモリ | 30,384 KB |
| 最終ジャッジ日時 | 2024-10-12 04:40:52 |
| 合計ジャッジ時間 | 2,082 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 3 |
| other | AC * 1 WA * 1 RE * 8 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
using System.Collections.Generic;
class No123{
static void Main(){
var num=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)).ToArray();
var count=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)).ToArray();
var list=new List<int>();
for(int i=num[0];i>0;--i){
list.Add(i);
}
for(int i=0;i<num[1];++i){
var card=list[num[1]-count[i]];
list.Remove(card);
list.Add(card);
}
Console.WriteLine(list.Last());
}
}
pirorirori_n712