結果

問題 No.5003 物理好きクリッカー
ユーザー 特命ログイン
提出日時 2018-12-11 07:37:55
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 30 ms / 10,000 ms
コード長 1,592 bytes
コンパイル時間 560 ms
実行使用メモリ 21,996 KB
スコア 38,998,834,411
平均クエリ数 10000.00
最終ジャッジ日時 2021-07-19 09:20:12
合計ジャッジ時間 3,913 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::fmt::Write as fmtWrite;
use std::io::*;

const NAMES: [&str; 5] = ["hand", "lily", "factory", "casino", "grimoire"];

fn main() {
	let mut output = String::new();
	let xs = [0, 150, 10, 1, 0, 149, 10, 1, 0, 119, 10, 1, 0, 107, 10, 1, 0, 103, 10, 1, 0, 103, 10, 1, 0, 107, 20, 1, 0, 230, 11, 1, 0, 173, 11, 1, 0, 145, 11, 1, 0, 133, 11, 1, 0, 130, 11, 1, 0, 131, 11, 1, 0, 136, 21, 1, 0, 300, 12, 1, 0, 237, 12, 1, 0, 193, 12, 1, 0, 175, 12, 1, 0, 169, 12, 1, 0, 169, 12, 1, 0, 175, 22, 1, 0, 381, 13, 1, 0, 335, 13, 1, 0, 258, 13, 1, 0, 228, 13, 1, 0, 216, 13, 1, 0, 215, 13, 1, 0, 219, 23, 1, 0, 469, 14, 1, 0, 395, 14, 1, 0, 317, 14, 1, 0, 286, 14, 1, 0, 275, 14, 1, 0, 275, 14, 1, 0, 283, 24, 1, 0, 614, 14, 1, 0, 159, 14, 1, 0, 168, 14, 1, 0, 180, 14, 1, 0, 196, 14, 1, 0, 215, 14, 1, 0, 237, 14, 1, 0, 263, 14, 1, 0, 294, 13, 1, 0, 4, 13, 1, 0, 5, 13, 1, 0, 6, 13, 1, 0, 8, 13, 1, 0, 9, 13, 1, 0, 11, 13, 1, 0, 14, 13, 1, 0, 16, 13, 1, 0, 20, 13, 1, 0, 24, 22, 1, 0, 7, 12, 9, 0, 1];

	for i in 0..xs.len() / 2 {
		let x = xs[i * 2];
		let c = xs[i * 2 + 1];
		for _ in 0..c {
			match x {
			0 => writeln!(output, "click").unwrap(),
			1 => writeln!(output, "enhclick").unwrap(),
			x if x < 20 => writeln!(output, "buy {}", NAMES[x % 10]).unwrap(),
			x if x < 30 => writeln!(output, "reinforce {}", NAMES[x % 10]).unwrap(),
			_ => {},
			}
		}
	}
	writeln!(stdout(), "{}", output).unwrap();
	stdout().flush().unwrap();
	let stdin = stdin();
	let mut stdin = stdin.lock();
	for _ in 0..10002 {
		stdin.read_line(&mut String::new()).unwrap();
	}
}
0