結果
問題 | No.1677 mæx |
ユーザー |
![]() |
提出日時 | 2021-09-14 18:10:34 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 220 ms / 2,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 268 ms |
コンパイル使用メモリ | 6,684 KB |
実行使用メモリ | 30,684 KB |
最終ジャッジ日時 | 2024-06-27 08:48:15 |
合計ジャッジ時間 | 4,021 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 18 |
コンパイルメッセージ
Possible attempt to separate words with commas at Main.pl line 17. Main.pl syntax OK
ソースコード
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)[<>]