文章列表
求最大公约数和最小公倍数
摘要:#include<iostream>#include<math.h>using namespace std;int mods(int a,int b){ while(b!=0){ int te……
树状数组+差分(树状数组区间更新与查询)模板,自用
摘要:自用模板,原理网上一大堆,不过建议自己跟着题目敲几遍,有部分所谓题解代码是错的。<树状数组区间更新与查询>#include<bits/stdc++.h>
using namespace std;
……
差分数组,树状数组,自用模板
摘要:放点自用模板...自用的<差分数组>#include<bits/stdc++.h>
using namespace std;
const int maxn=100005;
int orign[m……
qsort快排函数cmp用法总结
摘要:函数参数:qsort(s,n,sizeof(s[0]),cmp);int数组:int cmp(const void *a, const void *b){ return(*(int *)a……
c++中string类的简单介绍
摘要:#include "iostream"
#include "string"
using namespace std;
/*@author:浅滩
*family:c++中string类的简单介绍……
实用不常用的字符串字符函数记录
摘要:统一头文件<ctype.h>字符串:strncpy(p, p1, n) 复制指定长度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指定长度字符串 strcas……
向世界级C语言大师致敬。
摘要:个人原创!!!!#include int main()
{
printf(&((char)NULL)["www.如鹏网\0.com"]+((*"ru"-*"peng")<<SEEK_CUR……
史上最牛,访问数组元素,至少几十种访问数组元素的方式!!
摘要:个人原创,源代码:#include<stdio.h>
int main(){
int a[5]={1,2,3,4,5};
printf("a[0]=%d\n",a[0]);
printf("a……