社区讨论
只有40分,怎么回事
P2058[NOIP 2016 普及组] 海港参与者 3已保存回复 4
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 4 条
- 当前快照
- 1 份
- 快照标识符
- @lod2arj2
- 此快照首次捕获于
- 2023/10/30 23:35 2 年前
- 此快照最后确认于
- 2023/11/05 09:54 2 年前
CPP
#include <iostream>
using namespace std;
int number,timea,counta,i,j,cnt[100000],book[100000],cn[100000],kk,k;
int main()
{
cin>>number;
for(i=0;i<number;i++)
{
cin>>timea>>counta;
for(j=0;j<counta;j++)
{
cin>>cn[j];
book[cn[j]]=1;
}
for(k=0;k<1000;k++)
{
if(book[k]==1)
cnt[kk]++;
}
kk++;
}
for(i=0;i<number;i++)
cout<<cnt[i]<<endl;
return 0;
}
回复
共 4 条回复,欢迎继续交流。
正在加载回复...