ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1769. Old Ural Legend

Easy solution
Posted by ValenKof 9 Aug 2011 23:39
for i = 1..
for j = 0..n-i;
atoi() strings str[j...j+i] to num[j]
sort(num, num + n - i + 1)
find num[j] + 1 < num[j+1] and output num[j]+1
Re: Easy solution
Posted by [RSU_Tash]Nodirbek_Kuklamov 28 Nov 2011 23:12
There is a solution O(N) without sorting: check numbers that has length at most 6 digits...