結果
| 問題 |
No.1677 mæx
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2021-09-14 17:57:16 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 237 ms / 2,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 5,376 KB |
| 実行使用メモリ | 30,796 KB |
| 最終ジャッジ日時 | 2024-06-27 08:33:37 |
| 合計ジャッジ時間 | 4,413 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 mx{
@a=max(@_);
@e=mex(@_);
return map$_%MD,map$a[$_]+$e[$_],0..2;
}
$_=<>;
s/\b\?//g;
s/\d/qw(1,0,0 0,1,0 0,0,1)[$&]/ge;
s/\?/1,1,1/g;
print+(eval)[<>]
tails