Hello everyone ... recently I learned C++ language and joined to competitive programming World , I Just want to know if OOP ( Object-Oriented programming ) is important for me !? , such as " Struct " && " Class " .. Thanks in advance =D
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Hello everyone ... recently I learned C++ language and joined to competitive programming World , I Just want to know if OOP ( Object-Oriented programming ) is important for me !? , such as " Struct " && " Class " .. Thanks in advance =D
Название |
---|
OOP is not really important for competitive programming. In most of my solutions I don't even define methods (except for main of course).
OOP is more useful in huge projects. It improves readability and usability. So you should definitely learn OOP, but it is not necessary for competitive programming sites like Codeforces.
OOP is not important at all in competitive programming.
Sometimes (like in Topcoder) you have to code the solution inside a class/struct, but otherwise you don't need OOP.
No. You might need to define your own custom structs on rare occasions but even that can be avoided.
You mean like pair<pair<pair<pair<........> > > > ?
I once solved a problem that asked which of two poker hands was biggest by representing each of them as a pair< int, pair< int, pair< int, pair<int, int> > >.
You can imagine how that was a real work of art :D
tuple! :D
which language? python and other scripting languages?
http://www.cplusplus.com/reference/tuple/
C++ too.
Holy! That does make everything so much easier. Wish I wasn't declaring structs all this time. :)
This reminds me of this problem :D https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1256