1
Shinomiya Kaguya♡
这个作者很懒,什么都没留下…
展开
-
2020-2021年度第二届全国大学生算法设计与编程挑战赛(秋季赛)J 染方块-color
Description现在有一个 n \times nn×n 的方格,每一个格子是红块(X),绿块 (O),或者空白块 (.) ,而你可以把空白块染成红色。在你对你想染色的空白块进行染色之后,方格会有这样的变化:如果一个绿色块上下左右都是红块,这个绿块就会变成空白块。给定方格的初始状态,你现在可以对其进行符合条件的染色,求空格最大能达到多少个。为了方便处理,我们保证没有任意两个绿块边相邻,任意一个绿块上下左右必定有一个空白块,同时假定棋盘边界外的部分全都是红块。Inputnn 行字符串,每行字符原创 2020-11-16 14:20:56 · 924 阅读 · 1 评论 -
power oj 2914: 教Mannix小鸽鸽认数字
!在这里插入图片描述原创 2020-10-26 19:58:13 · 196 阅读 · 0 评论 -
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 · 182 阅读 · 0 评论 -
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 · 190 阅读 · 0 评论 -
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 · 249 阅读 · 0 评论 -
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 · 538 阅读 · 0 评论 -
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 · 197 阅读 · 0 评论 -
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 · 223 阅读 · 0 评论