随笔分类 -  STL

摘要:题目大意 给出 $1$ 到 $n$ 的一个排列($n\le 10^5$),记做 $a_1, a_2, \dots, a_n$ 。(注:原题面表述为:“给定 $n$ 个互不相同且不超过 $n$ 的整数”,并未指明 $a_i$ 是正数,属描述不确切,实际题意如此。见管理员赛后发的题解)求所有可能的区间中 阅读全文
posted @ 2018-03-16 22:12 Pat 阅读(187) 评论(0) 推荐(0)
摘要:Classrooms "传送门" The new semester is about to begin, and finding classrooms for orientation activities is always a headache. There are $k$ classrooms 阅读全文
posted @ 2016-09-14 18:12 Pat 阅读(682) 评论(0) 推荐(0)
摘要:时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定一个包含 $N$ 个整数的数组 $A$ 。你的任务是将 $A$ 重新排列,使得任意两个相等的整数在数组中都不相邻。 如果存在多个重排后的数组满足条件,输出字典序最小的数组。 这里字典序最小指:首先尽量使第一个整数最小,其次使第 阅读全文
posted @ 2016-08-07 23:28 Pat 阅读(411) 评论(0) 推荐(0)
摘要:传送门 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Have you ever played quoit in a playground? 阅读全文
posted @ 2016-07-27 11:37 Pat 阅读(249) 评论(0) 推荐(0)
摘要:Time Limit: 20000MS Memory Limit: 65536K Total Submissions: 1165 Accepted: 110 Case Time Limit: 5000MS Description May is a lovely girl. Due to her fi 阅读全文
posted @ 2016-07-03 00:21 Pat 阅读(446) 评论(0) 推荐(0)
摘要:传送门 time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Watchmen are in a danger and Doctor 阅读全文
posted @ 2016-03-11 18:38 Pat 阅读(609) 评论(0) 推荐(0)
摘要:这篇随笔是The C++ Programming Language Fourth Edition, by Bjarne Stroustrup 第33章STL Iterators的摘录。 1 Introduction This chapter presents the STL interators a 阅读全文
posted @ 2015-09-23 00:14 Pat 阅读(233) 评论(0) 推荐(0)