in 其它程序人生

摘要需要头文件<algorithm>函数名功能描述sort对给定区间所有元素进行排序stable_sort对给定区间所有元素进行稳定排序partial_sort对给定区间所有元素部分排序partial_sort_copy对给定区间复制并排序nth_element找出给定区间的某个位...

in 其它程序人生

原文http://www.lucien.ink/archives/309/起因  很久以前遇到过一个Bug,就是在for循环中使用iterator遍历容器时erase这个指针,导致了一些意想不到的Bug,今天突然想起来,做了点探究。过程std::set &emsp...

in 贪心题解

题目链接http://codeforces.com/contest/1008/problem/C题目You are given an array of integers. Vasya can permute (change order) its integers. He wants to do...

in 题解

题目链接http://codeforces.com/contest/1008/problem/B题目There are $n$ rectangles in a row. You can either turn each rectangle by $90$ degrees or leave it...

in 题解

题目链接http://codeforces.com/contest/1008/problem/A题目Vitya has just started learning Berlanese language. It is known that Berlanese uses the Latin alp...