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 1378. Artificial Intelligence

Victor Barinov (TNU) How to solve this problem with 150KB?? [7] // Problem 1378. Artificial Intelligence 7 Mar 2009 15:35
Some authors solved this problem with very good time and very small memory. But if we store input data without compressing it is necessary near 1Mb. Maybe there exist solution without storing input at all?
Who can help me to understand how it is possible?
Vedernikoff Sergey (HSE: EconomicsForever!) Re: How to solve this problem with 150KB?? [3] // Problem 1378. Artificial Intelligence 8 Mar 2009 01:12
You just calculate frequencies of appearing black cells for every row and column. This requires only ~10Kb of memory, and at the same time allows to recognize the figure
Victor Barinov (TNU) Re: How to solve this problem with 150KB?? [2] // Problem 1378. Artificial Intelligence 11 Mar 2009 02:23
Thank you for your answer. But I still don't know how to use frequencies for recognition figures...
Vedernikoff Sergey (HSE: EconomicsForever!) Re: How to solve this problem with 150KB?? [1] // Problem 1378. Artificial Intelligence 11 Mar 2009 02:54
Just think how density functions of projection of every of these figures look like. Circle recognition is easy even by one projection. For some bad cases of squares and triangles you need both projections.
Victor Barinov (TNU) Re: How to solve this problem with 150KB?? // Problem 1378. Artificial Intelligence 19 Mar 2009 03:02
wow! beautifull idea :)
My solution use symmetric of figures.
Anisimov Dmitry (Novosibirsk STU) Re: How to solve this problem with 150KB?? [1] // Problem 1378. Artificial Intelligence 1 Nov 2009 19:07
In fact, better solution than Sergei said is possible. I think if done in assembly under MS-DOS, solution could use less than half of kilobyte of memory.
Серовиков Андрей How to solve this problem with 150KB?? // Problem 1378. Artificial Intelligence 17 Aug 2010 14:29
I save only 8 points which enough for solution
Moment of inertia ;)