警示后人:如果你 100pts WA

P2704 [NOI2001] 炮兵阵地

5k_sync_closer @ 2022-08-20 10:39:30

注意考虑 n=1 的情况。统计答案时

for(int i = 1;i <= c;++i) for(int j = 0;j <= c;++j) q = max(q, f[n][i][j]);

而非

for(int i = 1;i <= c;++i) for(int j = 1;j <= c;++j) q = max(q, f[n][i][j]);

(第 1 行的上一行啥也没有)


by Aranea晨曦 @ 2022-10-01 18:50:33

orz


by Aeilot @ 2022-11-11 21:56:15

orz


by KυρωVixen @ 2023-07-08 19:13:04

orz


by 赛克尔だよ @ 2023-07-23 17:00:46

直接特判m==1,n==1不香吗


by 小小蒲公英 @ 2023-08-02 22:20:52

@5k_sync_closer orz,虽然但是,还是想问下为啥这里从0开始就对了啊?我原本只想到特判


|