結果
問題 |
No.3233 順列判定
|
ユーザー |
![]() |
提出日時 | 2025-08-15 21:34:52 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 1,000 ms |
コード長 | 496 bytes |
コンパイル時間 | 5,730 ms |
コンパイル使用メモリ | 333,976 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-08-15 21:35:09 |
合計ジャッジ時間 | 7,072 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace atcoder; using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(12); int n, m; cin >> n >> m; vector<int> cnt(n); rep(i, 1, n + 1) cnt[pow_mod(i, m, n)]++; rep(i, 0, n) if (cnt[i] == 0) { cout << "No\n"; return 0; } cout << "Yes\n"; }