版本比较
原创提高初赛阅读程序模拟题一道
正文
增加 5 行删除 5 行
5 行未改动67891010111213141515161718192021222322232425262732 行未改动6061626364646566676832 行未改动5 行未改动
> 阅读程序,阅读代码并完成相应问题,除非特殊说明,判断题一题 1.5 分,选择题一题 3 题分
```cpp#include<bits/stdc++.h> #include<bits/stdc++.h>#define LL long longusing namespace std;const LL mod=1e9+7;const LL N=55;LL T,n,m,x,len[N],ans[N][N]; LL T,n,m,x,len[N],ans[N][N];vector<LL>v[N];LL dfs(LL x,LL fa){ LL cnt=1; for(LL i:v[x]) { if(i==fa)continue; cnt=(cnt+dfs(i,x)*T)%mod; if(i==fa)continue; cnt=(cnt+dfs(i,x)*T)%mod; } return cnt;}int main()32 行未改动 } if(!f) { printf("%d ",j); break; break; } } }}32 行未改动