####1.准备站点目录 for i in {android,iphone,firefox,chrome,default} ;do mkdir /html/terminal/${i} && echo $i >/html/terminal/${i}/index.html ;done ####2.准备配 ...
分类:
Web程序 时间:
2021-04-21 12:00:37
阅读次数:
0
CodeForces-1178F1 Short Colorful Strip 区间DP 题意 给定$0-n$ 一共 $n+1$种颜色,现有$m$段初始时刻颜色都是0的纸,对这张纸的段进行操作,第$i$次操作会选择第$l$段到第$r$段纸进行区间染色,条件是这段此时必须为同种颜色,染为$i$。给出最终 ...
分类:
其他好文 时间:
2021-04-21 11:55:16
阅读次数:
0
输出小于输入值的所有正偶数。 1、while语句 #include <stdio.h> int main(void) { int i = 2, j; puts("please input an integer."); printf("j = "); scanf("%d", &j); while ( ...
分类:
编程语言 时间:
2021-04-20 15:40:50
阅读次数:
0
1 typedef int semaphore; 2 semaphore count_mutex = 1; 3 semaphore data_mutex = 1; 4 int count = 0; 5 6 void reader(){ 7 while(TRUE){ 8 down(&count_mut ...
分类:
其他好文 时间:
2021-04-20 15:08:36
阅读次数:
0
#堆排序 通过将无序表转化为堆,可以直接找到表中最大值或者最小值,然后将其提取出来,令剩余的记录再重建一个堆, 取出次大值或者次小值,如此反复执行就可以得到一个有序序列,此过程为堆排序。 思路: 1.创建一个堆 H[0……n-1]; 2.把堆首(最大值)和堆尾互换; 3.把堆的尺寸缩小 1,并调用 ...
分类:
编程语言 时间:
2021-04-20 14:08:43
阅读次数:
0
#include<cstdio> const double eps = 1e-5; double f(double x) { return x * x; } double calSqrt() { double mid,left=1,right=2; while (right - left > eps ...
分类:
其他好文 时间:
2021-04-20 14:03:49
阅读次数:
0
题目来源 给定一串长度不超过 1 的字符串,本题要求你将其中所有英文字母的序号(字母 a-z 对应序号 1-26,不分大小写)相加,得到整数 N,然后再分析一下 N 的二进制表示中有多少 0、多少 1。例如给定字符串 PAT (Basic),其字母序号之和为:16+1+20+2+1+19+9+3=7 ...
分类:
编程语言 时间:
2021-04-19 16:06:23
阅读次数:
0
这里用go to 来模拟汇编他们的区别 while 代码 int i = 0; while (i < 100) { i++; } goto 实现while int i = 0; WHILE_BEGIN: if (i < 100) { goto WHILE_END; } i++; goto WHILE ...
分类:
其他好文 时间:
2021-04-19 15:45:52
阅读次数:
0
##题意 求最长上升子序列长度 ##思路 本题直接用dp写,会超时,需要优化 优化办法:二分+dp ##AC代码 //4test n //6 p //4 2 6 3 1 5 ->3 //10 //2 3 4 5 6 7 8 9 10 1 ->9 //8 //8 7 6 5 4 3 2 1 ->1 / ...
分类:
其他好文 时间:
2021-04-19 14:47:09
阅读次数:
0
##思路 最长上升子序列的变形+记录路径 ##AC代码 #include<iostream> #include<cmath> #include<string.h> #include<algorithm> #include<stdio.h> #include<iomanip> #define inf ...
分类:
其他好文 时间:
2021-04-19 14:43:51
阅读次数:
0