CSP2019-J宝典

CSP2019-J宝典

——\(Memory\_of\_winter\)

模板

博客

博客模板链接

如平衡树,网络流,最短路,\(\mathrm{LCT}\)\(\mathrm{LCA}\),可并堆,\(\mathrm{tarjan}\)缩点,\(\mathrm{ODT}\)\(\mathrm{KMP}\)\(\mathrm{AC}\)自动机等

快读

namespace io {
    struct istream {
#define M (1 << 25)
        char buf[M], *ch = buf - 1;
        inline istream() { fread(buf, 1, M, stdin); }
        inline istream& operator >> (int &x) {
            while (isspace(*++ch));
            for (x = *ch & 15; isdigit(*++ch); ) x = x * 10 + (*ch & 15);
            return *this;
        }
#undef M
    } cin;
    struct ostream {
#define M (1 << 23)
        char buf[M], *ch = buf - 1;
        inline ostream& operator << (int x) {
            if (!x) { *++ch = '0'; return *this; }
            static int S[10], *top; top = S;
            while (x) { *++top = x % 10 ^ 48; x /= 10; }
            for (; top != S; --top) *++ch = *top;
            return *this;
        }
        inline ostream& operator << (const char x) {*++ch = x; return *this;}
        inline ~ostream() { fwrite(buf, 1, ch - buf + 1, stdout); }
#undef M
    } cout;
}

vim配置

如果考场没有\(\mathrm{vim}\)我也没办法,希望我\(\mathrm{dev}\)还用的习惯

se nu rnu ts=4 sw=4 ci si list lcs=tab:\|\- go=
" syntax on
" filetype plugin indent on
se guifont=Courier\_New:h14
colorscheme desert

map <F9> <ESC>:w<CR>:!g++ -o "%<" "%" -Wall -Wl,--stack=16777216<CR><CR>
map <C-F9> <ESC>:w<CR>:!g++ -o "%<" "%" -Wall -Wl,--stack=16777216 -std=c++11 -O2<CR><CR>
map <F10> <ESC>:!"%<"<CR><CR>
map <F11> <F9><F8>
map ya <ESC>gg<S-V>G"+y

imap <F9> <ESC>:w<CR>:!g++ -o "%<" "%" -Wall -Wl,--stack=16777216<CR><CR>
imap <C-F9> <ESC>:w<CR>:!g++ -o "%<" "%" -Wall -Wl,--stack=16777216 -std=c++11 -O2<CR><CR>
imap <F10> <ESC>:!"%<"<CR><CR>
imap <F11> <F9><F8>

imap <C-s> <TAB><BS><ESC>:w<CR>a
map <C-s> <ESC>:w<CR>

对拍

@echo off
:loop
gen.exe > in.in
S.exe < in.in > S.out
M.exe < in.in > M.out
fc S.out M.out
if not errorlevel 1 goto loop
pause

CSP2019-J注意事项

考前

  1. 记得看模板
  2. 注意休息,不要睡太晚
  3. 设个闹钟
  4. 考前不要太紧张

考时

  1. 先全面浏览题目,简单分配一下时间
  2. 注意看数据范围,有没有什么特殊性质
  3. 如果看不出正解,可以先把所有可以写的部分分计算一下,确定保底分和预计写的时间
  4. 计算答案和中间变量的大小,记得取模和开\(\mathrm{long\ long}\)
  5. 数组不要开小,变量类型不要写错
  6. 注意测试极限数据和边界数据
  7. 有时间要写对拍
  8. 最后要跑一遍大样例,检查是否有注释未删除
  9. 最后留出\(15\texttt{min}\)时间检查文件夹和文件名

考后

\(26\)号下午泼一泼隔膜,调整心态,不要影响到第二天

\(Day1\)出问题的地方重新复习一下

游记

不一定会有。如果有的话可能直接附在后面,也可能是链接

猜你喜欢

转载自www.cnblogs.com/Memory-of-winter/p/11860982.html