博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdu 6168(stl)
阅读量:1906 次
发布时间:2019-04-26

本文共 665 字,大约阅读时间需要 2 分钟。

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6168

代码:

#include
using 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

转载地址:http://xincf.baihongyu.com/

你可能感兴趣的文章
【NLP学习笔记】词共现矩阵
查看>>
【NLP学习笔记】NLP基础知识框架图
查看>>
【深度学习笔记】卷积的输入输出的通道、维度或尺寸变化过程
查看>>
【NLP学习笔记】训练集、验证集和测试集的概念及划分
查看>>
【NLP学习笔记】conda换源
查看>>
【深度学习笔记】常见的图像增强方法:scaling、rotating、flipping、random cropping
查看>>
【深度学习笔记】标准卷积
查看>>
【深度学习笔记】组卷积
查看>>
【深度学习笔记】循环神经网络和递归神经网络区别
查看>>
【学习笔记】英文科技论文常见英语句式积累
查看>>
【深度学习笔记】PixelShuffle
查看>>
【python3学习笔记】斜杠和双斜杠运算符的区别
查看>>
【深度学习笔记】torch.nn.Sequential(* args) 与 torch.nn.Module
查看>>
【深度学习笔记】用torch.nn.Sequential()搭建神经网络模型
查看>>
【深度学习笔记】用torch.nn.ModuleList搭建神经网络
查看>>
【解决错误】AttributeError: module ‘scipy.misc‘ has no attribute ‘imread‘
查看>>
【解决错误】复现RCAN的时候遇到了ImportError: cannot import name ‘_update_worker_pids’ from ‘torch._C’
查看>>
【解决错误】ModuleNotFoundError: No module named ‘skimage‘
查看>>
【深度学习笔记】pytorch的点乘(dot product)
查看>>
【深度学习笔记】残差
查看>>