結果
| 問題 | No.1409 Simple Math in yukicoder |
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-02-26 22:56:32 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 587 bytes |
| 記録 | |
| コンパイル時間 | 4,248 ms |
| コンパイル使用メモリ | 276,328 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-18 08:20:17 |
| 合計ジャッジ時間 | 36,136 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 TLE * 1 -- * 22 |
ソースコード
#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint1000000007;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000001
int main(){
int T;
cin>>T;
rep(_,T){
int v,x;
cin>>v>>x;
vector<int> ans(v*x);
rep(i,v*x){
ans[i] = pow_mod(i+1,v,v*x+1);
}
sort(ans.begin(),ans.end());
ans.erase(unique(ans.begin(),ans.end()),ans.end());
//cout<<ans.size()<<endl;
rep(i,min(x,(int)ans.size())){
if(i!=0)cout<<' ';
cout<<ans[i];
}
cout<<endl;
}
return 0;
}
沙耶花