結果

問題 No.700 LOVE
ユーザー _Clay____
提出日時 2018-10-14 14:33:33
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 627 bytes
コンパイル時間 12,834 ms
コンパイル使用メモリ 378,116 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 23:32:41
合計ジャッジ時間 13,805 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io;

fn main() {
  let mut buf = String::new();
  io::stdin().read_line(&mut buf).ok();
  let l: Vec<u16> = buf
    .trim()
    .split_whitespace()
    .map(|e| e.parse().ok().unwrap())
    .collect();

  let mut found = false;
  for _i in 0..l[0] {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).ok();
    found = buf
      .trim()
      .chars()
      .collect::<Vec<char>>()
      .windows(4)
      .any(|c| match c {
        ['L', 'O', 'V', 'E'] => true,
        _ => false,
      });
    if found {
      break;
    }
  }

  if found {
    println!("YES")
  } else {
    println!("NO")
  }
}
0