摘要: 1.找筷子 解题思路: 要找出唯一单着的那个数,可以用异或的方式 我们已知 a ^ a = 0 ,对于存在偶数个的数字,迟早会互相抵消,奇数个的数字也会两两抵消,只剩下最后一个答案。 AC代码: #include<iostream> #include<cstdio> #include<algorit 阅读全文
posted @ 2020-06-18 21:55 w_w_t 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 进制转换 #include<iostream> #include<string> #include<algorithm> using namespace std; int Atoi( string str , int N ){ //N进制转10进制,输入string 输出int int ans = 阅读全文
posted @ 2020-06-18 18:20 w_w_t 阅读(88) 评论(0) 推荐(0) 编辑