会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
fenicnn
Whatever doesn't kill you, makes you stronger
博客园
首页
新随笔
联系
订阅
管理
2018年4月17日
只出现一次的数
摘要: 问题:有n个数,其中只有一个数出现一次,其他的都出现两次,求这个数(空间复杂度为常数) / 全部xor起来即可 / include include using namespace std; int main() { int n,x,xor_sum=0; scanf("%d",&n); while(n
阅读全文
posted @ 2018-04-17 23:43 fenicnn
阅读(160)
评论(0)
推荐(0)
公告