Submission #3006289


Source Code Expand

use std::io::*;
use std::str::FromStr;
 
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}
 
#[allow(non_snake_case, unused_variables)]
fn main() {
    let S: String = read();
    let mut ans = "No";
    for i in 0..S.len()-1 {
        if &S[i..i+2]=="AC" {
            ans = "Yes";
            break;
        }
    }
    println!("{}", ans);
}

Submission Info

Submission Time
Task A - Can you get AC?
User semimaru
Language Rust (1.15.1)
Score 100
Code Size 678 Byte
Status AC
Exec Time 2 ms
Memory 4476 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 5
AC × 12
Set Name Test Cases
Sample subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt, subtask0_4.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt, subtask0_4.txt
Case Name Status Exec Time Memory
01.txt AC 2 ms 4352 KB
02.txt AC 2 ms 4352 KB
03.txt AC 2 ms 4352 KB
04.txt AC 2 ms 4352 KB
05.txt AC 2 ms 4352 KB
06.txt AC 2 ms 4352 KB
07.txt AC 2 ms 4476 KB
subtask0_0.txt AC 2 ms 4352 KB
subtask0_1.txt AC 2 ms 4352 KB
subtask0_2.txt AC 2 ms 4352 KB
subtask0_3.txt AC 2 ms 4352 KB
subtask0_4.txt AC 2 ms 4352 KB