# include <iostream>
using namespace std;
const int N=100010;
int n,k,ans,a,b;
int cnt[N];
int main(void)
{
cin>>n>>k;
cnt[0]++;
for(int i=0;i<k;i++)
{
cin>>a>>b;
if(!cnt[b])ans++;
cnt[a]++;
}
cout<<ans<<endl;
return 0;
}
08-27
126
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-05
1631
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-17
07-17
573
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-21
6204
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-18
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交