Buying

B. Buying gifts[贪心]

Problem - 1801B - Codeforces 题意是需要给两个人买礼物,有n个商店,每个商店只能给一个人买,而且每个商店给两个人买的礼物的价钱也可能不同,问给两人买的礼物的最大价格之差最小是多少。 我们考虑这种情况。如果当前给b买的礼物最大值为x,那么那些商店里给b礼物价格小于等于x的我 ......
Buying gifts

[USACO08NOV]Buying Hay S

# [[USACO08NOV]Buying Hay S](https://www.luogu.com.cn/problem/P2918 "[USACO08NOV]Buying Hay S") ## 题目描述 Farmer John is running out of supplies and nee ......
Buying USACO NOV Hay 08

P4544 Buying Feed G

dp &单调队列优化 这个题 : k<=i, 决策点k 可以等于i ,所以在 i 入队后递推 #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N =503,M =1e4+2 ......
Buying P4544 4544 Feed

Codeforces Round 644 (Div. 3) D. Buying Shovels(数论)

https://codeforces.com/contest/1360/problem/D ###D. Buying Shovels 题目大意: 一个人想买正好n把铲子。店内有k种包装的铲子:第i种包装正好由i把铲子组成(1≤i≤k)。这家商店有无限数量的包装。 选择一种类型的包装,然后购买几个(一 ......
数论 Codeforces Shovels Buying Round
共4篇  :1/1页 首页上一页1下一页尾页