2013年6月21日
摘要: 1 View Code 2 3 int prime(int cur) 4 { 5 int index; 6 int sum = 0; 7 memset(visit, false, sizeof(visit)); 8 visit[cur] = true; 9 for(int i = 0; i graph[index][j]){28 dist[j] = graph[index][j];29 } 30 } 31 } 32 return sum; 3... 阅读全文
posted @ 2013-06-21 21:39 straw_berry 阅读(127) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?Here is a sample tiling of a 2x17 rectangle.InputInput is a sequence of lines, each line containing an integer number 0 <= n <= 250.OutputFor each line of input, output one integer number in a separate line giving the 阅读全文
posted @ 2013-06-21 19:33 straw_berry 阅读(197) 评论(0) 推荐(0) 编辑