| 比赛 | NOIP模拟赛by mzx Day2 | 评测结果 | AAAAAAAWWW |
|---|---|---|---|
| 题目名称 | 森林大礼包 | 最终得分 | 70 |
| 用户昵称 | ourselves | 运行时间 | 2.691 s |
| 代码语言 | C++ | 内存使用 | 0.97 MiB |
| 提交时间 | 2016-10-20 19:39:05 | ||
#include<iostream>
#include<cstdio>
using namespace std;
long long n,m;
long long a[100009]={},b;
int main()
{
freopen("three_squirrels.in","r",stdin);
freopen("three_squirrels.out","w",stdout);
cin>>n;
a[0]=1;
for(int i=1;i<=n;i++)
{
cin>>m;
for(int s=1;s<=m;s++)
{
cin>>b;
a[i]=(a[i]+a[b])%1000000007;
}
}
cout<<a[n]<<endl;
return 0;
}