我把我今天写的超长缺省源粘过来吧
source.cpp
#include <bits/stdc++.h>
#define inf (0x3f3f3f3f)
#define INF (INFINITY)
#define LIMIT (INT_MAX)
#define REAL_OUTPUT_FORMAT_STR "%.*lf"
#define REAL_INPUT_FORMAT_STR "%lf"
// #define LL
// #define LD
#ifndef NOJ
#define getchar getchar_unlocked
#endif
#ifdef LL
#define int long long
#undef inf
#define inf (0x3f3f3f3f3f3f3f3f)
#undef LIMIT
#define LIMIT (LLONG_MAX)
#endif
#ifdef LD
#define double long double
#undef REAL_OUTPUT_FORMAT_STR
#define REAL_OUTPUT_FORMAT_STR "%.*Lf"
#undef REAL_INPUT_FORMAT_STR
#define REAL_INPUT_FORMAT_STR "%Lf"
#endif
#define pb push_back
#define ps push
#define lowbit(x) ((x) & (-(x)))
#define ls (i << 1)
#define rs (i << 1 | 1)
#define fill(x, y) memset(x, y, sizeof(x))
#define heap priority_queue<int, vector<int>, greater<int>>
#define pow2(x) (1 << (x))
#define changeif(a, b, c) ((a) == (b) ? (c) : (a))
#define addedge(u, v) a[u].pb(v); a[v].pb(u)
#define addedgew(u, v, w) a[u].pb(edge(v, w)); a[v].pb(edge(u, w))
#define aminos printf("debug : in line %d\n", __LINE__)
// #define f(x, y) ((m) * ((x) - 1) + (y))
#define kth(x, y) (x & (1 << (y - 1)))
#define kth1(x) (1 << (x - 1))
#define all1(x) ((1 << (x)) - 1)
#define gcd(x, y) (1ll * x * y == 0 ? x + y : __gcd((x), (y)))
#define lcm(x, y) ((x) / gcd((x), (y)) * (y))
#define chkmax(x, y) ((x) = max((x), (y)))
#define chkmin(x, y) ((x) = min((x), (y)))
#define add(x, y) (((x) + (y)) % mod)
#define addto(x, y) ((x) = add((x), (y)))
#define minus(x, y) (((x) - (y) + (mod)) % (mod))
#define minusto(x, y) ((x) = minus((x), (y)))
#define times(x, y) ((1ll * (x) * (y)) % (mod))
#define timesto(x, y) ((x) = times((x), (y)))
#define divide(x, y) (times(x, inv(y)))
#define divideto(x, y) ((x) = divide((x), (y)))
#define isnumber(x) (((x) >= '0') && ((x) <= '9'))
#define left(x) (((x) == 1) ? (n) : ((x) - 1))
#define right(x) (((x) == n) ? (1) : ((x) + 1))
#define toconst(s) ((const char *)s)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template<typename T, typename = enable_if_t<std::is_same<T, int>::value || is_same<T, long long>::value>>
inline T read(T &x) {
T f = 1; x = 0; char s = getchar();
while(!isnumber(s)) {if(s == '-') f = -1; s = getchar();}
while(isnumber(s)) x = (x << 1) + (x << 3) + (s ^ '0'), s = getchar();
return x *= f;
}
inline int read(char* s) {return scanf("%s", s);}
inline double read(double &x) {scanf(REAL_INPUT_FORMAT_STR, &x); return x;}
inline string& read(string& s) {cin >> s; return s;}
template<typename T, typename... Args> inline void read(T& x, Args&... args) {read(x); read(args...);}
template<typename T, typename = enable_if_t<std::is_same<T, int>::value || std::is_same<T, long long>::value>>
inline void print(T x, char suf = 0, int base = 10) {
if(x < 0) {putchar('-'); x = -x;}
if(x >= base) print(x / base, 0, base);
putchar(48 ^ (x % base));
if(suf) putchar(suf);
}
template<typename T, typename = enable_if_t<std::is_same<T, char*>::value || is_same<T, const char*>::value>>
inline void print(T s, char suf = 0) {printf("%s", s); if(suf) putchar(suf);}
inline void print(double x, char suf = 0, int digits = 2) {
printf(REAL_OUTPUT_FORMAT_STR, digits, x);
if(suf) putchar(suf);
}
template<typename T> inline void prints(T x) {print(x, '\n');}
template<typename T, typename... Args> inline void prints(T x, Args... args) {print(x, ' '); prints(args...);}
template<typename... Args> inline void print(Args... args) {prints(args...);}
template<typename T> inline void printarr(T a[], int n) {
int i; for(i = 1 ; i + 8 <= n ; i += 8) {
print(a[i], ' '); print(a[i+1], ' ');
print(a[i+2], ' '); print(a[i+3], ' ');
print(a[i+4], ' '); print(a[i+5], ' ');
print(a[i+6], ' '); print(a[i+7], ' ');
}
while(i <= n) {print(a[i], ' '); i++;}
putchar('\n');
}
template<typename T> inline void readarr(T a[], int n) {
int i; for(i = 1 ; i + 8 <= n ; i += 8) {
read(a[i]); read(a[i+1]);
read(a[i+2]); read(a[i+3]);
read(a[i+4]); read(a[i+5]);
read(a[i+6]); read(a[i+7]);
}
while(i <= n) {read(a[i]); i++;}
}
void solve();
int cx = 1;
signed main() {
#ifdef NOJ
auto st_t = std::chrono::steady_clock::now();
#endif
// read(cx);
while(cx--) {
solve();
}
#ifdef NOJ
auto ed_t = std::chrono::steady_clock::now();
auto duration = ed_t - st_t;
int time_used = std::chrono::duration_cast<std::chrono::microseconds>(duration).count();
time_used /= 1000;
printf("\nTime used : %dms\n", time_used);
#endif
return 0;
}
const int N = 1e5 + 5;
void solve() {
}
run.cpp
#include <bits/stdc++.h>
using namespace std;
signed main() {
int return_code = system("g++ 666.cpp -o 666 -O2 -static -std=c++14 -DNOJ -Wall \"-Wl,-stack=500000000\"");
if(return_code == 0) {
puts("Compile successfully !");
system("666.exe");
return 0;
}
else {
puts("\nCompile Error !");
return 0;
}
}
见证历史
尻股
洛阳铲
qp
hp
我的洛阳铲!
怎么这么火。
hp