結果

問題 No.5003 物理好きクリッカー
ユーザー 特命ログイン特命ログイン
提出日時 2018-12-11 07:59:19
言語 Rust
(1.77.0)
結果
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
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
21,684 KB
testcase_01 AC 31 ms
21,864 KB
testcase_02 AC 30 ms
21,864 KB
testcase_03 AC 31 ms
21,516 KB
testcase_04 AC 31 ms
21,372 KB
testcase_05 AC 31 ms
21,840 KB
testcase_06 AC 31 ms
21,288 KB
testcase_07 AC 31 ms
21,876 KB
testcase_08 AC 32 ms
21,492 KB
testcase_09 AC 31 ms
21,900 KB
testcase_10 AC 31 ms
21,492 KB
testcase_11 AC 31 ms
21,540 KB
testcase_12 AC 32 ms
21,360 KB
testcase_13 AC 32 ms
21,864 KB
testcase_14 AC 31 ms
21,672 KB
testcase_15 AC 32 ms
21,516 KB
testcase_16 AC 31 ms
21,840 KB
testcase_17 AC 31 ms
21,936 KB
testcase_18 AC 31 ms
21,492 KB
testcase_19 AC 32 ms
21,876 KB
testcase_20 AC 31 ms
21,384 KB
testcase_21 AC 31 ms
21,876 KB
testcase_22 AC 32 ms
21,852 KB
testcase_23 AC 30 ms
21,480 KB
testcase_24 AC 31 ms
21,876 KB
testcase_25 AC 31 ms
21,372 KB
testcase_26 AC 32 ms
21,900 KB
testcase_27 AC 31 ms
21,852 KB
testcase_28 AC 31 ms
21,684 KB
testcase_29 AC 31 ms
21,348 KB
testcase_30 AC 32 ms
21,684 KB
testcase_31 AC 32 ms
21,504 KB
権限があれば一括ダウンロードができます

ソースコード

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