結果
問題 |
No.9 モンスターのレベル上げ
|
ユーザー |
|
提出日時 | 2025-08-07 00:20:24 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 3,242 ms |
コンパイル使用メモリ | 286,016 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-07 00:20:33 |
合計ジャッジ時間 | 8,605 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) int main(){ int N;cin>>N; vector<int> A(N),B(N); rep(i,N) cin>>A[i]; rep(i,N) cin>>B[i]; vector<pair<int,int>> temp(N); rep(i,N) temp[i]={A[i],0}; set<pair<int,int>> temps(temp.begin(),temp.end()); int ans=1e9; rep(i,N){ auto s=temps; int ma=0; rep(j,N){ auto [t,u]=*s.begin(); s.erase(s.begin()); s.insert({t+B[(i+j)%N]/2,u+1}); ma=max(ma,u+1); } ans=min(ans,ma); } cout<<ans<<"\n"; return 0; }