結果
問題 | No.2737 Compound Word |
ユーザー |
![]() |
提出日時 | 2024-04-30 11:19:40 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 886 bytes |
コンパイル時間 | 15,291 ms |
コンパイル使用メモリ | 378,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-20 05:53:31 |
合計ジャッジ時間 | 14,876 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#![allow(unused_imports)]#![allow(dead_code)]#![allow(unused_variables)]#![allow(non_snake_case)]#![allow(special_module_name)]// use itertools::Itertools;use proconio::{fastout, input_interactive, marker::Chars};use std::cmp::{max, min, Reverse};use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};#[cfg(feature = "local")]mod lib;const MOD: i64 = 998244353;const MOD17: i64 = 1_000_000_007;const INF: i64 = 1 << 60;#[fastout]fn main() {input_interactive! {n: usize,s: [Chars; n]}let mut set = HashSet::new();for i in 0..n {for j in 0..n {if i == j {continue;}let mut a = s[i].clone();let mut b = s[j].clone();a.append(&mut b);set.insert(a);}}println!("{}", set.len());}