Polyglot
Polyglot
Polyglot_Introduction
Register here
Problem Statements Up!! click here .
Deadline Extended to 3rd October 23.59hrs
Total Prize Money of Rs 10000 /-
What does the next few lines meant to you??
# define y >
# include<stdio.h>
# define x z /*
print("shaastra\n");__END__
++++++++++[>++++++++++>++++++++++<<-]
+++[>>+++++<-<-]>>.<+++++++.-------..>.+.--.<.*/
main()
{ printf ("shaastra\n"); }
What is so special about these lines??
....Do you see a C program?? a Perl script?? or a Brainf**k code !!!
Its actually a 3 language Polyglot which outputs shaastra.
A polyglot is a computer program or script written in a valid form of multiple programming languages, which
performs the same operations or output independently of the programming language used to compile or interpret it.
The event expects you to write polyglots to solve some simple problems.
Sounds easy??? lets see!!! Give it a try at Shaastra 2009.
Links that may interest you...
- http://en.wikipedia.org/wiki/Polyglot_(computing)
- http://ideology.com.au/polyglot/
- http://head.wall.sk/page/polyglot/
- http://www.gnu.org/fun/jokes/happy-new-year.cfbC.html
Polyglot_eventformat
- It is an online event.
- Contest will start on september 14th 23.59hrs and end on september 28th 23.59 hrs.
- Participants can upload their solutions in the event portal and it will be evaluated once in 2 days and ranking will be updated accordingly.
Polyglot_rules_and_regulation
- Teams of atmost 3 members.
- Participants can chose any of the following languages for solving the problems.
C++ (g++ 4.2.4) or C (gcc 4.2.4)
Pascal (fpc 2.2.0)
Java (j2se jdk 5.0)
Python (python 2.5.2)
Ruby (ruby 1.8.6)
Perl (perl 5.8.8)
Brainf**k (bf2c)
Haskell (ghc 6.8.2)
PHP (php 5.2.4)
Common Lisp (clisp 2.42)
Bash (bash 3.2.39)
Scheme (guile 1.6)
Assembler (nasm 0.98.38)
Fortran (g77 3.4.6)
Prolog (swipl 5.6.47)
Whitespace (wspace 0.2)
Polyglot_scoring_system
- Only solutions which produce the expected output in all the languages used to write the polyglot
will be evaluated. - The programs will be evaluated on the basis of the length of the program.
- Creative solutions will earn you extra points.
polyglot_sample_questions
Alice is provided with two basket out of which one contain n apples and another contains m oranges.
He is now asked to pick an apple or an orange from the basket.
Given n and m write a 4 language polyglot that will output the number of ways in which alice can pick
an apple or an orange.
Input
The only input line contains two integers n and m, with one space between them [n, m < 50]
Output
The output must contain only one integer - the total number of ways in which Alice can pick up an apple or an orange.
Example
Input
1 1
Output
2
| Attachment | Size |
|---|---|
| Esoteric programming and Polyglot.pdf | 303.17 KB |
| polyglot introduction.pdf | 298.53 KB |
Polyglot_FAQ
- What are the prerequisites?
Experience in coding with different programming languages and a general understanding of compilers and interpreters is essential. - Does the team members have to be from the same college?
No, there is no such restriction. - How many programming languages do I have to know?
The more the merrier. Its better to know different types of languages. - What is the eligibility criteria?
Only students from India or abroad are eligible to participate.




















