0
已解决
WA 85分代码如下:
#include<iostream>
using namespace std;
int w[101],t=0;
bool pd(int n){
for(int i=1;i<=t;i++)
if(w[i]==n)return 1;
return 0;
}
int main(){
int n,m,cnt=0,k;
bool f=0;
cin>>m>>n;
while(n--){
cin>>k;
if(pd(k))continue;
if(t==m)t=0;
w[++t]=k;
cnt++;
}
cout<<cnt;
return 0;
}
以前回答发的代码和我的思路不一样,请不要发以前的网址!!!
0
已采纳
0
0
0
0
0