If you find yourself in Nevada at an abandoned nuclear range during Halloween time, you’ll become a witness of an unusual show. Here Ghostbusters hold annual tests for new versions of their proton packs. There are n Ghostbusters and n portable traps…
2019. Pair: normal and paranormal Time limit: 1.0 secondMemory limit: 64 MB If you find yourself in Nevada at an abandoned nuclear range during Halloween time, you’ll become a witness of an unusual show. Here Ghostbusters hold annual tests for new ve…
Pair: normal and paranormal 题目链接: http://acm.hust.edu.cn/vjudge/contest/126546#problem/H Description If you find yourself in Nevada at an abandoned nuclear range during Halloween time, you'll become a witness of an unusual show. Here Ghostbusters hol…
题意:给你三个数A,B,C 现在要你找到满足 A and B >C 或者 A 异或 B < C 的对数. 思路:我们可以走对立面 把既满足 A and B <= C 也满足 A 异或 B >= C的个数用数位dp统计出来 最后用A*B减去即可 #include <bits/stdc++.h> using namespace std; const double pi = acos(-1.0); const int N = 1e6+7; const int inf = 0…
最近做的一场比赛,把自己负责过的题目记一下好了. Problem B URAL 2013 Neither shaken nor stirred 题意:一个有向图,每个结点一个非负值,可以转移到其他结点.初始时刻从结点出发,然后每次到达一个结点询问上一个到达的正值结点的权值,离开结点时也要询问一下,因为当前结点可能为正数,答案就是这个值了,如果不存在这个样的正权值输出“sober",或者不明确时输出“unkonwn”. 分析:可以当做树形dp来做.dp[u][0]表示进入结点时上一个正权值,dp[…
E Find the median 题意:每次往序列中增加连续的[l,r]的数,每加入一次就询问当前序列的中位数. 解法:此题没有要求在线,那么直接离线+线段树+二分就可以了.求出每个端点之后排序得到数组b,线段树每个叶子结点i存储的是区间[ b[i-1]+1,b[i] ]的系数(即当前序列有多少个[ b[i-1]+1,b[i] ]).修改时顺便维护当前总的数个数sum,然后处理询问就是直接在线段树上二分就可以了. #include<bits/stdc++.h> #define lc o*2…
Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair…
Oulipo Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6227 Accepted Submission(s): 2513 Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, wit…
Windows 常量定义在winuser.h中可以找到,如果了安装了visual studio 2010,winuser.h所在目录为C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include /***************************************************************************** ** winuser.h -- USER procedure declarations,…
学习:重点理解这句话的意思: next[j]会告诉我们从哪里开始匹配 模板题. Oulipo Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3612 Accepted Submission(s): 1428 Problem Description The French author Georges Perec (1936…
Oulipo Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7141 Accepted Submission(s): 2835 Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, wit…
Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair normal,…
KMP算法 求串内匹配数,计数时返回next[]位置. Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’affi…
Oulipo Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23667 Accepted: 9492 Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote…
Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair…
题目意思:找到上串在下串中有多少个 Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’affirmait fau…
Oulipo Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 36903 Accepted: 14898 Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quot…