老师们公认的好代码
2025-12-14 22:09:57
发布于:北京
1.很差的这个:
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 10;
int a[N];
signed main (){
int n;
cin >> n;
for(int i = 1; i <= n; i ++){
cin >> a[i];
}
...
}
2.这个很搞基
#pragma GCC optimize(3, "Ofast", "inline", "unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
const int N = 2000010;
const int mod = 1e9 + 7;
const int inf = 1e9;
const long long infll = 1e18;
using ld = long double;
using ull = unsigned long long;
using i128 = __int128;
const ull base = 13331;
signed main()
{
cin.tie(0)->sync_with_stdio(false);
cout << fixed << setprecision(15);
int T = 1;
// cin >> T;
Loyalty::init();
for (int ca = 1; ca <= T; ++ca)
Loyalty::main(ca, T);
return 0;
}
你们说呢?评论区见,如果有新的,请发出来,球球啦!
全部评论 7
除了那个set precision什么的东西,还有主函数里的第1行,别的我都不知道是干嘛的(主要还是头文件,然后什么一一堆东西吧)
9小时前 来自 浙江
0主播主播,第2个代码是干嘛的?
9小时前 来自 浙江
0#pragma GCC optimize(3, "Ofast", "inline", "unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; const int N = 2000010; const int mod = 1e9 + 7; const int inf = 1e9; const long long infll = 1e18; using ld = long double; using ull = unsigned long long; using i128 = __int128; const ull base = 13331; signed main() { cin.tie(0)->sync_with_stdio(false); cout << fixed << setprecision(15); int T = 1; // cin >> T; Loyalty::init(); for (int ca = 1; ca <= T; ++ca) Loyalty::main(ca, T); return 0; }21小时前 来自 日本
0来自日本???!!!
18小时前 来自 北京
0
如果你的老师认为
#define int long long是好代码,那么他一定不是位好老师昨天 来自 浙江
0对对对
21小时前 来自 北京
0
?
昨天 来自 浙江
0都没人看?
昨天 来自 北京
0bushi===
昨天 来自 北京
0





























有帮助,赞一个