結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-06 07:23:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 696 bytes |
| コンパイル時間 | 887 ms |
| コンパイル使用メモリ | 69,876 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-11-28 01:37:19 |
| 合計ジャッジ時間 | 78,420 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 1 TLE * 12 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
using namespace std;
int main(){
int N;
cin>>N;
vector<pair<int,int>> v1(N);
int A;
for(int i=0;i<N;++i){
cin>>A;
v1[i].first=A;
v1[i].second=0;
}
vector<int> v2(N);
for(int i=0;i<N;++i){
cin>>v2[i];
}
int x=INT_MAX;
for(int i=0;i<N;++i){
rotate(v2.begin(),v2.begin()+i,v2.end());
vector<pair<int,int>> v3=v1;
for(int j=0;j<N;++j){
sort(v3.begin(),v3.end());
int a=(v2[j]/2);
v3[0].first+=a;
v3[0].second+=1;
}
int y=0;
for(int j=0;j<N;++j){
int b=v3[j].second;
if(y<b) y=b;
}
if(x>y) x=y;
}
cout<<x<<endl;
}