結果
問題 | No.1692 Expectations |
ユーザー |
|
提出日時 | 2024-06-26 13:39:29 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 27,182 ms |
コンパイル使用メモリ | 404,376 KB |
実行使用メモリ | 7,112 KB |
最終ジャッジ日時 | 2024-06-26 13:39:58 |
合計ジャッジ時間 | 15,840 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
use std::{collections::HashSet, io::Read};fn main() {let mut s = String::new();std::io::stdin().read_to_string(&mut s).ok();let n: Vec<u64> = s.split_whitespace().flat_map(str::parse).collect();let c = HashSet::<_>::from_iter(n[2..].iter()).len();println!("{} {}", c, if n[0] == n[1] && c == 1 { 1 } else { 0 })}