2013年8月31日

NYOJ 364 田忌赛马(模拟分析)

摘要: 田忌赛马时间限制:3000 ms | 内存限制:65535 KB难度:3描述Here is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others.""Both of Tian and the king have three horses in different clas 阅读全文

posted @ 2013-08-31 21:43 落水寒冰 阅读(254) 评论(0) 推荐(0) 编辑

NYOJ 586 疯牛(二分+贪心)

摘要: 疯牛时间限制:1000 ms | 内存限制:65535 KB难度:4描述农夫 John 建造了一座很长的畜栏,它包括N (2 2 #include 3 using namespace std; 4 int a[100010],n,c; 5 bool greed( int t)//值判断 6 { 7 int i,j=a[0],count=0; 8 for(i=0;i=t) {j=a[i]; count++;}11 if(count>=c-1) return true;12 13 }14 return false;15 }16 void bina... 阅读全文

posted @ 2013-08-31 21:20 落水寒冰 阅读(314) 评论(0) 推荐(0) 编辑

NYOJ 30 Gone Fishing(枚举+贪心)

摘要: Gone Fishing时间限制:3000 ms | 内存限制:65535 KB难度:5描述John is going on a fishing trip. He has h hours available (1 = 0 ), is known. Each 5 minutes of fishing decreases the number of fish expected to be caught in the next 5-minute interval by a constant rate of di (di >= 0). If the number of fish expected 阅读全文

posted @ 2013-08-31 20:35 落水寒冰 阅读(557) 评论(0) 推荐(0) 编辑

导航