06 2015 档案
摘要:#include #include #include //#include //#include using namespace std; void reverse_data( string &data) { char temp = '0'; int st...
阅读全文
摘要:时间限制:20000ms单点时限:1000ms内存限制:256MB描述且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了!小Ho现在手上有M张奖券,而奖品区有N件奖品,分别标号为1到N,其中第i件奖品需要need(i)张奖券进行兑换,同时也只能兑...
阅读全文
摘要:#include #include #include #include using namespace std; int t,n;bool ok;string str; struct Trie { Trie *next[26]; int num;}; void inser...
阅读全文
摘要:This is my first problem of Trie.Thanks tohttp://www.cnblogs.com/dolphin0520/archive/2011/10/15/2213752.html#include #include #include #include using...
阅读全文
摘要:Enumeration:#include #include #include #include #include #include typedef long long ll;using namespace std;const int MAXN=100005;bool has[52];int f(in...
阅读全文
摘要:This problem too much water,so there is code:#include #include using namespace std;const int MAXN=105;int w[MAXN][MAXN];int dp[MAXN][MAXN][MAXN];int n...
阅读全文
摘要:部分内容来自网上~ 头文件: 输入输出: 自定义STL优先队列的优先级: string流的用法(以Hdu 2072为例): lower_bound & upper_bound: C/C++ char数组的相关操作: 合并数组中相同的项:
阅读全文
摘要:#include main(){ FILE *fp; if((fp=fopen("in.txt","rt"))==NULL) { printf("错误:文件不存在"); getch(); exit(1); } while(fsc...
阅读全文
摘要:第四届河南省大学生程序设计竞赛 第一题题目描述Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐标快速计算出来。单元格的行坐标是由数字编号的数字序号,而列坐标使用字母序号。观察字母序号,发现第1列到第26列的字母序号分别为A,B,…,Z,接着,第27列序号为AA,第28列为AB,...
阅读全文
摘要:声明一个char类型的栈。假设题目输入内容为n(int),a(string),b(string),a、b的下标记为index1和indexe2。第一步肯定是入栈。然后遍历b中每个字符: 如果栈不为空且栈顶元素等于b[index2],出栈。否则a[index1]入栈,如果没有元素可入栈,输出No。...
阅读全文
摘要:This problem is just like java's BigInteger:#include #include using namespace std;string format(string str){ bool zheng=true; int ppos=str.find('.'); ...
阅读全文
摘要:以下部分内容并非原创,原作者见到还请谅解~大数String s=”12345”;BigInteger c=BigInteger.valueOf(s);格式输出System.out.printf("%+8.3f\n", 3.14); //"+"表示后面输出的数字会有正负号,正的+,负的- ;8.3f表...
阅读全文

浙公网安备 33010602011771号