結果
| 問題 |
No.699 ペアでチームを作ろう2
|
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2019-08-26 22:21:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 760 bytes |
| コンパイル時間 | 1,859 ms |
| コンパイル使用メモリ | 168,740 KB |
| 実行使用メモリ | 8,576 KB |
| 最終ジャッジ日時 | 2024-11-08 09:44:46 |
| 合計ジャッジ時間 | 4,384 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | -- * 12 |
ソースコード
#include "bits/stdc++.h"
#define ALL(obj) (obj).begin(),(obj).end()
#define RALL(obj) (obj).rbegin(),(obj).rend()
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define REPR(i, n) for(int i = (int)(n); i >= 0; i--)
#define FOR(i,n,m) for(int i = (int)(n); i < int(m); i++)
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = MOD - 1;
const ll LLINF = 4e18;
int main() {
int n; cin >> n;
vector<int> a(n);
REP(i, n) cin >> a[i];
int ans = 0;
do {
int s = 0;
REP(i, n / 2) {
s ^= a[i] + a[i + n / 2];
}
ans = max(ans, s);
reverse(a.begin() + n / 2, a.end());
} while (next_permutation(ALL(a)));
cout << ans << endl;
getchar(); getchar();
}
🍮かんプリン