結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-01 13:58:39 |
| 言語 | PHP (843.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 357 bytes |
| コンパイル時間 | 271 ms |
| コンパイル使用メモリ | 31,032 KB |
| 実行使用メモリ | 72,900 KB |
| 最終ジャッジ日時 | 2024-11-15 16:41:49 |
| 合計ジャッジ時間 | 21,802 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 TLE * 6 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$n = trim(fgets(STDIN));
$nums = explode(" ",trim(fgets(STDIN)));
$numstr = implode(" ", $nums);
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;