B. Mishka and trip time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Little Mishka is a great traveller and she visited many countries. After thinking about where to travel this time, she cho…
C - Preparing for the Contest Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 377B Description Soon there will be held the world's largest programming contest, but the testing system sti…
Mishka started participating in a programming contest. There are nn problems in the contest. Mishka's problem-solving skill is equal to kk. Mishka arranges all problems from the contest into a list. Because of his weird principles, Mishka only solves…
http://codeforces.com/contest/1029/problem/B You are given a problemset consisting of nn problems. The difficulty of the ii-th problem is aiai. It is guaranteed that all difficulties are distinct and are given in the increasing order. You have to ass…
题目链接:http://codeforces.com/problemset/problem/369/B 题目意思:给出6个整数, n, k, l, r, sall, sk ,需要找出一个满足下列条件的序列:1. l <= 每一个数 <= r 2.整个序列的数的和为sall 3.取得最高分数的那k个人的总分数恰好(注意,是刚刚好,多了或少了都不可,而且这k个人的分数不一定都是相等的)等于sk.(至于后面的那句 if a1, a2, ..... sk = a1 + a2 + ...…
140D - New Year Contest 思路:贪心+排序.罚时与时间成正比,因为在0点前做完的题都可以在0点提交.从时间短的开始做最优. 代码: #include<bits/stdc++.h> using namespace std; ; const int INF=0x3f3f3f3f; int a[N]; int main() { ios::sync_with_stdio(false); cin.tie(); int n; cin>>n; ;i<n;i++) {…