hdu 6168(stl)
发布日期:2021-06-29 21:40:32
浏览次数:2
分类:技术文章
本文共 665 字,大约阅读时间需要 2 分钟。
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6168
代码:
#includeusing namespace std;int main(){ int n; while(scanf("%d",&n)!=EOF) { multiset s; for(int i=1;i<=n;i++) { int x; scanf("%d",&x); s.insert(x); } for(auto it=s.begin();it!=s.end();it++) { for(auto is=s.begin();is!=it;is++) { auto num=*it+*is; auto tem=s.find(num); if(tem!=s.end()) s.erase(tem); } } vector v(s.begin(),s.end()); printf("%d\n",v.size()); for(int i=0;i
转载地址:https://dh-butterfly.blog.csdn.net/article/details/77484463 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
做的很好,不错不错
[***.243.131.199]2024年04月13日 05时24分49秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
angular 环境搭建 无坑
2019-04-30
echarts之 雷达图的使用 1
2019-04-30
android AlertDialog 弹窗自定义布局 点击外部不关闭弹窗
2019-04-30
vue项目 webpack-dev-server 报错
2019-04-30
java HelloWorld
2019-04-30
antD Pro vue 的中后台解决方案 - 项目搭建 1
2019-04-30
antD Pro vue 的中后台解决方案 - 路由 2
2019-04-30
dom - altkey
2019-04-30
dom - keyCode
2019-04-30
dom - js事件绑定快捷键
2019-04-30
dom - 查找元素之8大方法
2019-04-30
dom - 创建节点
2019-04-30
uni-app 环境搭建
2019-04-30
uni-app 浏览器测试
2019-04-30
dom - 12 种 node 类型
2019-04-30
Dart - 环境配置
2019-04-30
Dart - comment 注释
2019-04-30
Dart - variate 变量
2019-04-30
Dart - default 默认值
2019-04-30
Dart - default&const
2019-04-30