【清华集训2014】玛里苟斯 - 题目 - Universal Online Judge k=1,2,3,4,5各占20pts是提示 应当分开考虑 k=1 拆位,如果第i位有1,则有1/2的概率xor出来,得到(1<<i)的贡献 证明考虑若干个有1的数,找到偶数个1的概率 k=2 还是拆位 然后考虑 ...
分类:
其他好文 时间:
2019-01-05 22:48:45
阅读次数:
200
Description 给出N,统计满足下面条件的数对(a,b)的个数: 1. 1 using namespace std; define int long long define ONLINE_JUDGE ifdef ONLINE_JUDGE define getchar() ((p1==p2&& ...
分类:
其他好文 时间:
2019-01-02 17:32:14
阅读次数:
223
def judge_password(password): if len(password) >= 8: pattern = re.compile('[A-Z]+') match = pattern.findall(password) if match: pattern = re.compile('... ...
分类:
其他好文 时间:
2018-12-30 02:35:18
阅读次数:
241
Goodbye 2018 本来想在2018年12月31日的夜里面再写这一篇的,但是可巧今个周末要写一篇叫做“路”的随笔,写完后有感而发,写下这篇文章。 里面的一些简写:bcb—编程班 OJ—Online Judge AC—Accepted WA—Wrong Answer TLE Time Limit ...
分类:
数据库 时间:
2018-12-24 02:58:41
阅读次数:
180
Evacuation Plan Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5665Accepted: 1481Special Judge 题目链接:http://poj.org/problem?id=2175 Descripti ...
分类:
其他好文 时间:
2018-12-22 21:59:33
阅读次数:
168
/* 满足n>=(k+1)*k/2的整数n必定满足 a+(a+1)+...+(a+k-1) #define mod 1000000007 #define ll long long using namespace std; ll n,k; int judge(ll x){ ll tot=(x+x+k-... ...
分类:
其他好文 时间:
2018-12-20 11:58:14
阅读次数:
168
/*二分答案即可*/ #include #define maxn 500005 #define ll long long #define INF 5000005 using namespace std; ll n,b,a[maxn]; int judge(ll x){ ll tot=0; for(i... ...
分类:
其他好文 时间:
2018-12-20 10:29:09
阅读次数:
144
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Exa ...
分类:
其他好文 时间:
2018-12-18 11:02:53
阅读次数:
180
题目链接:https://codeforces.com/contest/1093 A. Dice Rolling 题意: 有一个号数为2-7的骰子,现在有一个人他想扔到几就能扔到几,现在问需要扔多少次,能使扔出的总和等于xi。 题解: 由于是special judge,模拟一下搞搞就行了= = 代码 ...
分类:
其他好文 时间:
2018-12-18 10:56:25
阅读次数:
188
还是贪心qwq (这首曲子Xeuphoria的超好听 Noi open judge 3528 给定一个十进制正整数n(0 < n < 1000000000),每个数位上数字均不为0。n的位数为m。 现在从m位中删除k位(0<k < m),求生成的新整数最小为多少? 例如: n = 9128456, ...
分类:
其他好文 时间:
2018-12-05 18:42:55
阅读次数:
167