結果

問題 No.2379 Burnside's Theorem
ユーザー as277575as277575
提出日時 2023-07-14 21:33:46
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 1,568 bytes
コンパイル時間 1,138 ms
コンパイル使用メモリ 122,464 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-10-14 11:34:47
合計ジャッジ時間 2,330 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 2 ms
4,372 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 6 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,352 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,352 KB
testcase_10 AC 2 ms
4,352 KB
testcase_11 AC 2 ms
4,352 KB
testcase_12 AC 2 ms
4,356 KB
testcase_13 AC 7 ms
4,356 KB
testcase_14 AC 9 ms
4,348 KB
testcase_15 AC 11 ms
4,352 KB
testcase_16 AC 3 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 12 ms
4,376 KB
testcase_19 AC 6 ms
4,352 KB
testcase_20 AC 9 ms
4,372 KB
testcase_21 AC 12 ms
4,376 KB
testcase_22 AC 1 ms
4,356 KB
testcase_23 AC 12 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bit>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <random>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <set>
#include <string>

using namespace::std;

template<typename T, typename U>
ostream& operator<< (ostream& o, const pair<T, U>& p) {
  o << "<" << p.first << ", " << p.second << ">";
  return o;
}

template <typename T>
ostream& operator<< (ostream& o, const vector<T>& v) {
 for (const auto& x : v) o << x << " ";
 return o;
}

template <typename T>
ostream& operator<< (ostream& o, const set<T>& v) {
 for (const auto& x : v) o << x << " ";
 return o;
}

template <typename T>
ostream& operator<< (ostream& o, const deque<T>& v) {
 for (const auto& x : v) o << x << " ";
 return o;
}

template <typename K, typename V>
ostream& operator<<(ostream& o, const unordered_map<K, V>& m) {
  o << "{";
  for (const auto& [k, v] : m)
    o << " " << k << ": " << v << ",";
  o << "}";
  return o;
}

template <typename T>
istream& operator>> (istream& i, vector<T>& v) {
  for (auto& x : v) i >> x;
  return i;
}

istream& operator>> (istream& i, pair<int, int>& p) {
  i >> p.first >> p.second;
  return i;
}

int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  unordered_set<long long> d;
  long long m = n;
  for (long long i = 2; i * i <= n; ++i)
    for (; m % i == 0; m /= i) d.insert(i);
  if (m > 1) d.insert(m);
  cout << (d.size() <= 2 ? "Yes" : "No") << endl;
  

  
  return 0;
}

0