码迷,mamicode.com
首页 >  
搜索关键字:define    ( 25272个结果
最大数和最小数
最大数#include <stdio.h>#define MAX 10int main() { int n, a[MAX]; printf("Input the number of figure(<10):\n"); scanf("%d",&n); for (int i = 0; i < n; i+ ...
分类:其他好文   时间:2020-05-04 15:48:54    阅读次数:172
莫队总结
莫队是一种暴力数据结构。 先给一道例题: "SP3267 DQUERY D query" 我们很容易想到以一段区间为基础向内伸缩或向外扩展并不断更新答案。 然而我们如果按题目给出的询问顺序更新的话,很容易被卡成 $\mathcal O(n^2)$ ,这就需要我们给这些询问一个顺序,使得移动次数最小。 ...
分类:其他好文   时间:2020-05-04 15:29:16    阅读次数:52
累加和累乘
累加#include <stdio.h>#define MAX 10int main() { int n; int a[MAX]; int sum = 0; printf("Input the number of figure(<=10):\n"); scanf("%d",&n); for(int ...
分类:其他好文   时间:2020-05-04 15:26:15    阅读次数:73
区块链技术,到底能不能落地?
导读 电子货币依靠自身金融中介信用,配合高成本的基础设置和运营成本,通过中心化方式给用户服务,同时向商家收费而数字货币不依赖中心化的信用节点,直接走基于区块链的P2P支付。 如果以比特币网络为例,它的运营成本是矿工消耗的电力、带宽和存储,费用由用户直接支付给矿工。如果是基于弱中心化的PoS算法,那么 ...
分类:其他好文   时间:2020-05-03 21:58:19    阅读次数:95
大0-1背包
Beautiful Land #include<cstdio>价值背包 #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<map> #define m ...
分类:其他好文   时间:2020-05-03 20:35:46    阅读次数:57
矿大OJ 1768.Power Strings.
题目描述 Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of co ...
分类:其他好文   时间:2020-05-03 18:40:49    阅读次数:162
【第八周】编程——线性表
.h #define SEGMENT 50 // 有序线性表元素每段长度 typedef int ElemType; // 定义线性表元素类型为整数 int. typedef struct{ ElemType *elem; // 元素类型的动态数组指针 int size; // 有序线性表的元素个数 ...
分类:其他好文   时间:2020-05-03 16:49:01    阅读次数:50
基于51单片机PID算法控制直流电机转速且数码管显示实际转速与设定速度的项目工程
#include<reg52.h> #include<stdio.h> #define uchar unsigned char #define uint unsigned int unsigned char code Duan[]={0x3F, 0x06,0x5B,0x4F,0x66,0x6D,0x ...
分类:编程语言   时间:2020-05-03 16:37:20    阅读次数:125
用移进--规约给出对输入串abbcde#的分析过程
#include<stdio.h> #include<string.h> #include<iostream> using namespace std; #define MAXSIZE 100 typedef struct{ char *base; char *top; }Sqstack; //手动 ...
分类:其他好文   时间:2020-05-03 15:06:45    阅读次数:259
Js遍历对象总结
Js遍历对象总结 遍历对象的方法主要有 、`Object.keys() Object.getOwnPropertyNames() Reflect.ownKeys() Object.getOwnPropertySymbols()` for in 语句以任意顺序迭代对象的可枚举属性,包括原型链上的可枚举 ...
分类:Web程序   时间:2020-05-03 14:22:31    阅读次数:60
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!