码迷,mamicode.com
首页 >  
搜索关键字:ural 1762    ( 1009个结果
URAL 1671 Anansi's Cobweb (并查集)
题意:给一个无向图。每次查询破坏一条边,每次输出查询后连通图的个数。思路:并查集。逆向思维,删边变成加边。#include#include#include#include#include#define inf -100000000#define LL long long#define maxn 10...
分类:Web程序   时间:2014-08-01 13:17:11    阅读次数:248
平方剩余
平方剩余 POJ:1808 链接:http://poj.org/problem?id=1808 题意:给定a,n(n为质数) 问 x^2 ≡ a (mod n) 是否有解    可以用a^((n - 1)/2) ≡ ±1(mod n) 当为1是二次剩余,为-1是非二次剩余 但上述方法仅仅是判断是否有解,下面的方法能够求最小整数解 Ural(Timus) 1132 链接...
分类:其他好文   时间:2014-07-30 23:56:45    阅读次数:732
(校赛)URAL 1991 The battle near the swamp
In the battle with the Trade Federation, Queen Amidala decided to ask gungans for help. Jar Jar Binks escorted the Queen and her people to the holy place where they had an agreement. The gungans agree...
分类:其他好文   时间:2014-07-29 15:01:46    阅读次数:235
(校赛) URAL 1993 This cheeseburger you don't need
Master Yoda is the oldest member of the Jedi Council. He conducts preparatory classes of little Younglings up to the moment they get a mentor. All Younglings adore master Yoda and they hope to grow...
分类:其他好文   时间:2014-07-29 14:59:48    阅读次数:266
(校赛)URAL 1998 The old Padawan
Luke Skywalker is having exhausting practice at a God-forsaken planet Dagoba. One of his main difficulties is navigating cumbersome objects using the Power. Luke’s task is to hold several stones in ...
分类:其他好文   时间:2014-07-29 13:15:57    阅读次数:326
URAL 1167 Bicolored Horses(DP)
Bicolored Horses 大意:给你N匹马,K个马厩,每一个马都只会是0或1,每一个马厩里会有一个不快乐值(不快乐值=0马的个数*1马的个数),问怎么分配会得出一个最小的不快乐值,输出最小的不快乐值。 思路:先(n^2)处理出来每个区间中的不快乐值,再用DP求解出K个马厩的最小不快乐值。 dp[i][j], i表示当前是分配的第几个马厩,j表示当前...
分类:其他好文   时间:2014-07-29 13:15:06    阅读次数:190
URAL 1167 Bicolored Horses(DP)
Bicolored Horses大意:给你N匹马,K个马厩,每一个马都只会是0或1,每一个马厩里会有一个不快乐值(不快乐值=0马的个数*1马的个数),问怎么分配会得出一个最小的不快乐值,输出最小的不快乐值。思路:先(n^2)处理出来每个区间中的不快乐值,再用DP求解出K个马厩的最小不快乐值。dp[i...
分类:其他好文   时间:2014-07-29 12:35:26    阅读次数:187
URAL 1081 Binary Lexicographic Sequence
第13个位置第5个Bit :13>num[4] =>1 第四个bit 13-num[4]=5 :50 ,3-1 第三个Bit 5>num[2](3) 5-num[2]=2 ...#includeint num[45];void init(){ num[0]=1; num[1]=2; ...
分类:其他好文   时间:2014-07-29 11:50:46    阅读次数:169
URAL 1992
CVSDescriptionYoda: Visit I will the cloners on Kamino... And see this army they have created for the Republic.Cloners from the Kamino planet breed so...
分类:其他好文   时间:2014-07-29 10:55:57    阅读次数:260
URAL 1804 The Machinegunners in a Playoff (比较绕的分类)
URAL 1804 The Machinegunners in a Playoff ,刚开始做,没有找到问题的本质分类还是比较绕的。...
分类:其他好文   时间:2014-07-28 16:12:25    阅读次数:232
1009条   上一页 1 ... 95 96 97 98 99 ... 101 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!