結果

問題 No.130 XOR Minimax
ユーザー %20%20
提出日時 2017-09-11 17:09:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 2,337 ms
コンパイル使用メモリ 197,072 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-25 06:46:25
合計ジャッジ時間 3,557 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 17 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 38 ms
5,376 KB
testcase_07 WA -
testcase_08 AC 62 ms
5,376 KB
testcase_09 AC 8 ms
5,376 KB
testcase_10 AC 11 ms
5,376 KB
testcase_11 AC 33 ms
5,376 KB
testcase_12 AC 4 ms
5,376 KB
testcase_13 AC 27 ms
5,376 KB
testcase_14 AC 56 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 40 ms
5,376 KB
testcase_17 AC 40 ms
5,376 KB
testcase_18 AC 43 ms
5,376 KB
testcase_19 AC 50 ms
5,376 KB
testcase_20 AC 25 ms
5,376 KB
testcase_21 AC 53 ms
5,376 KB
testcase_22 AC 13 ms
5,376 KB
testcase_23 AC 5 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int a[100001],i;
int f(int s,int l,int r){
	int m;
	return s<0?0:(m=lower_bound(a+l,a+r,a[l]&-(1<<s)|1<<s)-a)-l&&m-r?1<<s|min(f(s-1,l,m),f(s-1,m,r)):f(s-1,l,r);
}
main(){
	for(;cin>>a[i++];);
	sort(a+1,a+i);
	cout<<f(29,1,i);
}
0