Excavator Contest Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3823 Description Bluefly University is famous of excavator technology. Lots of students take part in many excavator-related cou…
题 题意 n个问题,解决的顺序影响正确的概率,无论之前解决的问题是否答对,当前问题 j 答对概率为max{a[i][j]} (i为解决过的问题).求答对题目的最大期望和对应的答题顺序.T组测试,T (0 < T ≤ 100), n (0 < n ≤ 10). 分析 n那么小,就想到状态压缩DP(我不会dfs做这题) 假设当前状态是 i , i 对应的01串的1代表已经解决的问题,0代表尚未解决的,那么它肯定是由某个已解决的问题还没解决的状态转移过来的,也就是由其中一个1变为0的状态.所以我们枚…
K-Nice Time Limit: 1 Second Memory Limit: 32768 KB Special Judge This is a super simple problem. The description is simple, the solution is simple. If you believe so, just read it on. Or if you don't, just pretend that you can't see this on…
并查集+左偏树.....合并的时候用左偏树,合并结束后吧父结点全部定成树的根节点,保证任意两个猴子都可以通过Find找到最厉害的猴子 Monkey King Time Limit: 10000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu [Submit] [Go Back] [Status] Description Once in a forest, there lived…
A Average Score http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5373 a班有n个人,b班有m个人,bob在a班,现在知道除了bob以外的所有人的成绩,还知道bob如果从a班转到b班,两个班的平均成绩都会提高,问bob合法的成绩区间. 解法,求一下两个班的平均成绩,bob的成绩肯定要比a班的小,比b班的大. #include<cstdio> int main(){ int t,n,m,x,sa,sb; w…
http://acm.zju.edu.cn/onlinejudge/showContestProblems.do?contestId=358 The 2014 ACM-ICPC Asia Mudanjiang Regional Contest 136 - The 2014 ACM-ICPC Asia Mudanjiang Regional Contest Solved ID Title Ratio (AC/All) Yes A Average Score 61.78% (456/738) Yes…
H - K-Nice Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3212 Description This is a super simple problem. The description is simple, the solution is simple. If you believe so, just read it on. O…