結果
問題 |
No.3046 White Tiger vs Monster
|
ユーザー |
|
提出日時 | 2025-03-21 01:54:28 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 3,659 ms |
コンパイル使用メモリ | 272,144 KB |
実行使用メモリ | 21,560 KB |
最終ジャッジ日時 | 2025-03-22 22:31:40 |
合計ジャッジ時間 | 10,805 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 79 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef unsigned long long ull; int n,ans,tmp; ull a[200000],b; bool used[200000]; void dfs(ull p){ ans=max(ans,tmp); for(int i=0;i<n;i++){ if(!used[i]&&p>=a[i]){ tmp++; used[i]=1; dfs(p^a[i]); tmp--; used[i]=0; } } } int main(){ if(n>10) return 0; cin>>n>>b; for(int i=0;i<n;i++) cin>>a[i]; dfs(b); cout<<ans<<endl; }