CodeForces 702B Powers of Two
简单题。开一个$map$记录一下每个数字出现了几次,那么读入的时候$f[a[i]]+1$。计算$a[i]$做出的贡献的时候,先把$f[a[i]]-1$,然后再枚举$x$,答案加上$f[{2^x} - a[i]]$。#pragma comment(linker, "/STACK:1024000000,1024000000")#include<cstdio>#inc...