杂项笔记
杂
CapDem
coding
展开
-
OJ常见错误
ACM平台常见错误Waiting :系统无法在第一时间给所有提交以评判结果。Compiling : 您提交的代码正在被编译。Running : 您的程序正在系统上运行。Accepted (AC) : 您的程序是正确的,恭喜!Presentation Error (PE) : 虽然您的程序貌似输出了正确的结果,但是这个结果的格式有点问题。请检查程序的输出是否多了或者少了空格(’ ‘)、制表符(’\t’)或者换行符(’\n’)。Wrong Answer (WA) : 输出结果错,这个一般认为是算法有问题。原创 2021-07-03 22:54:22 · 1489 阅读 · 0 评论 -
C/C++快速幂
int qm(int a, int b) { int ans = 1; while (b) { if (b & 1)ans *= a; a *= a; b >>= 1; } return ans;}快速幂原理底数a变大原创 2021-05-12 20:03:30 · 122 阅读 · 0 评论 -
数据结构中typedef struct node用法
typedef struct node{ elemtype data; struct node* lchild, * rchild;}bitnode,*bittree;等价于typedef struct node{ elemtype data; struct node* lchild, * rchild;};typedef struct node bitnode;typedef struct node* bittree;即让bitnode等价于nodebittree 等价于n原创 2021-04-25 18:48:54 · 3188 阅读 · 0 评论