无敌函数库
2026-06-23 00:04:22
发布于:浙江
最近我用了7~8个月制作了基于Linux+GCC的无敌函数库,也是无偿献给大家好吧。
#include <cstdio>
#include <cstring>
#include <cstdarg>
#include <immintrin.h>
#include <vector>
extern "C" {
long read(int, void *, unsigned long);
long write(int, const void *, unsigned long);
}
#pragma GCC optimize("Ofast", "inline", "-fgcse", "-fgcse-lm", "-fipa-sra", "-ftree-pre", "-ftree-vrp", "-fpeephole2", "-ffast-math", "-fsched-spec", "unroll-loops", "-falign-jumps", "-falign-loops", "-falign-labels", "-fdevirtualize", "-fcaller-saves", "-fcrossjumping", "-fthread-jumps", "-funroll-loops", "-fwhole-program", "-freorder-blocks", "-fschedule-insns", "inline-functions", "-ftree-tail-merge", "-fschedule-insns2", "-fstrict-aliasing", "-fstrict-overflow", "-falign-functions", "-fcse-skip-blocks", "-fcse-follow-jumps", "-fsched-interblock", "-fpartial-inlining", "no-stack-protector", "-freorder-functions", "-findirect-inlining", "-frerun-cse-after-loop", "inline-small-functions", "-finline-small-functions", "-ftree-switch-conversion", "-foptimize-sibling-calls", "-fexpensive-optimizations", "-funsafe-loop-optimizations", "inline-functions-called-once", "-fdelete-null-pointer-checks", "floop-nest-optimize", "floop-interchange", "ftree-loop-distribution")
#pragma GCC target("avx512f", "avx512vl", "sse", "sse2", "sse3", "ssse3", "sse4", "sse4.1", "sse4.2", "popcnt", "abm", "mmx", "avx", "avx2", "fma", "bmi", "bmi2", "lzcnt", "tune=native")
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-value"
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wuninitialized"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wtype-limits"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wfloat-equal"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Woverflow"
#pragma GCC diagnostic ignored "-Wformat-truncation"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
typedef long long ll;
typedef double lf;
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#define fnlikely(cond) __builtin_unpredictable((cond))
#define elif else if
#define memcpy(r1, s, len) __builtin_memcpy((r1), (s), (len))
#define strlen(r1) __builtin_strlen((r1))
#define memcmp(s1, s2, n) __builtin_memcmp((s1), (s2), (n))
#define strcmp(s1, s2) __builtin_strcmp((s1), (s2))
#define sin(x) __builtin_sin((x))
#define cos(x) __builtin_cos((x))
#define clz(x) __builtin_clz((x))
#define clzll(x) __builtin_clzll((x))
#define ctz(x) __builtin_ctz((x))
#define ctzll(x) __builtin_ctzll((x))
#define ffs(x) __builtin_ffs((x))
#define parity(x) __builtin_parity((x))
#define ceil(x) __builtin_ceil((x))
#define floor(x) __builtin_floor((x))
#define round(x) __builtin_round((x))
#define roundll(x) __builtin_roundll((x))
#define exp(x) __builtin_exp((x))
#define acos(x) __builtin_acos((x))
#define types_compatible_p(type1, type2) __builtin_types_compatible_p((type1), (type2))
#define constant_p(expr) __builtin_constant_p((expr))
#define assume(cond) __builtin_assume((cond))
#define unreachable(x) __builtin_unreachable((x))
#define popcount(x) __builtin_popcount((x))
#define popcountll(x) __builtin_popcountll((x))
#define add_overflow(x, y, result) __builtin_add_overflow((x), (y), (&result))
#define mul_overflow(x, y, result) __builtin_mul_overflow((x), (y), (&result))
#define bswap16(x) __builtin_bswap16((x))
#define bswap32(x) __builtin_bswap32((x))
#define bswap64(x) __builtin_bswap64((x))
#define assume_aligned(ptr, align) __builtin_assume_aligned((ptr), (align))
#define prefetch(a,b,c) __builtin_prefetch(a,b,c)
#define ln(x) __builtin_log((x))
template <typename T>
T max(T a,T b){return a>b?a:b;}
template <typename T>
T min(T a,T b){return a<b?a:b;}
inline lf log(lf x,lf n){return ln(x) / ln(n);}
static const lf pi = acos(-1.0);
static const lf e = exp(1.0);
static char _rbuf[1 << 16] __attribute__((aligned(64)));
static char* _rptr = _rbuf;
static char* _rend = _rbuf;
static inline char _gc() {
if (unlikely(_rptr == _rend)) {
ssize_t bytes_read = read(0, _rbuf, sizeof(_rbuf));
_rend = _rbuf + bytes_read;
_rptr = _rbuf;
if (unlikely(bytes_read <= 0)) return EOF;
}
return *_rptr++;
}
static char _wbuf[1 << 16] __attribute__((aligned(64)));
static char* _wptr = _wbuf;
static inline void _pc(char c) {
if (unlikely(_wptr == _wbuf + sizeof(_wbuf))) {
write(1, _wbuf, _wptr - _wbuf);
_wptr = _wbuf;
}
*_wptr++ = c;
}
static inline void _return() {
if (likely(_wptr != _wbuf)) {
write(1, _wbuf, _wptr - _wbuf);
_wptr = _wbuf;
}
}
namespace std{
struct string {
char r1[1001];
string() { r1[0] = '\0'; }
string(char c) { r1[0] = c; r1[1] = '\0'; }
string(const char* s) {
if (unlikely(!s)) { r1[0] = '\0'; return; }
size_t len = strlen(s);
if (len > 1000) len = 1000;
memcpy(r1, s, len);
r1[len] = '\0';
}
string(const string& other) {
size_t len = strlen(other.r1);
if (len > 1000) len = 1000;
memcpy(r1, other.r1, len);
r1[len] = '\0';
}
string& operator=(const string& other) {
if (this != &other) {
size_t len = strlen(other.r1);
if (len > 1000) len = 1000;
memcpy(r1, other.r1, len);
r1[len] = '\0';
}
return *this;
}
inline char& operator[](int i) { return r1[i]; }
inline const char& operator[](int i) const { return r1[i]; }
bool operator==(const string& other) const {
size_t l1 = strlen(r1);
size_t l2 = strlen(other.r1);
if (l1 != l2) return false;
return memcmp(r1, other.r1, l1) == 0;
}
bool operator!=(const string& other) const { return !(*this == other); }
string operator+(const string& other) const { string res; size_t l1 = strlen(r1); size_t l2 = strlen(other.r1); size_t total = l1 + l2; if (total > 1000) {total = 1000;} if (l1 > 0) {memcpy(res.r1, r1, l1);}if (total > l1 && l2 > 0) { size_t copy_len = (total - l1 < l2) ? (total - l1) : l2; memcpy(res.r1 + l1, other.r1, copy_len); } res.r1[total] = '\0'; return res; }
string& operator+=(const string& other) {
size_t l1 = strlen(r1);
size_t l2 = strlen(other.r1);
if (l1 + l2 >= 1000) {
size_t space = 1000 - l1;
if (space > 0) memcpy(r1 + l1, other.r1, space);
r1[1000] = '\0';
} else {
memcpy(r1 + l1, other.r1, l2);
r1[l1 + l2] = '\0';
}
return *this;
}
string& operator+=(const char* s) {
size_t l1 = strlen(r1);
size_t l2 = strlen(s);
if (l1 + l2 >= 1000) {
size_t space = 1000 - l1;
if (space > 0) memcpy(r1 + l1, s, space);
r1[1000] = '\0';
} else {
memcpy(r1 + l1, s, l2);
r1[l1 + l2] = '\0';
}
return *this;
}
string& operator+=(char c) {
size_t len = strlen(r1);
if (likely(len < 1000)) {
r1[len] = c;
r1[len + 1] = '\0';
}
return *this;
}
inline int size() const { return (int)strlen(r1); }
inline bool empty() const { return r1[0] == '\0'; }
inline const char* c_str() const { return r1; }
inline void clear() { r1[0] = '\0'; }
inline void push_back(char c) { size_t len = strlen(r1); if (likely(len < 1000)) { r1[len] = c; r1[len + 1] = '\0'; } }
string substr(int pos, int len = -1) const {
string res;
int sz = (int)strlen(r1);
if (pos < 0) pos = 0;
if (pos >= sz) return res;
if (len < 0 || pos + len > sz) len = sz - pos;
memcpy(res.r1, r1 + pos, (size_t)len);
res.r1[len] = '\0';
return res;
}
int find(const string& sub) const {
if (sub.empty()) return 0;
const char* p = strstr(r1, sub.r1);
return p ? (int)(p - r1) : -1;
}
};
inline string operator+(const char* s, const string& str) {
string res(s);
res += str;
return res;
}
inline string operator+(char c, const string& str) {
string res(c);
res += str;
return res;
}
inline string read_s() {
string a;
char c = _gc();
while (c <= 32) {
if (c == EOF) return a;
c = _gc();
}
int cnt = 0;
while (c > 32 && cnt < 1000) {
a.r1[cnt++] = c;
c = _gc();
}
a.r1[cnt] = '\0';
return a;
}
inline void getline(string& s) {
char c = _gc();
int cnt = 0;
while (cnt < 1000) {
if (c == '\n' || c == '\r' || c == EOF) break;
s.r1[cnt++] = c;
c = _gc();
}
s.r1[cnt] = '\0';
}
inline void write_s(const string& a) {
const char* p = a.r1;
while (*p) _pc(*p++);
}
inline void reverse(string& s) {
int len = s.size();
int half = len >> 1;
char* start = s.r1;
char* end = s.r1 + len - 1;
for (int i = 0; i < half; ++i) {
swap(*start, *end);
start++;
end--;
}
}
}; // string 类型 字符串(带输出输入工具)
using namespace std;
namespace Code{
inline ll read_d() {
ll x = 0;
int f = 1;
char c = _gc();
while (c < '0' || c > '9') {
if (c == '-') f = -1;
c = _gc();
if (unlikely(c == EOF)) break;
}
while (c >= '0' && c <= '9') {
x = (x << 3) + (x << 1) + (c ^ 48);
c = _gc();
}
return f == 1 ? x : -x;
}
inline lf read_f() {
ll ip = 0;
lf f = 1.00;
char c = _gc();
while (c < '0' || c > '9') {
if (c == '-') f = -1.00;
c = _gc();
if (unlikely(c == EOF)) break;
}
while (c >= '0' && c <= '9') {
ip = (ip << 3) + (ip << 1) + (c ^ 48);
c = _gc(); // 此时 c 已经是小数点或者分隔符(如空格)
}
lf fp = 0.00, base = 0.1;
if (c == '.') {
c = _gc(); // 只有确认是小数点后,才读取下一位小数
while (c >= '0' && c <= '9') {
fp += (c ^ 48) * base;
base *= 0.1;
c = _gc();
}
}
return double(ip + fp) * f;
}
inline void read_w(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
char c;
while (*fmt) {
if (*fmt == '%') {
fmt++;
if (!*fmt) break;
if (*fmt == 's') {
string* s = va_arg(args, string*);
s -> clear();
c = _gc();
while (c <= 32) { if (c == EOF) goto end; c = _gc(); }
while (c > 32) {
s->push_back(c);
c = _gc();
if(c == EOF) break;
}
}else if (*fmt == 'd') {
ll* val = va_arg(args, ll*);
*val = read_d();
}else if (*fmt == 'c') {
char* val = va_arg(args, char*);
*val = _gc();
}else if (*fmt == 'l') {
if (*(fmt+1) == 'f') {
fmt++;
lf* val = va_arg(args, lf*);
*val = read_f();
}
}else if (*fmt == 'f') {
lf temp = read_f();
float* val = va_arg(args, float*);
*val = (float)temp;
}
} else {
c = _gc();
while (c <= 32 && *fmt != '%') c = _gc();
}
fmt++;
}
end:
va_end(args);
}
void write(ll x) {
if (x == 0) { _pc('0'); return; }
if (x < 0) { _pc('-'); x = -x; }
char buf[25];
char* ptr = buf + 24;
*ptr = '\0';
while (x > 0) {
*--ptr = '0' + (char)(x % 10);
x /= 10;
}
while (*ptr) _pc(*ptr++);
}
void write(int x) {
if (x == 0) { _pc('0'); return; }
if (x < 0) { _pc('-'); x = -x; }
char buf[25];
char* ptr = buf + 24;
*ptr = '\0';
while (x > 0) {
*--ptr = '0' + (char)(x % 10);
x /= 10;
}
while (*ptr) _pc(*ptr++);
}
inline void write_p(lf x, int max_decimal) {
if (x == 0.0) { _pc('0'); return; }
if (x < 0) { _pc('-'); x = -x; }
ll int_part = (ll)x;
write(int_part);
if (max_decimal <= 0) return;
_pc('.');
lf frac_part = x - (lf)int_part;
for (int i = 0; i < max_decimal; i++) {
frac_part *= 10.0;
ll digit = (ll)frac_part;
_pc('0' + (char)digit);
frac_part -= (lf)digit;
}
}
inline void write(lf x) { write_p(x, 16); }
inline void write(float x) { write_p(x, 8); }
void write_w(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
while (*fmt) {
if (*fmt == '%') {
fmt++;
if (!*fmt) break;
ll precision = -1;
if (*fmt == '.' && *(fmt+1) == '*') {
fmt += 2;
precision = va_arg(args, ll);
}else if (*fmt == '.') {
fmt++;
ll p = 0;
bool has_digit = false;
while(*fmt >= '0' && *fmt <= '9') {
p = p * 10 + (*fmt - '0');
fmt++;
has_digit = true;
}
if (has_digit) precision = p;
}
switch (*fmt) {
case 'd':
case 'i':
write((ll)va_arg(args, ll));
break;
case 'l':
if (*(fmt+1) == 'd') {
write(va_arg(args, ll));
fmt++;
} else write((ll)va_arg(args, ll));
break;
case 'L':
if (*(fmt+1) == 'd') {
write(va_arg(args, ll));
fmt++;
}
break;
case 'f':
case 'F':
case 'g':
case 'G':
if (precision >= 0) write_p(va_arg(args, lf), precision);
else write(va_arg(args, lf));
break;
case 's': {
const char* s = va_arg(args, const char*);
write_s(s);
break;
}
case 'c':
_pc((char)va_arg(args, int));
break;
case '%':
_pc('%');
break;
default:
_pc('%');
_pc(*fmt);
break;
}
} else if (*fmt == '\\') {
fmt++;
if (!*fmt) break;
switch (*fmt) {
case 'n': _pc('\n'); break;
case 't': _pc('\t'); break;
case 'r': _pc('\r'); break;
case '\\': _pc('\\'); break;
case '"': _pc('"'); break;
default:
_pc('\\');
_pc(*fmt);
break;
}
} else _pc(*fmt);
fmt++;
}
va_end(args);
}
};
using namespace Code; // C语言输出输入工具
namespace math {
ll sum_d(ll a[], int n) {
ll sum = 0;
for (int i = 0; i < n; ++i) sum += a[i];
return sum;
}
lf sum_f(lf a[], int n) {
lf sum = 0;
for (int i = 0; i < n; ++i) sum += a[i];
return sum;
}
lf pow(lf a, lf b) {
ll ll_b = (ll)b;
lf lf_b = b - ll_b;
if (lf_b != 0.00) return __builtin_pow(a, b);
if (a == 1.0 || ll_b == 0) return 1.0;
if (a == 0.0) return 0.0;
if (a == -1.0) return (ll_b & 1) ? -1.0 : 1.0;
bool neg = false;
if (ll_b < 0) {
neg = true;
ll_b = -ll_b;
}
lf res = 1.0;
lf base = a;
while (ll_b > 0) {
if (ll_b & 1) res *= base;
base *= base;
ll_b >>= 1;
}
return neg ? 1.0 / res : res;
}
lf sqrt(lf x, lf n) {
if (unlikely(n == 0 || x == 0)) return 0;
if (unlikely(n == 1)) return x;
if (likely(n == 2)) return __builtin_sqrt(x);
if (unlikely(x < 0 && static_cast<long long>(n) % 2 == 0)) {
return 0.0L / 0.0L;
}
long double y = x;
long double prev_y;
const long double epsilon = 1e-15L;
do {
prev_y = y;
long double y_power_n_minus_1 = 1.0L;
for (int i = 0; i < static_cast<int>(n) - 1; ++i) {
y_power_n_minus_1 *= prev_y;
}
y = ((n - 1) * prev_y + x / y_power_n_minus_1) / n;
} while (y > prev_y ? y - prev_y > epsilon : prev_y - y > epsilon);
return y;
}
inline ll gcd(ll a, ll b) {
while (b) {
a %= b;
swap(a, b);
}
return a;
}
inline ll lcm(ll a, ll b) {
if (a == 0 || b == 0) return 0;
return (a / gcd(a, b)) * b;
}
template<typename T>
struct less {
bool operator()(const T& a, const T& b) const {
return a < b;
}
};
template<typename T, typename Compare>
__attribute__((always_inline))
void insertion_sort(T a[], int begin, int end, Compare cmp) {
for (int i = begin + 1; i <= end; i++) {
T k = a[i];
int j = i - 1;
while (j >= begin + 3) {
if (!cmp(k, a[j])) break;
a[j + 1] = a[j];
if (!cmp(k, a[j - 1])) { j--; break; }
a[j] = a[j - 1];
if (!cmp(k, a[j - 2])) { j -= 2; break; }
a[j - 1] = a[j - 2];
if (!cmp(k, a[j - 3])) { j -= 3; break; }
a[j - 2] = a[j - 3];
j -= 4;
}
while (j >= begin && cmp(k, a[j])) {
a[j + 1] = a[j];
j--;
}
a[j + 1] = k;
}
}
template<typename T, typename Compare>
inline void sort3(T& a, T& b, T& c, Compare cmp) {
if (cmp(b, a)) swap(a, b);
if (cmp(c, b)) swap(b, c);
if (cmp(b, a)) swap(a, b);
}
template<typename T, typename Compare>
void median_of_9(T a[], int l, int h, Compare cmp) {
int step = (h - l) / 8;
int idx[9];
for (int i = 0; i < 9; ++i)idx[i] = l + i * step;
idx[8] = h;
sort3(a[idx[0]], a[idx[1]], a[idx[2]], cmp);
sort3(a[idx[3]], a[idx[4]], a[idx[5]], cmp);
sort3(a[idx[6]], a[idx[7]], a[idx[8]], cmp);
sort3(a[idx[0]], a[idx[3]], a[idx[6]], cmp);
sort3(a[idx[2]], a[idx[4]], a[idx[7]], cmp); // 注意这里 idx[4] 是候选的中位数
sort3(a[idx[1]], a[idx[5]], a[idx[8]], cmp);
sort3(a[idx[2]], a[idx[4]], a[idx[5]], cmp);
sort3(a[idx[3]], a[idx[4]], a[idx[5]], cmp); // 确保 idx[4] 是中位数
sort3(a[idx[4]], a[idx[7]], a[idx[8]], cmp); // 确保 idx[8] 是偏大的值
}
template<typename T, typename Compare>
void dual_pivot_partition(T a[], int l, int h, Compare cmp, int& lp, int& rp) {
if(h-l>1000)median_of_9(a,l,h,cmp);
else{
int m = l + (h - l) / 2;
if (cmp(a[m], a[l])) swap(a[l], a[m]);
if (cmp(a[h], a[l])) swap(a[l], a[h]);
if (cmp(a[h], a[m])) swap(a[m], a[h]);
}
T p1 = a[l];
T p2 = a[h];
int k = l + 1;
int g = h - 1;
int l_ptr = l + 1;
while (k <= g) {
if (cmp(a[k], p1)) {
swap(a[k], a[l_ptr]);
l_ptr++;
k++;
}else if (cmp(p2, a[k])) {
while (k <= g && cmp(p2, a[g])) g--;
swap(a[k], a[g]);
g--;
if (cmp(a[k], p1)) {
swap(a[k], a[l_ptr]);
l_ptr++;
}
k++;
}else k++;
}
l_ptr--;
g++;
swap(a[l], a[l_ptr]);
swap(a[h], a[g]);
lp = l_ptr;
rp = g;
}
template<typename T, typename Compare>
void introsort_logic(T a[], int l, int h, Compare cmp, int d) {
while (h - l + 1 > 16) {
if (d == 0) {
insertion_sort(a, l, h, cmp);
return;
}
d--;
int lp, rp;
dual_pivot_partition(a, l, h, cmp, lp, rp);
int size1 = lp - l;
int size2 = rp - lp - 1;
int size3 = h - rp;
if (size1 <= size2 && size1 <= size3) {
introsort_logic(a, l, lp - 1, cmp, d);
l = lp + 1;
introsort_logic(a, lp + 1, rp - 1, cmp, d);
l = rp + 1;
} else if (size2 <= size1 && size2 <= size3) {
introsort_logic(a, lp + 1, rp - 1, cmp, d);
if (size1 < size3) {
introsort_logic(a, l, lp - 1, cmp, d);
l = rp + 1;
} else {
introsort_logic(a, rp + 1, h, cmp, d);
h = lp - 1;
}
} else {
introsort_logic(a, rp + 1, h, cmp, d);
h = rp - 1;
}
}
}
template<typename T, typename Compare = less<T>>
void sort(T a[], int begin, int end, Compare&& cmp = Compare()) {
if (begin >= end) return;
bool is_sorted_asc = true;
bool is_sorted_desc = true;
int cnt1=0;
int cnt2=0;
int id_1=-1;
int id_2=-1;
for (int i = begin; i < end; i++) {
if(i+8<=end)prefetch(&a[i+8],0,3);
if (cmp(a[i + 1], a[i])) {
is_sorted_asc = false;
id_1=i;
cnt1++;
}
if (cmp(a[i], a[i + 1])) {
is_sorted_desc = false;
id_2=i;
cnt2++;
}
}
if (is_sorted_asc) return;
if (is_sorted_desc || (cnt1==1 && cnt2==0)) {
int l = begin, r = end;
while (l < r) {
swap(a[l], a[r]);
l++;
r--;
}
id_1=begin+end-id_1;
int k=id_1-1;
T temp = a[id_1];
while (k >= begin && cmp(temp, a[k])) {
a[k+1] = a[k];
k--;
}
a[k+1] = temp;
return;
}
if(cnt2==1 && cnt1==0){
int k=id_2+2;
T temp = a[id_2+1];
while (k <= end && cmp(a[k], temp)) {
a[k-1] = a[k];
k++;
}
a[k-1] = temp;
return;
}
int d = 2 * ln(end - begin + 1);
introsort_logic(a, begin, end, std::forward<Compare>(cmp), d);
insertion_sort(a, begin, end, std::forward<Compare>(cmp));
}
}; // 数学函数库
using namespace math;
struct IO{
IO& operator<<(const int val) { write(val); return *this; }
IO& operator<<(const ll val) { write(val); return *this; }
IO& operator<<(const float val) { write(val); return *this; }
IO& operator<<(const lf val) { write(val); return *this; }
IO& operator<<(const string val) { write_s(val); return *this; }
IO& operator<<(const char* val) { write_s(val); return *this; }
IO& operator<<(const char& val) { _pc(val); return *this; }
IO& operator<<(const bool val) { write_s(val?"true":"false"); return *this; }
IO& operator>>(int& val) { val=read_d(); return *this; }
IO& operator>>(ll& val) { val=read_d(); return *this; }
IO& operator>>(float& val) { val=read_f(); return *this; }
IO& operator>>(lf& val) { val=read_f(); return *this; }
IO& operator>>(string& val) { val=read_s(); return *this; }
IO& operator>>(char& val) { val=_gc(); return *this; }
};
IO cin,cout;
int main(){
_return();
}
这里输出输入函数的用法:
平时输出输入:直接跟标准库cout/cin用法一模一样
格式化输出:用read_w / write_w,用法跟scanf/printf一模一样,只是函数名变了一下而已
看到这里点个赞吧!!!


为了让你给我点赞,所以我祝你:
🎉 事业与学业
前程似锦
鹏程万里
马到成功
一帆风顺
蒸蒸日上
步步高升
飞黄腾达
功成名就
金榜题名
独占鳌头
学业有成
才高八斗
学富五车
出类拔萃
名列前茅
百尺竿头
更进一步
如日中天
宏图大展
志得意满
💰 财富与好运
财源广进
恭喜发财
招财进宝
日进斗金
生意兴隆
富贵吉祥
年年有余
金玉满堂
堆金积玉
财运亨通
鸿运当头
吉星高照
紫气东来
福至心灵
时来运转
顺风顺水
万事如意
心想事成
吉祥如意
大吉大利
❤️ 家庭与生活
幸福美满
阖家欢乐
阖家幸福
天伦之乐
喜气洋洋
欢天喜地
笑口常开
其乐融融
安居乐业
丰衣足食
无忧无虑
心满意足
称心如意
花好月圆
甜甜蜜蜜
夫唱妇随
相敬如宾
永浴爱河
百年好合
白头偕老
💪 健康与平安
身体健康
生龙活虎
龙马精神
精神焕发
容光焕发
神采奕奕
福寿安康
寿比南山
长命百岁
延年益寿
平平安安
出入平安
一路平安
四季平安
竹报平安
安然无恙
逢凶化吉
遇难呈祥
否极泰来
转危为安
✨ 综合与美好
福星高照
福如东海
洪福齐天
五福临门
寿与天齐
喜气盈门
瑞气盈门
春风得意
满面春风
欣欣向荣
生机勃勃
万象更新
日新月异
锦上添花
喜上加喜
双喜临门
美梦成真
如愿以偿
称心快意
完美无缺
点赞的人全家都接接接!(包括他自己,无副作用)
全部评论 1
欢迎大家对我的函数库进行讨论!
如有做的不好的地方,可以直接评论指出。5天前 来自 浙江
0





















有帮助,赞一个