任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6319 Problem A. Ascending Rating Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 5943    Accepted Submission(s): 2004 Problem Description Before…
题目链接:2018 Multi-University Training Contest 2 6318 Swaps and Inversions 题意:sum=x*逆序个数+交换次数*y,使sum最小 思路:反复观察发现,如果有逆序对,那么就一定有相邻的逆序对,而且交换他们一定是合理的 进一步发现,逆序对的数量即是最大交换的次数,最后,ans=min(x,y)*逆序个数 使用分治排序求逆序对个数: #include<cstdio> #include<iostream> #includ…
比赛链接:2018 Multi-University Training Contest 1 6301 Distinct Values 题意:输出一个长度为n的序列,要求满足m个区间的数都不相同,并且字典序最小 思路:首先在草稿纸上模拟填充过程,从左往右填充,发现规律,有最小的数则取出最小的数.越过某些区间时,某些数字又可以重复使用利用set来维护这个待取出的集合 代码: #include<cstdio> #include<iostream> #include<set>…
Distinct Values Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2298    Accepted Submission(s): 740 Problem Description Chiaki has an array of n positive integers. You are told some facts about…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6341 Problem J. Let Sudoku Rotate Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1363    Accepted Submission(s): 717 Problem Description Sudoku i…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6342 Problem K. Expression in Memories Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2150    Accepted Submission(s): 772Special Judge Problem De…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6336 Problem E. Matrix from Arrays Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1711    Accepted Submission(s): 794 Problem Description Kazari…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6343 Problem L. Graph Theory Homework Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1536    Accepted Submission(s): 830 Problem Description Ther…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6333 Problem B. Harvest of Apples Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 4043    Accepted Submission(s): 1560 Problem Description There a…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6301 Distinct Values Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5312    Accepted Submission(s): 1823 Problem Description Chiaki has an array of…