結果
問題 | No.804 野菜が苦手 |
ユーザー |
![]() |
提出日時 | 2019-03-22 21:25:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 687 bytes |
コンパイル時間 | 1,714 ms |
コンパイル使用メモリ | 165,848 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 02:43:35 |
合計ジャッジ時間 | 2,150 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h>#define CEIL(a,b) ((a) / (b) + ((a) % (b) == 0 ? 0 : 1))using namespace std;using ll = long long;using pii = pair<int, int>;constexpr int MOD = int(1e9 + 7);constexpr int INF = int(1e9 + 1);constexpr ll LLINF = ll(4 * 1e18 + 1);// constexpr int INF = 2147483647; // 2 * 1e9// constexpr ll LLINF = 9223372036854775807; // 9 * 1e18const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1, 0};const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1, 0};int main(){ios::sync_with_stdio(false);cin.tie(nullptr);cout << fixed << setprecision(10);int a, b, c, d;cin >> a >> b >> c >> d;cout << min({d / (c + 1), a, b / c}) << "\n";return 0;}