Orders
586. Customer Placing the Largest Number of Orders
参考官方题解:https://leetcode.cn/problems/customer-placing-the-largest-number-of-orders/solutions/2366301/ding-dan-zui-duo-de-ke-hu-by-leetcode-so-bywe/ 首先我 ......
1357. Apply Discount Every n Orders 每隔n个顾客打折
There is a supermarket that is frequented by many customers. The products sold at the supermarket are represented as two parallel integer arrays produ ......
P9556 [SDCPC2023] A-Orders
## 思路 如果 $k$ 和每个订单都是固定的,那所有的生产和剩余的货物都是固定的,那直接模拟就好。 可以提前对订单按照天数排序,对于排序后第 $i$ 个订单,可以提前累加前面所有订单所需的货物,再与天数乘以 $k$ 判断能否完成。 ## AC 代码 ```cpp #include using na ......
P9556 [SDCPC2023] A-Orders 题解
[题目传送门](https://www.luogu.com.cn/problem/P9556) 一道模拟题。 可以命名一个订单的结构体,然后将订单的结束时间进行排序。用一个变量模拟货物的数量,每遇到一个订单,货物的数量就会加上距离上一个订单的天数乘上 $k$。即对于第 $i$ 个订单,距离第 $i- ......