結果

問題 No.1220 yukipoker
ユーザー o2co2c
提出日時 2020-09-04 23:50:35
言語 Rust
(1.77.0)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 1,613 bytes
コンパイル時間 13,770 ms
コンパイル使用メモリ 377,580 KB
実行使用メモリ 5,504 KB
最終ジャッジ日時 2024-05-05 03:47:28
合計ジャッジ時間 14,343 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 3 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 66 ms
5,376 KB
testcase_12 AC 65 ms
5,376 KB
testcase_13 AC 133 ms
5,504 KB
testcase_14 AC 129 ms
5,376 KB
testcase_15 AC 95 ms
5,376 KB
testcase_16 AC 100 ms
5,376 KB
testcase_17 AC 55 ms
5,376 KB
testcase_18 AC 73 ms
5,376 KB
testcase_19 AC 143 ms
5,376 KB
testcase_20 AC 134 ms
5,504 KB
testcase_21 AC 3 ms
5,376 KB
testcase_22 AC 3 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 3 ms
5,376 KB
testcase_25 AC 3 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

macro_rules !input {(source =$s :expr ,$($r :tt ) *) =>{let mut iter =$s .split_whitespace () ;let mut next =||{iter .next () .unwrap () } ;input_inner !{next ,$($r ) *} } ;($($r :tt ) *) =>{let stdin =std ::io ::stdin () ;let mut bytes =std ::io ::Read ::bytes (std ::io ::BufReader ::new (stdin .lock () ) ) ;let mut next =move ||->String {bytes .by_ref () .map (|r |r .unwrap () as char ) .skip_while (|c |c .is_whitespace () ) .take_while (|c |!c .is_whitespace () ) .collect () } ;input_inner !{next ,$($r ) *} } ;}
macro_rules !input_inner {($next :expr ) =>{} ;($next :expr ,) =>{} ;($next :expr ,$var :ident :$t :tt $($r :tt ) *) =>{let $var =read_value !($next ,$t ) ;input_inner !{$next $($r ) *} } ;}
macro_rules !read_value {($next :expr ,($($t :tt ) ,*) ) =>{($(read_value !($next ,$t ) ) ,*) } ;($next :expr ,[$t :tt ;$len :expr ] ) =>{(0 ..$len ) .map (|_ |read_value !($next ,$t ) ) .collect ::<Vec <_ >>() } ;($next :expr ,chars ) =>{read_value !($next ,String ) .chars () .collect ::<Vec <char >>() } ;($next :expr ,usize1 ) =>{read_value !($next ,usize ) -1 } ;($next :expr ,$t :ty ) =>{$next () .parse ::<$t >() .expect ("Parse error" ) } ;}

fn main() {
    input! {
        q: usize,
        query: [(usize, usize, usize); q]
    }
    let mut x = vec![0f64; 100001];
    for i in 1..=100000 {
        x[i] = x[i - 1] + (i as f64).log10();
    }
    for (n, m, k) in query {
        let f = (k - 1) as f64 * (m as f64).log10();
        let s = x[n] - x[n - k + 1] - x[k];
        if s < f {
            println!("Flush");
        } else {
            println!("Straight");
        }
    }
}
0