結果

問題 No.2449 square_permutation
ユーザー tailstails
提出日時 2023-08-31 21:14:05
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 190 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 164,492 KB
実行使用メモリ 19,888 KB
最終ジャッジ日時 2023-08-31 21:14:53
合計ジャッジ時間 41,311 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 3 ms
4,380 KB
testcase_04 AC 4 ms
4,380 KB
testcase_05 AC 13 ms
4,376 KB
testcase_06 AC 911 ms
9,036 KB
testcase_07 AC 988 ms
9,664 KB
testcase_08 AC 1,138 ms
10,552 KB
testcase_09 AC 1,271 ms
11,464 KB
testcase_10 AC 1,803 ms
14,604 KB
testcase_11 AC 1,982 ms
15,440 KB
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 AC 2 ms
4,380 KB
testcase_23 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,a[n+1];
VI v[n+1];
rep(i,1,n+1){
	ll j=i;
	rrep(k,1,547){
		if(j%(k*k)==0){
			j/=k*k;
		}
	}
	a[i]=j;
	v[j].push_back(i);
}
rep(i,1,n+1){
	wtSp(v[a[i]].back());
	v[a[i]].pop_back();
}
0