版本比较
题解:CF1704E Count Seconds
正文
增加 3 行删除 3 行
32 行未改动3334353637373839404142 行未改动84858687888889909192939495969697989910020 行未改动32 行未改动}E[M+5];void add_edge(int u,int v){ E[++tot]=Node{v,head[u]}; head[u]=tot;} }void init(){ tot=0; for(int i=1;i<=n;++i) head[i]=0;42 行未改动 } } cout<<(n+a[ed])%mod<<'\n';}signed main(){ signed main(){ ios::sync_with_stdio(false); cin.tie(0);cout.tie(0); cin>>T; while(T--){ cin>>n>>m; init(); for(int i=1;i<=n;++i) cin>>a[i]; cin>>a[i]; for(int i=1;i<=m;++i){ int u,v; cin>>u>>v; add_edge(u,v);20 行未改动