2751: [HAOI2012]容易题(easy)Time Limit: 10 SecMemory Limit: 128 MBSubmit: 872Solved: 377[Submit][Status]Description为了使得大家高兴,小Q特意出个自认为的简单题(easy)来满足大家,这道简单...
分类:
其他好文 时间:
2014-09-19 18:58:45
阅读次数:
277
【题目简述】:其实就是根据题目描述:A permutation of the integers 1 to n is an ordering of these integers. So the natural way to represent a permutation is to list the integers in this order. With n = 5, a permutation...
分类:
其他好文 时间:
2014-09-19 13:53:15
阅读次数:
185
这个题是简单题,但是我的思路本身不周全,忽略了一种比较“无理”的情况,而导致WA多次。我是把猜的串全扫一遍以后判断出结果,但是实际上可能是前面已经全猜对了,但是这个选手是个逗比,已经猜对了还要猜,而且后面还又猜错了几次,导致最后猜错的总次数大于7。这种情况下应该也算win的。所以如果已经全猜对了,就...
分类:
其他好文 时间:
2014-09-18 12:55:43
阅读次数:
144
基本运用,基本是模板题。
求fi【n】. (1,1) *( 1 )
( 1,0) ( 0)
#include
#include
using namespace std;
struct juz
{
int bat[3][3];
int x,y; //行 列
};
juz mutp(ju...
分类:
其他好文 时间:
2014-09-16 22:15:31
阅读次数:
243
【题意简述】:求由小正方体组成的大的长方体的表面积。
【分析】:注意边界。
// 268K 0Ms
#include
using namespace std;
int main()
{
int C;
int t;
int l,w;//底面的长和宽
int h;// 立方体的高
int s=0;//表面积
cin>>C;
int Min;
while(C--)
{
...
分类:
其他好文 时间:
2014-09-16 14:18:30
阅读次数:
265
说说:
其实这道题就是一道广度优先遍历求最短路径的简单题目。但是可能今晚状态不太好,开始一直想当然地就按深度优先遍历去写了。然后测试数据又刚好能通过,结果就特别地纠结。不过总的来说,这道题是非常简单的。至于代码的话,后来写得烦起来了,可能看起来有点凌乱QAQ
源代码:
#include
#include
#define MAX 30+5
typedef struct{
int x;...
分类:
其他好文 时间:
2014-09-14 22:12:57
阅读次数:
358
简单题,splay题意: 按顺序给出一些数,找出距离当前数最近的数的差,将这些差求和即可。#include #include #include #include #include #include #include #include #include #include #include #defi....
分类:
其他好文 时间:
2014-09-14 21:53:47
阅读次数:
250
题目地址:HDU 3395
刷了几道白书和CF上的非算法题,感觉智商越来越接近负数了。。。还是先刷几道简单题缓缓。。
这题很简单,二分图模型,用费用流也可以,用KM也可以。不过需要注意的是这里是最大费用流,并不是最大费用最大流,区别在于是否是最大流,这题可以不是最大流,所以要当费用开始减少的时候停止继续流,来保证费用是最大的。
代码如下:
#include
#include
#incl...
分类:
其他好文 时间:
2014-09-12 19:16:54
阅读次数:
265
一道很简单的,典型的BFS。
代码虐我千百遍,我待代码如初恋
Catch That Cow
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 47366
Accepted: 14869
Description
Farmer John has been info...
分类:
其他好文 时间:
2014-09-09 12:46:18
阅读次数:
210
渣渣的我做算法只能做水题啊。。
又是一道BFS水题
代码虐我千百遍,我待代码如初恋。我对代码是真爱啊
Knight Moves
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 22041
Accepted: 10294
Description
Backgrou...
分类:
其他好文 时间:
2014-09-09 12:39:48
阅读次数:
175