結果
問題 | No.3110 Like CPCTF? |
ユーザー |
|
提出日時 | 2025-04-18 20:27:53 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 883 bytes |
コンパイル時間 | 14,871 ms |
コンパイル使用メモリ | 383,924 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-04-18 20:28:09 |
合計ジャッジ時間 | 14,586 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#![allow(unused_imports,non_snake_case,dead_code)] use std::{cmp::Reverse as Rev,collections::*,iter::*}; use proconio::{marker::*,*}; #[fastout] fn main(){ input!{ n:usize, s:Chars, } let mut ans=0; for a in 0..n{ for b in a+1..n{ if s[a]==s[b]{ continue; } for c in b+1..n{ if s[a]!=s[c]{ continue; } for d in c+1..n{ if s[a]==s[d] || s[b]==s[d]{ continue; } for e in d+1..n{ if s[a]==s[e] || s[b]==s[e] || s[d]==s[e]{ continue; } ans+=1; } } } } } println!("{ans}"); }