比赛 平凡的题目 评测结果 WWWWWWWWWW
题目名称 平凡的数据范围 最终得分 0
用户昵称 VG|Kn. 运行时间 0.017 s
代码语言 C++ 内存使用 0.39 MiB
提交时间 2015-11-03 11:22:33
显示代码纯文本
#include<iostream>
#include<cstdio>
using namespace std;

const int maxn = 10000 + 100;
int n;
long long a[maxn];
long long maxa = 0;

int main()
{
	freopen("xor_equ.in","r",stdin);
	freopen("xor_equ.out","w",stdout);
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		if (a[i] > maxa)
			maxa = a[i];
	}
	if (maxa <= 1)
		cout << 1;
	else if (maxa > 1 && maxa <= 3)
		cout << 3;
	else if (maxa > 3 && maxa <= 7)
		cout << 7;
	else if (maxa > 7 && maxa <= 15)
		cout << 15;
	else if (maxa > 15 && maxa <= 31)
		cout << 31;
	else if (maxa > 31 && maxa <= 63)
		cout << 63;
	else if (maxa > 63 && maxa <= 127)
		cout << 127;
	else if (maxa > 127 && maxa <= 255)
		cout << 255;
	else if (maxa > 255 && maxa <= 511)
		cout << 511;
	else if (maxa > 511 && maxa <= 1023)
		cout << 1023;
	else if (maxa > 1023 && maxa <= 2047)
		cout << 2047;
	else if (maxa > 2047 && maxa <= 4095)
		cout << 4095;
	else if (maxa > 4095 && maxa <= 8191)
		cout << 8191;
	else if (maxa > 8191 && maxa <= 16383)
		cout << 16383;
	else if (maxa > 16383 && maxa <= 32767)
		cout << 32767;
	else if (maxa > 32767 && maxa <= 65535)
		cout << 65535;
	else if (maxa > 65535 && maxa <= 131071)
		cout << 131071;
	else if (maxa > 131071 && maxa <= 262143)
		cout << 262143;
	else if (maxa > 262143 && maxa <= 524287)
		cout << 524287;
	else if (maxa > 524287 && maxa <= 1048575)
		cout << 1048575;
	else if (maxa > 1048575 && maxa <= 2097151)
		cout << 2097151;
	else if (maxa > 2097151 && maxa <= 4194303)
		cout << 4194303;
	else if (maxa > 4194303 && maxa <= 8388607)
		cout << 8388607;
	else if (maxa > 8388607 && maxa <= 16777215)
		cout << 16777215;
	else if (maxa > 16777215 && maxa <= 33554431)
		cout << 33554431;
	else if (maxa > 33554431 && maxa <= 67108863)
		cout << 67108863;
	else if (maxa > 67108863 && maxa <= 134217727)
		cout << 134217727;
	else if (maxa > 134217727 && maxa <= 268435455)
		cout << 268435455;
	else if (maxa > 268435455 && maxa <= 536870911)
		cout << 536870911;
	else if (maxa > 536870911 && maxa <= 1073741823)
		cout << 1073741823;
	else if (maxa > 1073741823 && maxa <= 2147483647)
		cout << 2147483647;
	return 0;
}