
搜索
文章平均质量分 62
NineFailure
这个作者很懒,什么都没留下…
展开
-
HDU1241简易广搜
搜索原创 2016-04-07 20:22:31 · 373 阅读 · 0 评论 -
HDU5723(53/600)
An abandoned country has n(n≤100000)n(n≤100000) villages which are numbered from 1 to nn. Since abandoned for a long time, the roads need to be re-built. There are m(m≤1000000)m(m≤1000000) roads to be原创 2017-07-21 14:38:55 · 290 阅读 · 0 评论 -
51nod1366(43/600)
一个国家有N个公民,标记为0,1,2,…,N-1,每个公民有一个存款额。已知每个公民有一些朋友,同时国家有一条规定朋友间的存款额之差不能大于d。也就是说,a和b是朋友的话,a有x元的存款,b有y元,那么|x-y|<=d。给定d值与N个人的朋友关系,求这个国家最富有的人和最贫穷的人的存款相差最大的可能值是多少?即求贫富差距的最大值的下界。若这个值为无穷大,输出-1. Input 多组测试数据,第原创 2017-07-16 16:56:14 · 391 阅读 · 0 评论 -
codeforces 525E (29/600)
Anya loves to fold and stick. Today she decided to do just that.Anya has n cubes lying in a line and numbered from 1 to n from left to right, with natural numbers written on them. She also has k sticke原创 2017-07-05 01:56:38 · 339 阅读 · 0 评论 -
CodeForces - 560D (12/600)
Today on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are called equivalent in one of the two cases:They are equal. If we split st原创 2017-06-11 20:46:23 · 382 阅读 · 0 评论 -
poj3411 弱智搜索WA一下午....
再用邻接矩阵存图直播吃屎的#include<iostream>#include<cmath>#include<string>#include<queue>#include<stack>#include<cstring>#include<vector>using namespace std;int gaga=0x3f3f3f3f;int n,m,zouguo[11];vector<原创 2016-11-21 17:53:15 · 630 阅读 · 0 评论 -
lightoj 1009 二分染色
The Vampires and Lykans are fighting each other to death. The war has become so fierce that, none knows who will win. The humans want to know who will survive finally. But humans are afraid of going to原创 2016-11-02 13:03:58 · 250 阅读 · 0 评论 -
HDU1045 水dfs....数据量太小了才16.....
#include<iostream>#include<string>#include<memory.h>#include<algorithm>using namespace std;int n;string tut[5];int biaoji[5][5];int inf=0x3f3f3f3f;int dfs(int x,int y){ for(int s=x+1;s<n;原创 2016-10-16 16:15:38 · 735 阅读 · 0 评论 -
lightoj 1012 水广搜。。。最近我脑子不大好了
#include<iostream>#include<cstdio>#include<string>#include<algorithm>#include<queue>#include<string>using namespace std;string w[30];int xingzou[4][2]={{0,1},{1,0},{-1,0},{0,-1}};struct p{原创 2016-09-29 13:28:42 · 440 阅读 · 0 评论 -
HDU5025 状压+BFS
Description 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng’en during the Ming Dynasty. In this novel, Monkey King Sun原创 2016-10-14 13:39:27 · 632 阅读 · 0 评论 -
HDU5012 bfs
There are 2 special dices on the table. On each face of the dice, a distinct number was written. Consider a1.a2,a3,a4,a5,a6 to be numbers written on top face, bottom face, left face, right face, front原创 2016-10-12 10:50:59 · 328 阅读 · 0 评论 -
lightoj 1023 水dfs
在m<0的时候就不要了… 多复制粘贴几次 总有一波好使的#include<iostream>#include<algorithm>#include<cstdio>#include<memory.h>using namespace std;int n, m;int biaoji[270];int jilu[300];int qw[27];void dfs(int zuobiao,原创 2016-10-11 16:06:54 · 356 阅读 · 0 评论 -
HDU1198
别人都用的dfs,并查集 我用的bfs也过了#include<iostream>#include<algorithm>#include<queue>#include<functional>#include<vector>#include<string>#include<cstdlib>#include<stack>using namespace std;int zujian[11原创 2016-07-19 20:27:51 · 298 阅读 · 0 评论 -
HDU1195弱智广搜
广搜原创 2016-06-22 21:24:47 · 345 阅读 · 0 评论 -
HDU1010弱智搜索
其实这里边就一个奇偶剪枝值得看 再就是注意全局变量的多组数据的初始化 没啥好说的了… 不过需要注意的是这个题不能用bfs bfs只能求出最短的来 求出最短的就停了,问题是这个东西最短的不一定就是答案 所以用dfs bfs我跪了无数次 Problem DescriptionThe doggie found a bone in an ancient maze, which fascina原创 2016-06-18 19:06:53 · 408 阅读 · 0 评论 -
HDU1016
都很水…#include<iostream>#include<string>#include<cmath>#include<algorithm>#include<queue>#include<stack>#include<cstring>using namespace std;int prime[38] = { 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,原创 2016-07-14 11:25:47 · 344 阅读 · 0 评论 -
HDU5952(66/600)
一个有N个点M条边的图,球其中由S个点构成的团的个数。一个团是一个完全子图。 Input 第一行是测试点数。对于每个测试点,第一行包含3个整数N,M和S (N ≤ 100,M ≤ 1000,2 ≤ S ≤ 10),接下来的M行的每一行包含2整数u和v(1 ≤ u < v ≤ N),那就是说那里有一条边在u和v之间。保证顶点最大的度数不超过20。 Output 对于每个测试点,输出一个数表示原创 2017-07-28 19:04:03 · 295 阅读 · 0 评论