
ad hoc
文章平均质量分 88
mowayao
这个作者很懒,什么都没留下…
展开
-
Uva11572-Unique Snowflakes
统计最长无公共元素子串:map 搞定#include #include #include #include #include #include using namespace std;int n;vector st;map visit;void LNRS_dp_hash_impro(vector &arr, int size){ //memset(visit, -1,原创 2013-08-15 21:53:57 · 670 阅读 · 0 评论 -
Uva10970 Big Chocolate
水水题#include #include using namespace std;int main(){ int m,n; while(~scanf("%d%d",&m,&n)){ cout<<(n-1)*m+m-1<<endl; } return 0;}原创 2013-08-03 12:55:52 · 570 阅读 · 0 评论 -
UVa10229 - Modular Fibonacci
Problem A: Modular FibonacciThe Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...) are defined by the recurrence:F0 = 0F1 = 1Fi = Fi-1 + Fi-2 for i>1Write a program which c原创 2014-03-18 19:29:17 · 868 阅读 · 0 评论 -
UVa763 - Fibinary Numbers
Problem B: How many Fibs?Recall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n>=3)Given two numbers a and b, calculate how many Fibonacci numbers are in原创 2014-03-18 15:53:37 · 823 阅读 · 0 评论 -
UVa10670 - Work Reduction
Problem C: Work ReductionPaperwork is beginning to pile up on your desk, and tensions at the workplace are starting to mount. Your boss has threatened to fire you if you don't make any progress by原创 2014-03-11 15:34:28 · 658 阅读 · 0 评论 -
UVa162 Beggar My Neighbour
Beggar My Neighbour ``Beggar My Neighbour'' (sometimes known as ``Strip Jack Naked'') is a traditional card game, designed to help teach beginners something about cards and their values. A原创 2014-03-01 17:08:36 · 1225 阅读 · 0 评论 -
UVa10901 - Ferry Loading III
Problem B: Ferry Loading IIIBefore bridges were common, ferries were used to transport cars across rivers. River ferries, unlike their larger cousins, run on a guide line and are powered by the rive原创 2014-03-01 19:26:42 · 1107 阅读 · 0 评论 -
UVa10145Loansome Car Buyer
Problem D: Loansome Car BuyerSource file:loan.{c, cpp, java, pas}Input file:loan.inOutput file:loan.outKara Van and Lee Sabre are lonesome. A few months ago they原创 2014-02-28 14:31:34 · 1123 阅读 · 0 评论 -
UVa10145 - Lock Manager
Problem C"Lock Manager"You are invited to be a part of the team that is developing yet another DBMS (Data Base Management System). You will be responsible for the Lock Manager.Locks control co原创 2014-03-01 01:09:53 · 1111 阅读 · 0 评论 -
POJ2817 WordStack
WordStackTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2944 Accepted: 1023DescriptionAs editor of a small-town newspaper, you know that a substantial原创 2013-10-06 16:33:52 · 869 阅读 · 0 评论 -
Uva 10340 ALL IN ALL
弱爆了,这种水题都能弹个几次。。。少了一个++k #include #include #include #include #include using namespace std;int main(){ string st1,st2; while(cin >> st1 >> st2){ int k = 0,cnt = 0; for(int i = 0; i < s原创 2013-08-03 12:43:01 · 499 阅读 · 0 评论