shell #! /bin/bash #外层循环 for ((i=1;i<=9;i++)) do #内层循环 for ((j=1;j<=i;j++)) do #计算2个数的乘积 let "product=i*j" #输出乘积 printf "i*i?j=$product" #输出空格分隔符 if [ ...
分类:
编程语言 时间:
2021-03-03 11:55:14
阅读次数:
0
转自:https://mp.weixin.qq.com/s/MVSIRRzEvU9TxTe2MH0pAA 作者:Kubernetes Blog k8s技术圈 2020-12-03 Kubernetes 在 v1.20 版本之后将废弃 Docker 作为容器运行时。 事实上你完全不需要感到恐慌。 Do ...
分类:
Web程序 时间:
2021-03-03 11:49:07
阅读次数:
0
CodeForces-1491C Pekora and Trampoline 贪心,递推 题意 一条直线上有$n$个点,每次可以选择一个起点,若该点为$S_i$,则会跳到$i + S_i$,(不超过N)且$S_i --$(不小于1)。 问最少的放置次数,让所有$S_i = 1$。 \[ 1 \leq ...
分类:
其他好文 时间:
2021-03-02 12:40:56
阅读次数:
0
Some think we can acquire knowledge from news reports. Others believe we cannot trust journalists. What do you think? What important qualities should ...
分类:
其他好文 时间:
2021-03-02 12:39:13
阅读次数:
0
题链 sa $sa[i]$表示排名$i$的开头 $rk[i],x[i]$表示$i$后缀所在的排名 $y[i]$表示的第二段排名为$i$的开头 $c[i]$为桶 倍增 #include<bits/stdc++.h> using namespace std; const int N=1e5+5; int ...
分类:
编程语言 时间:
2021-03-02 12:00:38
阅读次数:
0
题意 博览馆正在展出由世上最佳的 \(M\) 位画家所画的$N$幅图画。可是,那里的博览馆有一个很奇怪的规定,就是在购买门票时必须说明两个数字,$a$和$b$,代表他要看展览中的第 \(a\) 幅至第 \(b\) 幅画(包含 \(a\) 和 \(b\))之间的所有图画,而门票的价钱就是一张图画一元。 ...
分类:
其他好文 时间:
2021-03-01 13:57:13
阅读次数:
0
https://leetcode-cn.com/problems/zai-pai-xu-shu-zu-zhong-cha-zhao-shu-zi-lcof/solution/ 由于是有序数组,所有二分找左界线和右界限。 while i <= j, 最终会在j < i 的时候停下来,所以是可以遍历到整 ...
分类:
其他好文 时间:
2021-03-01 13:44:35
阅读次数:
0
description: There are two strings \(a\), \(b\) with the length \(n\), and \(m\). Find the Array <\(p_1, p_2, ..., p_m>\), such that \(a_{p_i}= b_i\), ...
分类:
其他好文 时间:
2021-03-01 13:26:32
阅读次数:
0
循环结构 while 语法 int i = 0; while(i<100){ i++; } 注意: 只要布尔表达式为true,循环就会一直执行 多数情况会让循环停止,需要一个让表达式false的方式来结束循环 少部分情况需要循环一直执行,比如服务器的请求响应监听等 循环条件一直为true会无限循环/ ...
分类:
其他好文 时间:
2021-03-01 13:18:26
阅读次数:
0
A 跑步 题目大意 : * Code Show Code #include <cstdio> #include <algorithm> using namespace std; const int N = 2005; int read(int x = 0, int f = 1, char c = g ...
分类:
其他好文 时间:
2021-03-01 13:16:23
阅读次数:
0