結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー |
|
提出日時 | 2015-06-26 22:29:30 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 771 bytes |
コンパイル時間 | 1,157 ms |
コンパイル使用メモリ | 163,596 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 17:44:13 |
合計ジャッジ時間 | 2,821 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 2 ms
6,812 KB |
testcase_02 | AC | 2 ms
6,812 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 2 ms
6,944 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 1 ms
6,944 KB |
testcase_11 | AC | 1 ms
6,940 KB |
testcase_12 | WA | - |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, n) for (int i = (n) - 1; i >= 0; i--) #define rrep2(i, a, b) for (int i = (a) - 1; i >= (b); i--) #define all(v) (v).begin(), (v).end() using namespace std; typedef long long ll; const ll inf = 1e9; const ll mod = 1e9 + 7; int N; ll G[1000], D[1000]; pair<ll, int> EXP[1000]; int main() { cin >> N; rep (i, N) cin >> G[i] >> D[i]; rep (i, N) EXP[i] = make_pair(G[i] - 30000 * D[i], i); sort(EXP, EXP + N); ll sum = EXP[N - 1].first * 6; if (sum >= 100 * 30000) { cout << "YES" << endl; rep (i, 6) cout << EXP[N - 1].second << endl; } else { cout << "NO" << endl; } }