
codeforces
比赛
RTFIL
坚持的人有收获
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #677 (Div. 3)-- A--E的题解
A. Boring Apartments #include<bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0) #define lowbit(a) (a & (-a)) #define ll long long const ll llinf =原创 2020-11-07 16:56:13 · 168 阅读 · 0 评论 -
F. Zero Remainder Sum---Codeforces Round #677 (Div. 3)--题解
F. Zero Remainder F. Zero Remainder Sum You are given a matrix a of size n×m consisting of integers. You can choose no more than ⌊m2⌋ elements in each row. Your task is to choose these elements in such a way that their sum is divisible by k and this sum is原创 2020-11-07 16:44:53 · 275 阅读 · 0 评论 -
Codeforces Round #625 -前三题题解
文章目录A. Contest for Robots题意:很简单就不写了思路:代码1代码2B. Journey Planning题意:思路:代码:C. Remove Adjacent题意:思路:关于这道题目:反思:代码: Codeforces Round #625 (Div. 2, based on Technocup 2020 Final Round)-A. Contest for Robots ...原创 2020-03-02 10:22:28 · 572 阅读 · 0 评论 -
CodeForces - 224B-思维题
B - Array You’ve got an array a, consisting of n integers: a1, a2, …, an. Your task is to find a minimal by inclusion segment [l, r] (1 ≤ l ≤ r ≤ n) such, that among numbers al, al + 1, …, ar there...原创 2020-02-28 11:43:28 · 526 阅读 · 0 评论 -
Codeforces Round #582 (Div. 3)
B. Bad Prices 题目传送门 这道题目给我一个错觉,理解题目错觉,不过理解后也能很快做出来。 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int main() { int t, n, i, j, min, count; scan...原创 2019-11-27 20:23:44 · 127 阅读 · 0 评论 -
codeforces-B. Balanced Tunnel
题目传送门 题意: 问你n辆车通过一个桥洞,等全部通过桥洞后有多少辆车超过进洞之前在自己前面的车。 解题思路: 每辆车都有自己的标记,那么先将进洞的顺序(从小到大)记录,而每辆车对应出洞的的顺序也重新记录。那么再比较它们的标记。 比如 进 汽车: 3 5 2 1 4 进 顺序 :1 2 3 4 5 出 汽车: 4 3 2 5 1 出 顺序:5 1 3 2 4 那么 超出的序好就是 5 ...原创 2019-10-24 10:06:35 · 391 阅读 · 0 评论 -
codefoces-A. Pens and Pencils
题目传送门 题意简单: 两门课程,一门是实际课,一门是理论课,两种笔,一种是钢笔,另一种是铅笔,另用一个盒子装这两种笔。没门课使用对应的笔,不能随便用其它的笔,每门课需要用a, #include<iostream> #include<cstdio> #include<algorithm> #include<string.h> #include<...原创 2019-10-24 10:06:27 · 340 阅读 · 0 评论 -
B. Koala and Lights-Codeforces Round #584( Div. 1 + Div. 2)
题目传送门 B. Koala and Lights time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output It is a holiday season, and Koala is decorating his house with cool l...原创 2019-10-13 20:17:50 · 207 阅读 · 0 评论 -
codeforce-Text Document Analysis
我是题目 Modern text editors usually show some information regarding the document being edited. For example, the number of words, the number of pages, or the number of characters. In this problem you shou...原创 2019-07-17 08:26:55 · 167 阅读 · 0 评论 -
Codeforces Round #480 (Div. 2)-
A. Links and Pearls A necklace can be described as a string of links (’-’) and pearls (‘o’), with the last link or pearl connected to the first one. You can remove a link or a pearl and insert it betw...原创 2019-07-30 11:33:06 · 199 阅读 · 0 评论 -
codefoces-A. Divide it!
题目链接 You are given an integer n. You can perform any of the following operations with this number an arbitrary (possibly, zero) number of times: Replace n with n2 if n is divisible by 2; Replace n wit...原创 2019-07-25 11:18:55 · 229 阅读 · 0 评论 -
Codeforces Round #427 (Div. 2)
A. Key races 题目链接 Two boys decided to compete in text typing on the site “Key races”. During the competition, they have to type a text consisting of s characters. The first participant types one chara...原创 2019-07-25 11:19:15 · 138 阅读 · 0 评论 -
Codeforces #479 (Div. 3)-C. Less or Equal-
C. Less or Equal You are given a sequence of integers of length n and integer number k. You should print any integer number x in the range of [1;109] (i.e. 1≤x≤109) such that exactly k elements of giv...原创 2019-07-25 17:35:57 · 218 阅读 · 0 评论 -
Codeforces Round #383 (Div. 2)
题目链接 A. Arpa’s hard exam and Mehrdad’s naive cheat There exists an island called Arpa’s land, some beautiful girls live there, as ugly ones do. Mehrdad wants to become minister of Arpa’s land. Arpa ha...原创 2019-07-26 18:05:59 · 145 阅读 · 0 评论 -
Codeforces Round #529 (Div. 3)
A. Repeating Cipher Polycarp loves ciphers. He has invented his own cipher called repeating. Repeating cipher is used for strings. To encrypt the string s=s1s2…sm (1≤m≤10), Polycarp uses the following...原创 2019-07-27 10:21:52 · 146 阅读 · 0 评论 -
Codeforces Round #479 (Div. 3)
A. Wrong Subtraction 题目链接 Little girl Tanya is learning how to decrease a number by one, but she does it wrong with a number consisting of two or more digits. Tanya subtracts one from a number by the ...原创 2019-07-27 10:22:59 · 131 阅读 · 0 评论 -
Educational Codeforces Round 71 (Rated for Div. 2)-A. There Are Two Types Of Burgers-B. Square Filli
题目传送门 A. There Are Two Types Of Burgers time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are two types of burgers in your restaurant — ham...原创 2019-08-23 17:18:28 · 386 阅读 · 0 评论 -
Codeforces Round #584 - ( Div. 1 + Div. 2)- A. Paint the Numbers
题目传送门 A. Paint the Numbers time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a sequence of integers a1,a2,…,an. You need to paint e...原创 2019-09-16 20:35:14 · 278 阅读 · 0 评论 -
codefoces-B. Plus from Picture
题目链接 You have a given picture with size w×h. Determine if the given picture has a single “+” shape or not. A “+” shape is described below: A “+” shape has one center nonempty cell. There should be som...原创 2019-06-12 10:07:29 · 725 阅读 · 0 评论 -
codefoces-A. Feed the cat
题目链接 A. Feed the cat After waking up at hh:mm, Andrew realised that he had forgotten to feed his only cat for yet another time (guess why there’s only one cat). The cat’s current hunger level is H poi...原创 2019-06-18 20:49:53 · 216 阅读 · 0 评论 -
Protect Sheep
题目链接:https://codeforces.com/contest/948/problem/A Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepher...原创 2019-04-05 08:28:34 · 425 阅读 · 1 评论 -
A. The Useless Toy
题目链接:https://codeforces.com/problemset/problem/834/A A. The Useless Toy time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Walking through the str...原创 2019-04-05 09:33:07 · 192 阅读 · 0 评论 -
B. Petya and Exam
题目链接:https://codeforces.com/problemset/problem/832/B It’s hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish...原创 2019-04-05 17:42:34 · 235 阅读 · 0 评论 -
A. Diverse Strings t
cf:http://codeforces.com/contest/1144/problem/A 水题: #include<stdio.h> #include<algorithm> #include<string.h> #include<iostream> using namespace std; #define ll long long int ma...原创 2019-04-01 08:56:03 · 294 阅读 · 0 评论 -
A. Many Equal Substrings
题目链接:https://codeforces.com/contest/1029/problem/A A. Many Equal Substrings time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a...原创 2019-04-05 21:20:46 · 369 阅读 · 0 评论 -
A. Snowball
题目链接:https://codeforces.com/contest/1099/problem/A A. Snowball time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Today’s morning was exceptionall...原创 2019-04-08 19:08:59 · 253 阅读 · 0 评论 -
A. Points in Segments
题目来源:https://codeforces.com/problemset/problem/1015/A You are given a set of n segments on the axis Ox, each segment has integer endpoints between 1 and m inclusive. Segments may intersect, overlap or...原创 2019-04-03 10:58:00 · 222 阅读 · 0 评论 -
R. Game
题目链接:https://codeforces.com/problemset/problem/630/R There is a legend in the IT City college. A student that failed to answer all questions on the game theory exam is given one more chance by his pro...原创 2019-04-03 11:13:56 · 141 阅读 · 0 评论 -
A. Restoring Three Numbers
题目链接:https://codeforces.com/contest/1154/problem/A A. Restoring Three Numbers time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarp has gues...原创 2019-04-17 08:52:27 · 289 阅读 · 0 评论 -
B. Make Them Equal
B. Make Them Equal time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a sequence a1,a2,…,an consisting of n integers. You can choos...原创 2019-04-17 09:23:30 · 347 阅读 · 0 评论 -
B. Shopping
题目链接:https://codeforces.com/problemset/problem/665/B Ayush is a cashier at the shopping center. Recently his department has started a ''click and collect" service which allows users to shop online. Th...原创 2019-04-18 20:40:27 · 305 阅读 · 0 评论 -
CodeForces - 667B
题目链接:https://codeforces.com/problemset/problem/667/B As some of you know, cubism is a trend in art, where the problem of constructing volumetrical shape on a plane with a combination of three-dimensio...原创 2019-04-18 21:16:49 · 290 阅读 · 0 评论 -
A. Little Pony and Crystal Mine
题目链接:https://codeforces.com/contest/454/problem/A A. Little Pony and Crystal Mine time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Twilight Spar...原创 2019-04-19 16:51:04 · 237 阅读 · 0 评论 -
A. Silent Classroom
题目链接 A. Silent Classroom time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are n students in the first grade of Nlogonia high school. The p...原创 2019-05-25 16:52:47 · 268 阅读 · 0 评论 -
codefoces-Far Relative’s Problem
题目 B. Far Relative’s Problem Famil Door wants to celebrate his birthday with his friends from Far Far Away. He has n friends and each of them can come to the party in a specific range of days of the y...原创 2019-06-07 10:39:59 · 212 阅读 · 0 评论 -
codefoces-Nauuo and Votes
A. Nauuo and Votes 题目链接 Nauuo is a girl who loves writing comments. One day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes. It’s known that there were x pers...原创 2019-06-08 08:30:32 · 373 阅读 · 0 评论 -
codefoces- Nauuo and Chess
题目链接 Nauuo is a girl who loves playing chess. One day she invented a game by herself which needs n chess pieces to play on a m×m chessboard. The rows and columns are numbered from 1 to m. We denote a ...原创 2019-06-08 09:22:01 · 285 阅读 · 0 评论 -
B. Divisors of Two Integers
B. Divisors of Two Integers time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Recently you have received two positive integer numbers x and y. Yo...原创 2019-04-04 16:44:43 · 180 阅读 · 0 评论