結果

問題 No.2737 Compound Word
ユーザー Haniwa
提出日時 2025-10-06 20:18:11
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 27,089 ms
コンパイル使用メモリ 401,444 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-06 20:18:40
合計ジャッジ時間 14,367 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
use std::collections::HashSet;

fn main() {
	input! {
		n: usize,
		s: [String; n],
	}

    let mut hash_set = HashSet::new();

    for i in 0..n {
        for j in 0..n {
            if i == j {
                continue;
            }

            hash_set.insert(format!("{}{}", s[i], s[j]));
        }
    }

    println!("{}", hash_set.len());
}
0