
构造
wanherun
今天会有好事发生吗
展开
-
bzoj2717 [Violet 4]迷路的兔子
题目构造题。一共有C(n,2)对兔子,每天对三对兔子有影响,每对兔子不能超过三次。感性认识,能挺C(n,2)天。之后,就是如何构造了,当然需要玄学。#include<bits/stdc++.h> using namespace std; int n; inline char nc() { static char buf[100000],*p1=buf,*p2=buf; return原创 2017-09-24 20:59:33 · 465 阅读 · 0 评论 -
bzoj2296 【POJ Challenge】随机种子
题目构造题,首先,我们需要0~9都有,先构造9876543210*1000000,之后,让它整除x就好了,这也非常简单。#include<bits/stdc++.h> using namespace std; long long T,x; long long p=9876543210000000; inline char nc() { static char buf[100000],*p1=原创 2017-09-23 23:52:47 · 274 阅读 · 0 评论 -
bzoj3101 N皇后
题目呀哈哈哈,我也成为氪金玩家了。。。开通了权限号,贼贵,不过,我们平均地想,一天也就不到1块钱(滑稽更要努力刷题了。考虑构造一波一、当n mod 6 != 2 或 n mod 6 != 3时,有一个解为: 2,4,6,8,…,n,1,3,5,7,…,n-1 (n为偶数) 2,4,6,8,…,n-1,1,3,5,7,…,n (n为奇数) (上面序列第i个数为ai,表示在第i行ai列放一个皇后;原创 2017-09-22 22:50:49 · 214 阅读 · 0 评论