Hi, there was a question in my mind today I want to ask! Why the hell all the problems in the world want the answer 1-based when 90% of programmers work 0-based????? every time we should -- the input and ++ the answer :| sorry for poor English :)
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Hi, there was a question in my mind today I want to ask! Why the hell all the problems in the world want the answer 1-based when 90% of programmers work 0-based????? every time we should -- the input and ++ the answer :| sorry for poor English :)
Название |
---|
I think that's depends on writer. Some writers think 1-indexed (1-based) is more natural problem statement than 0-indexed one. Or if writers don't think about 0-indexed or 1-indexed, many problems will be 1-indexed. (It's only my guess, if it isn't I'm sorry)
By the way, how did you get the information of "90% of programmers are using 0-indexed"?
What indexing is more natural? It looks like discussion about is zero natural number.
I think 1-based indexing is better because you will not get confused, when you say "first element", "second element", "third element" and so on.