0w1

Entries from 2017-04-01 to 1 day

CFR 780 B. The Meeting Place Cannot Be Changed ( Binary Search )

題意: 有些整數點上有朋友,每個朋友有個最高速率。問所有朋友集結到任意實數點需要的最短時間。資料規模: The first line contains single integer n (2 ≤ n ≤ 60 000) — the number of friends. The second line contains n integers x1, x2, ..., xn (1…

CFR 777 C. Alyona and Spreadsheet ( Python Output Optimization )

Problem - C - Codeforces題意: 給一個 N * M 的矩陣。K 筆詢問,每次問 [ L, R ] 範圍的行是否存在一個列,使得在 [ L, R ] 之間為非遞減。資料規模: The first line of the input contains two positive integers n and m (1 ≤ n·m ≤ 100 000) — the num…