結果

問題 No.2737 Compound Word
コンテスト
ユーザー Rusty
提出日時 2024-04-30 11:19:06
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 883 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,366 ms
コンパイル使用メモリ 207,120 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-05-14 06:24:30
合計ジャッジ時間 4,216 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unexpected `cfg` condition value: `local`
  --> src/main.rs:12:7
   |
12 | #[cfg(feature = "local")]
   |       ^^^^^^^^^^^^^^^^^ help: remove the condition
   |
   = note: no expected values for `feature`
   = help: consider adding `local` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

ソースコード

diff #
raw source code

#![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());
}
0