結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー |
![]() |
提出日時 | 2023-09-29 03:19:32 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 34 ms / 400 ms |
コード長 | 1,098 bytes |
コンパイル時間 | 2,153 ms |
コンパイル使用メモリ | 200,480 KB |
実行使用メモリ | 24,408 KB |
スコア | 108,260 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 12:33:04 |
合計ジャッジ時間 | 9,861 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
純コード判定しない問題か言語 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
ソースコード
#include <bits/stdc++.h> using namespace std; constexpr int T = 52, N = 10; int convert(int x) { const int r = x % 10; if (r == 0) return x; if (r <= 3) return x + 3 - r; if (r <= 6) return x + 6 - r; return x + 10 - r; } int main() { int t, n, money; cin >> t >> n >> money; money /= 500; array<int, N> s, p, r; s.fill(0); p.fill(0); r.fill(0); for (int week = 0; week < T; week++) { if (week % 3 != 1 or money < 2000) { cout << 1; for (int i = 0; i < 10; i++) { cout << ' ' << min(money / 10, max(0, convert(1.5 * pow(1.05, 3 * p.at(i))) - r.at(i))); } cout << endl; } else { cout << "2 2" << endl; } cin >> money; money /= 500; for (auto &&x : s) { cin >> x; } for (auto &&x : p) { cin >> x; } for (auto &&x : r) { cin >> x; } } return 0; }