原文:Codeforces 1239E. Turtle 折半

原文鏈接www.cnblogs.com zhouzhendong p CF E.html 前言 咕了這么久之后,我的博客復活了 題解 結論 存在一個最優解 A 數組,滿足 forall leq i lt n, A ,i leq A ,i , A ,i geq A ,i 證明提示:假設 A ,i gt A ,j ,i lt j ,那么,交換這兩個值之后得到的答案嚴格不劣,另一行證法相同。 結論 當 ...

2019-10-20 22:32 5 369 推薦指數:

查看詳情

Codeforces 1270E

我們把所有點分成四類 $A_{0,0},A_{0,1},A_{1,0},A_{1,1}$ 發現如果$A_{0,0}+A_{1,1} > 0$並且$A_{0,1}+A_{1,0} > 0 ...

Mon Dec 30 23:40:00 CST 2019 4 143
codeforces 877e

E. Danil and a Part-time Job time limit per test 2 seconds memory limit per test 256 megabytes input ...

Mon Nov 06 01:31:00 CST 2017 0 1356
Codeforces 1220E. Tourism

傳送門 這是一道英語題,首先要讀懂題目: $\text{Alex believes that his trip will be interesting only if he will not us ...

Fri Sep 20 20:42:00 CST 2019 2 263
codeforces 1269 E K Integers

E. K Integers 題目連接:https://codeforces.com/contest/1269/problem/E 題意 給了一個排列p,你每次操作可以交換兩個相鄰的元素,現在問你最少操作多少次可以形成一個形如1,2,3,4..k 這樣的子段 k從1~n 題解 ...

Tue Dec 24 11:42:00 CST 2019 0 260
Codeforces Round #580 (Div. 1) A-E

Contest Page A Tag:構造 將$a_i$看做一個無窮數列,$i > 2n$時$a_i = a_{i - 2n}$.設$sgn_i = \sum\limits_{j ...

Wed Aug 21 17:59:00 CST 2019 5 212
codeforces 1285E. Delete a Segment

鏈接:https://codeforces.com/problemset/problem/1285/E 題意:給一個數軸上有n個線段集,線段集若有相交,則合並為一個新的合並線段集,比如[1,6]和[2,9],因為兩個線段有相交,所以要合並為[1,9],先問刪掉給定的n個線段集中的任意一個,剩下 ...

Tue Jan 14 23:32:00 CST 2020 0 214
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM