- 博客(64)
- 资源 (11)
- 收藏
- 关注
原创 解决ubuntu下的磁盘不能访问问题
报错形式:不能访问 107 GB 卷Error mounting /dev/nvme0n1p4(对应路径) at /media/chudongfang/F27A236F7A232FB1: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/nvme0n1p4" "/m
2016-05-31 21:49:32 7487
原创 校个人赛——02
A - Infinite SequenceTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionVasya likes everything infinite. Now he is studying the pr
2016-05-31 21:23:34 482
原创 C - 悼念512汶川大地震遇难同胞――珍惜现在,感恩生活——HOJ ——0-1背包 滚动数组
C - 悼念512汶川大地震遇难同胞――珍惜现在,感恩生活Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription急!灾区的食物依然短缺! 为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现
2016-05-24 16:45:16 532
原创 B - I NEED A OFFER!——HOJ 类0-1背包问题 +滚动数组
B - I NEED A OFFER!Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国
2016-05-24 15:46:02 461
原创 A - Bone Collector——HOJ 简单0-1背包
A - Bone CollectorTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionMany years ago , in Teddy’s hometown there was a man who was c
2016-05-24 11:51:28 538
原创 C - Palindrome——区间DP,巧妙的利用滚动数组
C - PalindromeTime Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA palindrome is a symmetrical string, that is, a string read ident
2016-05-23 21:16:45 497
原创 B - Longest Ordered Subsequence——HOJ
B - Longest Ordered SubsequenceTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA numeric sequence of ai is ordered if a1 a2 aN
2016-05-23 16:51:38 421
原创 A - The Triangle——HOJ
A - The TriangleTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription73 88 1 02 7 4 44 5 2 6 5(Figure 1
2016-05-23 16:24:39 385
原创 刷题声明模板
#include#include#include#include#include#include#include #include#include#include#include#include#include#define mst(ss,b) memset((ss),(b),sizeof(ss))#define maxn 0x3f3f3f3f#define MAX
2016-05-21 18:23:50 447
原创 链表的插入排序
void LinkInsertSort(){ //current指向当前待插入的结点。 STUDENT* head2, *current, *p, *q; if (head == NULL) return ; //第一次拆分。 head2 = head;//把链表一的头节点给链表二 head = NULL; while
2016-05-21 18:17:51 367
原创 区间DP——1048 石子归并 codevs
1048 石子归并 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold题解 有n堆石子排成一列,每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子,一次合并的代价为两堆石子的重量和w[i]+w[i+1]。问安排怎样的合并顺序,能
2016-05-19 20:30:32 477
原创 最长公共子序列——LCS
参考:http://blog.csdn.net/v_JULY_v/article/details/6110269最长公共子序列的DP 解决方法:其可以化简为最优的子结构记:Xi=﹤x1,⋯,xi﹥即X序列的前i个字符 (1≤i≤m)(前缀)Yj=﹤y1,⋯,yj﹥即Y序列的前j个字符 (1≤j≤n)(前缀)假定Z=﹤z1,
2016-05-19 16:35:15 394
原创 N - Longest Ordered Subsequence——POJ 最长递增子序列
N - Longest Ordered SubsequenceTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA numeric sequence of ai is ordered if a1 a2 aN
2016-05-19 10:47:44 850
原创 P - FatMouse and Cheese——记忆DP探索与发现过程
P - FatMouse and CheeseTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionFatMouse has stored some cheese in a city. The city can b
2016-05-17 00:34:12 628
原创 R - Milking Time——POJ C语言实现
R - Milking TimeTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionBessie is such a hard-working cow. In fact, she is so focused
2016-05-16 15:59:26 486
原创 Problem I: Catching Dogs——华中农业大学第四届程序
Problem I: Catching DogsTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 1109 Solved: 288[Submit][Status][Web Board]Description Diao Yang keeps many dogs. But today his dogs all run
2016-05-15 19:12:30 684
原创 百度之星——Problem D
Problem D Accepts: 2519 Submissions: 7501 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem Description度熊所居住的 D 国,是一个完全尊重人权的国度。
2016-05-15 19:08:08 480
原创 Problem J: Arithmetic Sequence——华中农业大学第四届程序设计大赛网络同步赛题目
Problem J: Arithmetic SequenceTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 1771 Solved: 299[Submit][Status][Web Board]Description Giving a number sequence A with length n, you
2016-05-15 15:13:35 787
原创 华中农业大学第四届程序设计大赛网络同步赛题目
Problem A: SokobanTime Limit: 1 Sec Memory Limit: 512 MBSubmit: 17 Solved: 1[Submit][Status][Web Board]Description Sokoban is a very famous mini game. When Diao Fei was young, he
2016-05-15 15:06:31 984
原创 Problem H: Eat Candy
Problem H: Eat CandyTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 1329 Solved: 643[Submit][Status][Web Board]Description There is a box with infinite volume. At first there are n
2016-05-15 15:01:09 308
原创 Problem C: The Same Color
Problem C: The Same ColorTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 983 Solved: 595[Submit][Status][Web Board]Description Diao Yang has many balls with different colors. Today
2016-05-15 14:59:21 336
原创 Problem G: Find The Difference
Problem G: Find The DifferenceTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 214 Solved: 161[Submit][Status][Web Board]Description Diao Fei is very good at the game which names “Find
2016-05-14 16:56:19 653 2
原创 Problem F: The Nearest Same Chocolate
Problem F: The Nearest Same ChocolateTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 271 Solved: 151[Submit][Status][Web Board]Description Now it is well-known that after the 40th A
2016-05-14 16:47:04 387
原创 I - 最少拦截系统——HOJ LCS
I - 最少拦截系统Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹
2016-05-12 22:33:15 604
原创 H - Tickets——HOJ 简单一维DP
H - TicketsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionJesus, what a great movie! Thousands of people are rushing to the cin
2016-05-12 20:09:58 404
原创 F - Piggy-Bank——HOJ 一维DP 装载问题
F - Piggy-BankTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionBefore ACM can do anything, a budget must be prepared and the nece
2016-05-12 19:15:10 492
原创 E - Super Jumping! Jumping! Jumping!——HOJ
E - Super Jumping! Jumping! Jumping!Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionNowadays, a kind of chess game called “Super
2016-05-12 16:39:00 401
原创 C - Monkey and Banana——POJ
C - Monkey and BananaTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionA group of researchers are designing an experiment to test
2016-05-12 15:45:57 532
原创 B - Ignatius and the Princess IV——POJ
B - Ignatius and the Princess IVTime Limit:1000MS Memory Limit:32767KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription"OK, you are not too bad, em... But you can neve
2016-05-11 20:35:27 1768
原创 A - Max Sum Plus Plus——POJ
A - Max Sum Plus PlusTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionNow I think you have got an AC in Ignatius.L's "Max Sum" prob
2016-05-11 20:20:59 564
转载 滚动数组
form: http://blog.csdn.net/niushuai666/article/details/6677982滚动数组的作用在于优化空间,主要应用在递推或动态规划中(如01背包问题)。因为DP题目是一个自底向上的扩展过程,我们常常需要用到的是连续的解,前面的解往往可以舍去。所以用滚动数组优化是很有效的。利用滚动数组的话在N很大的情况下可以达到压缩存储的作用。
2016-05-11 19:00:22 407
原创 G - Lunch Time——ZOJ
G - Lunch TimeTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionThe 999th Zhejiang Provincial Collegiate Programming Contest will be
2016-05-10 22:07:52 797
原创 J - Convert QWERTY to Dvorak——ZOJ
J - Convert QWERTY to DvorakTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionEdward, a poor copy typist, is a user of the Dvorak La
2016-05-10 21:27:11 862
原创 L - Demacia of the Ancients——ZOJ
L - Demacia of the AncientsTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionThere is a popular multiplayer online battle arena game
2016-05-10 20:16:34 478
原创 H - May Day Holiday——ZOJ
H - May Day HolidayTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionAs a university advocating self-learning and work-rest balance,
2016-05-10 20:15:32 896
原创 给定年月日,一个公式巧算星期几
来看公式:int CaculateWeekDay(int y,int m, int d){ if(m==1||m==2) { m+=12; y--; } int iWeek=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400)%7; return iWeek;} 这个公式叫基姆拉尔森
2016-05-10 19:54:29 14897 1
原创 D - Beauty of Array——ZOJ
D - Beauty of ArrayTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionEdward has an array A with N integers. He defines the beauty of
2016-05-10 17:58:18 468
原创 A - Ace of Aces——ZOJ
A - Ace of AcesTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionThere is a mysterious organization called Time-Space Administrative
2016-05-10 16:10:12 967
原创 D - Fliptile——POJ
D - FliptileTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionFarmer John knows that an intellectually satisfied cow is a happy
2016-05-09 16:50:40 778
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人