結果
| 問題 |
No.699 ペアでチームを作ろう2
|
| ユーザー |
betit0919
|
| 提出日時 | 2019-08-18 15:48:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 980 bytes |
| コンパイル時間 | 1,103 ms |
| コンパイル使用メモリ | 107,244 KB |
| 実行使用メモリ | 9,888 KB |
| 最終ジャッジ日時 | 2024-10-01 14:07:52 |
| 合計ジャッジ時間 | 3,975 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 1 -- * 9 |
ソースコード
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <map>
#include <numeric>
#include <random>
#include <queue>
#include <deque>
#include <tuple>
#include <iomanip>
#include <iterator>
#include <functional>
using namespace std;
typedef long long ll;
const int INF = (1 << 30) - 1;
const ll INFLL= (1LL << 61) - 1;
const int MOD = 1000000007;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin>>N;
vector<int> A(N);
REP(i,N)cin>>A[i];
vector<int> nums(N,0);
REP(i,N)nums[i]=i/2;
int ans=0;
do {
vector<int>AA(N/2);
REP(i,N){
AA[nums[i]]+=A[i];
}
int tmp=0;
REP(i,N/2){
tmp^=AA[i];
}
ans=max(tmp,ans);
} while (std::next_permutation(nums.begin(), nums.end()));
cout<<ans<<endl;
}
betit0919