結果
問題 | No.2850 Make Slimes |
ユーザー |
|
提出日時 | 2024-08-25 13:33:46 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,912 bytes |
コンパイル時間 | 5,063 ms |
コンパイル使用メモリ | 180,352 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-25 13:33:56 |
合計ジャッジ時間 | 4,621 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
#pragma GCC target("avx2")#pragma GCC optimize("O3")#pragma GCC optimize("unroll-loops")#include <bits/stdc++.h>#if __has_include(<atcoder/all>)#include <atcoder/all>using namespace atcoder;#endif#include <chrono>#include <unistd.h>using namespace std;using namespace chrono;#define rep(i, n) for (ll i = 0; i < (n); ++i)#define rep1(i, n) for (ll i = 1; i <= (n); ++i)#define rrep(i, n) for (ll i = n; i > 0; --i)#define bitrep(i, n) for (ll i = 0; i < (1 << n); ++i)#define all(a) (a).begin(), (a).end()#define yesNo(b) ((b) ? "Yes" : "No")using ll = long long;using ull = unsigned long long;using ld = long double;using mint = modint998244353;using MINT = modint1000000007;string alphabet = "abcdefghijklmnopqrstuvwxyz";string ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";constexpr double pi = 3.141592653589793;constexpr ll smallMOD = 998244353;constexpr ll bigMOD = 1000000007;constexpr ll dx[] = {1, 0, -1, 0, 1, -1, -1, 1};constexpr ll dy[] = {0, 1, 0, -1, 1, 1, -1, -1};struct Init{Init(){ios::sync_with_stdio(0);cin.tie(0);cout << fixed << setprecision(15);}} init;template <typename T>ostream &operator<<(ostream &os, const vector<T> &vec){os << "[";rep(i, vec.size()){os << vec[i];if (i != vec.size() - 1)os << ", ";}os << "]";return os;}template <typename T>ostream &operator<<(ostream &os, const vector<vector<T>> &vec){os << "[";rep(i, vec.size()){os << vec[i];if (i != vec.size() - 1)os << ", ";}os << "]";return os;}int main(){ll a, b, c, d;cin >> a >> b >> c >> d;ll cnt = 0;if (a == 0){cout << d / b << endl;}else if (b == 0){cout << c / a << endl;}else{cout << min(c / a, d / b) << endl;}return 0;}