#include<bits/stdc++.h> #define int long long using namespace std; signed main(){ return 0; }
注意到 #define int long long 而 main 函数必须返回一个 int 值,所以不能使用 int main()
通常使用 signed main,因为 signed 等效替代于 signed int,也就是有符号整型,这与 int 别无二致,但不会导致超出范围
c++ - Difference between signed main() and int main()? - Stack Overflow:
int main
doesn't return -signed main returns . You have defined a macro named .int
long long
int
Speaking of which, defining a macro with the name that matches a keyword exhibits undefined behavior.
标签:int,long,signed,Tips,main,define From: https://www.cnblogs.com/slowlydance2me/p/16909205.html