当前位置:网站首页>XOR procedure
XOR procedure
2022-07-24 14:37:00 【51CTO】
#include <stdio.h>
int main()
{
int arr[]={1,2,3,4,5,6,7,6,5,4,3,2,1};
int i=0;
int sz=sizeof(arr)/sizeof(arr[0]);
int ret=0;
for (i=0;i<sz;i++)
{
ret=ret^arr[i];
}
printf("%d",ret);
///*for(i=0;i<sz;i++)
//{
// int j=0;
// int count =0;
// for (j=0;j<sz;j++)
// {
// if(arr[i]==arr[j])
// {
// count =count+1;
// }
// }
// if(count==1)
//{
// printf("%d",arr[i]);
// break;
//}
//}*/
//printf("a=%d,b=%d\n",a,b);
return 0;
}
边栏推荐
- 多数据源配置下,解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
- Centos7安装达梦单机数据库
- [oauth2] II. Authorization method of oauth2
- Is it safe for Huatai Securities to open an account? Can it be handled on the mobile phone?
- Beijing all in one card listed and sold 68.45% of its equity at 352.888529 million yuan, with a premium rate of 84%
- 自动化渗透扫描工具
- Stack and queue - 20. Valid parentheses
- Moving the mouse into select options will trigger the mouseleave event processing scheme
- Rasa 3.x 学习系列-Rasa [3.2.4] - 2022-07-21 新版本发布
- pip换源
猜你喜欢

REST风格

IEEE Transaction期刊模板使用注意事项

Bibliometrix: dig out the one worth reading from thousands of papers!

Maotai ice cream "bucked the trend" and became popular, but its cross-border meaning was not "selling ice cream"

"After 00" is coming! Digital data ushers in a new generation of "codeless" forces

Production environment tidb cluster capacity reduction tikv operation steps

Detailed explanation of IO model (easy to understand)

Video game design report template and resources over the years

TypeError: Cannot read property ‘make‘ of undefined

Multithreaded common classes
随机推荐
【NLP】下一站,Embodied AI
电赛设计报告模板及
交换
REST风格
小熊派 课程导读
TypeError: 'str' object does not support item assignment
茅台冰淇淋“逆势”走红,跨界之意却并不在“卖雪糕”
Source code analysis of ArrayList
[oauth2] III. interpretation of oauth2 configuration
Jmmert aggregation test report
达梦实时主备集群搭建
Introduction to Xiaoxiong school
Bibliometrix: dig out the one worth reading from thousands of papers!
学习scipy minimize
CSDN garbage has no bottom line!
Can't remember regular expressions? Here I have sorted out 99 common rules
Detailed explanation of IO model (easy to understand)
Activate the newly installed Anaconda in the server
Typo in static class property declarationeslint
Deep learning 1 perceptron and implementation of simple back propagation network