結果
| 問題 |
No.3281 Pacific White-sided Dolphin vs Monster
|
| コンテスト | |
| ユーザー |
ゼリトキ
|
| 提出日時 | 2025-09-26 21:42:10 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 755 bytes |
| コンパイル時間 | 2,628 ms |
| コンパイル使用メモリ | 279,280 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-09-26 21:43:51 |
| 合計ジャッジ時間 | 5,103 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define ll long long
const long long mod=998244353;
const long long hmod=46216567629137;
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
int N;
cin>>N;
ll H[N+1];
for(int i=1;i<=N;i++) cin>>H[i];
priority_queue<int,vector<int>,greater<int>>PQ;
for(int i=1;i<=N;i++){
int c=0;
for(int j=0;j<60;j++){
if(H[i]>>j&1) c=j;
}
c++;
PQ.push(c);
}
int ans=0;
while(!PQ.empty()){
while(true){
if(PQ.empty()) break;
ans++;
if(PQ.top()<=ans){
PQ.pop();
}
}
}
cout<<ans<<endl;
}
ゼリトキ