题目传送门 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int MAX_N = 100000 + 10; 7 int cnt[MAX_N]; 8 int ans[MAX_N]; 9 in...
分类:
编程语言 时间:
2015-05-15 19:52:47
阅读次数:
159
Cell Phone NetworkTime Limit:1000MSMemory Limit:65536KTotal Submissions:5916Accepted:2119DescriptionFarmer John has decided to give each of his cows a...
分类:
其他好文 时间:
2015-05-14 18:00:34
阅读次数:
142
1 System.Array类和System.collections.ArrayList类示例:控制台程序,新疆三个类,抽象类Animal以及两个继承类Cows和ChickenAnimal.cspublic abstract class Animal { protected ...
Description
The cows have reconstructed Farmer John’s farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. The cows didn’t have time to rebuild any extra roads,...
分类:
其他好文 时间:
2015-05-13 10:38:19
阅读次数:
148
题目传送:Lost Cows
思路:线段树,从后往前扫描,如果当前数字为n,则表示它是剩余的序列中(包括他自己)顺序后的第n+1个数。找到后删除,借助线段树可以达到快速删除的效果
AC代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#in...
分类:
其他好文 时间:
2015-05-13 10:33:48
阅读次数:
116
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