随笔分类 -  DP

摘要:Problem Statement Taro's summer vacation starts tomorrow, and he has decided to make plans for it now. The vacation consists of NN days. For each ii ( 阅读全文
posted @ 2020-06-15 12:19 DeaL57 阅读(227) 评论(0) 推荐(0)
摘要:Problem Statement There are NN stones, numbered 1,2,…,N1,2,…,N. For each ii (1≤i≤N1≤i≤N), the height of Stone ii is hihi. There is a frog who is initi 阅读全文
posted @ 2020-06-15 09:15 DeaL57 阅读(338) 评论(0) 推荐(0)
摘要:There are nn models in the shop numbered from 11 to nn, with sizes s1,s2,…,sns1,s2,…,sn. Orac will buy some of the models and will arrange them in the 阅读全文
posted @ 2020-05-25 12:17 DeaL57 阅读(243) 评论(0) 推荐(0)
摘要:Denis, after buying flowers and sweets (you will learn about this story in the next task), went to a date with Nastya to ask her to become a couple. N 阅读全文
posted @ 2020-05-09 11:37 DeaL57 阅读(183) 评论(0) 推荐(0)
摘要:This is the hard version of this problem. The only difference is the constraint on kk — the number of gifts in the offer. In this version: 2≤k≤n2≤k≤n. 阅读全文
posted @ 2020-05-04 00:16 DeaL57 阅读(189) 评论(0) 推荐(0)
摘要:You are given two integers nn and mm. Calculate the number of pairs of arrays (a,b)(a,b) such that: the length of both arrays is equal to mm; each ele 阅读全文
posted @ 2020-04-28 21:20 DeaL57 阅读(187) 评论(0) 推荐(0)