技术栈

stl map

hnjzsyjyj
4 天前
数据结构·stl map
洛谷 B4241:[海淀区小学组 2025] 统计数对 ← STL map【题目来源】 https://www.luogu.com.cn/problem/B4241 【题目描述】 陶陶是一个计算机爱好者,对二进制数有着特别的喜好,遇到各种各样的数据,他总能找到跟 2 的整数次幂的关系。现在,他获得了一个长度为 n 的数列 a1,a2,…,an,他发现其中有些元素的和恰好是 2 的整数次幂。对于给定的 a1,a2,…,an,你的任务是统计有多少个数对 (i,j) 满足 ai+aj=2^x,其中 x∈N∗,i<j,这里 N∗ 表示正整数集合。 【输入格式】 第一行包含一个整数 n,
hnjzsyjyj
2 年前
stl map
HDU 2648:Shopping ← STL map【题目来源】 http://acm.hdu.edu.cn/showproblem.php?pid=2648 【题目描述】 Every girl likes shopping,so does dandelion.Now she finds the shop is increasing the price every day because the Spring Festival is coming .She is fond of a shop which is called "memory". Now sh
我是有底线的