結果

問題 No.5003 物理好きクリッカー
ユーザー 特命ログイン特命ログイン
提出日時 2018-12-11 08:09:12
言語 Rust
(1.77.0)
結果
AC  
実行時間 30 ms / 10,000 ms
コード長 1,615 bytes
コンパイル時間 722 ms
実行使用メモリ 22,008 KB
スコア 44,468,516,191
平均クエリ数 10000.00
最終ジャッジ日時 2021-07-19 09:20:19
合計ジャッジ時間 3,925 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

use std::io::*;

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

fn main() {
	let mut output = Vec::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!(&mut output, "click").unwrap(),
			1 => writeln!(&mut output, "enhclick").unwrap(),
			x if x < 20 => writeln!(&mut output, "buy {}", NAMES[x % 10]).unwrap(),
			x if x < 30 => writeln!(&mut output, "reinforce {}", NAMES[x % 10]).unwrap(),
			_ => {},
			}
		}
	}
	
	let stdout = stdout();
	let mut stdout = stdout.lock();
	stdout.write_all(&output).unwrap();
	stdout.flush().unwrap();
	let stdin = stdin();
	let stdin = stdin.lock();
	let mut lines = stdin.lines();
	while let Some(Ok(_)) = lines.next() {
	}
}
0