#!/bin/sh #define SOURCE_DIR=( $* ) TARGET_DIR=/data/backup/ YEAR=`date +%Y` MONTH=`date +%m` DAY=`date +%d` WEEK=`date +%u` FILES=system_backup.tgz C ...
分类:
系统相关 时间:
2020-06-04 21:31:32
阅读次数:
105
题意:建一颗以$1$为根结点的树,询问$q$次,每次询问一个结点,问该结点的第$k$个子结点,如果不存在则输出$-1$. 题解:该题数据范围较大,需要采用dfs预处理的方法,我们从结点$1$开始向下找,$ans$数组记录的是,第$x$次查找时的结点,$path$表示某个结点所需的查找次数,$siz$ ...
分类:
其他好文 时间:
2020-06-04 19:43:10
阅读次数:
53
#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;const ll nl=1e18;/* ...
分类:
其他好文 时间:
2020-06-04 19:38:52
阅读次数:
55
#include<cstdio> #include<queue> #include<cstring> #include<cmath> #include<iostream> #define mod 9987 using namespace std; const int N=1000005; int e ...
分类:
其他好文 时间:
2020-06-04 09:12:20
阅读次数:
66
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> //exit 函数需要 #include <malloc.h> #define MAXSIZE 8 typedef struct queue { int* arr; //int 类 ...
分类:
其他好文 时间:
2020-06-04 01:42:21
阅读次数:
70
Codeforces Round #646 (Div. 2) A题 题意:给你一个数组,问是否能选出其中 x 个数使和为奇数 #include<bits/stdc++.h> using namespace std; #define forn(i,n) for(int i=0;i<n;i++) #de ...
分类:
其他好文 时间:
2020-06-04 01:08:15
阅读次数:
51
/* Epoll private bits inside the event mask */#define EP_PRIVATE_BITS (EPOLLWAKEUP | EPOLLONESHOT | EPOLLET | EPOLLEXCLUSIVE) ...
分类:
其他好文 时间:
2020-06-04 00:59:19
阅读次数:
74
dp https://www.luogu.com.cn/problem/P1410 给定一个长度为 \(N\)( \(N\) 为偶数)的序列,问能否将其划分为两个长度为 \(N/2\) 的严格递增子序列 多测,\(N\le 2000\) 不看题解果然还是没能想出来/kk 容易想到的:\(f(i,j, ...
分类:
其他好文 时间:
2020-06-03 23:14:24
阅读次数:
61
// var num = 10; // console.log(typeof num); // number // var str = 'eric'; // console.log(typeof str); //string // var flag = true; // console.log(ty ...
分类:
其他好文 时间:
2020-06-03 20:25:14
阅读次数:
68
一、创建头文件74hc595.h代码如下: #ifndef __74HC595_H_ #define __74HC595_H_ #include <reg52.h> #define uchar unsigned char #define uint unsigned int sbit DIO = P1 ...
分类:
其他好文 时间:
2020-06-03 13:55:43
阅读次数:
43