codeforces

Codeforces Round 1002 (Div.2)

A. Milya and Two Arrays

A. Milya and Two Arrays

题目描述

给你两个长度为n的数组a和b,a,b中的每个元素都至少出现两次。你可以重新排列a,最后要使得ai+bi的不同种类大于...

Codeforces Round 1042 (Div. 3)

A Lever

题目描述

给定两个长度为 的数组 , .现在有以下两个操作:

  1. 选择一个下标 ,若,则$A{i}=A{i}-...

Codeforces Round 912 Div2

A Halloumi Boxes

题目大意

给定一个数组A,我们可以对数组惊醒多次操作,操作如下:
我们可以将数组中的某一段倒置,但是长度不能超过K,例如:反转子数组意味着选择两个索引i和j...

Codeforces Round 913 Div3

A Rook

题目大意

给一个国际象棋棋盘,有t次询问,每次询问给定一个棋子坐标s 例如 d4.

问: 输出这个棋子上下左右四个方向的坐标

解题思路

两个for循...

Codeforces Round 914 Div2

A Forked!

题目大意

给定王后和国王的位置, 马可以先朝一个方向走a步,再朝另一个方向走b
问:马有多少个位置可以同时走到皇后和国王

###...

Codeforces Round 916 Div3

A Problemsolving Log

题目描述

给一个整数n,字符串s,字符串中s[i]表示第i分钟解决第s[i]题.
问题A需要1分钟解决,问题B需要2分钟解决,以此...

Codeforces Round 922 Div2

A Brick Wall

题目描述

砖块大小为1 * k,砖块可以水平和竖直放置,
现在,我们用这样的砖块砌一堵n * m的墙, 墙的稳定性为水平砖块数与垂直砖块数...

Codeforces Round 967 (Div. 2)

A.Make All Equal

题目描述

{% tabs A %}

You are given a cyclic array .
You can perform the following operation on a at most times:

  • Let m be the current size of a, you can...

Codeforces Round 971 (Div.4)

A. Minimize!

Minimize!

题目描述

{% tabs A %}

You are given two integers a and b (a≤b). Over all possible integer values of c (a≤c≤b), find the minimum value of (c−a)+(b−c).

Codeforces Round 974 (Div.3)

A. Robin Helps

Robin Helps

题目描述

{% tabs A %}

There is a little bit of the outlaw in everyone, and a little bit of the hero too. The heroic outlaw Robin Hood is famous for taking from the rich and giving to the poor. Robin...

Built with MDFriday ❤️