結果

問題 No.1372 Median of Submasks
ユーザー leaf_1415
提出日時 2020-10-07 03:32:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
MLE  
実行時間 -
コード長 361 bytes
コンパイル時間 692 ms
コンパイル使用メモリ 65,500 KB
実行使用メモリ 814,244 KB
最終ジャッジ日時 2024-07-20 03:13:49
合計ジャッジ時間 2,857 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 MLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cassert>
#include <algorithm>
#include <vector>
#define llint long long

using namespace std;

llint n;

int main(void)
{
	cin >> n;
	assert(n >= 1 && n < (1LL<<60));
	
	vector<llint> vec;
	for(llint t = n; t; t = (t-1)&n) vec.push_back(t);
	sort(vec.begin(), vec.end());
	
	cout << vec[(int)vec.size()/2] << endl;
		
	return 0;
}
0