ACM
Rick~
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
排序
排序 输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。 你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。 Input 输入包含多组测试用例,每组输入数据只有一行数字(数字之间没有空格),这行数字的长度不大于1000。 输入数据...原创 2018-12-07 17:03:55 · 136 阅读 · 0 评论 -
POJ 1611 并查集
POJ 1611 并查集 The Suspects Time Limit: 1000MS Memory Limit: 20000K Total Submissions: 53197 Accepted: 25301 Description Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aeti...原创 2019-01-28 23:29:15 · 210 阅读 · 0 评论 -
POJ 3126 素数筛选+BFS
POJ 3126 Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 30738 Accepted: 16699 Description The ministers of the cabinet were quite upset by the message from the Chief of Securi...原创 2019-01-28 23:56:59 · 152 阅读 · 0 评论 -
HDU 2159 dp完全背包
HDU 2159 FATE Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 19932 Accepted Submission(s): 9325 Problem Description 最近xhd正在玩一款叫做FATE的游戏,为了得...原创 2019-01-29 00:03:38 · 124 阅读 · 0 评论 -
HDU 2845 dp
HDU 2845 Beans Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6624 Accepted Submission(s): 2843 Problem Description Bean-eating is an inter...原创 2019-01-29 00:07:56 · 138 阅读 · 0 评论 -
POJ 3984 BFS走迷宫
POJ 3984 迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37978 Accepted: 21300 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,...原创 2019-01-29 00:11:06 · 200 阅读 · 0 评论 -
HDU 1159 dp+最长公共子序列
HDU 1159 Common Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 51579 Accepted Submission(s): 23755 Problem Description A subseq...原创 2019-01-29 00:16:39 · 148 阅读 · 0 评论 -
HDU 1495 BFS倒可乐
HDU 1495 非常可乐 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 27120 Accepted Submission(s): 10537 Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情...原创 2019-01-29 00:19:11 · 207 阅读 · 0 评论 -
HDU 2067 卡特兰数
HDU 2067 小兔的棋盘 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14077 Accepted Submission(s): 6972 Problem Description 小兔的叔叔从外面旅游回来给她带来了一个礼物,...原创 2019-01-29 00:21:14 · 152 阅读 · 0 评论 -
HDU 2049 错排公式
HDU 2049 不容易系列之(4)——考新郎 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 51011 Accepted Submission(s): 18604 Problem Description 国庆期间,省城HZ刚刚...原创 2019-01-29 00:23:31 · 140 阅读 · 0 评论 -
HDU 2068 错排公式
HDU 2068 RPG的错排 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 17473 Accepted Submission(s): 7016 Problem Description 今年暑假杭电ACM集训队第一次组成女生队,...原创 2019-01-29 00:25:53 · 159 阅读 · 0 评论 -
Dijkstra算法
算法复杂度:o(n²) 算法简介:将所有点分为S T两集合,每次在T中找距离S最短的点挪入S中。代码中用vis数组界定S T #include<cstring> #include<iostream> #include<algorithm> using namespace std; int maze[101][101]; int vis[101]; int d[1...原创 2019-03-26 15:29:01 · 228 阅读 · 0 评论 -
Floyd算法
Floyd就是疯狂遍历,找出地图中两两之间的最短距离。 //Floyd算法可以算出地图中任意两个地点(x、y)的最短距离 //并且保存在maze[x][y]里 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; #...原创 2019-03-26 15:30:01 · 551 阅读 · 0 评论 -
HDU 1176 数塔
HDU1176 免费馅饼 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 68496 Accepted Submission(s): 24014 Problem Description 都说天上不会掉馅饼,但有一天gameboy正走...原创 2019-01-23 11:51:58 · 149 阅读 · 0 评论 -
HDU 1420 快速幂取模
HDU 1420 Prepared for New Acmer Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13561 Accepted Submission(s): 5096 Problem Description 集训进行了...原创 2019-01-23 11:36:13 · 179 阅读 · 0 评论 -
HDU 1171 dp
HDU 1171 Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 53813 Accepted Submission(s): 18236 Problem Description Nowadays,...原创 2019-01-23 11:30:13 · 130 阅读 · 0 评论 -
ASCII码排序
ASCII码排序 输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。 Input 输入数据有多组,每组占一行,有三个字符组成,之间无空格。 Output 对于每组输入数据,输出一行,字符中间用一个空格分开。 Sample Input qwe asd zxc Sample Output e q w a d s c x z 问题分析: 用冒泡排序法依次比较字符大小,再从小到大输出,其...原创 2018-12-07 17:54:13 · 423 阅读 · 0 评论 -
计算球体积
计算球体积 根据输入的半径值,计算球的体积。 Input 输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。 Output 输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。 Sample Input 1 1.5 Sample Output 4.189 14.137 Hint #define PI 3.1415927 题目分析: 注意数字都为浮点数,输出的结果保留3位...原创 2018-12-07 17:57:24 · 145 阅读 · 0 评论 -
A + B Problem Too
A + B Problem Too This problem is also a A + B problem,but it has a little difference,you should determine does (a+b) could be divided with 86.For example ,if (A+B)=98,you should output no for result....原创 2018-12-07 18:00:28 · 149 阅读 · 0 评论 -
String Task
String Task Problem Description Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: in the given stri...原创 2018-12-05 22:03:03 · 371 阅读 · 0 评论 -
J-Problem J
J-Problem J 给定一个日期,输出这个日期是该年的第几天。 Input 输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。 Output 对于每组输入数据,输出一行,表示该日期是该年的第几天。 Sample Input 1985/1/20 2006/3/12 Sample Output 20 71 ...原创 2018-12-08 23:56:56 · 152 阅读 · 0 评论 -
George and Accommodation
George and Accommodation George has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a...原创 2018-12-07 15:53:39 · 132 阅读 · 0 评论 -
Stones on the Table
Stones on the Table There are n stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that any two neighboring stones had d...原创 2018-12-07 16:01:20 · 152 阅读 · 0 评论 -
A + B Problem
A + B Problem Calculate A + B. Input Each line will contain two integers A and B. Process to end of file. Output For each case, output A + B in one line. Sample Input 1 1 Sample Output 2 问题分析: 做加法运算,但...原创 2018-12-07 16:04:47 · 139 阅读 · 0 评论 -
HDU 2191 多重背包
HDU 2191 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 40121 Accepted Submission(s): 16974 Problem Description 急...原创 2019-01-25 09:53:04 · 111 阅读 · 0 评论 -
HDU 1114 背包
HDU1114 Piggy-Bank Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 37180 Accepted Submission(s): 18422 Problem Description Before ACM can do...原创 2019-01-25 09:56:25 · 294 阅读 · 0 评论 -
HDU 2059 dp
HDU 2059 龟兔赛跑 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 23887 Accepted Submission(s): 8757 Problem Description 据说在很久很久以前,可怜的兔子经历了人生中最大...转载 2019-01-26 21:56:39 · 191 阅读 · 0 评论 -
HDU 1069 dp
HDU1069 A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If...原创 2019-01-23 11:11:17 · 126 阅读 · 0 评论 -
POJ1258:Agri-Net-最小生成树
Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John ordered...原创 2019-03-26 15:31:10 · 167 阅读 · 0 评论
分享