結果
| 問題 | No.292 芸名 |
| コンテスト | |
| ユーザー |
Tiramister
|
| 提出日時 | 2018-09-02 17:58:59 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 2,000 ms |
| + 832µs | |
| コード長 | 698 bytes |
| 記録 | |
| コンパイル時間 | 478 ms |
| コンパイル使用メモリ | 190,744 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-09-08 06:26:48 |
| 合計ジャッジ時間 | 2,335 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
use std::io::*;
use std::str::FromStr;
#[allow(dead_code)]
fn get_line() -> String {
let stdin = stdin();
let mut line = String::new();
stdin.lock().read_line(&mut line).expect("io error.");
line.trim().to_string()
}
#[allow(dead_code)]
fn cast<T: FromStr>(s: &str) -> T {
s.parse().ok().expect("parse error.")
}
#[allow(dead_code)]
fn get_vec<T: FromStr>() -> Vec<T> {
(&get_line()).split(' ').map(cast::<T>).collect()
}
fn main() {
let v: Vec<String> = get_vec();
let (t, u) = (cast::<usize>(&v[1]), cast::<usize>(&v[2]));
for (i, c) in v[0].chars().enumerate() {
if i == t || i == u {continue;}
print!("{}", c);
}
println!("");
}
Tiramister