結果

問題 No.1677 mæx
ユーザー tailstails
提出日時 2021-09-14 18:10:34
言語 Perl
(5.38.2)
結果
AC  
実行時間 241 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 35,256 KB
最終ジャッジ日時 2023-09-09 16:01:19
合計ジャッジ時間 4,593 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,684 KB
testcase_01 AC 2 ms
4,796 KB
testcase_02 AC 3 ms
4,812 KB
testcase_03 AC 3 ms
4,920 KB
testcase_04 AC 181 ms
31,344 KB
testcase_05 AC 179 ms
32,188 KB
testcase_06 AC 183 ms
31,984 KB
testcase_07 AC 184 ms
32,052 KB
testcase_08 AC 180 ms
31,316 KB
testcase_09 AC 179 ms
31,868 KB
testcase_10 AC 180 ms
31,656 KB
testcase_11 AC 182 ms
31,988 KB
testcase_12 AC 183 ms
31,736 KB
testcase_13 AC 181 ms
32,136 KB
testcase_14 AC 238 ms
33,400 KB
testcase_15 AC 239 ms
33,980 KB
testcase_16 AC 241 ms
34,040 KB
testcase_17 AC 239 ms
33,724 KB
testcase_18 AC 237 ms
33,816 KB
testcase_19 AC 2 ms
4,832 KB
testcase_20 AC 2 ms
4,856 KB
testcase_21 AC 233 ms
35,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible attempt to separate words with commas at Main.pl line 17.
Main.pl syntax OK

ソースコード

diff #

sub MD{998244353}
sub max{
	($a,$b,$c,$d,$e,$f)=@_;
	return map$_%MD,$a*$d,$a*$e+$b*$d+$b*$e,$a*$f+$b*$f+$c*$d+$c*$e+$c*$f;
}
sub mex{
	($a,$b,$c,$d,$e,$f)=@_;
	return map$_%MD,$b*$e+$b*$f+$c*$e+$c*$f,$a*$d+$a*$f+$c*$d,$a*$e+$b*$d;
}
sub m3x{
	@a=&max;
	@e=&mex;
	return map$_%MD,map$a[$_]+$e[$_],0..2;
}
$_=<>;
y/?/3/;
s/\b\d/qw(1,0,0 0,1,0 0,0,1 1,1,1)[$&]/ge;
print+(eval)[<>]
0