原文:Codeforces Round #569 題解

Codeforces Round 題解 CF A Valeriy and Deque 有一個雙端隊列,每次取隊首兩個值,將較小值移動到隊尾,較大值位置不變。多組詢問求第 m 次操作時隊首兩個數。 顯然 O n 次以內隊首變成了最大值,之后就循環了,暴力前 O n 個操作的答案即可 https: codeforces.com contest submission CF B Tolik and His ...

2019-06-22 23:03 2 374 推薦指數:

查看詳情

Codeforces Round #732 題解

AquaMoon and Two Arrays 因為要求每一次操作后數都要大於 \(0\), 於是我們每一次選一個大於其目標值的數把它減一,選一個小於其目標值的數把它加一即可。 AquaMoon ...

Tue Jul 13 01:39:00 CST 2021 0 916
Codeforces Global Round 15 題解

A - Subsequence Permutation 求出 \(s\) 排序后的結果 \(t\),計算 \(s, t\) 不同的位置數即可。 B - Running for Gold 答案唯一 ...

Tue Jul 27 22:40:00 CST 2021 0 197
Codeforces Round #557 題解【更完了】

Codeforces Round #557 題解 掉分快樂 CF1161A Hide and Seek Alice和Bob在玩捉♂迷♂藏,有\(n\)個格子,Bob會檢查\(k\)次,第\(i\)次檢查第\(x_i\)個格子,如果Alice在這個格子就輸了。Alice一開始會在一個格子 ...

Sun May 05 19:21:00 CST 2019 2 547
Codeforces Round #704 (Div. 2) 題解

本場鏈接:Codeforces Round #704 (Div. 2) 閑話 大Fst場,排名從781->449,給我看傻了都.D題非常依賴特判,感覺我也不大能講清楚所有情況.E的話好像也比較碼農,正在寫,可能晚上做出來了就更新,沒做出來的話明天更. A. Three swimmers ...

Wed Feb 24 06:13:00 CST 2021 0 343
Codeforces Round #702 (Div. 3) 題解

本場鏈接:Codeforces Round #702 (Div. 3) A. Dense Array B. Balanced Remainders C. Sum of Cubes 思路 枚舉\(b\),由范圍可以知道\(1 \leq b \leq 10^4\).\(a\)可以求 ...

Wed Feb 17 18:59:00 CST 2021 0 273
Codeforces Round #699 (Div. 2) A~E 題解

本場鏈接:Codeforces Round #699 (Div. 2) A. Space Navigation 題目大意:有一個飛船一開始在\((0,0)\),有一個操作列表\(s\),每個位置表示一個上下左右的移動操作.有一個目的地坐標是\((px,py)\).但是這個操作序列不一定能夠正確 ...

Sat Feb 06 22:11:00 CST 2021 0 404
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM