May you explain to me ?
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | jiangly | 3670 |
| 3 | Kevin114514 | 3657 |
| 4 | maroonrk | 3355 |
| 5 | Um_nik | 3353 |
| 6 | squareOf105 | 3346 |
| 7 | tourist | 3343 |
| 8 | strapple | 3324 |
| 9 | heuristica | 3322 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | AmShZ | 143 |
| 4 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 134 |
| 9 | maroonrk | 133 |
| 10 | qwexd | 130 |
May you explain to me ?
| Name |
|---|



They're the same thing. You might often see people do signed main instead of int main because they do in the beginning.
#define int long longThis is beacuse long long is not allowed as a return type in main(), but people want to use int instead of long long as they are used to it.
It is mainly in competitive programming when programmers replace int with long long in whole code with #define int long long. But main allow only return type of 32 bit but long long is 64 bits. So to keep return 32 bits signed is used because signed int and signed are same, but writing signed does not replace anything. If you write signed int then it will throw error as int will be replaced.
Interesting decision to bump an old post like this that already has an adequate answer.
I guess to make it worth people's while, I'll add in a fun fact of my own for the people who got summoned to this post by the comment above: when using g++, you can technically omit the return type entirely and it will still compile (with a warning about how ISO C++ forbids omitting the type). That is,
main() {}is sufficient. Use at your own risk.