码迷,mamicode.com
首页 >  
搜索关键字:bob    ( 1241个结果
博弈论
bzoj2463 谁能赢呢?题目大意:给定一个n×n的方格,从(1,1)开始走,每次可以到上下左右没有到过的一个格子,alice先手,交替操作,如果先手必胜则输出'Alice’,否则输出‘Bob’。思路:lcomyn大爷秒暴结论。后来仔细想了想,只发现走一步肯定会改变格子奇偶性。其实如果n是偶数,那...
分类:其他好文   时间:2015-08-28 08:27:25    阅读次数:200
zoj 3885 The Exchange of Items 【最小费用最大流】
The Exchange of Items Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob lives in an ancient village, where transactions are done by one item exchange with another. Bob is very clever and he...
分类:其他好文   时间:2015-08-27 02:16:40    阅读次数:225
对象序列化(json)
#! /usr/bin/python# -*- coding:"utf-8"-*-import jsonclass Info(object): def __init__(self,name): self.name=name#序列化t=json.dumps(Info('Bob'),...
分类:Web程序   时间:2015-08-26 13:56:49    阅读次数:143
HDU 4268 Alice and Bob(贪心)
Alice and Bob Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3700    Accepted Submission(s): 1174 Problem Description Alice and B...
分类:其他好文   时间:2015-08-26 12:09:37    阅读次数:135
HDU 4111 Alice and Bob (博弈)
Alice and BobTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1799Accepted Submission(s): 650Proble...
分类:其他好文   时间:2015-08-25 23:41:06    阅读次数:233
HDU 4268 Alice and Bob(贪心+STL)
该题一开始我用multiset写了一发,写的比较裸,TLE了 。 后来队友想到了一个比较好的方法 :将两个结构体排序之后,从大到小枚举Alice的h,对于每个h,将Bob中满足h小于当前h的牌的w加进multiset,然后用二分函数查找一下大于等于当前w的第一个数,当前迭代器的上一个指针就是小于当前w的最大w,找到就删除。那么也就是我们用了这样的贪心策略:对于Alice的每一张牌,要覆盖一张Bob...
分类:其他好文   时间:2015-08-25 21:52:14    阅读次数:134
The Himalayas (zoj 3809)
The HimalayasTime Limit:2 Seconds Memory Limit:65536 KBAs an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery o...
分类:其他好文   时间:2015-08-19 19:42:03    阅读次数:167
C语言中谓词的用法
NSArray*persons=@[jack,tom,rose,lucy,bob,john,lily];//指定谓词条件NSPredicate*pre1=[NSPredicatepredicateWithFormat:@"age<40"];for(Person*personinpersons){//条件匹配//验证对象是否符合谓词pre1BOOLbool1=[pre1evaluateWithObject:person];if(bool1){NSLog(@"%@",..
分类:编程语言   时间:2015-08-19 17:51:49    阅读次数:145
UVA196-Spreadsheet(拓扑排序)
SpreadsheetIn 1979, Dan Bricklin and Bob Frankston wrote VisiCalc, the first spreadsheet application. It became a huge success and, at that time, was ...
分类:编程语言   时间:2015-08-19 12:35:16    阅读次数:160
bson的操作
bson的操作flyfish 2015-8-27使用的是bson-cppbson的创建//{ name : 'joe', age : 33.7 } //方式1 bson::bo a = bson::bob().append("name", "joe").append("age", 33.7).obj(); //方式2 bson::bob x; x.append...
分类:其他好文   时间:2015-08-17 15:31:19    阅读次数:311
1241条   上一页 1 ... 82 83 84 85 86 ... 125 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!