結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-01 13:53:36 |
| 言語 | PHP (843.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 338 bytes |
| コンパイル時間 | 1,373 ms |
| コンパイル使用メモリ | 32,404 KB |
| 実行使用メモリ | 72,532 KB |
| 最終ジャッジ日時 | 2024-11-15 16:41:19 |
| 合計ジャッジ時間 | 26,021 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 TLE * 7 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$n = trim(fgets(STDIN));
$nums = explode(" ",trim(fgets(STDIN)));
$numOrig = $nums;
sort($nums);
$act = 0;
$tail = $n;
while(($num = array_pop($nums)) !== null) {
$pos = array_search($num, $numOrig);
if($pos > $tail) {
array_push($nums,$num);
break;
}
$tail = $pos;
}
echo count($nums);
echo PHP_EOL;