
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 longconst ll llinf =原创 2020-11-07 16:56:13 · 161 阅读 · 0 评论 -
F. Zero Remainder Sum---Codeforces Round #677 (Div. 3)--题解
F. Zero RemainderF. Zero Remainder SumYou 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 · 268 阅读 · 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 · 557 阅读 · 0 评论 -
CodeForces - 224B-思维题
B - ArrayYou’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 · 519 阅读 · 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 · 124 阅读 · 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 · 385 阅读 · 0 评论 -
codefoces-A. Pens and Pencils
题目传送门题意简单:两门课程,一门是实际课,一门是理论课,两种笔,一种是钢笔,另一种是铅笔,另用一个盒子装这两种笔。没门课使用对应的笔,不能随便用其它的笔,每门课需要用a,#include<iostream>#include<cstdio>#include<algorithm>#include<string.h>#include<...原创 2019-10-24 10:06:27 · 329 阅读 · 0 评论 -
B. Koala and Lights-Codeforces Round #584( Div. 1 + Div. 2)
题目传送门B. Koala and Lightstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt is a holiday season, and Koala is decorating his house with cool l...原创 2019-10-13 20:17:50 · 198 阅读 · 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 · 157 阅读 · 0 评论 -
Codeforces Round #480 (Div. 2)-
A. Links and PearlsA 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 · 190 阅读 · 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 · 220 阅读 · 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 · 134 阅读 · 0 评论 -
Codeforces #479 (Div. 3)-C. Less or Equal-
C. Less or EqualYou 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 · 210 阅读 · 0 评论 -
Codeforces Round #383 (Div. 2)
题目链接A. Arpa’s hard exam and Mehrdad’s naive cheatThere 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 · 135 阅读 · 0 评论 -
Codeforces Round #529 (Div. 3)
A. Repeating CipherPolycarp 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 · 140 阅读 · 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 · 123 阅读 · 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 Burgerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are two types of burgers in your restaurant — ham...原创 2019-08-23 17:18:28 · 379 阅读 · 0 评论 -
Codeforces Round #584 - ( Div. 1 + Div. 2)- A. Paint the Numbers
题目传送门A. Paint the Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence of integers a1,a2,…,an. You need to paint e...原创 2019-09-16 20:35:14 · 273 阅读 · 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 · 710 阅读 · 0 评论 -
codefoces-A. Feed the cat
题目链接A. Feed the catAfter 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 · 205 阅读 · 0 评论 -
Protect Sheep
题目链接:https://codeforces.com/contest/948/problem/ABob 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 · 413 阅读 · 1 评论 -
A. The Useless Toy
题目链接:https://codeforces.com/problemset/problem/834/AA. The Useless Toytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWalking through the str...原创 2019-04-05 09:33:07 · 182 阅读 · 0 评论 -
B. Petya and Exam
题目链接:https://codeforces.com/problemset/problem/832/BIt’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 · 228 阅读 · 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 longint ma...原创 2019-04-01 08:56:03 · 282 阅读 · 0 评论 -
A. Many Equal Substrings
题目链接:https://codeforces.com/contest/1029/problem/AA. Many Equal Substringstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output You are given a...原创 2019-04-05 21:20:46 · 360 阅读 · 0 评论 -
A. Snowball
题目链接:https://codeforces.com/contest/1099/problem/AA. Snowballtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday’s morning was exceptionall...原创 2019-04-08 19:08:59 · 246 阅读 · 0 评论 -
A. Points in Segments
题目来源:https://codeforces.com/problemset/problem/1015/AYou 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 · 213 阅读 · 0 评论 -
R. Game
题目链接:https://codeforces.com/problemset/problem/630/RThere 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 · 127 阅读 · 0 评论 -
A. Restoring Three Numbers
题目链接:https://codeforces.com/contest/1154/problem/AA. Restoring Three Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has gues...原创 2019-04-17 08:52:27 · 282 阅读 · 0 评论 -
B. Make Them Equal
B. Make Them Equaltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence a1,a2,…,an consisting of n integers.You can choos...原创 2019-04-17 09:23:30 · 340 阅读 · 0 评论 -
B. Shopping
题目链接:https://codeforces.com/problemset/problem/665/BAyush 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 · 299 阅读 · 0 评论 -
CodeForces - 667B
题目链接:https://codeforces.com/problemset/problem/667/BAs 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 · 281 阅读 · 0 评论 -
A. Little Pony and Crystal Mine
题目链接:https://codeforces.com/contest/454/problem/AA. Little Pony and Crystal Minetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwilight Spar...原创 2019-04-19 16:51:04 · 233 阅读 · 0 评论 -
A. Silent Classroom
题目链接A. Silent Classroomtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n students in the first grade of Nlogonia high school. The p...原创 2019-05-25 16:52:47 · 260 阅读 · 0 评论 -
codefoces-Far Relative’s Problem
题目B. Far Relative’s ProblemFamil 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 · 202 阅读 · 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 · 358 阅读 · 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 · 278 阅读 · 0 评论 -
B. Divisors of Two Integers
B. Divisors of Two Integerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently you have received two positive integer numbers x and y. Yo...原创 2019-04-04 16:44:43 · 172 阅读 · 0 评论