摘要:
Kuro is currently playing an educational game about numbers. The game focuses on the greatest common divisor (GCD), the XOR value, and the sum of two 阅读全文
摘要:
Bert is a programmer with a real fear of floating point arithmetic. Bert has quite successfully used rational numbers to write his programs but he doe 阅读全文
摘要:
The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,(1, 阅读全文
摘要:
Eagle (AKA Mohamed Ahmed) lives in a city consists of n intersections connected by n-1 roads, in a way that can go from any intersection to any other 阅读全文
摘要:
(一下只供自己复习用,目的是对比这几个题,所以写得不详细。需要细节的可以参考其他博主) 【BZOJ3172:单词】 题目: 某人读论文,一篇论文是由许多(N)单词组成。但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次。N<=200,总单词长度不超过10^6。 思路: 简 阅读全文
摘要:
【A:最大的K-偏差排列】: 第一次在hiho卡一题,所以暴力了搜索了一下,70分,后面回来打表找规律,规律是有和K有关的周期。 当K<=N/2时,成周期交叉变化,最后尾部部分单独考虑。 当K>N/2时,有三个序列,分别是[K+1...N] [K...N-K+1 ] [1..N-K] 自己的代码: 阅读全文
摘要:
题意:给定字符串S,多次修改区间值,多次询问区间有多少匹配串T,可以失配3次。 超时思路:用bitset的思路去做的,每次记录T的相应位置[0,L-1]的集合,一位一位的移、求并,对于出现的失配位置,我们最多可以更新3次。假设数据小一点,没准可以过。 主要还是修改操作那里太暴力的,单点操作的题是遇到 阅读全文
摘要:
Special Thanks: Jane Alam Jan*At moment in University of Texas at San Antonio - USA You will be given n integers A1A2A3...An. Find a permutation of th 阅读全文
摘要:
BTW wants to buy a gift for her BF and plans to buy an integer array. Generally Integer arrays are costly and hence bought the cheapest one from the m 阅读全文
摘要:
On September 22, 2004, Oceanic Flight 815 crashed on a mysterious island somewhere in the pacific. There actually were survivors in the crash , N surv 阅读全文