
ACM划水
文章平均质量分 56
_我走路带风
To save time is to lengthen life.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu1754 线段树
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0 学生ID编号分别从1编到N。 第二行包原创 2017-05-13 17:22:33 · 263 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛(网上资格赛) Problem H : DHU Club Festival 贪心
Description During the past DHU Club Festival, XiaoTang got many bottles of drinks, but each was of a different taste. And they were not of the same concentration. Sometimes it's just that con原创 2017-05-26 20:36:26 · 395 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛(网上资格赛) Problem J : Raising Bacteria
Description You are a lover of bacteria so you want to raise some bacteria in a box. Initially, the box is empty. Every morning, you can put any number of bacteria into the box. Every night every b原创 2017-05-26 20:41:53 · 331 阅读 · 0 评论 -
棋盘问题 深搜
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 当为-1 -1时表示输入结束原创 2017-05-18 15:14:18 · 360 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛 A : STEED Cards 暴力
Description Corn does not participate the STEED contest, but he is interested in the word "STEED". So, Corn writes all permutations of the word "STEED" on different cards and gets 60 cards finall原创 2017-06-03 21:24:23 · 523 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛 C : Count the Number 深搜
Description Given n numbers, your task is to insert '+' or '-' in front of each number to construct expressions. Note that the position of numbers can be also changed. You can calculate a resu原创 2017-06-03 21:27:53 · 529 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛 I : Frog's Jumping 找规律
Description There are n lotus leaves floating like a ring on the lake, which are numbered 0, 1, ..., n-1 respectively. The leaf 0 and n-1 are adjacent. The frog king wants to play a jumping ga原创 2017-06-03 21:43:21 · 682 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛 O : An Easy Problem 贪心
Description Zhu Ge is a very clever boy. One day, he discovered 2*n numbers. He wanted to divide them into n groups, each group contains 2 integers, and minimize the sum of the absolute value o原创 2017-06-03 21:57:48 · 693 阅读 · 0 评论 -
HDU - 1331 Function Run Fun 记忆化搜索
We all love recursion! Don't we? Consider a three-parameter recursive function w(a, b, c): if a 1 if a > 20 or b > 20 or c > 20, then w(a, b, c) returns: w(20, 20, 20) if a w(a,原创 2017-07-08 13:00:57 · 318 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛(网上资格赛)Problem B : Coach
Description In the ACM training team, the coach wants to split all students into many groups and each group consists of three students. Let's assume that all students are numbered from 11 to nn.原创 2017-05-26 20:31:57 · 403 阅读 · 0 评论 -
2017年上海金马五校程序设计竞赛(网上资格赛)Problem A : Corn's new language
Description Corn is going to promote programming in the campus, so he wants to add a lot of interesting ideas to make programming more attractive. One task he is working on is to develop a new prog原创 2017-05-26 20:29:41 · 620 阅读 · 0 评论 -
Is It A Tree? 并查集
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties. Ther原创 2017-05-13 17:40:09 · 518 阅读 · 0 评论 -
UVALive - 4868 暴力
老铁,这个题把就别想啥算法了,直接暴力秒了做下题吧,一开始还在想什么算法,后来一看数据直接不忍了,给个小数据简直了,暴力了。 #include #include #include #include using namespace std; int huiwen(char s[]){ int len = strlen(s); int min = len / 2;原创 2017-05-13 18:02:59 · 348 阅读 · 0 评论 -
UVALive - 4872 最小生成树
这个题看着像是一个图,于是我就当最小生成树树去搞了一下,然后一脸懵逼的A了 #include #include using namespace std; long long INF = 1000000; double cost[1005][1005]; double mincost[1005]; bool used[1005]; int vv; double prim原创 2017-05-13 18:06:27 · 310 阅读 · 0 评论 -
UVALive 6150 神坑
这个题把,不难,就是暴力,但是我WA了半年,我想说,老铁,至于吗,输出没有回车就WA,出题人什么心态啊啊啊啊 呜呜呜 #include #include #include using namespace std; int main(){ string end="E-N-D"; int i=0,higt=0,flag; char b[10005][105]; int原创 2017-05-13 18:18:57 · 397 阅读 · 0 评论 -
HDU 1176 DP
动归虐我千百遍,还是不会写,被一个老哥教会的,就是三种考虑情况,向前,向后,原地 #include #include using namespace std; int v[100005][15],x[100005],t[100005]; int u,n; int ccc(int a,int b,int c) { int k; k=a>b?a:b; k=k>原创 2017-05-13 18:25:24 · 261 阅读 · 0 评论 -
HDU 1203 I NEED A OFFER! DP
Problem Description Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得原创 2017-05-13 18:26:55 · 273 阅读 · 0 评论 -
The story of a cow
有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛? Input 输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0 n=0表示输入数据的结束,不做处理。 Output 对于每个测试实例,输出在第n年的时候母牛的数量。 每个输出占一行。 Sample Input 2 4 5 0 Sa原创 2017-05-13 18:31:54 · 320 阅读 · 0 评论 -
love A^B HDU - 2035 暴力
Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。 Sample Input 2原创 2017-05-13 23:57:16 · 220 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 H (简单DP)
In this winter holiday, Bob has a plan for skiing at the mountain resort. This ski resort has MM different ski paths and NN different flags situated at those turning points. The ii-th path fro原创 2017-09-09 15:16:05 · 413 阅读 · 0 评论