0w1

Entries from 2017-03-31 to 1 day

偷懶題單

這裡留一些比較偏經典的題單,主要是還不會寫的東西,之後一併解決:Flow: D: 浮気予防 - AtCoder Beginner Contest 010 | AtCoderMath: D: LCM Rush - AtCoder Beginner Contest 020 | AtCoder D: 多重ループ - AtCoder Beginner Contest 021 | AtCoder

CFR 767 D. Cartons of milk ( Binary Search, Counting Sort )

Problem - D - Codeforces題意: 你有 N 個牛奶,第 i 瓶會在 A[ i ] 天後壞掉。商店有 M 個牛奶,第 i 瓶會在 B[ i ] 天後壞掉。你一天喝至多 K 瓶牛奶,問最多可以買多少牛奶,使得你不必喝任何壞掉的牛奶。資料規模: N, M ≤ 1e6 過期天數 ≤ 1e7 TL: 2000…

CFR 767 C. Garland ( Tree DP )

Problem - C - Codeforces題意: 給一棵節點帶權的樹。問是否存在一種分割方法,使得可以分成三個非空子樹,使得權重總和相同。輸出方案。資料規模: The first line contains single integer n (3 ≤ n ≤ 1e6) — the number of lamps in the garland. Then n…