結果

問題 No.5003 物理好きクリッカー
ユーザー 特命ログイン
提出日時 2018-12-11 07:59:19
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 32 ms / 10,000 ms
コード長 1,611 bytes
コンパイル時間 731 ms
実行使用メモリ 21,948 KB
スコア 44,468,516,191
平均クエリ数 10000.00
最終ジャッジ日時 2021-07-19 09:20:24
合計ジャッジ時間 3,979 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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::with_capacity(2000000);
	let xs = [0, 15, 1, 1, 0, 75, 10, 1, 0, 99, 10, 1, 0, 89, 10, 1, 0, 85, 10, 1, 0, 85, 10, 1, 0, 88, 10, 1, 0, 92, 20, 1, 0, 213, 11, 1, 0, 165, 11, 1, 0, 140, 11, 1, 0, 129, 11, 1, 0, 127, 11, 1, 0, 128, 11, 1, 0, 133, 21, 1, 0, 297, 12, 1, 0, 235, 12, 1, 0, 191, 12, 1, 0, 173, 12, 1, 0, 167, 12, 1, 0, 168, 12, 1, 0, 173, 22, 1, 0, 380, 13, 1, 0, 334, 13, 1, 0, 257, 13, 1, 0, 227, 13, 1, 0, 215, 13, 1, 0, 213, 13, 1, 0, 218, 23, 1, 0, 468, 14, 1, 0, 394, 14, 1, 0, 316, 14, 1, 0, 285, 14, 1, 0, 274, 14, 1, 0, 274, 14, 1, 0, 282, 24, 1, 0, 613, 14, 1, 0, 158, 14, 1, 0, 167, 14, 1, 0, 179, 14, 1, 0, 195, 14, 1, 0, 214, 14, 1, 0, 236, 14, 1, 0, 262, 14, 1, 0, 293, 14, 1, 0, 330, 13, 1, 0, 3, 13, 1, 0, 4, 13, 1, 0, 5, 13, 1, 0, 6, 13, 1, 0, 8, 13, 1, 0, 10, 13, 1, 0, 12, 13, 1, 0, 14, 13, 1, 0, 17, 22, 1, 0, 6, 12, 9];


	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 stdin = stdin.lock();
	let mut lines = stdin.lines();
	while let Some(Ok(_)) = lines.next() {
	}
}
0