Romantic Value
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Farmer John is a diligent man. He spent a lot of time building roads between his farms. From his point of view, every ro...
分类:
其他好文 时间:
2014-08-19 10:58:44
阅读次数:
228
Drainage Ditches
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 56084
Accepted: 21547
Description
Every time it rains on Farmer John's fields, a pond forms ...
分类:
其他好文 时间:
2014-08-18 20:31:32
阅读次数:
303
题意:有n对新人要在同一天结婚。结婚时间为Ti到Di,这里有时长为Si的一个仪式需要神父出席。神父可以在Ti-(Ti+Si)这段时间出席也可以在(Di-Si)-Si这段时间。问神父能否出席所有仪式,如果可以输出一组时间安排。思路:2-SAT。神父可以在开始出席也可以在结束时候出席,要求与其他出席时间...
分类:
其他好文 时间:
2014-08-18 20:17:22
阅读次数:
247
一、typeof语法为typeofdata,可能返回number,boolean,string,object,undefined,functiontypeof"John"// Returns stringtypeof3.14// Returns numbertypeoffalse// Returns...
分类:
其他好文 时间:
2014-08-18 01:30:53
阅读次数:
262
题目链接
题意:牧师John能否安排到所有婚礼,使其为所有婚礼送上祝福(祝福时间大于婚礼从时间的一半)。
思路:贪心,按照婚礼中间时间从小到大排序,尽量早结束婚礼祝福时间最晚开始(每个婚礼都有一个祝福时间最晚开始的时间)比较早的婚礼。
代码:
#include
#include
#include
#include
using namespace std;
...
分类:
其他好文 时间:
2014-08-17 17:03:52
阅读次数:
158
John 发现了很多种岩石。每种岩石都有一个独一无二成分:由小写英文字母组成。宝石是由一个单一的字符组成,并且将在所有岩石中出现。给出一些岩石的成分,输出有多少种不同的宝石存在。输入:第一行包含一个整数 N, 代表岩石的个数接下来的N行,每行包含岩石的构成,由小写的英文字母组成输出:输出有多少种不同...
分类:
其他好文 时间:
2014-08-17 16:51:22
阅读次数:
184
Building RoadsTime Limit:1000MSMemory Limit:65536KTotal Submissions:9255Accepted:2669DescriptionFarmer John had just acquired several new farms! He wa...
分类:
其他好文 时间:
2014-08-17 15:34:22
阅读次数:
298
题意:给你一个无限的棋盘,里面有n×n的棋子,每个棋子可以跳过一个相邻(4个方向)棋子跳到下一个位置,并把他的相邻位(他跳过的那一位)删除。解题思路:判断n%3 是否等于 0 , 原因未知。解题代码: 1 #include 2 int main(){ 3 int n ; 4 whil...
分类:
其他好文 时间:
2014-08-16 23:49:01
阅读次数:
290
Description
F- Hats
Background
John Hatman, the honest cloakroom attendant of the RoyalTheatre of London, would like to know the solution to the followingproblem.
TheProble...
分类:
其他好文 时间:
2014-08-15 14:37:28
阅读次数:
208
http://poj.org/problem?id=3254Corn FieldsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 7588Accepted: 4050DescriptionFarmer John has purchas...
分类:
其他好文 时间:
2014-08-14 23:10:31
阅读次数:
278