A. An interesting gameZhouzhou and Dazhongfeng are playing an interesting game. They havesome cards with numbers on them, and all the numbers are between zero andnine. They can use these cards to make up different numbers. Now they wantto know the smallest number they cannot make up. Can you tell them?The first line contains an integer T(T ≤ 100). The next T lines, each linecontains a string S(jSj ≤ 100000), the string represents all the cards they have,each character represents an card.Output the smallest number they cannot makeup.301234567230111112228 4 0
#include#include #include using namespace std;int aa[11];int main(){ int num,j; string s; cin>>num; while(num--) { memset(aa,0,sizeof(aa)); cin>>s; for(int i=0;i aa[i]) { min=aa[i]; j=i; } } if(!flag) { if(j!=0){ for(int i=0;i