摘要:
#include<cstdio> #include<iostream> #include<queue> #include<algorithm> #define P1 20031101 #define P2 998244353 #define N 1000000 #define int long lo 阅读全文
摘要:
我还真没想出来……不要怪我哦…… 我想的是一直往堆里塞数,知道数的个数超多n很多。 首先,这个超过很多很难把控,其次,复杂度不允许。 于是我们考虑一波dp: f [ i ] 表示第i个丑数,那么这个丑数 f [ i ] 一定等于 f [ k ] * a [ j ] (其中 k < i )。 那么我们 阅读全文