solve AOJ