Submission #3388382
Source Code Expand
#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::{stdin, stdout, BufWriter, Write};
#[allow(unused_imports)]
use std::iter::FromIterator;
mod util {
use std::fmt::Debug;
use std::io::{stdin, stdout, BufWriter, StdoutLock};
use std::str::FromStr;
#[allow(dead_code)]
pub fn line() -> String {
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
line.trim().to_string()
}
#[allow(dead_code)]
pub fn chars() -> Vec<char> {
line().chars().collect()
}
#[allow(dead_code)]
pub fn gets<T: FromStr>() -> Vec<T>
where
<T as FromStr>::Err: Debug,
{
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
line.split_whitespace()
.map(|t| t.parse().unwrap())
.collect()
}
#[allow(dead_code)]
pub fn with_bufwriter<F: FnOnce(BufWriter<StdoutLock>) -> ()>(f: F) {
let out = stdout();
let writer = BufWriter::new(out.lock());
f(writer)
}
}
#[allow(unused_macros)]
macro_rules ! get { ( [ $ t : ty ] ) => { { let mut line : String = String :: new ( ) ; stdin ( ) . read_line ( & mut line ) . unwrap ( ) ; line . split_whitespace ( ) . map ( | t | t . parse ::<$ t > ( ) . unwrap ( ) ) . collect ::< Vec < _ >> ( ) } } ; ( [ $ t : ty ] ; $ n : expr ) => { ( 0 ..$ n ) . map ( | _ | get ! ( [ $ t ] ) ) . collect ::< Vec < _ >> ( ) } ; ( $ t : ty ) => { { let mut line : String = String :: new ( ) ; stdin ( ) . read_line ( & mut line ) . unwrap ( ) ; line . trim ( ) . parse ::<$ t > ( ) . unwrap ( ) } } ; ( $ ( $ t : ty ) ,* ) => { { let mut line : String = String :: new ( ) ; stdin ( ) . read_line ( & mut line ) . unwrap ( ) ; let mut iter = line . split_whitespace ( ) ; ( $ ( iter . next ( ) . unwrap ( ) . parse ::<$ t > ( ) . unwrap ( ) , ) * ) } } ; ( $ t : ty ; $ n : expr ) => { ( 0 ..$ n ) . map ( | _ | get ! ( $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ ( $ t : ty ) ,*; $ n : expr ) => { ( 0 ..$ n ) . map ( | _ | get ! ( $ ( $ t ) ,* ) ) . collect ::< Vec < _ >> ( ) } ; }
#[allow(unused_macros)]
macro_rules ! debug { ( $ ( $ a : expr ) ,* ) => { eprintln ! ( concat ! ( $ ( stringify ! ( $ a ) , " = {:?}, " ) ,* ) , $ ( $ a ) ,* ) ; } }
const BIG_STACK_SIZE: bool = true;
#[allow(dead_code)]
fn main() {
use std::thread;
if BIG_STACK_SIZE {
thread::Builder::new()
.stack_size(32 * 1024 * 1024)
.name("solve".into())
.spawn(solve)
.unwrap()
.join()
.unwrap();
} else {
solve();
}
}
fn solve() {
let (x, y) = get!(u64, u64);
if (x < 2 && y < 2) || (min(x, y) == 1 && max(x, y) == 2) {
println!("Brown");
} else {
println!("Alice");
}
}
Submission Info
Submission Time |
|
Task |
D - Alice&Brown |
User |
hatoo |
Language |
Rust (1.15.1) |
Score |
0 |
Code Size |
3030 Byte |
Status |
WA |
Exec Time |
3 ms |
Memory |
8572 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
0 / 500 |
Status |
|
|
Set Name |
Test Cases |
Sample |
00-00.txt, 00-01.txt, 00-02.txt, 00-03.txt |
All |
00-00.txt, 00-01.txt, 00-02.txt, 00-03.txt, 01-00.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, 01-17.txt, 01-18.txt, 01-19.txt |
Case Name |
Status |
Exec Time |
Memory |
00-00.txt |
AC |
3 ms |
8572 KB |
00-01.txt |
AC |
3 ms |
8572 KB |
00-02.txt |
AC |
3 ms |
8572 KB |
00-03.txt |
AC |
3 ms |
8572 KB |
01-00.txt |
WA |
3 ms |
8572 KB |
01-01.txt |
WA |
3 ms |
8572 KB |
01-02.txt |
AC |
3 ms |
8572 KB |
01-03.txt |
AC |
3 ms |
8572 KB |
01-04.txt |
AC |
3 ms |
8572 KB |
01-05.txt |
AC |
3 ms |
8572 KB |
01-06.txt |
AC |
3 ms |
8572 KB |
01-07.txt |
AC |
3 ms |
8572 KB |
01-08.txt |
WA |
3 ms |
8572 KB |
01-09.txt |
AC |
3 ms |
8572 KB |
01-10.txt |
AC |
3 ms |
8572 KB |
01-11.txt |
AC |
3 ms |
8572 KB |
01-12.txt |
WA |
3 ms |
8572 KB |
01-13.txt |
AC |
3 ms |
8572 KB |
01-14.txt |
WA |
3 ms |
8572 KB |
01-15.txt |
AC |
3 ms |
8572 KB |
01-16.txt |
WA |
3 ms |
8572 KB |
01-17.txt |
AC |
3 ms |
8572 KB |
01-18.txt |
AC |
3 ms |
8572 KB |
01-19.txt |
AC |
3 ms |
8572 KB |