#include #include #include using namespace std; int main(){ srand(1); bool no[10][10]; string ins; int ini; for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ no[i][j]=false; } } while(1){ int r[10]; for(int i=0;i<10;i++){ while(1){ r[i]=rand()%10; if(no[i][r[i]]==false) break; } cout<>ini>>ins; if(ini==10) break; if(ini==0){ for(int i=0;i<10;i++){ no[i][r[i]]=true; } } } }