competitive_hpp/utils/
yes_no.rs

1/// if true:
2///     return "Yes"
3/// if false:
4///     return "No"
5#[allow(non_snake_case)]
6pub fn YesNo(judge: bool) -> &'static str {
7    if judge {
8        "Yes"
9    } else {
10        "No"
11    }
12}
13
14/// if true:
15///     return "YES"
16/// if false:
17///     return "NO"
18#[allow(non_snake_case)]
19pub fn YESNO(judge: bool) -> &'static str {
20    if judge {
21        "YES"
22    } else {
23        "NO"
24    }
25}
26
27/// if true:
28///     return t
29/// if false:
30///     return f
31pub fn tf<'a>(value: bool, t: &'a str, f: &'a str) -> &'a str {
32    if value {
33        t
34    } else {
35        f
36    }
37}