結果
| 問題 |
No.3186 Big Order
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2025-06-22 04:48:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 2,000 ms |
| コード長 | 497 bytes |
| コンパイル時間 | 6,132 ms |
| コンパイル使用メモリ | 367,792 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-22 04:48:18 |
| 合計ジャッジ時間 | 7,705 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
#include <iostream>
#include <numeric>
#include <boost/multiprecision/cpp_int.hpp>
namespace mp=boost::multiprecision;
int main(){
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int t;
std::cin>>t;
for(;t--;){
mp::uint256_t a,b,c;
std::cin>>a>>b>>c;
mp::uint512_t d=1;
mp::uint256_t z=0;
for(int i=133;i--;){
d*=d;
z*=2;
if(b>>i&1){
d*=a;
}
while(d%c==0){
d/=c;
z+=1;
}
d=gcd(d,decltype(d)(c));
}
std::cout<<z%998244353<<'\n';
}
}
tails