2014年9月17日
摘要: 还沉浸在2014世界杯吗? 快用程序模拟属于自己独一无二的世界杯吧!FIFA2014世界杯模拟器 你值得拥有// 类 player、 team的定义及实现, 代码放到player_team.cpp中 1 #include 2 #include 3 using namespace s... 阅读全文
posted @ 2014-09-17 21:56 左手代码右手诗 阅读(752) 评论(0) 推荐(0) 编辑
  2014年5月8日
摘要: // Matrix.h#ifndef MATRIX_H#define MATRIX_H#include#include#include#define rows 4#define cols 4#define L 6using std::ostream;classMatrix{friend ostrea... 阅读全文
posted @ 2014-05-08 23:09 左手代码右手诗 阅读(1401) 评论(4) 推荐(1) 编辑
  2014年4月28日
摘要: #include#includeusing namespace std;void printMonth(int year, int month);void printMonthTitle(int year, int month);void printMonthName(int month);void... 阅读全文
posted @ 2014-04-28 23:20 左手代码右手诗 阅读(1083) 评论(1) 推荐(0) 编辑
  2014年4月24日
摘要: You guys must have seen nested list (嵌套链表) such as [1, 2, 3, [4, 5, [6, 7]], 8, [9, 0]].So your task is to improve DouList with nested feature. You ca... 阅读全文
posted @ 2014-04-24 22:39 左手代码右手诗 阅读(781) 评论(0) 推荐(0) 编辑
  2014年4月18日
摘要: Description有一天, PY找到了一张藏宝图.这张地图被划分成2^n * 2^n个格子.左上角的格子的坐标为(0, 0)而右下角格子的坐标为(2^n-1, 2^n-1).如下:(0, 0)(0, 1)……(0, 2^n-1)……………………(2^n-2, 0)(2^n-2,1)……(2^n-... 阅读全文
posted @ 2014-04-18 22:39 左手代码右手诗 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 对于两个整数G和L(1#include#includeint main(){int d[10000];int T, G, L, ans, i, num; scanf("%d\n",&T);while(T--){ memset(d,0,sizeof(d)); num =0; scanf("%d %d"... 阅读全文
posted @ 2014-04-18 22:37 左手代码右手诗 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Description概念1:梅森数,当一个正整数可以表示成2p-1形式,且p为素数时,2p-1即称为梅森数概念2:在自然数中,只有1和它本身两个约数的数叫做素数。一个梅森数被称为梅森素数当且仅当它是一个素数。现给定一个正整数p(pint prime(int x){longlong i;if(x <... 阅读全文
posted @ 2014-04-18 22:36 左手代码右手诗 阅读(676) 评论(0) 推荐(0) 编辑
摘要: You'll be given two intergers. The number of the digits of each is from 1 to 200, inclusive. And what you need to do is to culcalate the product of th... 阅读全文
posted @ 2014-04-18 22:35 左手代码右手诗 阅读(537) 评论(0) 推荐(0) 编辑
摘要: Given a b and p, output (a^b) % p (2#include#includeint quick_power(int a,int b,int p){int temp;if(b ==0){return1;} temp = quick_power(a, b /2, p);if(... 阅读全文
posted @ 2014-04-18 22:33 左手代码右手诗 阅读(112) 评论(0) 推荐(0) 编辑
摘要: ConstraintsTime Limit: 1 secs, Memory Limit: 8 MBDescriptionInput A and B, output A+BInputInput two values, A and B.(0#includevoid init(int*arr,int*le... 阅读全文
posted @ 2014-04-18 22:32 左手代码右手诗 阅读(164) 评论(0) 推荐(0) 编辑