码迷,mamicode.com
首页 >  
搜索关键字:timus    ( 147个结果
timus 1106 Two Teams(二部图)
Two Teams Time limit: 1.0 secondMemory limit: 64 MB The group of people consists of N members. Every member has one or more friends in the group. You ...
分类:其他好文   时间:2016-09-07 17:46:02    阅读次数:184
Timus Online Judge 1001. Reverse Root
Input The input stream contains a set of integer numbers Ai (0 ≤ Ai ≤ 1018). The numbers are separated by any number of spaces and line breaks. A size ...
分类:其他好文   时间:2016-08-29 11:30:21    阅读次数:239
URAL 2062 Ambitious Experiment(树状数组)
题目地址:http://acm.timus.ru/problem.aspx?space=1&num=2062 思路:对于x位置上的数,对其有贡献的数为位置为x的因数且属于修改区间[l,r]的数。所以对于查询操作ans=a[p]+sigma(sum(j)) (j为p的约数)。区间修改时仅需修改区间端点值:c[l]+=d,c[r+1]-=d(当数x在某个区间[l,r]时,每次求前x项的和时已包含该区...
分类:编程语言   时间:2016-08-23 22:10:17    阅读次数:146
URAL 2070 Interesting Numbers(数学)
题目地址:http://acm.timus.ru/problem.aspx?space=1&num=2070 思路:质数一定满足题意(满足条件一,因子数为2为质数)。所以只需求出l到r中的合数且因子数为质数的数的个数。该数质因子只能为1(若大于一,则因子数为合数),所以枚举每个质数,若该质数的指数+1(因子数)为质数,则ans--。 #include #include #include #in...
分类:其他好文   时间:2016-08-22 21:52:08    阅读次数:207
URAL 2068 Game of Nuts(博弈)
题目地址:http://acm.timus.ru/problem.aspx?space=1&num=2068 思路:x个石子,x=2*k+1。分三堆2*k+1=(2*k1+1)+(2*k2+1)+(2*k3+1)=2(k1+k2+k3+1)+1。k1+k2+k3+1=k,每分一次,k1+k2+k3减少1,所以石子最多分k次。求出总次数,判断奇偶即可。 #include #include #in...
分类:其他好文   时间:2016-08-22 20:12:08    阅读次数:190
URAL 2069 Hard Rock(思路)
题目地址:http://acm.timus.ru/problem.aspx?space=1&num=2069 思路:对于起点要么横着走,要么竖着走,则共有四种方式,直接竖横、横竖、先横后竖再横、现竖后横再竖,对于中间路径取最大值即可。 #include #include #include #include using namespace std; const int maxn=1e5+50; ...
分类:其他好文   时间:2016-08-22 20:11:29    阅读次数:172
Ural1519 Formula 1(插头dp)
原题网址:http://acm.timus.ru/problem.aspx?space=1&num=1519 有关插头dp和状态压缩请参考:http://wenku.baidu.com/link?url=AFuYe_EfR5yXMNK0rY-TaLe6LLgKhsOVxBM1RQULxElPrvjQ ...
分类:其他好文   时间:2016-08-09 14:59:08    阅读次数:193
Timus OJ 1997 Those are not the droids you're looking for (二分匹配)
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1997 这个星球上有两种人,一种进酒吧至少玩a小时,另一种进酒吧最多玩b小时。 下面n行是人进进出出的时刻,0为进,1为出。让你求是否有合法解。 将合法的进入和出去连边,然后二分匹配就可以了。 ...
分类:其他好文   时间:2016-07-14 15:00:48    阅读次数:224
数位dp专题
第一题:Amount of degrees (ural 1057) 题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1057 第二题:windy数。 题目链接:http://www.lydsy.com/JudgeOnline/problem.php ...
分类:其他好文   时间:2016-05-16 20:06:27    阅读次数:118
Timus 1204 Idempotents
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1204 题目描述: x*x ≡ x (mod n) ,求解所有满足该式的x值,其中n为两个不同的素数的积,并且有x<n; 那么假设n=p*q,且 x mod n = x, 然后易得到 x*x = a ...
分类:其他好文   时间:2016-04-10 17:47:39    阅读次数:128
147条   上一页 1 ... 4 5 6 7 8 ... 15 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!