
codeforce
葛济维的博客
总想日更博客的小白
展开
-
Codeforces Raif Round 1 (Div. 1 + Div. 2) ABC题解
A. Box is Pull题解:如果两个点不在一条直线上就加上老鼠多走的2步。#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>#include<string>#include<stack>#include<queue>#include<set>#includ原创 2020-10-18 18:20:27 · 400 阅读 · 0 评论 -
Educational Codeforces Round 96 (Rated for Div. 2) (A - C题个人题解)
Educational Codeforces Round 96 (Rated for Div. 2)A. Number of Apartments暴力#include<iostream>using namespace std;int main(){ int t; cin>>t; while(t--){ int n; cin>>n; int sum; int flag = 0原创 2020-10-12 23:43:09 · 168 阅读 · 0 评论 -
CodeForces - 545A Toy Cars
Little Susie, thanks to her older brother, likes to play with cars. Today she decided to set up a tournament between them. The process of a tournament is described in the next paragraph.There are n t...原创 2020-08-31 14:06:48 · 276 阅读 · 0 评论 -
Domino for Young(codeforces 1269D)
You are given a Young diagram.Given diagram is a histogram with n columns of lengths a1,a2,…,an (a1≥a2≥…≥an≥1).Young diagram for a=[3,2,2,2,1].Your goal is to find the largest number of non-overla...原创 2020-08-31 14:04:50 · 306 阅读 · 0 评论 -
K-Dominant Character思维题 (CodeForces - 888C)
You are given a string s consisting of lowercase Latin letters. Character c is called k-dominant iff each substring of s with length at least k contains this character c.You have to find minimum k su...原创 2020-08-31 14:04:33 · 235 阅读 · 0 评论 -
Theater Square
The Theater Square can be represented as a rectangle having height n and length m, divided into square 1×1 cells. Let’s denote the cell located at the intersection of i-th row and j-th column as (i,j). The rows are numbered from top to bottom, the columns原创 2020-07-22 20:17:06 · 305 阅读 · 0 评论 -
Average Superhero Gang Power(CF-1111B)
Every superhero has been given a power value by the Felicity Committee. The avengers crew wants to maximize the average power of the superheroes in their team by performing certain operations.Initial...原创 2020-07-11 19:45:43 · 241 阅读 · 0 评论 -
Odd Selection——Codeforces Round #646 (Div. 2)
A. Odd Selection——Codeforces Round #646 (Div. 2)Shubham has an array a of size n, and wants to select exactly x elements from it, such that their sum is odd. These elements do not have to be consecutive. The elements of the array are not guaranteed to be原创 2020-06-03 21:26:43 · 219 阅读 · 0 评论 -
B. Subsequence Hate -Codeforces Round #646 (Div. 2)
B. Subsequence HateShubham has a binary string s. A binary string is a string containing only characters “0” and “1”.He can perform the following operation on the string any amount of times:Select an index of the string, and flip the character at that i原创 2020-06-03 21:15:13 · 172 阅读 · 0 评论