矩阵快速幂
摘要:#include #include using namespace std; long long x[999][999]; long long ans[999][999]; long long dx[999][999]; const int p=1e9+7; void ans_cf(int n) { for(int i=1;i<=n;i++) for(int j=1;j<=...
阅读全文
posted @
2018-05-25 23:22
蔡军帅
阅读(159)
推荐(0) 编辑
2017中国大学生程序设计竞赛 - 女生专场 Happy Necklace(递推+矩阵快速幂)
摘要:Happy Necklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1146 Accepted Submission(s): 491
阅读全文
posted @
2018-05-23 15:37
蔡军帅
阅读(205)
推荐(0) 编辑
四川第七届 C Censor (字符串哈希)
摘要:Censor frog is now a editor to censor so-called sensitive words (敏感词). She has a long text pp. Her job is relatively simple -- just to find the first
阅读全文
posted @
2018-04-26 21:18
蔡军帅
阅读(391)
推荐(0) 编辑
POJ 1276 Cash Machine(单调队列优化多重背包)
摘要:Cash Machine Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 38986 Accepted: 14186 Description A Bank plans to install a machine for cash w
阅读全文
posted @
2018-04-24 21:58
蔡军帅
阅读(334)
推荐(0) 编辑
快速幂
摘要:#include using namespace std; int quick(int a,int b) { int s=1; while(b) { if(b%2==1) s*=a; a*=a; b/=2; } return s; } int main() { int a,b; cin>>...
阅读全文
posted @
2018-03-21 17:55
蔡军帅
阅读(155)
推荐(0) 编辑
POJ 2549 Sumsets(折半枚举+二分)
摘要:Sumsets Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11946 Accepted: 3299 Description Given S, a set of integers, find the largest d suc
阅读全文
posted @
2018-02-24 14:27
蔡军帅
阅读(402)
推荐(0) 编辑
poj 3977 Subset(折半枚举+二进制枚举+二分)
摘要:Subset Time Limit: 30000MS Memory Limit: 65536K Total Submissions: 5721 Accepted: 1083 Description Given a list of N integers with absolute values no
阅读全文
posted @
2018-02-24 13:42
蔡军帅
阅读(181)
推荐(0) 编辑
POJ 2785 4 Values whose Sum is 0(折半枚举+二分)
摘要:4 Values whose Sum is 0 Time Limit: 15000MS Memory Limit: 228000K Total Submissions: 25675 Accepted: 7722 Case Time Limit: 5000MS Description The SUM
阅读全文
posted @
2018-02-23 15:38
蔡军帅
阅读(202)
推荐(0) 编辑
POJ 2674 Linear world(弹性碰撞)
摘要:Linear world Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 4426 Accepted: 1006 Description The Disc, being flat, has no real horizon. Any
阅读全文
posted @
2018-02-23 15:02
蔡军帅
阅读(187)
推荐(0) 编辑
POJ 3684 Physics Experiment(弹性碰撞)
摘要:Physics Experiment Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2936 Accepted: 1045 Special Judge Description Simon is doing a physics e
阅读全文
posted @
2018-02-23 12:21
蔡军帅
阅读(246)
推荐(0) 编辑
POJ 1222 EXTENDED LIGHTS OUT(反转)
摘要:EXTENDED LIGHTS OUT Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12616 Accepted: 8002 Description In an extended version of the game Lig
阅读全文
posted @
2018-02-23 11:03
蔡军帅
阅读(273)
推荐(0) 编辑
POJ 3185 The Water Bowls(反转)
摘要:The Water Bowls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7292 Accepted: 2887 Description The cows have a line of 20 water bowls from
阅读全文
posted @
2018-02-22 16:41
蔡军帅
阅读(158)
推荐(0) 编辑
POJ 3279 Fliptile(反转 +二进制枚举)
摘要:Fliptile Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13631 Accepted: 5027 Description Farmer John knows that an intellectually satisfie
阅读全文
posted @
2018-02-22 16:01
蔡军帅
阅读(208)
推荐(0) 编辑
POJ 3276 Face The Right Way(反转)
摘要:Face The Right Way Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6038 Accepted: 2791 Description Farmer John has arranged his N (1 ≤ N ≤
阅读全文
posted @
2018-02-22 14:02
蔡军帅
阅读(209)
推荐(0) 编辑
POJ 2566 Bound Found(尺取法,前缀和)
摘要:Bound Found Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5207 Accepted: 1667 Special Judge Description Signals of most probably extra-te
阅读全文
posted @
2018-02-21 23:58
蔡军帅
阅读(348)
推荐(0) 编辑
POJ 3320 Jessica's Reading Problem(尺取法)
摘要:Jessica's Reading Problem Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14734 Accepted: 5073 Description Jessica's a very lovely girl woo
阅读全文
posted @
2018-02-21 20:25
蔡军帅
阅读(214)
推荐(0) 编辑
POJ 3061 Subsequence(尺取法)
摘要:Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18145 Accepted: 7751 Description A sequence of N positive integers (10 < N < 10
阅读全文
posted @
2018-02-21 19:48
蔡军帅
阅读(129)
推荐(0) 编辑