結果
問題 |
No.130 XOR Minimax
|
ユーザー |
![]() |
提出日時 | 2017-09-11 16:59:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 265 bytes |
コンパイル時間 | 2,221 ms |
コンパイル使用メモリ | 195,992 KB |
最終ジャッジ日時 | 2025-01-05 02:54:20 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 16 WA * 5 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 7 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h> using namespace std; int a[100001],i; int f(int s,int l,int r){ return s<0?0:(i=lower_bound(a+l,a+r,a[l]&-(1<<s)|1<<s)-a)-l&&i-r?1<<s|min(f(s-1,l,i),f(s-1,i,r)):f(s-1,l,r); } main(){ for(;cin>>a[i++];); sort(a+1,a+i); cout<<f(29,1,i); }