摘要: Counterfeit DollarTime Limit:1000MSMemory Limit:10000KTotal Submissions:29060Accepted:9114DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size make it indistinguishable from the r 阅读全文
posted @ 2011-06-07 12:39 JustDoIt0 阅读(313) 评论(1) 推荐(0) 编辑
摘要: /**威佐夫博奕(Wythoff Game):有两堆各若干个物品,两个人轮流从某一堆或同时从两*堆中取同样多的物品,规定每次至少取一个,多者不限,最后取光者得胜.*(ak,bk)(ak≤bk ,k=0,1,2,...,n)表示两堆物品的数量,则*奇异局面(先手必败,P-Position) ak =[k(1+√5)/2], bk= ak + k (k=0,1,2,...,n方括*号表示取整函数)*/以下是极为简短代码#include <iostream>#include <string>#include <algorithm>#include <cmat 阅读全文
posted @ 2011-06-06 19:50 JustDoIt0 阅读(347) 评论(0) 推荐(0) 编辑
摘要: DividingTime Limit:1000MSMemory Limit:10000KTotal Submissions:38124Accepted:9377DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the same value, bec 阅读全文
posted @ 2011-06-05 13:43 JustDoIt0 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 纠结一个下午,发现自己真的是越来越菜了,以前做的很快的题竟然久战不下!以后得在poj上常练了!以下是源码,比较乱,难得整理了……回溯法的应用#include<iostream>#include <fstream>using namespace std;const int MAX=1000;int typeValue[MAX];int x[MAX];//每种对应的张数,回溯时用int xx[MAX];int Request[MAX];int maxKind=0;int totalStemps=100000;int maxValue=0;bool isTie=false;i 阅读全文
posted @ 2011-06-04 22:22 JustDoIt0 阅读(277) 评论(0) 推荐(0) 编辑