二分答案. 思路:对于二分给定的mid,即当前允许移动的最大重量,我们可以把小于改重量的标记一下,然后把没有标记的按照顺序放到另一个数组,然后判断是否满足两两相同. #include<bits/stdc++.h> using namespace std; ; int arr[N]; int brr[N]; int crr[N]; bool mark[N],mark1[N]; ; const int mm=1e9; int n; bool judge(int x){ memset(mark,,s…
Home Web Board ProblemSet Standing Status Statistics Problem F: 求平均年龄 Problem F: 求平均年龄 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 720 Solved: 394[Submit][Status][Web Board] Description 定义一个Persons类,用于保存若干个人的姓名(string类型)和年龄(int类型),定义其方法 void ad…
Problem F Funny Car Racing There is a funny car racing in a city with n junctions and m directed roads. The funny part is: each road is open and closed periodically. Each road is associate with two integers (a, b), that means the road will be open fo…
Problem F. Door LockTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/attachments Description It was a beautiful night at Yekaterinburg, the sky was crystal clear with no clouds, and the view of the moon and the stars was…
Problem F "Folding" Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100002 Description Bill is trying to compactly represent sequences of capital alphabetic characters from 'A' to 'Z' by folding repeating subsequences insid…
Problem F. Fibonacci SystemTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86821#problem/B Description Little John studies numeral systems. After learning all about fixed-base systems, he became inte…
Problem F: ExponentiationTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 4 Solved: 2[Submit][Status][Web Board] [Edit] [TestData]DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example…