版本比较
2025 / 12 / 31 Wed. 训练赛 总结
正文
增加 4 行删除 4 行
108 行未改动全部展开1091101111121131141151161171181191201211221231242 行未改动1271281291301311321331341356 行未改动108 行未改动全部展开return 1;if(a>20||b>20||c>20)return w(20,20,20);if(t[a][b][c]!=0)return t[a][b][c];if(a<b&&b<c){t[a][b][c]=w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c);return t[a][b][c];}t[a][b][c]=w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1);return t[a][b][c];}int main(){ios::sync_with_stdio(false);2 行未改动while(cin>>a>>b>>c){if(a==-1&&b==-1&&c==-1)break;cout<<"w("<<a<<", "<<b<<", "<<c<<") = "<<w(a,b,c)<<endl;}return 0;}```6 行未改动108 行未改动全部展开1091101111121131141151161171181191201211221231242 行未改动1271281291301311321331341356 行未改动108 行未改动全部展开return 1;if(a>20||b>20||c>20)return w(20,20,20);if(t[a][b][c]!=0)return t[a][b][c];if(a<b&&b<c){t[a][b][c]=w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c);return t[a][b][c];}t[a][b][c]=w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1);return t[a][b][c];}int main(){ios::sync_with_stdio(false);2 行未改动while(cin>>a>>b>>c){if(a==-1&&b==-1&&c==-1)break;cout<<"w("<<a<<", "<<b<<", "<<c<<") = "<<w(a,b,c)<<endl;}return 0;}```6 行未改动