当前位置:网站首页>[51nod] 2106 an odd number times
[51nod] 2106 an odd number times
2022-06-24 02:49:00 【SSL_ GYX】
An odd number of times

Their thinking
If a number is also or twice , Then it is equivalent to no or .
There is only one odd number in the data , So all the numbers or one time , The result is an odd number of times .
code
#include<iostream>
#include<cstdio>
using namespace std;
int n,ans;
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
int t;
scanf("%d",&t);
ans^=t;
}
printf("%d\n",ans);
}
边栏推荐
- Industry ranks first in blackmail attacks, hacker organizations attack Afghanistan and India | global network security hotspot
- 2022-2028 global tungsten copper alloy industry research and trend analysis report
- 2022-2028 global indoor pressure monitor and environmental monitor industry research and trend analysis report
- Is your database "cloud native"?
- How to enable IPv6 network access for personal broadband
- LeetCode 599. Minimum index sum of two lists
- Learning and life -- Talking about my learning methods
- Tornado code for file download
- [supply chain • case] Tianneng group: the key to understanding the leading battery manufacturer to achieve the first profit fault
- Which is a good human voice synthesis platform? What are the human voice synthesis application scenarios
猜你喜欢

2022-2028 global third-party data platform industry research and trend analysis report

2022-2028 global medical coating materials industry research and trend analysis report

2022-2028 Global Industry Survey and trend analysis report on portable pressure monitors for wards

2022-2028 global cancer biopsy instrument and kit industry research and trend analysis report

What is etcd and its application scenarios

Permission maintenance topic: domain controller permission maintenance
Cloudpods golang practice

IOS development - multithreading - thread safety (3)

2022-2028 global portable two-way radio equipment industry research and trend analysis report

2022-2028 global indoor pressure monitor and environmental monitor industry research and trend analysis report
随机推荐
The 2021 Tencent digital ecology conference is coming
Gin framework: add API logging Middleware
How to access easynvr management platform through web pages without data?
2022-2028 global aircraft front wheel steering system industry research and trend analysis report
How does easynvr call the interface to modify a user-defined page?
Engineer culture: why doesn't bat call the boss
S2b2c platform of fresh food industry reshapes the ecosystem of agricultural products and builds a mobile fresh food comprehensive mall
IOS development - multithreading - thread safety (3)
Uipickerview show and hide animation
2022-2028 global portable two-way radio equipment industry research and trend analysis report
What is the performance improvement after upgrading the 4800h to the 5800h?
Buddha's foot before examination: the first bullet of leetcode
AI talk | solution for shopping mall inspection robot
November 1 global network security hotspot
Uiscrollview add gestures show and hide keyboard
Where is the domain name filed? What materials are required for domain name filing?
Build a reliable, scalable and maintainable application system
Contour-v1.19.1 release
Gin framework: add Prometheus monitoring
How to use nsfilemanager