⬆️ ⬇️

Codeforces: Unknown Language Round # 3



Thanks to the initiative of a group of users from Iran, on Codeforces on Saturday, July 30th at 10:00 Moscow time

Unknown Language Round # 3 will take place. In short, this is the original form of sports and programmer entertainment, which I first proposed in February of this year. A little more you can read here .



With the beginning of the competition you are offered a set of tasks and only one programming language. This language is kept in the strictest confidence before the start of the contest. We assume that almost all participants will be new. Thus, for three hours of working time you have to compete in programming in an unknown language. Tasks vary in complexity from very simple ( example ) to fairly complex ( example ). The emphasis is on tasks that require programming technique, rather than the ability to invent effective algorithms.



In previous rounds, we used the languages ​​Tcl and Io. It was fun!



Here, for example, is the solution of a Chinese user watashi , who solved this problem in about 50 minutes and wrote such a compact code in an unfamiliar language Io:

')

ini := Map clone section := "" ini atPut(section, Map clone) n := File standardInput readLine asNumber File standardInput readLines foreach(line, line = line asMutable strip if (line containsSeq(";"), continue) if (line containsSeq("["), section = line strip("[") strip("]") strip ini atIfAbsentPut(section, Map clone), kv := line split("=") key := kv at(0) asMutable strip value := kv at(1) asMutable strip ini at(section) atPut(key, value) ) ) ini keys sort foreach(section, if (section size > 0, ("[" .. section .. "]") println) subini := ini at(section) subini keys sort foreach(key, value = subini at(key) (key .. "=" .. value) println ) ) 


I invite you to join this fun event by taking part in it.



Related Links:

Source: https://habr.com/ru/post/125165/



All Articles