結果
| 問題 | No.3714 Prefix Team Name |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-09-23 17:16:35 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 550 ms / 2,000 ms |
| + 498µs | |
| コード長 | 1,116 bytes |
| 記録 | |
| コンパイル時間 | 6,421 ms |
| コンパイル使用メモリ | 204,648 KB |
| 実行使用メモリ | 117,164 KB |
| 最終ジャッジ日時 | 2026-09-23 17:16:50 |
| 合計ジャッジ時間 | 13,787 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use itertools::Itertools;
use proconio::{input, marker::Chars, marker::Usize1};
use std::cmp::{Reverse, max, min};
use std::collections::{BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn main() {
input! {
X: Chars,
Y: Chars,
Z: Chars,
}
let mut st = HashSet::new();
for i in 0..X.len() {
for j in 0..Y.len() {
for k in 0..Z.len() {
let a = X[..=i].iter().collect::<String>();
let b = Y[..=j].iter().collect::<String>();
let c = Z[..=k].iter().collect::<String>();
for s in [a, b, c].iter().permutations(3) {
let t = s.iter().join("");
st.insert(t);
}
}
}
}
println!("{}", st.len());
}
norioc