Problem I. 277. (November 2011)
I. 277. The file helyforr.dat (downloadable from our webpage) contains the name, geographical coordinates and number of inhabitants of Hungarian settlements. Your program i277 should display these settlements on the screen as a point, or a circle/rectangle proportional to the settlement's population, if the population is larger than 10000, see in the example.
Your program reads the geographical coordinates, the number of inhabitants and the name of the settlement from a file. The first line of the file contains the number of settlements n together with the horizontal (dx) and vertical (dy) size of the rectangular map on the screen (256dx,dy1024). Then each of the following n lines contains data for the settlements. The first two pieces of data of the actual line are the longitudinal and latitudinal coordinates in minutes. The third quantity is the population, while the last piece of data is the name (without any diacritical marks), see in the example ``Példa a bemenetre''.
You should display all settlements in a rectangular box with sides dx and dy. The given spherical coordinates should be interpreted as ordinary planar coordinates X and Y. This way you will obtain the map of settlements of Hungary.
Settlements with population larger than 10000 should be highlighted with a circle or square. The centre of the highlight should coincide with the geographical coordinates. The size of the highlight should correspond to the size of the population. In the case of Budapest, having by far the largest population, you should individually choose the size of its highlight: it has to be 1.5 times the size of the highlight of the second largest city.
The source code (i277.pas, i277.cpp, ...) together with a short documentation of your program and solution (i277.txt, i277.pdf, ...) -- also specifying the name of the developer environment to use for compiling the source file -- should be submitted in a compressed file i277.zip.
Deadline expired on 12 December 2011.
Sorry, the solution is available only in Hungarian. Google translation
Mintamegoldásként Barkaszi Richárd Miklós Nyíregyházi, 12. osztály diák megoldását közöljük: i277.pas
|13 students sent a solution.|
|10 points:||Adrián Patrik, Antal János Benjamin, Barkaszi Richárd Miklós, Fényes Balázs, Gema Barnabás, Hoffmann Áron, Jákli Aida Karolina, Kocsis 789 Mátyás, Kovács Balázs Marcell, Kucsma Levente István, Varga 256 Erik.|
|9 points:||Szabó Levente.|
|2 points:||1 student.|