結果
問題 |
No.1563 Same Degree
|
ユーザー |
|
提出日時 | 2024-06-24 13:50:12 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 21 ms / 2,000 ms |
コード長 | 522 bytes |
コンパイル時間 | 14,273 ms |
コンパイル使用メモリ | 390,496 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 13:50:29 |
合計ジャッジ時間 | 14,365 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut l = s.lines(); for _ in 0..l.next().unwrap().parse().unwrap() { let n: Vec<usize> = l.next().unwrap().split(' ').flat_map(str::parse).collect(); let mut c = vec![0; n[0]]; for _ in 0..n[1] { l.next() .unwrap() .split(' ') .flat_map(str::parse::<usize>) .for_each(|i| c[i - 1] += 1); } c.sort(); c.dedup(); println!("{}", if c.len() < n[0] { "Yes" } else { "No" }) } }