Coding
Brainfck
Total prize money: Rs. 10,000
Introduction
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Does this ring a bell in your brain???
This could be…..a cryptic message? Or an arithmetic expression without numbers? Or may be…a “Hello World” program?
Indeed it is! A “Hello World” code written in “brainfck”. The brainfck language is an esoteric programming language noted for its extreme minimalism. It was designed to challenge and amuse programmers, and is not suitable for practical use. The brainfck language itself is turing-complete and has only 8 commands.
The event asks you to write codes in brainfck to solve certain problems that looked so easy to you but try them now with just these 8 commands.
Finalists
Note: All the outstation prticipants will be provided the accommodation during Shaastra '08 at IIT Madras campus provided they register on the Shaastra user portal as soon as possible.
- S.S.V. Kaushik,
Gayatri Vidya Parishad College of Engineering,
Vizag
- Cijo George
Cyriac Thomas Chittuthara
Govt.Model Engineering College, Kochi
- Vineeth G. Nair
Muhammad Farsan
Model Engineering College,
Thrikkakkara,
Cochin,
Kerala
- Kunal Sangwan
Achin Kulshrestha
NIT Kurukshetra
- P Vishwa Theja
Shashank Srikant
National Institute of Technology,
Kurukshetra
- A.Srichakri
N.M.R. Saran
IIT Madras
- Ankit Malpani
Rahul Sethi
IIT Madras
- P Narendhranath - IITM Chennai
M Sangeeta Nair - GCC bangalore
- Rishit Desai
Aziz Bookwala
Vishwakarma Institute of Technology, Pune
- Jenish C Mehta
Anant Sharma
BITS Pilani Goa Campus
- A. Naveen Kumar
V. Siva Shanmukh
IIT Madras
- Appu Mathew Joseph
Ankit Malpani
BITS Pilani Goa Campus
- Raghul R
Jeph Paul
Model Engineering College , Cochin , Kerala
- Abhishek Biswajit Mishra
Sohil Arora
NIT Kurukshetra
- Arun N
Sanjeev S
College of Engineering,Guindy
Event Format
- The event consists of two stages – prelims round will be submission by e-mail and the final round will be conducted at IIT-M during Shaastra-08.
- For the preliminary round, four problems have been posted and the participants are required to submit the solutions written in brainfck before September 7th.
- Solutions will be judged on the basis of the correctness of the solution and space-time complexity.
- All problems carry equal weights.
- Teams qualifying the prelims will be notified through e-mail/Shaastra website.
- Format for the final round shall be explained to the teams qualified on the day of the event.
Rules and Regulations
- At most two members per team.
- Solutions for the prelims must be e-mailed to the given e-mail id in the following format:
# To: brainfck08@gmail.com
# Subject: Shaastra 2008
# Attachments: pdf/doc/odt files consisting of brainfck codes for each problem
E.g. ProblemOne.pdf…
# Body: Names and e-mail ids of the participants and the college name.
- One person can participate through only one team. On violation, teams can be disqualified.
- Re-submissions are allowed with last submission being accepted as the final one.
- Coordinators’ decision shall be final and binding.
FAQs
- I have never heard of Brainfck. How can I learn it?
Learning Brainfck is really easy. Follow this link and by the end of the article, you will be an expert in Brainfck.
-
I am not able to solve all the problems. What should I do?
You can participate by submitting the solution for at least one problem. But make sure that your solution is complete. Obviously, more problems you solve, more are your chances to qualify.
-
Which interpreter/compiler I need to use?
Many brainfck interpreters are available online/for download. This is one of the many available on the web: http://koti.mbnet.fi/villes/php/bf.php
Sample Problems
- “Hello World” program. : Follow the introduction.
- Countdown from 9 to 0. :
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++>++++++++++[<<.->.>-]
- Read a string from the keyboard and print it out in reverse order.
: +[>,]<-[+.<-]
Prelim Problems
NOTE : You have to submit "brainfck" codes (not a code generator) for the following problems.
- Given any number (less than or equal to 64), print it in the binary format. Also, give the output(in decimal format) when the number is multiplied by 3.
E.g.
# Input: 15
Output: 1111
45
# Input: 64
Output: 1000000
192
- Given a string input, rotate it (last to first) by a specific amount.
* Input format: first two places will be for amount of rotation.
e.g.
# Input: 04abcdefghij
Output (rotated by 4): ghijabcdef
# Input: 111a2b3c4d5e6f7g8h9i0j
Output (rotated by 11): e6f7g8h9i0j1a2b3c4d5
- Geometric Progressions
Given the values of 'a' (first term of the G.P.) and 'r' (the common ratio), print the G.P. till 100.
* Input format: two places for value of 'a' followed by two places for value of 'r'.
e.g.
# Input: 1502
Output: 15
30
60
# Input: 0502
Output: 5
10
20
40
80
- Sort the given string alphabetically.
E.g.
# Input : harshalpatil
Output: aaahhillprst
# Input: abcdefghijkl
Output: abcdefghijkl
Note : For any queries please feel free to contact the coordinators.
Contact
brainfck08@gmail.com
Coordinators
Harshal Patil (harshal@cse.iitm.ac.in) - 9444620114
Ankur Sharma (ankurs@cse.iitm.ac.in) - 9444239570