結果
| 問題 | 
                            No.2379 Burnside's Theorem
                             | 
                    
| コンテスト | |
| ユーザー | 
                             vjudge1
                         | 
                    
| 提出日時 | 2025-02-05 02:10:27 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,801 bytes | 
| コンパイル時間 | 4,988 ms | 
| コンパイル使用メモリ | 280,672 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2025-02-05 02:10:38 | 
| 合計ジャッジ時間 | 8,027 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 4 | 
| other | RE * 20 | 
ソースコード
//Bismillah
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define forn(i, a, n) for (int i = a; i < n; i++)
#define fornr(i, a, n) for (int i = n - 1; i >= a; i--)
#define print(a) cout << a << "\n";
#define printarr(a) forn(i, 0, a.size()) cout << a[i] << " "; cout << endl;
#define file_read(filepath) freopen(filepath, "r", stdin);
#define file_write(filepath) freopen(filepath, "w", stdout);
#define f first
#define s second
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define sorted(a) is_sorted(all(a))
#define vi vector<int>
#define vvi vector<vector<int>>
#define vc vector<char>
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define vpii vector<pair<int,int>>
#define MOD1 1000000007
#define mii map<int,int>
#define sz(a) a.size()
int maxn = 1e6;
vector<bool> is_prime(maxn, true);
vector<int> primes;
void compute() {
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i <= maxn; i++) {
        if (is_prime[i] && (long long)i * i <= maxn) {
            for (int j = i * i; j <= maxn; j += i)
                is_prime[j] = false;
        }
    }
    for(int i = 2; i <= maxn; i++){
        if(is_prime[i]) primes.pb(i);
    }
}
void solve(){
    int n;
    cin >> n;
    set<int> pos;
    for(auto i : primes){       
        bool div = false;
        while(n % i == 0){
            div = true;
            n = n / i;
        }
        if(div) pos.insert(i);
    }
    if(sz(pos) <= 2){
        print("Yes")
    } else {
        print("No")
    }
}
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t = 1;
    //cin >> t;
    compute();
    while(t--){
        solve();
    }
    return 0;
}
            
            
            
        
            
vjudge1