結果

問題 No.1409 Simple Math in yukicoder
ユーザー 沙耶花沙耶花
提出日時 2021-02-26 22:56:32
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 587 bytes
コンパイル時間 4,403 ms
コンパイル使用メモリ 257,028 KB
実行使用メモリ 13,752 KB
最終ジャッジ日時 2024-04-10 13:38:36
合計ジャッジ時間 53,948 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
13,752 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,948 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 434 ms
6,940 KB
testcase_08 AC 1,490 ms
6,940 KB
testcase_09 AC 379 ms
6,944 KB
testcase_10 AC 1,186 ms
6,944 KB
testcase_11 AC 1,479 ms
6,940 KB
testcase_12 AC 1,140 ms
6,940 KB
testcase_13 AC 453 ms
6,940 KB
testcase_14 AC 339 ms
6,940 KB
testcase_15 AC 520 ms
6,940 KB
testcase_16 AC 550 ms
6,944 KB
testcase_17 AC 1,990 ms
6,948 KB
testcase_18 AC 977 ms
6,944 KB
testcase_19 AC 1,044 ms
6,944 KB
testcase_20 AC 828 ms
6,944 KB
testcase_21 AC 668 ms
6,944 KB
testcase_22 AC 1,253 ms
6,944 KB
testcase_23 AC 261 ms
6,940 KB
testcase_24 AC 207 ms
6,940 KB
testcase_25 AC 1,209 ms
6,940 KB
testcase_26 AC 1,315 ms
6,940 KB
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 TLE -
testcase_37 TLE -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0