結果
問題 |
No.698 ペアでチームを作ろう
|
ユーザー |
|
提出日時 | 2018-06-09 20:23:03 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 2,561 ms |
コンパイル使用メモリ | 173,764 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-15 04:46:47 |
合計ジャッジ時間 | 2,954 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
int N, A[15]; int dp[1<<15]; { rd(N,A(N)); REP(b, 1<<(N-1)){ if (__builtin_popcountll(b)&1) continue; REP(i, N){ if (b&(1<<i)) continue; REP(j, N){ if (b&(1<<j)) continue; int b2 = b|(1<<i)|(1<<j); dp[b2] = max(dp[b2], dp[b]+(A[i]^A[j])); } } } wt(dp[(1<<N)-1]); }