随笔分类 -  OJ-codeforces

摘要:题目链接 题目 This is simplified version of the problem used on the original contest. The original problem seems to have too difiicult solution. The constra 阅读全文
posted @ 2022-01-10 16:10 zhangtingxi 阅读(45) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 Everyone knows that long ago on the territory of present-day Berland there lived Bindian tribes. Their capital was surrounded by n n n hills, 阅读全文
posted @ 2022-01-10 14:22 zhangtingxi 阅读(51) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 This is yet another problem dealing with regular bracket sequences. We should remind you that a bracket sequence is called regular, if by inse 阅读全文
posted @ 2022-01-10 10:27 zhangtingxi 阅读(58) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 Peter decided to wish happy birthday to his friend from Australia and send him a card. To make his present more mysterious, he decided to make 阅读全文
posted @ 2021-12-24 19:02 zhangtingxi 阅读(102) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 This is yet another problem on regular bracket sequences. A bracket sequence is called regular, if by inserting "+" and "1" into it we get a c 阅读全文
posted @ 2021-12-24 18:32 zhangtingxi 阅读(66) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 A group of tourists is going to kayak and catamaran tour. A rented lorry has arrived to the boat depot to take kayaks and catamarans to the po 阅读全文
posted @ 2021-12-22 18:32 zhangtingxi 阅读(85) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it that starts in the upper left cel 阅读全文
posted @ 2021-12-22 17:24 zhangtingxi 阅读(52) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 The winner of the card game popular in Berland "Berlogging" is determined according to the following rules. If at the end of the game there is 阅读全文
posted @ 2021-12-20 18:50 zhangtingxi 阅读(77) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目 You are given a sequence of numbers a1, a2, ..., an, and a number m. Check if it is possible to choose a non-empty subsequence aij such that t 阅读全文
posted @ 2021-12-08 22:36 zhangtingxi 阅读(343) 评论(0) 推荐(0) 编辑
摘要:题目链接 我要是在noip前做这道题就好了。 这道题的本质就是noip2021方差中的一个性质,对于每个数进行修改,就是把它左右的差进行交换。 注意的是首项一定要一样。 Code // Problem: CF1110E Magic Stones // Contest: Luogu // URL: h 阅读全文
posted @ 2021-12-03 21:06 zhangtingxi 阅读(40) 评论(0) 推荐(0) 编辑
摘要:题目链接 暴力是肯定可以的。所以这里讲 O(1)。 首先不考虑重复,则有 (|s|+1)×26 种可行方案。 然后重复的就是在一个字母的左右放和这个字母相同的字母,有 |s| 种可能。 所以总共有 (|s|+1)×26|s| 种可能。 Cod 阅读全文
posted @ 2021-12-02 16:45 zhangtingxi 阅读(57) 评论(0) 推荐(0) 编辑
摘要:题目链接 由于 n15,所以我们可以直接枚举每条题目选或不选,最后判断是否合法即可。 时间复杂度:O(2n)。 Code // Problem: CF550B Preparing Olympiad // Contest: Luogu // URL: https: 阅读全文
posted @ 2021-12-02 16:27 zhangtingxi 阅读(35) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示