如题看代码
#include<bits/stdc++.h>
using namespace std;
struct myset{
char a[410];
int l=0;
bool repeat(char c){
int t=l;
while(t--)if(a[t]==c)return false;
return true;
}
void push(char i){
if(!repeat(i))return;
else {
l++;
a[l]=i;
}
}
void pop(int i){
if(i>l)return;
l--;
for(;i<=l;i++)a[i]=a[i+1];
}
};
int main(){
myset a;
a.push('o');
a.push('o');
if(a.repeat('o'))cout<<1;
cout<<a.l;
}