Submission #4047283
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, StdoutLock, Write};
#[allow(unused_imports)]
use std::iter::FromIterator;
#[allow(unused_macros)]
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 ) * } } ; }
#[allow(unused_macros)]
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 ) * } } ; }
#[allow(unused_macros)]
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 , bytes ) => { read_value ! ( $ next , String ) . into_bytes ( ) } ; ( $ next : expr , usize1 ) => { read_value ! ( $ next , usize ) - 1 } ; ( $ next : expr , $ t : ty ) => { $ next ( ) . parse ::<$ t > ( ) . expect ( "Parse error" ) } ; }
#[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 ! debug { ( $ ( $ a : expr ) ,* ) => { eprintln ! ( concat ! ( $ ( stringify ! ( $ a ) , " = {:?}, " ) ,* ) , $ ( $ a ) ,* ) } ; }
#[allow(dead_code)]
#[allow(dead_code)]
struct Writer {
s: String,
}
#[allow(unused_imports)]
use std::fmt::Display;
#[allow(dead_code)]
#[doc = " let mut writer = Writer::new();"]
#[doc = " writer.writeln(hoge);"]
#[doc = " ..."]
#[doc = " writer.flush()"]
impl Writer {
#[allow(dead_code)]
pub fn new() -> Writer {
Writer { s: String::new() }
}
#[allow(dead_code)]
pub fn flush(&mut self) {
print!("{}", self.s);
self.s.clear();
}
pub fn write<T: Display>(&mut self, x: T) {
self.s.push_str(&format!("{}", x));
}
pub fn writeln<T: Display>(&mut self, x: T) {
self.s.push_str(&format!("{}", x));
self.s.push('\n');
}
#[allow(dead_code)]
pub fn write_vec<T: Display>(&mut self, xs: &Vec<T>) {
if xs.len() == 0 {
self.writeln("");
return;
}
self.write(&format!("{}", xs[0]));
for i in 1..xs.len() {
self.write(&format!(" {}", xs[i]));
}
self.writeln("");
}
}
#[allow(unused_macros)]
macro_rules ! debug { ( $ ( $ a : expr ) ,* ) => { eprintln ! ( concat ! ( $ ( stringify ! ( $ a ) , " = {:?}, " ) ,* ) , $ ( $ a ) ,* ) } ; }
#[allow(dead_code)]
fn main() {
input!{
c: String,
}
if c == "a" || c == "e" || c == "i" || c == "o" || c == "u" {
println!("vowel");
} else {
println!("consonant");
}
}
Submission Info
Submission Time |
|
Task |
A - UOIAUAI |
User |
wh317706 |
Language |
Rust (1.15.1) |
Score |
100 |
Code Size |
3714 Byte |
Status |
AC |
Exec Time |
2 ms |
Memory |
4352 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
100 / 100 |
Status |
|
|
Set Name |
Test Cases |
Sample |
subtask0_0.txt, subtask0_1.txt, subtask0_2.txt |
All |
subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask1_0.txt, subtask1_1.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt |
Case Name |
Status |
Exec Time |
Memory |
subtask0_0.txt |
AC |
2 ms |
4352 KB |
subtask0_1.txt |
AC |
2 ms |
4352 KB |
subtask0_2.txt |
AC |
2 ms |
4352 KB |
subtask1_0.txt |
AC |
2 ms |
4352 KB |
subtask1_1.txt |
AC |
2 ms |
4352 KB |
subtask1_2.txt |
AC |
2 ms |
4352 KB |
subtask1_3.txt |
AC |
2 ms |
4352 KB |
subtask1_4.txt |
AC |
2 ms |
4352 KB |
subtask1_5.txt |
AC |
2 ms |
4352 KB |
subtask1_6.txt |
AC |
2 ms |
4352 KB |