![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CF
LSC__lsc
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #536 (Div. 2) B. Lunar New Year and Food Ordering
题意:有n种菜,m位顾客,每种菜都有它们的数量ai与价值ci;m位顾客,每一位顾客选择i-th种菜,数量为y,若i-th数量不够,则选择其他菜。若所有的菜都已售完,而顾客未能点满y道菜,顾客则会生气离开。问顾客最少花费多少钱?思路:简单的贪心,按照菜的价格将下标排个序。顾客选择i-th菜,数量为y,若i-th菜数量足够,则花费ci*y,ai-=y;若i-th数量不够,则选择其他菜中价格便宜的。...原创 2019-02-02 00:53:26 · 182 阅读 · 0 评论 -
Codeforces Round #555 (Div. 3)E. Minimum Array
题目链接You are given two arrays a and b, both of length n. All elements of both arrays are from 0 to n−1.You can reorder elements of the array b (if you want, you may leave the order of elements as it ...原创 2019-04-27 21:13:08 · 439 阅读 · 0 评论 -
Educational Codeforces Round 64 (Rated for Div. 2)ABC
A. Inscribed FiguresThe math faculty of Berland State University has suffered the sudden drop in the math skills of enrolling students. This year the highest grade on the entrance math test was 8. Ou...原创 2019-05-02 21:05:34 · 247 阅读 · 0 评论 -
Codeforces Round #554 (Div. 2) B Neko Performs Cat Furrier Transform & C Neko does Maths
B. Neko Performs Cat Furrier TransformCat Furrier Transform is a popular algorithm among cat programmers to create longcats. As one of the greatest cat programmers ever exist, Neko wants to utilize t...原创 2019-04-25 17:04:04 · 253 阅读 · 0 评论 -
Codeforces Round #562 (Div. 2) C. Increasing by Modulo(二分)
题目链接Toad Zitz has an array of integers, each integer is between 0 and m−1 inclusive. The integers are a1,a2,…,an.In one operation Zitz can choose an integer k and k indices i1,i2,…,ik such that 1≤i1...原创 2019-05-28 19:13:30 · 212 阅读 · 0 评论 -
Codeforces Round #565 (Div. 3) E Cover it!
题目链接题意: 有n个顶点,m条边,选择最多n/2个顶点,在这个图每个顶尖顶点相邻(换句话说,一条边上的两个顶点)的至少选择一个的顶点。思路: 奇偶染色法,对于相邻的两个顶点标记为不同的颜色,dfs遍历一遍即可。#include<bits/stdc++.h>using namespace std;const int maxn=6e5+7;struct EDGE{ ...原创 2019-06-11 14:03:18 · 359 阅读 · 0 评论 -
Codeforces Round #576 (Div. 2) D. Welfare State
题目链接There is a country with n citizens. The i-th of them initially has ai money. The government strictly controls the wealth of its citizens. Whenever a citizen makes a purchase or earns some money, ...原创 2019-07-31 10:33:48 · 160 阅读 · 0 评论