結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
omu
|
| 提出日時 | 2015-06-26 22:30:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 607 bytes |
| コンパイル時間 | 525 ms |
| コンパイル使用メモリ | 65,060 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 23:31:14 |
| 合計ジャッジ時間 | 1,313 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <functional>
using namespace std;
#define For(i,a,b) for(int i = (a);i < (b);i++)
#define rep(i,n) For(i,0,n)
int main(){
int n;
cin >> n;
int di = 30000;
vector < int > v;
int t = -1;
int Max = 0;
rep(i, n){
int g, d;
cin >> g >> d;
if (Max < g - d * di){
Max = g - d * di;
t = i;
}
}
int sum = 0;
for (int i = 0; i < 6; i++){
sum += Max;
}
if (sum >= di * 100){
cout << "YES" << endl;
rep(i, 6){
cout << t+1 << endl;
}
}
else{
cout << "NO" << endl;
}
return 0;
}
omu