随笔分类 -  STL-map

摘要:A sequence a1,a2,…,an is called good if, for each element ai, there exists an element aj (i≠j) such that ai+aj is a power of two (that is, 2d for some 阅读全文
posted @ 2018-07-21 21:40 Roni_i 阅读(249) 评论(0) 推荐(0) 编辑
摘要:Shuffle'm Up Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14471 Accepted: 6633 Description A common pastime for poker players at a poker 阅读全文
posted @ 2018-07-08 20:27 Roni_i 阅读(135) 评论(0) 推荐(0) 编辑
摘要:【链接】: "CF" 【题意】:从一堆数中选一个最大子集,使得任意两个数相减的绝对值都是2的幂。 【分析】:首先很难的一点,需要想到子集最多只能有三个,四个及以上的子集一定不存在(可以证明)。当有三个元素时,则必有其中两对元素之差相等。 【代码】: include using namespace s 阅读全文
posted @ 2018-06-07 14:35 Roni_i 阅读(238) 评论(0) 推荐(0) 编辑
摘要:【链接】: "CF988C" 【题意】:在n个序列中任选两个序列,两个序列都除去他们中的一个数,使的总和相同 【分析】:map mp,从0~m遍历删除第i个数,mp[sum a[i]]={j+1,i+1}; 其中key是记录删掉某个数的剩下的数,value是一对以行列号用来确定位置以方便输出。若删掉 阅读全文
posted @ 2018-06-03 17:34 Roni_i 阅读(235) 评论(0) 推荐(0) 编辑
摘要:【链接】: "CF987A" 【分析】:运用map 【代码】: include include include include using namespace std; define N 100010 define M 2005 const int INF = 0x3f3f3f3f; define 阅读全文
posted @ 2018-06-01 11:48 Roni_i 阅读(159) 评论(0) 推荐(0) 编辑
摘要:``` Problem B: Averyboy找密码 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 83 Solved: 29 [Submit][Status][Web Board] Description Averyboy获得了一个串只由大小写字母组成的密码,他现在要想办法解开密码的key,这个密码的key就是其中每个字母出现的次数的中位数。他... 阅读全文
posted @ 2018-05-05 22:42 Roni_i 阅读(189) 评论(0) 推荐(0) 编辑
摘要:D. Almost Difference time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Let's denote a func 阅读全文
posted @ 2017-12-13 13:07 Roni_i 阅读(304) 评论(0) 推荐(0) 编辑
摘要:C. Boxes Packing time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Boxes Packing time li 阅读全文
posted @ 2017-12-13 01:46 Roni_i 阅读(433) 评论(0) 推荐(0) 编辑
摘要:C. Registration system time limit per test 5 seconds memory limit per test 64 megabytes input standard input output standard output A new e-mail servi 阅读全文
posted @ 2017-12-02 18:03 Roni_i 阅读(246) 评论(0) 推荐(0) 编辑
摘要:1095 Anigram单词 基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 收藏 关注 1095 Anigram单词 基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 1095 Anigram单词 基准时间限制:1 秒 空间限制 阅读全文
posted @ 2017-11-04 09:48 Roni_i 阅读(225) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示