当前位置: 首页 > news >正文

众筹网站的分析与设计手机h5建站

众筹网站的分析与设计,手机h5建站,德文网站建设,wordpress 后台 500传送门 文章目录题意#xff1a;思路#xff1a;题意#xff1a; 思路#xff1a; 找规律yydsyydsyyds。 一看没什么想法#xff0c;所以打了个表#xff0c;好家伙#xff0c;不打不知道#xff0c;一打不得了#xff0c;下面是n6n6n6的符合要求的情况#xff1a; …传送门 文章目录题意思路题意 思路 找规律yydsyydsyyds。 一看没什么想法所以打了个表好家伙不打不知道一打不得了下面是n6n6n6的符合要求的情况 不难发现他符合条件的个数为2n−12^{n-1}2n−1个并且很有规律以某个数开头的个数分别为1,20,21,22,...,2n−21,2^0,2^1,2^2,...,2^{n-2}1,20,21,22,...,2n−2并且加入这个数之后小于他的数也都跟在后面了之后又是上面那种情况类似于递归。 比如333开头的我们通过不断k−2xk-2^xk−2x最终确定在以333开头的块内让后把3213 \ \ 2 \ \ 13  2  1放入答案之后发现又在444的块内让后将43214\ \ 3 \ \ 2 \ \ 14  3  2  1加入答案由于3213 \ \ 2 \ \ 13  2  1之前加入了所以加入444即可一直这样递归确定块即可。 由于nnn很大我们不能算出来2n2^n2n所以让他等于一个大于kkk的数即可。 附赠打标程序。 // Problem: B. Almost Sorted // Contest: Codeforces - Codeforces Round #715 (Div. 1) // URL: https://codeforces.com/problemset/problem/1508/B // Memory Limit: 256 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org)//#pragma GCC optimize(Ofast,no-stack-protector,unroll-loops,fast-math) //#pragma GCC target(sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tunenative) //#pragma GCC optimize(2) #includecstdio #includeiostream #includestring #includecstring #includemap #includecmath #includecctype #includevector #includeset #includequeue #includealgorithm #includesstream #includectime #includecstdlib #define X first #define Y second #define L (u1) #define R (u1|1) #define pb push_back #define mk make_pair #define Mid (tr[u].ltr[u].r1) #define Len(u) (tr[u].r-tr[u].l1) #define random(a,b) ((a)rand()%((b)-(a)1)) #define db puts(---) using namespace std;//void rd_cre() { freopen(d://dp//data.txt,w,stdout); srand(time(NULL)); } //void rd_ac() { freopen(d://dp//data.txt,r,stdin); freopen(d://dp//AC.txt,w,stdout); } //void rd_wa() { freopen(d://dp//data.txt,r,stdin); freopen(d://dp//WA.txt,w,stdout); }typedef long long LL; typedef unsigned long long ULL; typedef pairint,int PII;const int N1000010,mod1e97,INF0x3f3f3f3f; const double eps1e-6;int n; LL k; int a[N]; LL b[N],inf; bool st[N]; vectorpairLL,intv; vectorintans;bool check() {for(int i1;i6;i) if(a[i1]a[i]-1) return false;return true; }LL qmi(LL a,LL b) {LL ans1;while(b) {if(b1) ansans*a;aa*a;b1;}return ans; }void solve() {for(int i1;in;i) {if(in) b[i]1;else {int nown-i-1;if(now62) b[i]inf;else b[i]qmi(2ll,now);}}for(int i1;in;i) {if(kb[i]) {k-b[i];}else {for(int ji;j1!st[j];j--) ans.pb(j),st[j]1;}}for(auto x:ans) printf(%d ,x); puts(); }int main() { // ios::sync_with_stdio(false); // cin.tie(0);/*for(int i1;i6;i) a[i]i;do {if(check()) {for(int i1;i6;i) printf(%d ,a[i]);puts();}}while(next_permutation(a1,a16));*/infqmi(2ll,62);int _; scanf(%d,_);while(_--) {scanf(%d%lld,n,k);ans.clear();for(int i1;in;i) st[i]0;if(n1) {if(k!1) puts(-1);else printf(1\n);continue;}if(n-262) solve();else {LL nowqmi(2ll,n-1);if(know) puts(-1);else solve();}}return 0; } /**/
http://www.pierceye.com/news/358348/

相关文章:

  • 临沂企业网站建设珠海建设网站的公司哪家好
  • 中国网站建设公司排行榜网站建设精美模板
  • 国家对于学校网站建设深圳网站建设公司网络服务
  • 承德建站公司福田庆三整鼻子好吗
  • 域名和网站关联seo优化是指
  • 爱站网官网关键词周口网站关键词优化
  • vps网站管理器阿里云如何做网站
  • 网站是什么意思例如营销型网站文案怎么做
  • 五莲县网站建设wordpress去掉链接中的吗
  • 贡井区建设局网站建网是什么
  • 高端大气网站模板南京网站制作西安
  • wordpress站点标题和副标题网站内容要突出什么原因
  • 网站建设公司排行杭州wordpress站外链接跳转页面
  • 哪个网站可以做行程攻略哈尔滨市建设工程招标网
  • django网站开发实例望城建设局网站
  • 住房和城乡建设网站方案网页界面设计的网络系统有哪些
  • 自己做的网站怎么设置文件下载商城app搭建
  • 好看的网站分享查域名注册详细信息查询
  • 中山网站建设招聘宜宾seo快速排名
  • 网站制作 福宁网络有限公司单页网站seo优化
  • 增城做网站站长之家域名查询大全
  • 个人网站建设报价做游戏出租的网站好
  • 珠海网站建设公司哪家好织梦网站怎么做下载地址
  • 西安商城网站建设公司宁夏住宅建设发展公司网站
  • 网站建设实现用户登录济南网站建设找老兵
  • 做网站还挣钱吗成都网站设计策划免费
  • 阿里云服务器怎么放网站百度开户渠道商哪里找
  • 网赢天下深圳网站建设建设一个小说网站
  • 北湖区网站建设哪家好什么做网站的公司好
  • 做司法亲子鉴定网站专业设计服务网站