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/ 首先我 ......
Customer Placing Largest Number Orders

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 ......
Discount 顾客 Orders Apply Every

P9556 [SDCPC2023] A-Orders

## 思路 如果 $k$ 和每个订单都是固定的,那所有的生产和剩余的货物都是固定的,那直接模拟就好。 可以提前对订单按照天数排序,对于排序后第 $i$ 个订单,可以提前累加前面所有订单所需的货物,再与天数乘以 $k$ 判断能否完成。 ## AC 代码 ```cpp #include using na ......
A-Orders Orders P9556 SDCPC 9556

P9556 [SDCPC2023] A-Orders 题解

[题目传送门](https://www.luogu.com.cn/problem/P9556) 一道模拟题。 可以命名一个订单的结构体,然后将订单的结束时间进行排序。用一个变量模拟货物的数量,每遇到一个订单,货物的数量就会加上距离上一个订单的天数乘上 $k$。即对于第 $i$ 个订单,距离第 $i- ......
题解 A-Orders Orders P9556 SDCPC

2022-04-26:给定一个数组componets,长度为A, componets[i] = j,代表i类型的任务需要耗时j 给定一个二维数组orders,长度为M, orders[i][0]代表i

2022-04-26:给定一个数组componets,长度为A, componets[i] = j,代表i类型的任务需要耗时j 给定一个二维数组orders,长度为M, orders[i][0]代表i号订单下单时间 orders[i][1]代表i号订单是哪种类型的任务,毫无疑问orders[i][1 ......
数组 componets 长度 代表 orders
共5篇  :1/1页 首页上一页1下一页尾页