Some contests have allowed participants to use C++11/14, so I want to know some excellent features C++11/14 has. Pls give me some advice!Thanks!
| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 141 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 135 |
| 8 | BledDest | 132 |
| 9 | maroonrk | 131 |
| 10 | qwexd | 129 |
Some contests have allowed participants to use C++11/14, so I want to know some excellent features C++11/14 has. Pls give me some advice!Thanks!
| Name |
|---|



Iterate over a vector using
auto:or
Not only the
vector,set/map/unordered_set/unordered_map/multiset/...can also be used in this way.And the optimize of loops:
Before:
After:
Lambda also became available:
Before:
After:
As I don't use these features much, if you find mistakes in my code, please comment me.
Thanks!
Auto comment: topic has been updated by 040902fyn (previous revision, new revision, compare).