結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-01 13:59:58 |
| 言語 | PHP (8.5.11) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 39 ms |
| コンパイル使用メモリ | 37,976 KB |
| 実行使用メモリ | 48,320 KB |
| 最終ジャッジ日時 | 2026-09-23 08:58:13 |
| 合計ジャッジ時間 | 7,797 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 TLE * 1 -- * 23 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$n = trim(fgets(STDIN));
$numstr = trim(fgets(STDIN));
$nums = explode(" ",$numstr);
sort($nums);
$act = 0;
$tail = strlen($numstr);
while(($num = array_pop($nums)) !== null) {
$pos = strpos($numstr, $num);
if($pos > $tail) {
array_push($nums,$num);
break;
}
$tail = $pos;
}
echo count($nums);
echo PHP_EOL;