- 博客(15)
- 收藏
- 关注
转载 Balanced Lineup
Time Limit:5000MSMemory Limit:65536KTotal Submissions:64964Accepted:30260Case Time Limit:2000MSDescriptionFor the daily milking, Farmer John's...
2018-09-11 22:22:00
125
转载 The Water Problem(RMQ的ST写法)
ST算法:基于动态规划求区间最值的算法。以O(nlogn)的预处理代价,换取O(1)的查询时性能,f[i,j]代表从第i个数起连续2^j个数中的最大值。把f[i,j]平均分成两段(因为f[i,j]一定是偶数个数字)从i到i+2^(j-1)-1为一段,i+2^(j-1)到i+2^j-1为一段(长度都为2^(j-1)),显然f[i , j] = max(f[i , j-1],f[i ...
2018-09-11 22:19:00
191
转载 Color the ball
Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,...
2018-09-11 02:42:00
124
转载 Find Integer(费马大定律+构造勾股数)
Problem Descriptionpeople in USSS love math very much, and there is a famous math problem .give you two integersn,a,you are required to find2integersb,csuch thatan+bn=cn.Inputon...
2018-09-10 00:57:00
117
转载 头文件模板(方便拿来用)
#include<bits/stdc++.h>#define LL long long#define ULL unsigned long long#define scl(i) scanf("%lld", &i)#define scll(i, j) scanf("%lld %lld", &i, &j)#define sclll...
2018-09-10 00:38:00
322
转载 Lattice's basics in digital electronics
LATTICE is learning Digital Electronic Technology. He is talented, so he understood all those pieces of knowledge in10^{-9}10−9second. In the next10^{-9}10−9second, he built a data decoding...
2018-09-09 01:37:00
108
转载 多重背包
Description有重量和价值分别为 wi ( 1 ≤ wi ≤ 1015 )、vi ( 1 ≤ vi ≤ 1015 ) 的 n (1 ≤ n ≤ 40 )个物品。从这些物品中挑选总重量不超过 C (1 ≤ C ≤ 1015)的物品,求所选挑选方案中价值总和的最大值。Input多测试用例。每个测试用例:第一行是 n 和 C,接下来有 n 行,每行两个正整数...
2018-09-03 11:27:00
162
转载 超大背包(二分+贪心)
Description有重量和价值分别为 wi ( 1 ≤ wi ≤ 1015 )、vi ( 1 ≤ vi ≤ 1015 ) 的 n (1 ≤ n ≤ 40 )个物品。从这些物品中挑选总重量不超过 C (1 ≤ C ≤ 1015)的物品,求所选挑选方案中价值总和的最大值。Input多测试用例。每个测试用例:第一行是 n 和 C,接下来有 n 行,每行两个正整数...
2018-09-03 11:21:00
193
转载 Cable master(二分)
Cable masterTime Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 30 Accepted Submission(s): 15Special JudgeDescription...
2018-09-01 00:03:00
174
转载 Conscription(Kruskal)
Time Limit:1000MSMemory Limit:65536KTotal Submissions:16957Accepted:5896DescriptionWindy has a country, and he wants to build an army to protect his c...
2018-08-31 12:21:00
161
转载 Connect the Cows
DescriptionEvery day, Farmer John walks around his farm to check on the health and well-being of hisN(1 ≤N≤ 10) cows.The location of each cow is described by a point in the 2D plane, an...
2018-08-31 01:22:00
414
转载 Fence Repair
Time Limit:2000MSMemory Limit:65536KTotal Submissions:61865Accepted:20444DescriptionFarmer John wants to repair a small length of the fence around the...
2018-08-31 00:49:00
87
转载 模板最大流(邻接表实现+炸点优化+Dinic算法+当前弧优化)
最大流Time Limit: 60000/30000 MS (Java/Others) Memory Limit: 562144/562144 K (Java/Others)Total Submission(s): 22 Accepted Submission(s): 10Description这是一道模板题。给定 n ...
2018-08-30 15:20:00
443
转载 快读优化
第一点 1 inline void read(int &x){ 2 char ch; 3 bool flag=false; 4 for (ch=getchar();!isdigit(ch);ch=getchar())if (ch=='-') flag=true; 5 for (x=0;isdigit(ch);x=x*10+ch-...
2018-08-29 16:22:00
176
转载 最大流—Ek算法(Edmond-Karp)
DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time...
2018-08-29 13:41:00
155
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人