結果
| 問題 |
No.393 2本の竹
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2016-07-12 17:15:24 |
| 言語 | Perl (5.40.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 265 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 5,120 KB |
| 実行使用メモリ | 27,264 KB |
| 最終ジャッジ日時 | 2024-10-15 01:07:29 |
| 合計ジャッジ時間 | 2,956 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 TLE * 1 -- * 18 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
for(1..<>){
($n1,$n2)=<>=~/\d+/g;
<>;
$n=0;
$s=0;
%h=0;
for$a(sort{$a-$b}<>=~//g){
$s+=$a;
@k=keys%h;
%h=();
for(@k){
if($s-$_<=$n2){
$h{$_}=1;
}
if($_+$a<=$n1){
$h{$_+$a}=1;
}
}
if(!%h){
last;
}
++$n;
}
print $n,$/;
}
tails