#include<bits/stdc++.h>
#define all(s) s.begin(),s.end()
using namespace std;
typedef long long ll;
ll n,x,y,xx,yy,ans;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n>>x>>y>>xx>>yy;
for(ll i=1;i<1e9;i<<=1)
{
if((i&x)==(i&xx))
continue;
for(ll j=i;j;j>>=1)
{
ans+=(j&x);
ans+=(j&y);
ans+=(j&xx);
ans+=(j&yy);
x^=(j&x);
y^=(j&y);
xx^=(j&xx);
yy^=(j&yy);
}
}
cout<<ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
320 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |