結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-17 03:13:27 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 290 ms / 5,000 ms |
| + 279µs | |
| コード長 | 399 bytes |
| 記録 | |
| コンパイル時間 | 1,003 ms |
| コンパイル使用メモリ | 181,692 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-28 08:02:54 |
| 合計ジャッジ時間 | 4,589 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
#define REP(i,n)for(int i=0;i<n;++i)
using namespace std;int N,A[1501],B[1501],v=1e9;int main(){priority_queue<pair<int,int>>p;cin>>N;REP(i,N){cin>>A[i];p.push(make_pair(-A[i],0));}REP(i,N)cin>>B[i];REP(i,N){auto q=p;REP(j,N)q.push(make_pair(q.top().first-B[(i+j)%N]/2,q.top().second-1)),q.pop();int w=0;while(q.size())w=max(w,-q.top().second),q.pop();v=min(v,w);}cout<<v;}