結果

問題 No.3281 Pacific White-sided Dolphin vs Monster
ユーザー Facade
提出日時 2025-10-11 08:36:04
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 2,857 ms
コンパイル使用メモリ 281,456 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-10-11 08:36:11
合計ジャッジ時間 6,528 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
const int inf=1e18;
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;cin>>n;
    vector<int>a(n);
    for(int i=0;i<n;i++)cin>>a[i];
    sort(a.begin(),a.end());
    int p=1;
    int ans=0;
    for(int i=0;i<n;i++){
        while(p<a[i]){
            p*=2;
            ans++;
        }
    }
    cout<<ans<<endl;
}
0