結果
| 問題 |
No.1723 [Cherry 3rd Tune *] Dead on
|
| コンテスト | |
| ユーザー |
mine691
|
| 提出日時 | 2021-09-29 14:20:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 2,000 ms |
| コード長 | 967 bytes |
| コンパイル時間 | 1,910 ms |
| コンパイル使用メモリ | 202,588 KB |
| 最終ジャッジ日時 | 2025-01-24 18:39:02 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using Int = long long;
constexpr static int mod = 1e9 + 7;
constexpr static int inf = (1 << 30) - 1;
constexpr static Int infll = (1LL << 61) - 1;
int Competitive_Programming = (ios_base::sync_with_stdio(false), cin.tie(nullptr), cout << fixed << setprecision(15), 0);
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
map<Int, Int> primes(Int n)
{
map<Int, Int> mp;
for (Int i = 2; i * i <= n; i++)
{
while (n % i == 0)
n /= i, mp[i]++;
}
if (n > 1)
mp[n]++;
return mp;
}
int main()
{
Int x, a, y, b;
cin >> x >> a >> y >> b;
auto px = primes(x), py = primes(y);
for (auto &&[k, v] : py)
{
if (px[k] * a < v * b)
{
cout << "No\n";
return 0;
}
}
cout << "Yes\n";
}
mine691