缺省源

#include <bits/stdc++.h>

using namespace std;

#define IL inline
#define bstr basic_string
#define vec vector
#define eb emplace_back
#define emp emplace
#define sz size
#define bg begin
#define rbg rbegin
#define al(v) v.bg(), v.end()
#define bk back
#define pp pop_back
#define fi first
#define se second
#define mkp make_pair
#define lb lower_bound
#define ub upper_bound
#define exg exchange
using ubt = long long;
using pii = pair<int, int>;
using dub = double;

auto ckx = [](auto &x, const auto &y) { (x < y) && (x = y); };
auto ckm = [](auto &x, const auto &y) { (x > y) && (x = y); };

template <typename T = int>
IL T _R() {
  T s = 0, w = 1;
  char c = getchar();
  while (!isdigit(c)) w = c == '-' ? -1 : 1, c = getchar();
  while (isdigit(c)) s = s * 10 + c - 48, c = getchar();
  return s * w;
}
template <typename T>
IL void _W(T x) {
  static short OUT[20], OT(0);
  if (x < 0) putchar('-');
  do OUT[++OT] = x % 10;
  while (x /= 10);
  for (; OT; OT--) putchar(OUT[OT] + 48);
}
#define _end putchar('\n')
#define _spc putchar(' ')

const int inf = 1e9;

int main() {
}

set number
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set cindent
set showcmd
set mouse=a

map <A-UP> :m-2<CR>
map <A-DOWN> :m+1<CR>

map <C-Z> <ESC>:w<CR>
map <F9> <ESC>:w<CR> <ESC>:!g++ -std=c++14 -Wall -Wextra -O2 -fsanitize=address,undefined -g -DLOCAL % -o %:r && time ./%:r<CR>
map <F5> <ESC>:w<CR> <ESC>:!g++ -std=c++14 -Wall -Wextra -O2 -DLOCAL % -o %:r && time ./%:r<CR>
map <C-K> <ESC>:w<CR> <ESC>:!gedit %<CR>
map <F12> <ESc>:w<CR> <ESC>:!g++ -std=c++14 -Wall -Wextra -O2 -DLOCAL % -o %:r<CR>

imap <C-Z> <ESC>:w<CR>
imap <F9> <ESC>:w<CR> <ESC>:!g++ -std=c++14 -Wall -Wextra -O2 -fsanitize=address,undefined -g -DLOCAL % -o %:r && time ./%:r<CR>
imap <F5> <ESC>:w<CR> <ESC>:!g++ -std=c++14 -Wall -Wextra -O2 -DLOCAL % -o %:r && time ./%:r<CR>
imap <C-K> <ESC>:w<CR> <ESC>:!gedit %<CR>
imap <F12> <ESc>:w<CR> <ESC>:!g++ -std=c++14 -Wall -Wextra -O2 -DLOCAL % -o %:r<CR>

// from wkh
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#define fpu(x) fputc_unlocked((x), _of)
#ifdef LOCAL
int _if = open("test.in", O_RDONLY);
FILE* _of = fopen("test.out", "w");
#else
int _if = fileno(stdin);
FILE* _of = stdout;
#endif
const char *_I = (char*) mmap(nullptr, lseek(_if, 0, SEEK_END), PROT_READ, MAP_PRIVATE, _if, 0);
template <typename T = int>
inline T _R() {
  T x = 0, f = 0;
  for (; *_I < 48; ++_I) f |= *_I == 45;
  for (; *_I > 47; ++_I) x = x * 10 + (*_I & 15);
  return f ? -x : x;
}
template <typename T>
void _W(T x) {
  if (x < 0) fpu(45), x = -x;
  if (x > 9) _W(x / 10);
  fpu(48 + x % 10);
}
posted @ 2024-11-06 20:17  ccxswl  阅读(63)  评论(1)    收藏  举报