自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 2020-2021年度第二届全国大学生算法设计与编程挑战赛(秋季赛)J 染方块-color

Description现在有一个 n \times nn×n 的方格,每一个格子是红块(X),绿块 (O),或者空白块 (.) ,而你可以把空白块染成红色。在你对你想染色的空白块进行染色之后,方格会有这样的变化:如果一个绿色块上下左右都是红块,这个绿块就会变成空白块。给定方格的初始状态,你现在可以对其进行符合条件的染色,求空格最大能达到多少个。为了方便处理,我们保证没有任意两个绿块边相邻,任意一个绿块上下左右必定有一个空白块,同时假定棋盘边界外的部分全都是红块。Inputnn 行字符串,每行字符

2020-11-16 14:20:56 880 1

原创 power oj 2914: 教Mannix小鸽鸽认数字

!在这里插入图片描述

2020-10-26 19:58:13 167

原创 F - Binary String Reconstruction CodeForces - 1352F

在这里插入代码片`#include<stdio.h>int main(){int a, b, c;int t;int i, j;scanf("%d", &t);for (i = 0; i < t; i++){ scanf("%d%d%d", &a, &b, &c); if (b==0) { for (j = 0;a>0&& j <= a; j++) { printf("0"); } fo

2020-07-04 11:40:19 172

原创 G - Special Permutation CodeForces - 1352G

A permutation of length nn is an array p=[p1,p2,…,pn]p=[p1,p2,…,pn], which contains every integer from 11 to nn (inclusive) and, moreover, each number appears exactly once. For example, p=[3,1,4,2,5]p=[3,1,4,2,5] is a permutation of length 55.For a given

2020-07-04 10:31:31 181

原创 D - Alice, Bob and Candies CodeForces - 1352D

There are nn candies in a row, they are numbered from left to right from 11 to nn. The size of the ii-th candy is aiai.Alice and Bob play an interesting and tasty game: they eat candy. Alice will eat candy from left to right, and Bob — from right to left.

2020-07-04 10:29:45 222

原创 C - K-th Not Divisible by n CodeForces - 1352C

You are given two positive integers nn and kk. Print the kk-th positive integer that is not divisible by nn.For example, if n=3n=3, and k=7k=7, then all numbers that are not divisible by 33 are: 1,2,4,5,7,8,10,11,13…1,2,4,5,7,8,10,11,13…. The 77-th number

2020-07-04 10:24:59 511

原创 B - Same Parity Summands CodeForces - 1352B

You are given two positive integers nn (1≤n≤1091≤n≤109) and kk (1≤k≤1001≤k≤100). Represent the number nn as the sum of kk positive integers of the same parity (have the same remainder when divided by 22).In other words, find a1,a2,…,aka1,a2,…,ak such that

2020-07-04 10:22:54 187

原创 A - Sum of Round Numbers CodeForces - 1352A

A positive (strictly greater than zero) integer is called round if it is of the form d00…0. In other words, a positive integer is round if all its digits except the leftmost (most significant) are equal to zero. In particular, all numbers from 11 to 99 (in

2020-07-04 10:19:39 215

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除