最新 最热

C++核心准则​SL.io.1:只在必须的时候使用字符级别的输入

Unless you genuinely just deal with individual characters, using character-level input leads to the user code performing potentially error-prone and potentially...

2020-10-30
1

input的类型汇总

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>......

2020-10-30
0

【每日一题】48. Rotate Image

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

2020-10-30
1

Codeforces 1291 Round #616 (Div. 2) B

B. Array Sharpening time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You’re given an array a1,…,an ...

2020-10-29
1

Codeforces Round #618 (Div. 2)-Non-zero

这个题是说通过最小的修改次数,是数列和不能为0,乘积不能为0; 那么也即数列中不存在0,如果存在0的一定要改,存在0的只能变成1,那我们考虑变成1之后,的和是否等于0,如果等于,就在修改1个,即cnt+1。...

2020-10-29
1

Codeforces Round #618 (Div. 2)-B. Assigning to Classes

Reminder: the median of the array [a1,a2,…,a2k+1] of odd number of elements is defined as follows: let [b1,b2,…,b2k+1] be the elements of the array in the sorte...

2020-10-29
0

Codeforces Round #618 (Div. 2)-C. Anu Has a Function

我们把a|b-b换成 a-a&b,也就是说使得a&b最小,那我们考虑什么时候最大,即所有数的最高位,只有一个为1不然一定在运算的过程中被削去,那么这个题就可以改成,在32位中找某一位只有一个数是1的那一个数,让他当第一。因为其余都会...

2020-10-29
1

Codeforce 1311A Add Odd or Subtract Even

Add Odd or Subtract Even time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given two positi...

2020-10-29
1

CF思维联系– Codeforces-989C C. A Mist of Florescence

As the boat drifts down the river, a wood full of blossoms shows up on the riverfront.

2020-10-29
1

中位数和平均数(题目来源:JLOJ2332)

Description 通常把在 n 个排好序的数中,位于最中间的数就走“中位数”,这里再规定细一点,如果 n 是奇数,那么最中间的数只有一个,那就是“中位数”,但如果 n 是偶数,那么最中间的数有两个,我们把这两个数的平均数也叫作“中...

2020-10-29
1