Skip to content

INSAlgo/forum-coding-contest-2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Forum Rhône Alpes 2020 - Coding Contest

Here are the problems we designed for the Forum Rhône-Alpes 2020 Coding Contest. These problems have been designed and written by INSAlgo.

  • Pre-coding-contest (to try out the contest platform)

    • A. Billeterie: Exercice simple, additionner deux produits.
    • B. Jeu des batonnets: Nim game.
    • C. Enigme: Solve a common game.
    • D. Partage de gateaux: Find the best way to make all your friend have a good time
  • Coding Contest (theme: prêt à l'embarquement)

    • A. Code Barre: Recompose the barcode algorithm.
    • B. Places choisies: Find the best placements for passengers on a plane.
    • C. Decollage imminent: Make sure the passengers put out their phone.
    • D. Roulage et travaux: Decide if all planes can take off providing there are roadworks in the airport

How to contribute

The solutions available are the ones we wrote and solutions from contributors that we approved. There are often many ways to solve a problem. Our solutions are not perfect but adapted to the skills we wanted to evaluate at each task. Please feel free to add the solutions in the missing languages, or better solutions than the ones we did.

If you translate an existing solution in a new language, please try to follow the structure, naming conventions and comments of the existing solution. Thanks for contributing :)

How to test your program with the given input / output

We won't reopen the platform, because it is costly to host and you can test your solutions locally or import the contest on your own platform.

To test your solutions, you can use piping in a terminal. For example, on Linux (if you don't use a Unix shell, you can find tutorials online):

# Python
python solution.py < ../input/input0.txt

# C++
./sol < ../input/input0.txt

# JavaScript
js sol.js < ../input/input0.txt

# etc

Common mistakes

We read a lot of your submissions in the last few contests, and received many questions. Here is some advice if you want to avoid common mistakes:

  • Learn to manage input / output. You can't afford to lose time on something like that when doing competitive programming. Most of the contests have the same format of input and output: reading space-separated lists of integers, strings, floats, or read multiple lines.
  • Read carefully the format of input and output: a typo can ruin your solution.
  • You don't have to check that the input is within the given bounds. The input is within the given bounds. Otherwise, why would we even provide the bounds?

License

This repo is under MIT license (see details below). However, some of the pictures used in the statements are not in the public domain or under a free license. We obtained the consent from their authors to use them, and you need to do the same.

MIT License

Copyright (c) 2019 INSAlgo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.```