hdu 6045 Is Derek lying?(思维推导)】的更多相关文章

/* HDU 6045 - Is Derek lying [ 分析 ] 题意: 有N个问题, 每个问题有A,B,C三种答案,答对加一分,答错不加分 给出甲乙两人的答案,给出两人的分数先x, y,问分数是否正确 分析: 统计甲乙相同的答案数目为 a, 不同的答案数目为 b 若甲的分数为x,则y能取到的最小值为 max(0, x-b),即甲答对的题目尽量在b中 y能取到的最大值为 b-max(0,x-a)+min(x,a) ,即甲答对的题目尽量在a中,答错的尽量在b中 编码时长:32分钟(-1) *…
题目网址:http://acm.hdu.edu.cn/showproblem.php?pid=6045 题目: Is Derek lying? Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 104    Accepted Submission(s): 65 Problem Description Derek and Alfia are…
Problem Description Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,they both participate in the summer camp of Borussia Dortmund.During the summer camp,there will be fan tests at intervals.The test consist…
题目链接 Problem Description Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,they both participate in the summer camp of Borussia Dortmund.During the summer camp,there will be fan tests at intervals.The test co…
题目链接 可以暴力找一下规律 比如,假设N=7,两人有5题相同,2题不同,枚举X=0->15时,Y的"Not lying"的取值范围从而找出规律 #include<bits/stdc++.h> using namespace std; typedef long long LL; int T; int N,X,Y; string D,A; int main() { ios::sync_with_stdio(false); cin>>T; while(T--)…
Is Derek lying? Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 612    Accepted Submission(s): 353 Problem Description Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.Thi…
Description 风景迷人的小城Y 市,拥有n 个美丽的景点.由于慕名而来的游客越来越多,Y 市特意安排了一辆观光公交车,为游客提供更便捷的交通服务.观光公交车在第0 分钟出现在1号景点,随后依次前往2.3.4……n 号景点.从第i 号景点开到第i+1 号景点需要Di 分钟. 任意时刻,公交车只能往前开,或在景点处等待. 设共有m 个游客,每位游客需要乘车1 次从一个景点到达另一个景点,第i 位游客在Ti 分钟来到景点Ai,希望乘车前往景点Bi(Ai<bi).为了使所有乘客都能顺利到达目的…
HDU 6187 Destroy Walls (思维,最大生成树) Destroy Walls *Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Total Submission(s): 1784 Accepted Submission(s): 692 * Problem Description Long times ago, there are beautiful histor…
题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=6045 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 687    Accepted Submission(s): 389 Problem Description Derek and Alfia are good friends.Derek …
http://acm.hdu.edu.cn/showproblem.php?pid=6045 题解:遍历一遍,求出两个人答案中相同的个数,用wa表示.然后我从大的数入手,当wa的数都尽可能在两个人答案的相同部分时,另一个人的答案中对的个数最小:当wa的数尽可能在两者答案不同的部分的时候,另一个人的答案对的个数最多. ac代码: #include <cstdio> #include <iostream> #include <queue> using namespace s…