题意是给你n个数字的序列,让你从中找含k个数字的序列,要求这k个数字要尽可能多次的从n个数字的序列中减去. 解法就是从1到n,二分查找可以删除的最大次数. http://codeforces.com/contest/1077/problem/D #include<bits/stdc++.h> using namespace std; ; int book[maxn]; int box[maxn]; int n,k; int fun(int cnt) { ; ; i<maxn; i++)…
任意门:http://codeforces.com/contest/1077/problem/D D. Cutting Out time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array ss consisting of nn integers. You have to find any ar…
Pyramid Split Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 104 Accepted Submission(s): 50 Problem Description Xiao Ming is a citizen who's good at playing,he has lot's of gold cones which…
Problem You are waiting in a long line to get a haircut at a trendy barber shop. The shop has B barbers on duty, and they are numbered 1 through B. It always takes the kth barber exactly Mk minutes to cut a customer's hair, and a barber can only cut…