結果

問題 No.1372 Median of Submasks
ユーザー mtmtmtmtmt
提出日時 2021-02-06 12:16:50
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 543 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 84,244 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-02 19:12:55
合計ジャッジ時間 1,686 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <map>
#include <utility>
#include <list>
#include <math.h>
#include <algorithm>
#include <bitset>
using namespace std;
/*
int binary(int a){
    for (int i=0;a>0;i++)
    {
        ans=ans+(a%2)*pow(10,i);
        a=a/2;
    }
    return ans;
}
*/
int main(){
    int n;
    cin>>n;
    vector<int> ans;
    ans.push_back(1);
    for(int i=0;pow(2,i)<=n;i++)
    {
        ans.push_back(pow(2,i));
    }
    cout<<ans[(ans.size()-1)]<<endl;

    return 0;
}
0