原创 【NCPC2017-2018-gym101572-A.Airport Coffee 】 線段樹+分類討論DP

Airport Coffee 題目鏈接: https://codeforces.com/gym/101572/problem/A Description Input Output Sample Input 100000 10

原创 【shell 練習】菜雞的自我修養~

前言 工作中經常有需要寫一個簡單shell腳本的情景,每次都要花費一些時間來用啥學啥,加起來用掉很多時間,所以打算用shell刷一些題,來鍛鍊自己的shell能力~ 1. 詞頻統計 題目描述 寫一個 bash 腳本以統計一個文本

原创 【Template】

#include <bits/stdc++.h> using namespace std; #include <glog/logging.h> #include <gflags/gflags.h> DEFINE_string(i

原创 【win+linux雙系統如何正確卸載linux系統】

前言 win+linux雙系統卸載linux用了1個多小時,現在分享一下踩坑經歷以及卸載的正確姿勢。 卸載流程 1.在 windows 下刪除 ubuntu的所有分區 win+x 選擇磁盤管理,找到所有的ubuntu分區,紅框

原创 【常用小知識】 windows下拷貝大文件

前言 筆者在清理自己的windows文件時遇到了拷貝大量文件時windows會無響應的情況,於是搜了一波,用命令行工具robocopy解決了該問題。 ROBOCOPY 詳細說明(暫時用可跳過) 在命令行輸入 robocopoy /

原创 【Codeforces 660C-Hard Process】二分/尺取

Hard Process 題目鏈接: https://codeforces.com/contest/660/problem/C Description Input Output Sample Input 7 1 1 0 0

原创 【 Educational Codeforces Round 72 - E. Sum Queries? 】 拆位+線段樹

題目鏈接 http://codeforces.com/contest/1217/problem/E 題意 定義一個不平衡的multiset爲集合中有某兩個元素的十進制表示在某一位均有不爲0。 現在給出一個數組,每次單點修改一個值,

原创 【2016-2017NEERC- gym101142-J. Java2016】構造

Java2016 題目鏈接: https://codeforc.es/gym/101142 Description Input Output Sample Input 1 Sample Output a = ? max ?

原创 【Educational Codeforces Round 11-F. Bear and Bowling 4】斜率優化DP+二分

Bear and Bowling 4 題目鏈接: https://codeforces.com/contest/660/problem/F Description Input Output Sample Input 6 5

原创 【Codeforces Gym-101933-E-Explosion Exploit】記憶化搜索

Explosion Exploit 題目鏈接: https://codeforces.com/gym/101933/problem/E Description Input Output Sample Input 1 2 2

原创 【Codeforces Global Round 7】 A.B.C.D1.D2

Educational Codeforces Round 20 前言 好久沒打cf的老年選手趁着早下班開了一場,感受到對於acm的某些思維有些淡忘了,但感覺這並不完全是壞事,只能說成績與付出還是很有關係滴,以後儘量找時間再打打吧,

原创 【NCPC2017-2018-gym101572-E.Emptying the Baltic 】優先隊列

Emptying the Baltic 題目鏈接: https://codeforces.com/gym/101572/problem/A Description Input Output Sample Input 3 3

原创 【2016-2017NEERC- gym101142-C.CodeCoder vs TopForces】樹狀數組+記憶化搜索

CodeCoder vs TopForces 題目鏈接: https://codeforc.es/gym/101142 Description Input Output Sample Input 4 2 3 3 2 1 1

原创 【2016-2017NEERC- gym101142-I. Integral Polygons】計算幾何+計數

Integral Polygons 題目鏈接: https://codeforc.es/gym/101142 Description Input Output Sample Input 5 7 3 3 5 1 4 2 1

原创 【Educational Codeforces Round 66 (Rated for Div. 2) E. Minimal Segment Cover】離線+樹上倍增

E. Minimal Segment Cover 題意 給你n個區間和m次詢問,每次詢問給出一個區間,問最少多少條線段可以覆蓋這個區間。 做法 首先考慮n^2貪心的做法,每次從左端點L開始,找到包含這個點的r最大的區間,再從這個