2012年4月7日

竟然是trie

摘要: Consecutive SumTime Limit: 1 SecMemory Limit: 128 MBSubmit: 42Solved: 3[Submit][Status][Web Board]DescriptionLittle Jimmy is learning how to add integers. As in decimal the digits are 0 to 9, it makes a bit hard for him to understand the summation of all pair of digits. Since addition of numbers req 阅读全文

posted @ 2012-04-07 21:31 Goal 阅读(392) 评论(0) 推荐(0) 编辑

cf

摘要: http://codeforces.com/contest/173/problem/A第一次做cf,感觉题目很好,贴下最简单的题目的代码View Code #include <iostream>#include <cstring>using namespace std;char s1[1100],s2[1100];int cal(char a,char b){ if(a==b) return 0; if(a=='R'&&b=='S') return 1; if(a=='S'&&b==' 阅读全文

posted @ 2012-04-07 21:18 Goal 阅读(167) 评论(0) 推荐(0) 编辑

spfa 反向建边 两次求最短路 Toll Management

摘要: Toll ManagementTime Limit: 1 SecMemory Limit: 128 MBSubmit: 43Solved: 16[Submit][Status][Web Board]DescriptionIn Dhaka there are too many vehicles. So, the result is well known, yes, traffic jam. So, mostly people have to spend quite a time in the roads to go from one place to another.Now, the stude 阅读全文

posted @ 2012-04-07 15:54 Goal 阅读(255) 评论(0) 推荐(0) 编辑

树状数组的应用 Mega Inversions

摘要: Mega InversionsTime Limit: 1 SecMemory Limit: 128 MBSubmit: 84Solved: 17[Submit][Status][Web Board]DescriptionThe n^2 upper bound for any sorting algorithm is easy to obtain: just take two elements that are misplaced with respect to each other and swap them. Conrad conceived an algorithm that procee 阅读全文

posted @ 2012-04-07 13:51 Goal 阅读(416) 评论(0) 推荐(0) 编辑

Robots on a grid bfs() dp

摘要: Robots on a gridTime Limit: 1 SecMemory Limit: 128 MBSubmit: 272Solved: 43[Submit][Status][Web Board]DescriptionYou have recently made a grid traversing robot that can finnd its way from the top left corner of a grid to the bottom right corner. However, you had forgotten all your AI programming skil 阅读全文

posted @ 2012-04-07 10:27 Goal 阅读(320) 评论(0) 推荐(0) 编辑

导航