摘要:
https://codeforces.com/contest/1257 A題 取個max(b-a+x, n-1) B題 儅x>3 時就可以變成任意y, 儅 n <= 3 時 討論下 C題 用數組記錄下沒個數的出現位置, 取與上一次位置的最小距離為答案 1 1 1 2 2 2 也可以, ans = 2 阅读全文
摘要:
https://codeforces.com/contest/1243A題 給n個數, 問能構成最大的方形邊長,n<=1e3, 用個桶排 逆序輸出最大邊值 B1題 給兩個字符串 問只交換一次能否使兩字符串相等,直接模擬 B2題 給兩個長度為n的小寫字母字符串s t, 問能否交換兩個字符串中使得兩字符 阅读全文
摘要:
https://atcoder.jp/contests/abc144/tasks/abc144_d (感谢 revollA 同学的解答) Problem D have two conditions 1、 water is so much x*2 >= a*a*b 2、 water is so lit 阅读全文
摘要:
渐进记号 • O:若∃𝑐 > 0, 𝑛0 > 0: ∀𝑛 ≥ 𝑛0, 0 ≤ 𝑇 𝑛 ≤ 𝑐 ⋅ 𝑓(𝑛),则称𝑇(𝑛) = 𝑂(𝑓 𝑛 ) • Ω:若∃𝑐 > 0, 𝑛0 > 0: ∀𝑛 ≥ 𝑛0, 0 ≤ 𝑐 ⋅ 𝑓(𝑛) ≤ 阅读全文
摘要:
https://codingcompetitions.withgoogle.com/kickstart/round/0000000000050e02/000000000018fd0d Book Reading (10pts, 15pts) 1 ≤ T ≤ 100.1 ≤ P1 < P2 < ... 阅读全文
摘要:
https://codeforces.com/contest/1236/problem/A https://codeforces.com/contest/1236/problem/B First, we can think about putting one present in m boxs, e 阅读全文
摘要:
https://www.cometoj.com/contest/68/problem/A enmmmm 看到 许多的 爆 ll 的老故事 https://www.cometoj.com/contest/68/problem/B 从小到大排个序 a1 a2 a3 a4 a5, 如果 sum-a5 <= 阅读全文
摘要:
cf遭到了 ddos 攻击, 所有三天内的所有比赛 unrated, 难受~~~ wxhtxdy(破音~~~) https://codeforces.com/contest/1223/problem/A 观察以后会发现 n 为奇数时可以变成 1 + x = n-x (x=(n-1)/2) 输出1 , 阅读全文
摘要:
https://codeforces.com/contest/1220/problem/A Input 4 ezor Input Output 0 Output https://codeforces.com/contest/1220/problem/B 注意溢出, 精度问题 https://code 阅读全文
摘要:
https://codeforces.com/contest/1228/problem/A input 121 130 input output 123 output input 98766 100000 input output -1 output https://codeforces.com/c 阅读全文