結果
| 問題 |
No.3110 Like CPCTF?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-19 13:24:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 524 bytes |
| コンパイル時間 | 2,133 ms |
| コンパイル使用メモリ | 194,872 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-04-19 13:24:58 |
| 合計ジャッジ時間 | 4,596 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 5 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin>>N;
string S;
char a,b,c,d,e;
cin>>S;
int t=0;
if(N<5)
cout<<0<<endl;
else{
for(int v=0;v<N-4;v++){
for(int w=v+1;w<N-3;w++){
for(int x=w+1;x<N-2;x++){
for(int y=x+1;y<N-1;y++){
for(int z=y+1;z<N;z++){
a=S.at(v);
b=S.at(w);
c=S.at(x);
d=S.at(y);
e=S.at(z);
cout<<a<<b<<c<<d<<e<<endl;
if(a==c && a!=b && a!=d && a!=e && b!=d && b!=e && d!=e)
t++;
}
}
}
}
}
cout<<t<<endl;
}
}