摘要: 大数,题目有点误解人。。。明明说VeryLongInteger但运算的却不是数字而是文本行#include#includeusing namespace std;char str1[1000005],str2[105];int main(){ scanf("%s",str1); while(scan... 阅读全文
posted @ 2011-11-10 21:18 DChipNau 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 水题 简单的博弈思想#include#includeusing namespace std;int main(){ int n,k; while(scanf("%d%d",&n,&k),n||k) { int i=n%(k+1); if(i!=1) printf("16\n"); else prin... 阅读全文
posted @ 2011-11-10 20:30 DChipNau 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 水题,应用简单dp,含i个字符的串的个数等于i-1个字符的串的个数*2(包扩加上0和加上1),再减去最后3个字符是011的情况。#include#includeusing namespace std;double dp[41];int main(){ memset(dp,0,sizeof(dp));... 阅读全文
posted @ 2011-11-10 19:50 DChipNau 阅读(93) 评论(0) 推荐(0) 编辑