This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
const int MAXN = 1000;
int data[MAXN + 1];
int main ()
{
int n;
int sol = 0;
scanf ("%d", &n);
for (int i = 0; i < n; ++i)
{
scanf ("%d", &data[i]);
sol += data[i];
}
int sum = 0;
for (int i = 0; i < n; ++i)
{
sum = (data[i] | sum) - (data[i] & sum);
}
if (sum != 0)
{
printf ("0");
}
else
{
int min = 2147483647;
for (int i = 0; i < n; ++i)
{
if (min > data[i])
min = data[i];
}
printf ( "%d", sol - min);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |