結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー monnumonnu
提出日時 2021-10-30 09:03:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 535 bytes
コンパイル時間 4,260 ms
コンパイル使用メモリ 228,768 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 16:12:43
合計ジャッジ時間 6,287 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
5,248 KB
testcase_01 AC 23 ms
5,376 KB
testcase_02 AC 23 ms
5,376 KB
testcase_03 AC 23 ms
5,376 KB
testcase_04 AC 23 ms
5,376 KB
testcase_05 AC 23 ms
5,376 KB
testcase_06 AC 22 ms
5,376 KB
testcase_07 AC 22 ms
5,376 KB
testcase_08 AC 22 ms
5,376 KB
testcase_09 AC 23 ms
5,376 KB
testcase_10 AC 23 ms
5,376 KB
testcase_11 AC 23 ms
5,376 KB
testcase_12 AC 22 ms
5,376 KB
testcase_13 AC 23 ms
5,376 KB
testcase_14 AC 23 ms
5,376 KB
testcase_15 AC 23 ms
5,376 KB
testcase_16 AC 23 ms
5,376 KB
testcase_17 WA -
testcase_18 AC 24 ms
5,376 KB
testcase_19 AC 24 ms
5,376 KB
testcase_20 AC 24 ms
5,376 KB
testcase_21 AC 24 ms
5,376 KB
testcase_22 AC 24 ms
5,376 KB
testcase_23 AC 23 ms
5,376 KB
testcase_24 AC 24 ms
5,376 KB
testcase_25 AC 23 ms
5,376 KB
testcase_26 AC 24 ms
5,376 KB
testcase_27 AC 22 ms
5,376 KB
testcase_28 AC 22 ms
5,376 KB
testcase_29 AC 22 ms
5,376 KB
testcase_30 AC 23 ms
5,376 KB
testcase_31 AC 23 ms
5,376 KB
testcase_32 AC 22 ms
5,376 KB
testcase_33 AC 23 ms
5,376 KB
testcase_34 AC 23 ms
5,376 KB
testcase_35 AC 23 ms
5,376 KB
testcase_36 AC 23 ms
5,376 KB
testcase_37 AC 23 ms
5,376 KB
testcase_38 AC 23 ms
5,376 KB
testcase_39 AC 23 ms
5,376 KB
testcase_40 AC 23 ms
5,376 KB
testcase_41 AC 23 ms
5,376 KB
testcase_42 AC 23 ms
5,376 KB
testcase_43 AC 23 ms
5,376 KB
testcase_44 AC 23 ms
5,376 KB
testcase_45 AC 24 ms
5,376 KB
testcase_46 AC 23 ms
5,376 KB
testcase_47 AC 23 ms
5,376 KB
testcase_48 AC 23 ms
5,376 KB
testcase_49 AC 23 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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){
      |            ^

ソースコード

diff #

#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';
}
0