結果
問題 |
No.3110 Like CPCTF?
|
ユーザー |
|
提出日時 | 2025-04-19 18:56:32 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 466 bytes |
コンパイル時間 | 3,462 ms |
コンパイル使用メモリ | 274,944 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-04-19 18:56:36 |
合計ジャッジ時間 | 4,003 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n; string s; cin>>n>>s; int ans=0; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(s[i]==s[j]) continue; for(int k=j+1;k<n;k++){ if(s[i]!=s[k]) continue; for(int l=k+1;l<n;l++){ if(s[i]==s[l]||s[j]==s[l]) continue; for(int m=l+1;m<n;m++){ if(s[i]==s[m]||s[j]==s[m]||s[l]==s[m]) continue; ans++; } } } } } cout<<ans<<endl; }