結果
| 問題 |
No.2042 RGB Caps
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2022-08-19 21:57:53 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 373 ms / 2,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 857 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 31,044 KB |
| 最終ジャッジ日時 | 2024-11-16 01:56:00 |
| 合計ジャッジ時間 | 3,986 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
コンパイルメッセージ
Name "main::k" used only once: possible typo at Main.pl line 1. Name "main::R" used only once: possible typo at Main.pl line 11. Name "main::B" used only once: possible typo at Main.pl line 11. Name "main::G" used only once: possible typo at Main.pl line 11. Main.pl syntax OK
ソースコード
($n,$k)=glob<>;
@a=sort{$a-$b}<>;
for(1..$n){
$c=R;
if($a[0]==$_){
$_=shift@a;
chop;
$c=chop;
}
for(B,G,R,$c){
if($$_<=$R&&$$_<=$G&&$$_<=$B){
$d=$_;
}
}
++$$d;
print$d;
}
tails