码迷,mamicode.com
首页 >  
搜索关键字:define    ( 25272个结果
window.location.href跳转带中文参数
获取跳转路径中的参数,传参就是获取指定参数,不传参就是获取全部参数 为了保险起见,建议 参数使用encodeURI()加密,使用的时候使用decodeURI()解密 function getRequestParam(param) { //获取当前的地址 var url = window.locati ...
分类:Windows程序   时间:2020-03-23 20:18:07    阅读次数:103
100-200以内的素数(今天敲的)
#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main()//100-200以内的素数{ int count = 0; int i, j; _Bool flag = 1; for (i = 100; ...
分类:其他好文   时间:2020-03-23 20:11:59    阅读次数:67
AGC 043 B - 123 Triangle (数学、 思维、巧妙)
题目:传送门 题意: 给你一个长度为 N 的只由123 构成的字符串 a ,定义 Xi,j 满足: 思路: 推荐博客:博one 博two 第一个观察,最终的答案只可能是 0、1、2,然后,从 N = 2 起,Xi,j 就不存在 3 了,都是 0、1、2,那我们直接在输入的时候,就将 123 转换为 ...
分类:其他好文   时间:2020-03-23 16:48:55    阅读次数:92
JavaScript数组去重
数组去重,一般都是在面试的时候才会碰到,一般是要求手写数组去重方法的代码。如果是被提问到,数组去重的方法有哪些?你能答出其中的10种,面试官很有可能对你刮目相看。在真实的项目中碰到的数组去重,一般都是后台去处理,很少让前端处理数组去重。虽然日常项目用到的概率比较低,但还是需要了解一下,以防面试的时候 ...
分类:编程语言   时间:2020-03-23 16:47:36    阅读次数:59
AtCoder Beginner Contest 159
传送门 A - The Number of Even Pairs #include <bits/stdc++.h> #define ll long long using namespace std; int main() { //freopen("in.txt","r",stdin); int n, ...
分类:其他好文   时间:2020-03-23 12:38:57    阅读次数:98
GetVersion
Windows 提供了GetVersionEx 函数来返回当前操作系统的版本信息 #include "stdafx.h" #include "windows.h" #include "iostream.h" int main(int argc, char* argv[]) { OSVERSIONIN ...
分类:其他好文   时间:2020-03-23 09:36:19    阅读次数:65
[CF1286B] Numbers on Tree
给定一棵有根树,每个结点有权值 $a_i$,记 $c_i$ 为 $i$ 的子树中权值 $ using namespace std; define int long long const int N = 2005; vector g[N]; priority_queue hp; int ans[N], ...
分类:其他好文   时间:2020-03-23 09:19:09    阅读次数:64
02.config.h文件编写
新建文件,命名为config.h,保存在 /source/Main/ 中 个人理解,编写config的好处:1.一个文件中定义全局变量,方便6 #ifndef __CONFIG_H__ #define __CONFIG_H__ //无符号类型的定义 #define uchar unsigned ch ...
分类:其他好文   时间:2020-03-23 00:30:48    阅读次数:99
21 栈
1,创建一个空栈,并向栈中压入1个元素 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 #define CAPACITY 100 //栈的容量 5 #define SIZE 10 //如果栈需要扩充,每次扩充10 6 7 //定义栈 8 typedef st ...
分类:其他好文   时间:2020-03-22 22:24:57    阅读次数:78
顺序表的题目
#include<iostream> using namespace std; #define ElemType int const int MaxSize=100; typedef struct{ ElemType data[MaxSize]; int length; }SqList; //就地逆 ...
分类:其他好文   时间:2020-03-22 19:40:19    阅读次数:75
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!