Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 4946
Accepted: 2850
Description
FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 ...
分类:
其他好文 时间:
2015-05-11 13:05:17
阅读次数:
107
Navigating the City
Time Limit: 1000MS
Memory Limit: 65536KB
64bit IO Format: %I64d & %I64u
Submit Status
Description
A dip in the milk market has forced the cows t...
分类:
其他好文 时间:
2015-05-09 10:24:22
阅读次数:
174
一开始以为是long long输入,后来发现用int就行,,,反正也是一个挺简单的题目,直接贴代码了。
#include
#include
int cows[10005]={0};
int main(){
int n,i,j;
long long res = 0,temp;
scanf("%d",&n);
for(i=1;i<=n;i++) {
scanf("%d",&cows[i...
分类:
其他好文 时间:
2015-05-09 10:15:17
阅读次数:
112
Til the Cows Come HomeTime Limit:1000MSMemory Limit:65536KTotal Submissions:33015Accepted:11174DescriptionBessie is out in the field and wants to get ...
分类:
编程语言 时间:
2015-05-08 18:05:23
阅读次数:
237
Cow RelaysTime Limit:1000MSMemory Limit:65536KTotal Submissions:5720Accepted:2266DescriptionFor their physical fitness program,N(2 ≤N≤ 1,000,000) cows...
分类:
其他好文 时间:
2015-05-08 09:22:25
阅读次数:
125
DescriptionSome of Farmer John’s N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see t...
分类:
其他好文 时间:
2015-05-07 22:16:34
阅读次数:
168
O - Treats for the Cows
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Submit Status Practice POJ 3186
Description
FJ has purchased N (1
The treats are interesting for ...
分类:
其他好文 时间:
2015-05-07 22:12:19
阅读次数:
199
一开始想到的是,用一个标志位记录取第i个数的时间,但后来发现这个方法不行,可能性太多,没办法推
然后就看了解题报告的思路,说是用区间dp,状态是设出来了,但受固有思维影响,老想着怎么顺着推。
最后实在想不出了,看了代码,才发现要逆着推,从结束状态开始推起,这样公式就出来了
为了保证每一层循环要用到的值都已经被计算出来了,按区间长度进行枚举
/*
dp[i][j]:剩下第i个至第j个物品时,...
分类:
其他好文 时间:
2015-05-06 22:59:06
阅读次数:
152
http://poj.org/problem?id=2393Yogurt factoryTime Limit:1000MSMemory Limit:65536KTotal Submissions:7341Accepted:3757DescriptionThe cows have purchased ...
分类:
其他好文 时间:
2015-05-06 22:49:00
阅读次数:
284
Treats for the Cows
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 4375
Accepted: 2226
Description
FJ has purchased N (1
The treats are interesting...
分类:
其他好文 时间:
2015-05-06 21:16:03
阅读次数:
136