Tisigram 2016 Technical Meeting Tuesday, March 28 th, 2016.

Slides:



Advertisements
Similar presentations
How to Begin… ?.
Advertisements

Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
One Dimensional Arrays
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
Contest format 5 hours, around 8-12 problems One computer running (likely)Linux, plus printer 3 people on one machine No cell phones, calculators, USB.
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
Lecture 2 Introduction to C Programming
Introduction to C Programming
 2000 Prentice Hall, Inc. All rights reserved. Chapter 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line.
Software Development Method. Assignments Due – Homework 0, Warmup Reading – Chapter 2 –
HKOI Final 2012 Contest. Submission Submit your source code, not executable! Submit through web interface Only your last submission count.
EPFL ACM ICPC Qualifiers Program Committee I&C, EPFL.
Getting familiar with ACM Contest. What is ACM ACM: Association for Computing Machinery o o the world’s largest.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
Basic Input/Output and Variables Ethan Cerami New York
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students C File Input and Output Checking input for errors.
ACM Programming Contests
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Copyright © 2009 Techtronics'09 by GCECT 1 Presents, De Code C De Code C is a C Programming competition, which challenges the participants to solve problems.
CMSC 104, Version 9/011 Incremental Programming Topics Review of Incremental Programming Example of Incremental Programming Reading None.
CHAPTER 2 PART #3 INPUT - OUTPUT 1 st semester King Saud University College of Applied studies and Community Service Csc
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 2 Chapter 2 - Introduction to C Programming.
Introduction to C Programming Angela Chih-Wei Tang ( 唐 之 瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan 2010 Fall.
CS101 Computer Programming I Chapter 4 Extra Examples.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
Reactive and Output-Only HKOI Training Team 2006 Liu Chi Man (cx) 11 Feb 2006.
Debugging, Escape Command, More Math. It’s your birthday!  Write a program that asks the user for their name and their age.  Figure out what their birth.
HKOI Programming HKOI Training Team (Intermediate) Alan, Tam Siu Lung Unu, Tse Chi Yung.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 2 - Introduction to C Programming Outline.
 2007 Pearson Education, Inc. All rights reserved. A Simple C Program 1 /* ************************************************* *** Program: hello_world.
Online Judge System Tom Chao Zhou CSC2100B Data Structures Tutorial 2.
CS1010: Programming Methodology
CHARACTER INPUT / OUTPUT AND INPUT VALIDATION. Introduction Input and output devices: keyboards, disk drives, mouse, monitors, printers. I/O functions.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
1 Lecture 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line of Text 2.3Another Simple C Program: Adding.
CCSA 221 Programming in C CHAPTER 3 COMPILING AND RUNNING YOUR FIRST PROGRAM 1 ALHANOUF ALAMR.
CMSC 104, Version 8/061L16IncrementalProg.ppt Incremental Programming Topics Review of Incremental Programming Example of Incremental Programming Reading.
Few More Math Operators
User-Written Functions
Chapter 2 - Introduction to C Programming
Richard P. Simpson Midwestern State University
Testing and Debugging.
REPETITION STATEMENTS
Lecture 13 & 14.
Algorithm Analysis CSE 2011 Winter September 2018.
Chapter 2 - Introduction to C Programming
CSE1320 INTERMEDIATE PROGRAMMING
CSE1320 INTERMEDIATE PROGRAMMING
Some Basics for Problem Analysis and Solutions
Chapter 2 - Introduction to C Programming
Chapter 2 - Introduction to C Programming
CS1100 Computational Engineering
Chapter 2 - Introduction to C Programming
Incremental Programming
CSE1320 INTERMEDIATE PROGRAMMING
1) C program development 2) Selection structure
CSE1320 INTERMEDIATE PROGRAMMING
Chapter 2 - Introduction to C Programming
Introduction to C Programming
Chapter 2 - Introduction to C Programming
CSCE 206 Lab Structured Programming in C
Introduction to C Programming
Programming Assignment Tutorial
Incremental Programming
The while Looping Structure
ICS103: Programming in C 6: Pointers and Modular Programming
ICS103: Programming in C 5: Repetition and Loop Statements
Switch Case Structures
Presentation transcript:

Tisigram 2016 Technical Meeting Tuesday, March 28 th, 2016

Participating (updated March 27 th, WIB) 2

What is it? Writing programs to solve problems in a contest environment Limited time to solve problems (4 hours) Individual contest participation 3 International Olympiad of Informatics 2013 – Brisbane, Australia

Contest format ACM-ICPC problem and scoring format IOI contest format 4 hours of programming One computer for individuals Intro: Topcoder Open 2014 – California, United States

Skills needed Algorithm skills Basic math skills Basic programming skills Speed (Godspeed typing speed helps) Creativity Debugging skills 5 International Olympiad of Informatics 2014 – Taipei, Taiwan

Some prestigious world contests ACM-ICPC (World Finals, National Selection,...) Google Code Jam Topcoder Open Facebook Hacker Cup... 6 Google Code Jam 2013 – London, United Kingdom

Some prestigious national contests Compfest UI Dinamik CS UPI Gemastik Agricode IPB Gemastik 7, 2014 – Yogyakarta, Indonesia

What do you gain? Improve your logical and analytical skills Good point to mention in CV Improve your network of friends Recognition Have fun! Onsite contests also plan excursions! 8 Facebook Hacker Cup 2013 – Facebook HQ, California, United States

Contest system Each problem has a problem setter Writes the problem, generates input test cases and their corresponding correct outputs Your program takes input and generates output in the format specified in the problem Outputs of your program will be compared with the correct outputs 9

Responses from the judge system Pending Accepted (AC) Wrong Answer (WA) Time Limit Exceeded (TLE) Memory Limit Exceeded (MLE) Runtime Error (RE) Compile Error (CE) Output Limit Exceeded (OLE) Forbidden System Call (FSC) 10

A typical problem Problem statement Input and output spec Input and output example Constraints (you don’t check for this! It will be satisfied by the input) Time limit (typically ~10 7 operations under 1s) Memory limit (typically MB at runtime) 11

Example (1) Given two positive integers A and B, print a number representing the sum of A and B. 12

Example (2) Input Format: First line: T ( T ≤ 100 ) indicating the number of test cases Each next T line consists of two positive integers A and B ( 1 ≤ A, B ≤ ) Format Output: For each test case, print the sum of A and B in its own line. 13

Example (3) Input Example Output Example

Example (4) #include int main() { int t, i; scanf( "%d", &t ); for ( i = 0; i < t; i++ ) { int a, b; scanf( "%d %d", &a, &b ); printf( "%d\n", a + b ); } } 15

Example (5) There’s no need to check the constraints (with if blocks) In this case, the constraints is T ≤ 100 and 1 ≤ A, B ≤ Your program should handle those constraints (data types, …) 16

Judging Black-box testing Hidden test cases Input and output examples doesn’t always represents the whole test case Example: gcc source.c -o source./source source.out diff source.out testcase.out 17

Scoring (1) ACM-ICPC standard Each submission will have time penalty Time penalty = duration between contest start time and submission time Each failed submission will be given 20 minutes penalty 18

Scoring (2) # SubmissionVerdictTimeTime PenaltyWrong Penalty Contest started08:00:00 Submission 1Compile Error08:03: Submission 2Wrong Answer08:15: Submission 3Wrong Answer08:22: Submission 4Time Limit Exceeded08:30: Submission 5Accepted08:45:20+46 Penalty calculation Final penalty126 19

Ranking (1) Sorted by number of problems solved (descending) Sorted by total penalty (ascending) Scoreboard will be frozen in last 60 minutes 20

Ranking (2) 21

Common mistakes Outputs that shouldn’t be there Usage of getch() or system("pause") Using void main() or int main() without return 0; exit code Improper formatting 22

Outputs that shouldn’t be there (1) Input Example 10 Output Example 30 23

Outputs that shouldn’t be there (2) #include int main() { int x; printf( "Input Angka: " ); scanf( "%d", &x ); printf( "%d\n", x * 5 ); return 0; } 24

Outputs that shouldn’t be there (3) Detected output Input Angka: 50 Test case output 50 25

Outputs that shouldn’t be there (4) 26

Outputs that shouldn’t be there (5) 27

Usage of getch() or system("pause") getch() and system("pause") made the program not stopping properly (still waiting input from keyboard) when the input is already in EOF state Expected verdict: Time Limit Exceeded 28

Using void main() or not returning 0 (1) System must get 0 exit code from program to determine that no runtime error get through int main() {... return 0; } 29

Using void main() or not returning 0 (2) 30 Answer of Andre Tisigram 2015 testing session

Improper formatting All output should be ended with a newline 31 Answer of Maulana Tisigram 2015 testing session

Questions? About problems, test cases, verdicts, … while on contest: Clarification tab on upper menu Judges will be online when contest is running Outside contest: 32

Clarifications Ask problem-related questions “Clear enough” “Judges have no comment” … Receive important announcement from judges Delayed competitions, time extensions … 33

Training System March 21 th – April 3 rd “Sesi Latihan Tisigram 2016” Username: NIM | Password: reverse(NIM) 34

Contest Simulation Friday, April 1 st, 2016, WIB - “Simulasi Kontes 2 Tisigram 2016” Username: NIM | Password: reverse(NIM) 35