算法竞赛编程变量命名指南
算法竞赛选手,在变量名使用上,有诸多门派:
字母派:a b c d e f g 依次使用
新字母派:array,brray,crray 表示三个数组
新新字母派:img,jmg,kmg 表示三张图片
拼音派:用 shanchu 表示删除,用 xiugai 表示修改
卖萌派:QAQ,qwq,TAT,orz
复读派:n,nn,nnn
重排派:next,extn,xtne
化合物派:h2o, ch4, co2
下划线派:_ ,__,___
脏话派:f**k,s**t,t*d
除了循环变量一般用 i,j,k 以外,其它变量名大家就放飞自我了
这样降低了代码可读性,一段时间以后谁也看不懂了,也不利于相互交流
这里按字母序列出一些推荐使用的变量名,仅供参考,抛砖引玉
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
add 加 anc, ancestor 祖先 ans, answer 答案 bel, belong 属于 best 最佳的 build 建立 block 障碍 ch, char 字符 check 判定 color 颜色 cmp, compare 比较 cnt, count 计数器 cur, current 当前量 deg, degree 度数 dep, depth 深度 del, delete 删除 delta 增量 diff, difference 差别 dist, distance 距离 div, division 除法,部分 dp 动态规划 edge 边 extra 额外的 fa, father 父亲 factor 因子 flag 标志 flow 流 from 来自 get 得到 Hash 哈希表(hash是保留字) heap 堆 in 入 ind, index 标号 inq 在队列里 inf, infinity 无穷大 init, initialize 初始化 insert 插入 inv, inverse 翻转,颠倒 last 最后一个 len, length 长度 lim, limit 极限 low, lower 下边的 mat, matrix 矩阵 mid, middle 中间量 mod 模 modify 修改 mp, map 映射 mst 最小生成树 mul, multiply 乘法 node 结点 num, number 数量 nxt 后继(next是保留字) out 出 pa, pair 对子 pre, precursor 前驱 prime 质数 pos, position 位置 prod, product 乘积 put 放置 que, queue 队列 query 询问 rank 秩 res, result 结果 res, residual 剩余 scc 强连通分量 size 大小 split 分裂 start 开始 stk, stack 栈 str 字符串 suc, succeed 后继 sum 和 tim 时间(time是保留字) tmp, temporary 临时量 tree 树 to 表目的 unite 联合 up, upper 上边的 update 更新 used 使用过的 val, value 值 vec, vector 向量 vis, visit 访问 zero 零 |
Hello guys, I am Nannie a professional in academic writing.
I enjoy solving people’s problems and make them happy. That is what I have been doing for decades now.
I have been writing since I was 12 years old and never knew it would turn out to be a full-time career. I have also been able to manage several assignments that involves writing. And I worked in three organizations as a volunteer to assist people.My passion has always been to help people succeed. And I go the extra mile to make that happen.
I enjoy writing books and have helped people from countries like Australia.
I work with a company whose mission is to provide quality works and make people happy. In fact, many students come to me for help on a daily basis because they know I always deliver. And I will continue to provide nothing but quality to build trust like I have been doing for the past few years.
Expert writer – Nannie Morris – http://www.arcaportugal.org Company
使用HJT表示可持久化数据结构
Hello, I am Leonard Rossi a professional in content writing.
I enjoy solving people’s problems and make them happy. That is what I have been doing for decades now.
I have been writing since I was 12 years old and never knew it would turn out to be a full-time career. I have also been able to manage several projects that involves writing. And I worked in three organizations as a volunteer to assist people.My hobbie has always been to help people succeed. And I go the extra mile to make that happen.
I enjoy writing Thesis and have helped people from countries like China.
I work with a service provider whose mission is to provide quality papers and make people happy. In fact, many students come to me for professional help on a daily basis because they know I always deliver. And I will continue to provide nothing but quality to build trust like I have been doing for the past few years.
Expert academic writer – Leonard – http://www.asadeaguia.net Corps
Hello, it’s Austin Hawes here!
I work as a professional an essay writer and have created this content with the intent of changing your life for the better. I started honing my writing talent in high school. I learned that my fellow students needed writing help—and they were willing to pay for it. The money was enough to help pay my tuition for my remaining semesters of college.
Ever since high school, I have continued to work as an academic writer. I was hired by a writing company based in the United Kingdom. Since then, the research papers that I have written have been sold around Europe and the United States.
In my line of work, I have become accustomed to hearing, “Austin Hawes, can you help me meet my writing assignment deadline?” I know that I can save their time.
Academic Writer – Austin Hawes – http://www.andersnordberg.com Corps
Thanks for visiting,
I’m Mehmet.
If you’ve ever been too busy and couldn’t finish a research assignment , then you’ve come to the right place. I assist students in all areas of the writing process . I can also write the essay from start to finish.
My career as a professional writer started during my school years . After learning that I was very capable in the field of academic writing, I decided to take it up as a profession.
Skilled Academic Writer- Mehmet- suisselifescience.com Band
merge -> 合并
Hello and welcome to my webpage. I’m Magdalena.
I have always dreamed of being a novelist but never dreamed I’d make a career of it. In college, though, I aided a fellow student who needed help. She could not stop complimenting me . Word got around and someone asked me for writing help just a week later. This time they would pay me for my work.
During the summer, I started doing research paper writing for students at the local college. It helped me have fun that summer and even funded some of my college tuition. Today, I still offer my writing skills to students.
Writing Specialist – Magdalena – inpolesine.com Corp
话说角度一般怎么缩写啊qwq
deg?何如
建议添加: 老婆派(我喜欢这么写)
set<int> Wives;
int Izayoi_Sakuya();
namespace Flandre_Scarlet {}
class Chtholly{};
struct Remilia_Scarlet{}
阿哈哈哈!!!!666
你的网站版权已经过期,鉴于过期尚未超过4个月:
(1)立即停止相关业务
(2)修改页面底部的版权信息
(3)重新开办相关业务
如果有必要,可以访问公安备案网获得相关信息
你的网站版权已经过期,鉴于过期尚未超过4个月:
(1)立即停止相关业务
(2)修改页面底部的版权信息
(3)重新开办相关业务
如果有必要,可以访问公安备案网获得相关信息
十六夜咲夜好评
您也是东方厨?
hzwer 似乎是东方厨呢…
其实不是,他的图包是朋友提供的(逃
哇!惊现p2oileen!
我一般写check会写成cxk,我觉得这样挺好看的(滑稽)
不吉利,这个函数会运行时常达两年半的#滑稽
哈哈哈哈哈笑死了