D - Black Spot Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice URAL 1934Description Bootstrap: Jones's terr...
分类:
编程语言 时间:
2015-07-29 11:58:32
阅读次数:
172
DES:给出起点和终点。给出所有小岛的编号。所有路径的起始点。和遇到怪物的概率。要求在最短路的条件下维护遇见怪物的概率最小的路径。就是用 SPFA算法。每条路的权值设为1。最短路即为途径的岛数最少。同时要用pre数组维护每个点的前驱。最后递归输出所走路径。把p变为不遇见怪物的概率, 即为维护p最大。...
分类:
其他好文 时间:
2015-07-29 11:56:32
阅读次数:
156
这题一看就是博弈吧,,,,,,,,,没啥说的。。
一次取1~L个棋子,,最后让2赢,,,输出符合的最小的L,,,没有的话就输出0、。。。。。
#include
#include
using namespace std;
int main()
{
int m;
scanf("%d",&m);
int i;
for(i=2;i
{
...
分类:
其他好文 时间:
2015-07-27 15:08:08
阅读次数:
110
这题跟前面的一个codeforces很像,,,,就是一个数一直映射,,,让式子回到原来,,,,,,的周期
先是纯模拟,,错了几回然后TLE:
#include
#include
using namespace std;
int t=0;
int a[1001],b[1001],c[1001];
int m;
int fuhe()
{
int i;
for(i...
分类:
其他好文 时间:
2015-07-27 15:02:31
阅读次数:
97
题意看哭我。。。。。。英语真的差太多了。。。
第一行不用说了。。。。。。之后每一行后面几个数是第一个数的后代,,,,最后求一条可以的祖宗到末代的顺序、。。。。。。。。。。。
拓扑排序(非模板较乱勿喷)...
分类:
其他好文 时间:
2015-07-25 12:19:15
阅读次数:
170
题好长,,,,题意就是能否在两块里各找一个数和为10000.。。。。。。。。。。。。先想到将两个数组排序,,,大加小。。。。。。。但是超时了。。。。。。。应该就想到动态规划或者二分,,,,,,,...
分类:
其他好文 时间:
2015-07-25 10:50:26
阅读次数:
133
开始水URAL,今天先来几个。。
1785. Lost in Localization
Time limit: 1.0 second
Memory limit: 64 MB
The Lavin Interactive Company, which has developed the turn-based strategy Losers-V, is const...
分类:
其他好文 时间:
2015-07-22 23:02:54
阅读次数:
318
1243. Divorce of the Seven Dwarfs
Time limit: 1.0 second
Memory limit: 64 MB
After the Snow White with her bridegroom had left the house of the seven dwarfs, their peaceful and prosperous l...
分类:
其他好文 时间:
2015-07-22 18:56:14
阅读次数:
131
这里写链接内容刚开始学插头dp好吃力,看了别人的代码有点看不懂,所以就参考了别人的代码,写了注释,希望有帮助
如果看不懂可以问//下面所说的情况全在论文中的第13页
#include
#include
#include
using namespace std;
#define N 13
#define S1 14000
#define S2...
分类:
其他好文 时间:
2015-07-20 19:31:35
阅读次数:
123
题意:给了x,y,l,r,求由x,y可以线性组合出多少个在[l,r]内的数。例x=4,y=5,l=7,r=13,则x,y可以组合出8,9,10,12,13
解:所有x,y线性组合的数可化为区间[x,y],[2x,2y],[3x,3y]......
从[kx,ky]开始区间重叠,则(k+1)x
在[l,r]区间内的数可化为f[r]-f[l-1],f[x]为x之前由x,y线性组合的数的个数
#...
分类:
其他好文 时间:
2015-07-19 18:14:31
阅读次数:
119