Skip to content

Commit

Permalink
逆から読んで同じになる単語以外は各々一回しか出現しない
Browse files Browse the repository at this point in the history
  • Loading branch information
y-uti committed Sep 30, 2015
1 parent 552b05a commit 5d4439b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solve.php
@@ -1,7 +1,7 @@
<?php <?php
while ($w = chop(fgets(STDIN))) { while ($w = chop(fgets(STDIN))) {
if ($w != ($r = strrev($w)) | $w > 0) { if ($w != ($r = strrev($w)) | $w > 0) {
if ($buffer[$r] && $buffer[$r]-- . ($pairs[] = min($w, $r)) || ++$buffer[$w]); if ($buffer[$r] && ($pairs[] = min($w, $r)) || ++$buffer[$w]);
} else { } else {
$center .= $w; $center .= $w;
} }
Expand Down

0 comments on commit 5d4439b

Please sign in to comment.