Problem Solving
20160021 Hanpil Kang (HYEA)
What is Problem Solving?
 Making an algorithm to solve given problem.
 Have limit usually in time and memory.
 Solving in short time often gives profit.
Kind of problems
 Simulation
 Calculate maximum / minimum
 Find optimal value in function
 Find some important data
Is it helpful for usual programming?
Is it helpful for usual programming?
No
Some codes
* http://codeforces.com/contest/639/problem/E
* http://codeforces.com/contest/639/submission/17000422
Some codes
 C++ (??!!)
 Useless Header files
 Macros
 Unknown constant name
Some codes
 using namespace
 Global variable
 Unknown function name
 Abusing of pair
Some codes
 Debug code not removed
 Unknown variable name
Additionally…
 Ignore constant of time complexity
 No deallocate of allocated memory
 No comment
 Sometimes no indentation
What is Problem Solving?
 Translating natural language to the Mathematics
 Continue optimizing routine
 Transcript routine to code
Why Problem Solving?
 Resolve complexity hiding
 Separate useful data and useless data
 Connecting algorithm in library
 You don’t need to code it, but need to use it.
 Someone has to code library It’s you
 Problems are everywhere.
Problem solving gives
how to solve problem
both real and theoretical
Thank you

Problem solving