D. Cow and Snacks 题意:有n种小吃,m个人,每个人有两种喜欢的小吃,当一个人遇到两种自己都喜欢的小吃,可以都吃掉,问在最优的吃小吃顺序下,不能吃到自己喜欢的小吃的人数最少是多少? 题解:把n种小吃当作n个点,m个人当作m条边,每个连通图里面第一个吃的人,一定是可以吃两种自己喜欢的小 ...
分类:
其他好文 时间:
2019-09-25 21:08:25
阅读次数:
109
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim ...
分类:
其他好文 时间:
2019-09-25 12:51:33
阅读次数:
96
Java 内部类 内部类分为四种: 非静态内部类 静态内部类 匿名类 本地类 步骤 1 : 非静态内部类 非静态内部类 BattleScore “战斗成绩” 非静态内部类可以直接在一个类里面定义 比如: 战斗成绩只有在一个英雄对象存在的时候才有意义 所以实例化BattleScore 的时候,必须建立 ...
分类:
编程语言 时间:
2019-09-24 13:57:25
阅读次数:
71
Pursuit For Artifacts "CodeForces 652E " Johnny is playing a well known computer game. The game are in some country, where the player can freely trave ...
分类:
其他好文 时间:
2019-09-23 11:56:16
阅读次数:
88
题目背景 USACO19年一月金组第一题 USACO19年一月金组第一题 题目描述 不为Farmer John所知的是,Bessie还热衷于资助艺术创作!最近,她开始研究许多伟大的诗人们,而现在,她想要尝试创作一些属于自己的诗歌了。 Bessie认识N(1≤N≤5000)个单词,她想要将她们写进她的 ...
分类:
其他好文 时间:
2019-09-22 21:53:49
阅读次数:
80
题目背景 目前征集本题SPJ USACO 19年一月月赛金组第二题 目前征集本题SPJ USACO 19年一月月赛金组第二题 题目描述 Farmer John正在尝试将他的N头奶牛(1≤N≤10^5),方便起见编号为1…N,在她们前往牧草地吃早餐之前排好顺序。 当前,这些奶牛以p1,p2,p3,…, ...
分类:
其他好文 时间:
2019-09-22 21:24:06
阅读次数:
112
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which the ...
分类:
其他好文 时间:
2019-09-22 01:03:03
阅读次数:
109
Dominoes Game 描述 Recently, my lovely daughter YuYu indulges in playing a game called dominoes. When the game starts, I first place some blocks with va ...
分类:
其他好文 时间:
2019-09-21 17:32:24
阅读次数:
91
Cow Sorting Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4766 Accepted Submission(s): 1727 Pro ...
分类:
编程语言 时间:
2019-09-20 21:19:36
阅读次数:
110
"传送门" A. Cards 记录一下出现的个数就行。 Code B. Multiplication Table 题意: 存在一个序列$a$,现在给出一个矩阵$M$,$M_{ij}=a_i\cdot a_j$。但现在序列和矩阵主对角线上面的元素遗失了。 现在要求$a$序列,数据保证有解。 思路: 容 ...
分类:
其他好文 时间:
2019-09-19 21:54:53
阅读次数:
91