打表是蜗牛速度吗?

P2225 [HNOI2001] 棋盘变换

`set<vector<vector<int> > > s;`和`vector<vector<int> > a,b,c;`看上去都是常数很大的东西。 你要不要试试用手写代替STL?
by K2Cr2O7 @ 2022-11-27 13:27:15


@[YuRuochen](/user/658786) 去除常数,你这玩意儿都有 $\Theta(2^n\times n^2)$,打到 $30$ 就是 $2^{30}\times 30^2\times 10^{-8}\text{s}=9663.676416\text{s}=2.68435456\text{h}$
by little_cindy @ 2022-11-27 13:31:51


@[YuRuochen](/user/658786) 况且vector的常数也比较大
by little_cindy @ 2022-11-27 13:32:26


@[YuRuochen](/user/658786) 按照你的时间复杂度,打到 $25$ 也有 $200s$
by little_cindy @ 2022-11-27 13:33:56


@[YuRuochen](/user/658786) 建议使用题解打表(
by little_cindy @ 2022-11-27 13:38:49


@[little_cindy](/user/357311) vector常数不大吧,你没看过用vector写平衡树的?
by 崔化博 @ 2022-11-27 13:39:53


@[地生王子](/user/361965) @[little_cindy](/user/357311) 同“崔华博”,在我的印像中,vector一直是非常快的。并且这个set怎么搞?
by YuRuochen @ 2022-11-27 13:42:43


@[YuRuochen](/user/658786) 不考虑常数你的代码也有 $\Theta(2^nn^2)$,这个常数只是小问题
by little_cindy @ 2022-11-27 13:45:30


@[little_cindy](/user/357311) 可是现在卡在26上了,一个早上也没打出来。。。
by YuRuochen @ 2022-11-27 13:46:59


@[YuRuochen](/user/658786) ~~那是你见少了~~ 有的图论题 vector 会T,邻接链表才能过
by little_cindy @ 2022-11-27 13:47:25


| 下一页