結果
問題 |
No.1723 [Cherry 3rd Tune *] Dead on
|
ユーザー |
![]() |
提出日時 | 2021-10-30 09:03:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 535 bytes |
コンパイル時間 | 4,002 ms |
コンパイル使用メモリ | 236,056 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-07 13:28:09 |
合計ジャッジ時間 | 6,488 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 49 WA * 1 |
コンパイルメッセージ
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,ll> 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'; }