01 2021 档案

摘要:多重背包II中的二进制拆分 for(int i=1;i<=n;i++) { int a,b,s;cin>>a>>b>>s;//体积、价值、数量 int k=1; while(k<=s) { w[++cnt]=a*k,v[cnt]=b*k; s-=k; k*=2; } // cout<<"s=="<< 阅读全文
posted @ 2021-01-15 11:45 30天CF上蓝!!! 阅读(66) 评论(0) 推荐(0)
摘要:1 阅读全文
posted @ 2021-01-14 15:40 30天CF上蓝!!! 阅读(40) 评论(0) 推荐(0)
摘要:###A #include<iostream> #include<algorithm> using namespace std; typedef pair<int,int>PII; const int N=5100; int main() { int t;cin>>t; while(t--) { i 阅读全文
posted @ 2021-01-13 16:00 30天CF上蓝!!! 阅读(84) 评论(0) 推荐(0)
摘要:##0.A - Simple Math 2 $ 让我非常自闭的一道题,当时题还读反了,要求输出\lfloor \frac{10N} \rfloor%M\ 1<=N<=10{18}\ 1<=M<=104\ 已知\lfloor \frac{\lfloor \frac \rfloor } \rfloor 阅读全文
posted @ 2021-01-10 10:39 30天CF上蓝!!! 阅读(168) 评论(0) 推荐(0)