2015 Multi-University Training Contest 10】的更多相关文章

CRB and Tree                                                             Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)                                                                                            To…
CRB and Apple Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 421    Accepted Submission(s): 131 Problem Description In Codeland there are many apple trees.One day CRB and his girlfriend decide…
CRB and Queries Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 533    Accepted Submission(s): 125 Problem DescriptionThere are N boys in CodeLand.Boy i has his coding skill Ai.CRB wants to k…
2015 Multi-University Training Contest 10 5406 CRB and Apple 1.排序之后费用流 spfa用stack才能过 //#pragma GCC optimize("O3") //#pragma comment(linker, "/STACK:1024000000,1024000000") #include<bits/stdc++.h> using namespace std; function<…
solved 7/11 2016 Multi-University Training Contest 10 题解链接 分类讨论 1001 Median(BH) 题意: 有长度为n排好序的序列,给两段子序列[l1,r1],[l2,r2]构成新的序列,问中间的数字. 思路: 根据不同情况分类讨论即可.时间复杂度O(1). 代码: #include <bits/stdc++.h> const int N = 1e5 + 5; int a[N]; int n, m; int l1, r1, l2, r…
Welcome Party Time Limit: 4000/4000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 875    Accepted Submission(s): 194 Problem Description The annual welcome party of the Department of Computer Science and Technolo…
CRB and Puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 301    Accepted Submission(s): 127 Problem DescriptionCRB is now playing Jigsaw Puzzle.There are N kinds of pieces with infinite su…
CRB and Candies Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 453    Accepted Submission(s): 222 Problem Description   CRB has N different candies. He is going to eat K candies.He wonders how…
题意: 输入n,求c(n,0)到c(n,n)的所有组合数的最小公倍数. 输入: 首行输入整数t,表示共有t组测试样例. 每组测试样例包含一个正整数n(1<=n<=1e6). 输出: 输出结果(mod 1e9+7). 感觉蛮变态的,从比赛开始我就是写的这道题,比赛结束还是没写出来…… 期间找到了逆元,最小公倍数,组合数的各种公式,但是爆了一下午tle. 比赛结束,题解告诉我,公式秒杀法…… 但是公式看不懂,幸好有群巨解说,所以有些听懂了,但还是需要继续思考才能弄懂. 题解: 设ans[i]表示i…
题意比较简单, dp[i][j] 表示上一次男女吃的deliciousness分别为i, j的时候的吃的最多的苹果. 那么dp[i][j] = max(dp[i][k] + 1),   0 <  k <= j dp[i][j] = max( max(dp[k][j]) + 1 ) , 0 < k <= i 对于第一个式子最大值 用树状数组线段树都可以解决, 第二个式子如果每次从0遍历到i再找最值的话,显然会超时. 仔细想想便可以发现第二个最值和第一个是一样的. 这个不好解释. 像是…