随笔分类 -  题库—Codeforces比赛

上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要:You have a card deck of n cards, numbered from top to bottom, i. e. the top card has index 1and bottom card — index n. Each card has its color: the 𝑖 阅读全文
posted @ 2021-04-14 13:24 脂环 阅读(95) 评论(0) 推荐(0) 编辑
摘要:Let's define the cost of a string 𝑠s as the number of index pairs i and j (1≤i<j<|s|) such that si=sj and si+1=sj+1. You are given two positive integ 阅读全文
posted @ 2021-04-14 09:18 脂环 阅读(98) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round #712 (Div. 2) A. Déjà Vu 暴力瞎搞即可,只有全a是不满足的,否则挑选a更多的一端加上a,当然也可以分别加a进行判断。 #include <bits/stdc++.h> using namespace std; int main() { int 阅读全文
posted @ 2021-04-06 23:47 脂环 阅读(73) 评论(0) 推荐(1) 编辑
摘要:Diamond Miner is a game that is similar to Gold Miner, but there are 𝑛n miners instead of 11 in this game. The mining area can be described as a plan 阅读全文
posted @ 2021-03-10 23:14 脂环 阅读(188) 评论(0) 推荐(0) 编辑
摘要:You are given a multiset S initially consisting of n distinct non-negative integers. A multiset is a set, that can contain some elements multiple time 阅读全文
posted @ 2021-03-10 23:10 脂环 阅读(276) 评论(0) 推荐(0) 编辑
摘要:A. Split it! Kawashiro Nitori is a girl who loves competitive programming. One day she found a string and an integer. As an advanced problem setter, s 阅读全文
posted @ 2021-03-10 23:05 脂环 阅读(190) 评论(0) 推荐(0) 编辑
摘要:A. Dense Array 数据范围很小可以直接枚举,对于每个间隔用while循环二倍二倍往里插。 #include <iostream> using namespace std; int a[55]; int main() { freopen("data.txt", "r", stdin); i 阅读全文
posted @ 2021-02-18 11:05 脂环 阅读(143) 评论(0) 推荐(0) 编辑
摘要:Educational Codeforces Round 104 (Rated for Div. 2) A~D A. Arena 除去最少的那部分以外都对答案有贡献。 #include <iostream> #include <algorithm> #include <set> using name 阅读全文
posted @ 2021-02-17 16:01 脂环 阅读(116) 评论(0) 推荐(0) 编辑
摘要:A. 签到,因为是等概率,且红色数字两两不同,黑色数字两两不同,故只需要看第一张即可。然后就是枚举每张卡片比较上面的两个数字。 #include <iostream> using namespace std; int main() { freopen("data.txt", "r", stdin); 阅读全文
posted @ 2020-12-20 00:22 脂环 阅读(117) 评论(0) 推荐(0) 编辑
摘要:You are given an array [𝑎1,𝑎2,…,𝑎𝑛][a1,a2,…,an] such that 1≤𝑎𝑖≤1091≤ai≤109. Let 𝑆S be the sum of all elements of the array 𝑎a. Let's call an a 阅读全文
posted @ 2020-12-18 08:49 脂环 阅读(258) 评论(1) 推荐(0) 编辑
摘要:You are playing a new computer game in which you have to fight monsters. In a dungeon you are trying to clear, you met three monsters; the first of th 阅读全文
posted @ 2020-12-18 08:39 脂环 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Gildong has an interesting machine that has an array 𝑎a with 𝑛n integers. The machine supports two kinds of operations: Increase all elements of a s 阅读全文
posted @ 2020-12-05 09:56 脂环 阅读(162) 评论(0) 推荐(0) 编辑
摘要:Note that girls in Arpa’s land are really attractive. Arpa loves overnight parties. In the middle of one of these parties Mehrdad suddenly appeared. H 阅读全文
posted @ 2020-12-02 23:35 脂环 阅读(95) 评论(0) 推荐(0) 编辑
摘要:Boring Apartments 模拟 #include <iostream> using namespace std; int main() { //freopen("data.txt", "r", stdin); int t; cin >> t; while(t--) { int x; cin 阅读全文
posted @ 2020-10-21 20:05 脂环 阅读(193) 评论(0) 推荐(0) 编辑
摘要:Kolya got an integer array a1,a2,…,an. The array can contain both positive and negative integers, but Kolya doesn't like 0 , so the array doesn't cont 阅读全文
posted @ 2020-09-30 22:25 脂环 阅读(276) 评论(0) 推荐(0) 编辑
摘要:You are given an array a consisting of n integers numbered from 1to n . Let's define the k -amazing number of the array as the minimum number that occ 阅读全文
posted @ 2020-09-28 20:28 脂环 阅读(366) 评论(0) 推荐(1) 编辑
摘要:You are given a binary string s consisting of n zeros and ones. Your task is to divide the given string into the minimum number of subsequences in suc 阅读全文
posted @ 2020-08-07 15:26 脂环 阅读(315) 评论(0) 推荐(0) 编辑
摘要:There are n people who want to participate in a boat competition. The weight of the i -th participant is wi. Only teams consisting of two people can p 阅读全文
posted @ 2020-08-07 15:02 脂环 阅读(559) 评论(0) 推荐(0) 编辑
摘要:You have n gifts and you want to give all of them to children. Of course, you don't want to offend anyone, so all gifts should be equal between each o 阅读全文
posted @ 2020-08-07 14:34 脂环 阅读(661) 评论(1) 推荐(1) 编辑
摘要:You are given the array aa a consisting of n positive (greater than zero) integers. In one move, you can choose two indices i and j (i≠j) such that th 阅读全文
posted @ 2020-08-07 14:21 脂环 阅读(703) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 10 下一页
点击右上角即可分享
微信分享提示
主题色彩