一.食品类 //食品类 class Food{ private String coding; //编码 private String name; //名称 private double price; //价格 Food(String coding,String name,double price){ ...
分类:
编程语言 时间:
2020-03-22 19:28:07
阅读次数:
85
出处: 理解I/O:随机和顺序 随机 I/O & 顺序 I/O 先看一篇译文介绍 随机I/O 顺序I/O Storage for DBAs: Ever been to one of those sushi restaurants where the food comes round in dishe ...
分类:
其他好文 时间:
2020-03-09 13:08:29
阅读次数:
98
题意:题意说餐馆准备了a份饺子,b份橘子汁,c份烙饼 有以下规则:1.每份游客至少得到一份菜 2.每位游客最多可以获赠一份饺子,一份橘子汁,一份烙饼 3.每位游客的菜肴不同 分析:我们可以得出最多能够接待7位顾客,我们可以采用暴力做法,枚举每种组合,2^7,也就是a b c ab ac bc abc ...
分类:
其他好文 时间:
2020-03-02 13:05:35
阅读次数:
63
c++ string类的find:1.find string s = "My cat's breath smells like cat food."; int a=s.find("breath"); cout<<a<<endl; 因为find是从0数起,输出字符串第一个字符的索引(从0开始),所以a ...
分类:
编程语言 时间:
2020-02-24 15:21:13
阅读次数:
65
Long story short, shashlik is Miroslav's favorite food. Shashlik is prepared on several skewers simultaneously. There are two states for each skewer: ...
分类:
其他好文 时间:
2020-02-23 17:59:52
阅读次数:
59
5-1 条件测试 :编写一系列条件测试;将每个测试以及你对其结果的预测和实际结果都打印出来。 a. 详细研究实际结果,直到你明白了它为何为True 或False b. 创建至少2个测试,且其中结果分别为True 和False 的测试都至少有2个。 food = 'meat' print("Is fo ...
分类:
编程语言 时间:
2020-02-20 11:36:35
阅读次数:
83
本题和某一年的oi题非常相似,都是经典套路 我们知道我们在送完食物后既可以向前送也可以回头送,这就体现了区间dp的思想 为什么我们这次的区间dp不用枚举第三维k来枚举从哪里送过来呢? 因为送货员不是傻子,他如果送到你这了,那么在你们两之间的可以都顺路送了,所以我们只需要枚举两个位置就行 这题的输入不 ...
分类:
其他好文 时间:
2020-02-19 10:18:25
阅读次数:
64
class Person(object): #name = "stu" #age = 10 #height = 160 #weight = 90 def run(self): print("run") def eat(self, food): print("eat " + food) def __i ...
分类:
编程语言 时间:
2020-02-10 12:12:17
阅读次数:
92
class Person(object): name = "stu" age = 10 height = 160 weight = 90 def run(self): print("run") def eat(self, food): print("eat " + food) def openDoo ...
分类:
编程语言 时间:
2020-02-10 11:48:52
阅读次数:
68
class Person(object): name = "" age = 0 height = 0 weight = 0 def run(self): print("run") def eat(self, food): print("eat" + food) def openDoor(self): ...
分类:
编程语言 时间:
2020-02-09 22:04:54
阅读次数:
92