原创 Codeforces 1291D

D. Irreducible Anagrams time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp

原创 Codeforces 680D

D. Bear and Tower of Cubes time limit per test 2 seconds memory limit per test 256 megabytes input standard input o

原创 Codeforces 1270D 思維題

D. Strange Device time limit per test 1 second memory limit per test 256 megabytes input standard input output stan

原创 Codeforces 1011E

E. Border time limit per test 1 second memory limit per test 256 megabytes input standard input output standard out

原创 Codeforces 914C

The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pass time, he likes to perform oper

原创 Codeforces 1270C 思維題

C. Make Good time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard

原创 Codeforces 641E

E. Little Artem and Time Machine time limit per test 2 seconds memory limit per test 256 megabytes input standard in

原创 csp模擬題-201903

1.小中大(100分) #include<iostream> #include<cstdio> #define maxn 100010 using namespace std; int a[maxn],n; int main(

原创 CCF模擬題-2019

2.小明種蘋果(續) #include<iostream> #include<cstdio> #include<cstring> #define maxn 1010 using namespace std; int n,op,x

原创 11.15

https://codeforces.com/gym/102411/problem/M ICPC 2019-2020 North-Western Russia Regional Contest   //A #include<iostre

原创 python--小確幸

#把手機號中間四位隱藏 def change_number(number): hiding_number=number.replace(number[3:7],'*'*4) print(hiding_number)

原创 CF-579 D. "Or" Game

題意:給一列數,任選一個數,乘x,最多操作k次,問最後a[1]|a[2]|...|a[n]的最大值是多少;思路:或運算是0|0=0,1|0=1,0|1=1,1|1=1,那麼每次乘一個大於等於2的數就能使最高位數增加,那麼肯定是把k個x都乘在

原创 10.26周賽補題

http://101.76.200.10/cache/4/03/maratona.ime.usp.br/7e08452c5de83ec599229759a9466aca/maratona_en.pdf A.問能否從左上角走到右下角,那麼就轉

原创 CF-1132 C.Painting the Fence

題目大意:現在有n個柵欄板,p個工人,每個工人可以塗一段區間的柵欄板,問如果僱傭p-2個工人,最多可以塗多少塊柵欄板。 做法:先求出q個工人能塗得最多木板數,並統計每個木板被塗的次數。求被塗一次的木板個數和被塗兩次的木板個數的前綴和。 暴力

原创 CF-378 B.Semifinals

題目意思:有n個參賽者,他們都需要參加兩場半決賽。第一場半決賽的成績依次是a1, a2, ..., an,分別對應第1~第n個人的成績。第二場則是b1, b2, ..., bn。其中這兩個序列都是以遞增方式排列的。需要從中找出有機會躋身於總