#1631 : Cats and Fish 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves thos…
Cats and Fish HihoCoder - 1631 题意: 有一些猫和一些鱼,每只猫有固定的吃鱼速度,吃的快的猫优先选择吃鱼,问在x秒时有多少完整的鱼和有多少猫正在吃鱼? 题解: 模拟一下.两层循环模拟在每一秒时,每个猫的状态是什么样子的,如果在这一秒这个猫没有吃鱼,而鱼还有剩余,那么就给猫吃,如果当前t秒是猫吃鱼速度的倍数,就说明这个猫刚好吃完,又可以给她鱼吃了. #include <bits/stdc++.h> using namespace std; struct node {…
Cats and Fish 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves those cats v…
思科CEO钱伯斯有句名言,叫"快鱼吃慢鱼",他觉得"在Internet经济下,大公司不一定打败小公司,可是快的一定会打败慢的."对此观点,笔者表示部分认同,首先,"快鱼吃慢鱼"已经被非常多商业案例所验证,无需多言,至于"大公司不一定打败小公司",笔者觉得,大公司在资源.资金.技术等层面拥有很多其它优势,胜算会更大一些,尽管大公司不一定能打败小公司,可是小公司要打败大公司几率更低,并且这也早已被非常多商业案例所验证. 今天要讨论…
Description There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves those cats very much. Last week, he won a scholarshi…
时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves those cats very much. Last…
编写一个Animal类,具有属性:种类:具有功能:吃.睡.定义其子类Fish package zhongqiuzuoye; public class Animal { //属性 private String type; public String getType() { return type; } public void setType(String type) { this.type = type; } //功能 public void eat() { } public void sleep…
///Animal类 package d922A; public class Animal { private String kind; public String getKind() { System.out.println(kind); return kind; } public void setKind(String kind) { this.kind = kind; } public void eat() { System.out.println("I can eat.");…
''' 1.首先要有一个画布 2.随机乌龟和鱼的位置 3.移动 ''' import random as r list_x = [0,10] list_y = [0,10] class Turtle: def __init__(self): #初始体力 self.power=100 #初始位置 self.x = r.randint(list_x[0],list_x[1]) # 这里重点知道 randint self.y = r.randint(list_y[0],list_y[1]) def m…