結果
| 問題 |
No.1409 Simple Math in yukicoder
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-02-26 22:56:32 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 587 bytes |
| コンパイル時間 | 3,762 ms |
| コンパイル使用メモリ | 253,256 KB |
| 最終ジャッジ日時 | 2025-01-19 06:32:33 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 TLE * 34 |
ソースコード
#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;
}
沙耶花