原创 第11周訓練總結

本週心得:差不多已經習慣了熬夜,從原來10點半準時睡覺到10點半準時打開CF…… 就這周的三場比賽而言感覺挺穩定的,第一場Div2的半個小時多一點做出前兩到,被C題卡住,至於第二場Unrated的那場最後一個題只能過樣例;至於昨晚的一場

原创 New Year Snowmen

  As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. Each showman shou

原创 Testing Round #16 (Unrated)

B. Square?   題目鏈接:https://codeforces.ml/contest/1351/problem/B #include <bits/stdc++.h> #define rush() int T

原创 City Skyline

  The best part of the day for Farmer John's cows is when the sun sets. They can see the skyline of the distant city. B

原创 Stall Reservations(貪心)

  Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time

原创 Dispute(隊列)

  Valera has n counters numbered from 1 to n. Some of them are connected by wires, and each of the counters has a speci

原创 Alice's Print Service(upper_bound)

  Alice is providing print service, while the pricing doesn't seem to be reasonable, so people using her print service

原创 1352:獎金

【題目描述】 由於無敵的凡凡在2005年世界英俊帥氣男總決選中勝出,Yali Company總經理Mr.Z心情好,決定給每位員工發獎金。公司決定以每個人本年在公司的貢獻爲標準來計算他們得到獎金的多少。 於是Mr.Z下令召開m方會談。每位

原创 C. Shifts

You are given a table consisting of n rows and m columns. Each cell of the table contains a number, 0 or 1. In one move

原创 Vasya and Books

 Vasya has got n books, numbered from 1 to n, arranged in a stack. The topmost book has number a1, the next one — a2, a

原创 Codeforces Round #639 (Div. 2)

A. Puzzle Pieces 題目鏈接:https://codeforces.ml/contest/1345/problem/A #include <bits/stdc++.h> #define rush() int T;cin

原创 Fence Repair(哈爾曼算法)

  Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he n

原创 Median(lower_bound)

  Given N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤ i < j ≤ N

原创 Robin Hood

  We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money fr

原创 1243:月度開銷

【題目描述】 農夫約翰是一個精明的會計師。他意識到自己可能沒有足夠的錢來維持農場的運轉了。他計算出並記錄下了接下來 N (1 ≤ N ≤ 100,000) 天裏每天需要的開銷。 約翰打算爲連續的M (1 ≤ M ≤ N) 個財政週期創建