摘要: 这道题要对全部为1的情况特判,因为这种情况下与一般的nim游戏下不同//============================================================================// Name : hdu1907.cpp// Author : // Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//========================================================== 阅读全文
posted @ 2011-05-19 10:07 KOKO's 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 明显的打表题,一开始想暴,发现太慢太慢了,后来加了个二分,很快就出答案了打表程序如下#include <iostream>#include <cstdio>using namespace std;long long sum[100000000];int l ,r, mid;int main(){ for(long long i = 1;i <= 100000000;i++) { sum[i] = sum[i-1]+i; } for(long long i = 2;i <= 100000000;i++) { l = 1; r = i; while(l < 阅读全文
posted @ 2011-05-19 01:05 KOKO's 阅读(103) 评论(0) 推荐(0) 编辑