Akh*_*dey -1 c++ performance program-entry-point signature
最近我在竞争性编程网站上看到了以下给出的代码,
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define mp make_pair
#define pb push_back
#define d double
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
signed main()
{ return 0; //Omitted the rest of the code
}
[Full Code][1]
Run Code Online (Sandbox Code Playgroud)
https://www.codechef.com/viewsolution/22121098
我想知道这个代码和常规C++代码int main()在CPU速度方面的效率和性能方面有什么区别,问题集通常很大.
signed main()相当于int main()除非 - 就像在示例中一样 - 你有一个定义int为long long. main() 必须返回 anint但宏#define int long long意味着int main()在这种情况下使用语法将不会编译并出现错误说明::mainmust return int。因此,signed main()。