| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75430 | sh25_ganzy | ABB形式子串 | C++ | 编译错误 | 0 MS | 0 KB | 726 | 2025-12-06 20:04:03 |
#include<bits/stdc++.h> using namespace std; char a[100]; int cnt=-1,combs_cnt=0; string combs[combs_cnt+1]; bool exist=false; string comb; int main(){ for(int i=0;i<100;i++){ cin>>a[i]; } for(int i=0;i<98;i++){ exist=false; if(a[i]==a[i+1]&&a[i+1]!=a[i+2]){ cnt++; comb=a[i]+a[i+1]+a[i+2]; for(int j=0;j<cnt+2;j++){ if(combs[j]==comb){ exist=true; } } if(exist==false){ combs_cnt++; combs[combs_cnt]=comb; } } } cnt--; combs_cnt--; cout<<cnt<<" "<<combs_cnt; return 0; }