I. Cockroaches time limit per test6. s memory limit per test256 MB inputstandard input outputstandard output There are N cockroaches in the field. Cockroach i is located at coordinate (xi,yi). No two cockroaches are located at the same spot. Boss Luo…
菜鸡队训练实录. 现场赛记录:[名称:奖项/排名] 2017: ICPC Shenyang:Gold/3 CCPC Hangzhou:Gold/3 ICPC Beijing:Gold/13 CCPC Final:Silver/22 ICPC Asia East Continent League Final:Gold/11 2018: WF:31th Place All ended. To do List: 一有空就训练 POI2018 Stage I[Done] 战术研究: 读新题的优先级高于…
A. Balloon Robot 假设机器人$0$时刻位于$0$号位置,那么每个气球所需的时间为$(s_a-b)\bmod m$. 将所有气球按这个时间排序,枚举每个气球的时间作为偏移量,得出最优解即可. 时间复杂度$O(p\log p)$. #include<cstdio> #include<algorithm> using namespace std; typedef long long ll; const int N=1000010; int T,n,m,p,i,s[N];l…
2016 China Collegiate Programming Contest Final Table of Contents 2016 China Collegiate Programming Contest FinalProblem A:Problem J:Problem H: Problem A: 题意:喝咖啡,每三杯就又可以有免费一杯,求最少花费: 分析:贪心: #include <bits/stdc++.h> using namespace std; const int inf…
先上题目: 1213. Cockroaches! Time limit: 1.0 secondMemory limit: 64 MB It's well-known that the most tenacious of life species on the Earth are cockroaches. They live everywhere if only there in food. And as far as they are unpretentious in food you can…
BaoBao has just found a string of length consisting of 'C' and 'P' in his pocket. As a big fan of the China Collegiate Programming Contest, BaoBao thinks a substring of is "good", if and only if 'C', and 'P', where denotes the -th charact…
抽象 一.抽象类:不知道是具体什么东西的类. abstract class 类名 1.抽象类不能直接new出来. 2.抽象类可以没有抽象方法. public abstract class USB { //抽象类 //两个抽象方法,抽象类中也可以不写抽象方法 public abstract void qidong(); public abstract void tingzhi();//抽象方法不用写{} } 3.抽象类中,可以有抽象方法,也可以有非抽象方法.抽象类中还可以有成员变量. 4.派生类中…
#!/usr/bin/python # 8th November, 2009 # update manager failed, giving me the error: # 'files list file for package 'xxx' is missing final newline' for every package. # some Googling revealed that this problem was due to corrupt files(s) in /var/lib/…
Java中的final关键字是用来限制用户行为的,说白了,就是用来限制我们这些程序员的.final可以用来修饰:变量.方法.类. 1)Java final variable final用来修饰变量时,该变量的值是不能改变的,其实就变成了常量,等同于c++中的constant关键字.来个栗子尝尝: class Bike9{ final int speedlimit=90;//final variable void run(){ speedlimit=400; } public static voi…