結果

問題 No.1166 NADA DNA
ユーザー yuruhiyayuruhiya
提出日時 2020-08-15 09:52:01
言語 cLay
(20240104-1)
結果
AC  
実行時間 27 ms / 3,000 ms
コード長 274 bytes
コンパイル時間 2,924 ms
コンパイル使用メモリ 174,904 KB
実行使用メモリ 19,856 KB
最終ジャッジ日時 2023-09-19 01:00:45
合計ジャッジ時間 4,372 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
9,480 KB
testcase_01 AC 3 ms
9,484 KB
testcase_02 AC 3 ms
9,496 KB
testcase_03 AC 8 ms
12,060 KB
testcase_04 AC 27 ms
19,776 KB
testcase_05 AC 27 ms
19,772 KB
testcase_06 AC 26 ms
19,704 KB
testcase_07 AC 26 ms
19,740 KB
testcase_08 AC 25 ms
19,748 KB
testcase_09 AC 27 ms
19,748 KB
testcase_10 AC 27 ms
19,856 KB
testcase_11 AC 26 ms
19,720 KB
testcase_12 AC 26 ms
19,748 KB
testcase_13 AC 26 ms
19,776 KB
testcase_14 AC 27 ms
19,728 KB
testcase_15 AC 27 ms
19,748 KB
testcase_16 AC 27 ms
19,712 KB
testcase_17 AC 26 ms
19,752 KB
testcase_18 AC 26 ms
19,708 KB
testcase_19 AC 27 ms
19,756 KB
testcase_20 AC 3 ms
9,580 KB
testcase_21 AC 3 ms
9,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int n, m, l, a[499500], b[499500], c[499500], z;
char s[1d3][51];
wgraph<int> g;
{
	rd(n, l, s(n));
	m = n * (n - 1) / 2;
	rep(i, n) rep(j, i + 1, n) {
		c[z] += s[i][0..l] != s[j][0..l];
		a[z] = i;
		b[z] = j;
		z++;
	}
	g.setEdge(n, m, a, b, c);
	wt(g.MST_Prim_cost());
}
0