上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
  2013年8月30日
摘要: http://poj.org/problem?id=1080题意:已知一个人类基因的积分表,给出两个字符串,计算这两个串的最大相似程度;思路:最长公共子序列的变形,用score[][] 表示积分值,dp[i][j]表示字符串s1[1,2,,,i]和s2[1,2,,,j]的分值,对一个dp[i][j],有三种可能:> s1取第i个字符,s2取‘-’时,dp[i][j] = dp[i-1][j] + score[s1[i]][0];>s1取‘-’,s2取第j个字符时,dp[i][j] = dp[i][j-1] + score[0][s2[j]];>s1取第i个字符,s2取第j个字 阅读全文
posted @ 2013-08-30 15:30 straw_berry 阅读(303) 评论(0) 推荐(0) 编辑
摘要: Time Limit:3000MSMemory Limit:65536KTotal Submissions:48526Accepted:16674DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal number of characters 阅读全文
posted @ 2013-08-30 09:37 straw_berry 阅读(235) 评论(0) 推荐(0) 编辑
  2013年8月29日
摘要: http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2497题意:给出顶点数,边数及节点s,判断s是否包含在所有的环中;思路:并查集的应用,在除s节点以外的节点中,取出有公共源点的节点放到一个集合中,若还能形成环说明s不能经过所有的环,否则s能经过所有的环; 1 #include 2 #include 3 4 int set[10010],n,m,s; 5 6 int find(int x) 7 { 8 if(set[x] != x) 9 set[x] = find(set[x... 阅读全文
posted @ 2013-08-29 23:23 straw_berry 阅读(188) 评论(0) 推荐(0) 编辑
  2013年8月28日
摘要: Time Limit:1000MSMemory Limit:30000KTotal Submissions:11397Accepted:3630DescriptionIn the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the captain. The captain is not satisfied with the way his soldiers are aligned; 阅读全文
posted @ 2013-08-28 16:22 straw_berry 阅读(258) 评论(0) 推荐(0) 编辑
  2013年8月23日
摘要: Time Limit:1000MSMemory Limit:30000KTotal Submissions:9163Accepted:5617DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.It orders two arms of negligible weight and each arm's length is 15. Some hooks ar 阅读全文
posted @ 2013-08-23 21:22 straw_berry 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MSMemory Limit:10000KTotal Submissions:24067Accepted:8414DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k=1,N, and for eac 阅读全文
posted @ 2013-08-23 12:48 straw_berry 阅读(325) 评论(0) 推荐(0) 编辑
  2013年8月22日
摘要: Time Limit:1000MSMemory Limit:10000KTotal Submissions:3519Accepted:2009DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shred sheets of paper into little pieces so that the contents would become unrea 阅读全文
posted @ 2013-08-22 20:54 straw_berry 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MSMemory Limit:65536KTotal Submissions:8795Accepted:3692DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. They use only 阅读全文
posted @ 2013-08-22 10:59 straw_berry 阅读(217) 评论(0) 推荐(0) 编辑
  2013年8月21日
摘要: Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 10897Accepted: 5594DescriptionWhen a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels used by each repeater must be carefully ch 阅读全文
posted @ 2013-08-21 23:11 straw_berry 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Time Limit:2000MSMemory Limit:65536KTotal Submissions:12075Accepted:6026Special JudgeDescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The other ce 阅读全文
posted @ 2013-08-21 16:45 straw_berry 阅读(194) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页