結果

問題 No.2379 Burnside's Theorem
ユーザー YugimnYugimn
提出日時 2023-09-08 09:15:00
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 982 bytes
コンパイル時間 4,123 ms
コンパイル使用メモリ 280,556 KB
実行使用メモリ 9,128 KB
最終ジャッジ日時 2023-09-08 09:15:07
合計ジャッジ時間 6,893 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
8,900 KB
testcase_01 AC 40 ms
9,020 KB
testcase_02 AC 40 ms
9,068 KB
testcase_03 AC 40 ms
8,848 KB
testcase_04 AC 44 ms
8,980 KB
testcase_05 AC 42 ms
8,988 KB
testcase_06 WA -
testcase_07 AC 41 ms
9,100 KB
testcase_08 AC 45 ms
8,856 KB
testcase_09 WA -
testcase_10 AC 44 ms
9,024 KB
testcase_11 AC 41 ms
8,940 KB
testcase_12 AC 45 ms
9,060 KB
testcase_13 AC 44 ms
8,900 KB
testcase_14 AC 44 ms
8,944 KB
testcase_15 AC 45 ms
8,856 KB
testcase_16 AC 41 ms
9,096 KB
testcase_17 AC 44 ms
8,860 KB
testcase_18 AC 44 ms
8,856 KB
testcase_19 AC 41 ms
8,952 KB
testcase_20 AC 41 ms
8,916 KB
testcase_21 AC 40 ms
8,900 KB
testcase_22 AC 40 ms
9,056 KB
testcase_23 AC 40 ms
9,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//Normal-2

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

void p(auto a){
  cout << a;
}

void ps(auto a){
  cout << a << " ";
}

void ps(){
  cout << " ";
}

void pl(auto a){
  cout << a << endl;
}

void pl(){
  cout << endl;
}

void fix15(){
  cout << fixed << setprecision(15);
}

void YES(){
  pl("YES");
}

void NO(){
  pl("NO");
}

void Yes(){
  pl("Yes");
}

void No(){
  pl("No");
}

void yes(){
  pl("yes");
}

void no(){
  pl("no");
}

//Normal-2
int main(){
  vector<bool> so(1e7, true);
  so[0] = so[1] = false;

  map<ll, int> sosu;
  for(int i = 2; i <= 1e6; i++){
    if(!so[i]) continue;

    sosu[i]++;
    
    for(int j = 2; i*j <= 1e6; j++){
      so[i*j] = false;
    }
  }

  map<ll, int> ans;
  ll N; cin >> N;
  
  for(auto s: sosu){
    while(N%s.first == 0){
      ans[s.first]++;

      N /= s.first;
    }

    if(N == 1) break;
  }

  (int)ans.size() <= 2 ? Yes() : No();
}
0