結果
| 問題 |
No.1723 [Cherry 3rd Tune *] Dead on
|
| コンテスト | |
| ユーザー |
monnu
|
| 提出日時 | 2021-10-30 09:02:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 536 bytes |
| コンパイル時間 | 4,116 ms |
| コンパイル使用メモリ | 236,540 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-07 13:27:57 |
| 合計ジャッジ時間 | 5,584 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 WA * 13 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:27:12: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
27 | for(auto [p,cnt]:m2){
| ^
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll=long long;
using Graph=vector<vector<int>>;
#define INF 1000000000
#define MOD 998244353
#define MAX 200000
int main(){
ll X,A,Y,B;
cin>>X>>A>>Y>>B;
map<ll,int> m1,m2;
for(ll i=2;i<=1000000;i++){
while(X%i==0){
m1[i]+=A;
X/=i;
}
while(Y%i==0){
m2[i]+=B;
Y/=i;
}
}
for(auto [p,cnt]:m2){
if(cnt>m1[p]){
cout<<"No"<<'\n';
return 0;
}
}
cout<<"Yes"<<'\n';
}
monnu