小墨在努力!!
吗了个b的。。。。。
摘要: WA了五六次,感谢讨论版的数据!!!!是用map<int ,int>过的#include <stdio.h>#include <string.h>#include <map>using namespace std;int main(){ int n ,i ,j ,len ,num ,m[300] ,flag = 0; char str[50]; m['0'] = 0 ,m['1'] = 1; m['2'] = m['A'] = m['B'] = m['C 阅读全文
posted @ 2012-01-28 10:57 小墨在努力!! 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目链接 :http://poj.org/problem?id=2676Source Code #include <stdio.h>#include <stdlib.h>#include <string.h>int num[10][10] ,col[10][10] ,row[10][10] ,g[10][10] ,flag;void dfs (int count) { if (count == 81) { flag = 1; for (int i = 0 ;i < 9 ;i++) { for (int j = 0 ;j <... 阅读全文
posted @ 2011-11-24 07:53 小墨在努力!! 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 61956 Accepted Submission(s): 14124 Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), ... 阅读全文
posted @ 2011-11-11 17:21 小墨在努力!! 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5068 Accepted Submission(s): 1552 Special JudgeProblem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty P... 阅读全文
posted @ 2011-11-04 18:41 小墨在努力!! 阅读(875) 评论(2) 推荐(0) 编辑
摘要: Simply SyntaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 181 Accepted Submission(s): 97 Problem DescriptionIn the land of Hedonia the official language is Hedonian. A Hedonian professor had noticed that many of her students still did not m... 阅读全文
posted @ 2011-11-02 12:32 小墨在努力!! 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 天气情况Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 411 Accepted Submission(s): 172 Problem Description如果我们把天气分为雨天,阴天和晴天3种,在给定各种天气之间转换的概率,例如雨天转换成雨天,阴天和晴天的概率分别为0.4,0.3,0.3.那么在雨天后的第二天出现雨天,阴天和晴天的概率分别为0.4,0.3,0.3.现在给你今天的天气情况,问你n天后的某种天气出现的概率.Input我... 阅读全文
posted @ 2011-11-02 12:25 小墨在努力!! 阅读(235) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>char visit[20][20];int count,m,n;void dfs(int x,int y){ count++; visit[x][y]='#'; if(x!=0&&visit[x-1][y]=='.')dfs(x-1,y); if(x!=n-1&&visit[x+1][y]=='.')dfs(x+1,y); if(y!=0&&visit[x][y-1]=='.')dfs 阅读全文
posted @ 2011-10-23 11:30 小墨在努力!! 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Farm IrrigationTime Limit: 2 Seconds Memory Limit: 65536 KBBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type of pipe. There are 11 types of pipes, which 阅读全文
posted @ 2011-10-22 20:37 小墨在努力!! 阅读(231) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>const int step[4][2]={-1,0,0,1,1,0,0,-1};//上下左右四个方向 char maze[10][10];int ex,ey,t,YS,n,m;void dfs(int x,int y){ /*for(int i=0;i<n;i++) { for(int j=0;j<m;j++) printf("%c",maze[i][j]); printf("\n"); } printf("%d--",t) 阅读全文
posted @ 2011-10-20 13:37 小墨在努力!! 阅读(466) 评论(0) 推荐(0) 编辑
摘要: Can you solve this equation?Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky.InputThe first line of the input contains an integer T(1<=T<=100) which means the number of test cases. Then T lines 阅读全文
posted @ 2011-09-25 20:53 小墨在努力!! 阅读(359) 评论(0) 推荐(0) 编辑