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
省事儿 只需要两行代码 把下面两行保存文件后缀改成.vbs ,双击试试看吧。 这里的0表示进程启动,可改成1 set WSHshell = wscript.createobject("wscript.shell") WSHshell.run "cmd.exe /c vue ui",0,true 开机 ...
分类:
其他好文 时间:
2021-03-02 12:31:22
阅读次数:
0
异常: java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*"since that cannot be set on ...
分类:
编程语言 时间:
2021-03-02 12:28:35
阅读次数:
0
题目描述 给你一个整数 x ,如果 x 是一个回文整数,返回 true ;否则,返回 false 。 回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。例如,121 是回文,而 123 不是。 示例 1: 输入:x = 121 输出:true 示例 2: 输入:x = -121 输出:f ...
分类:
其他好文 时间:
2021-03-02 12:16:48
阅读次数:
0
C语言中偶尔会遇到 !!(cond),特别是在宏定义当中; 一个感叹号!我们知道是取非,如下: !(非零)=0 !(零)=1 两个感叹号由此推导可以知道: !!(非零)=1 !!(零)=0 C语言中的感叹号(!)是逻辑运算操作符。经过该操作符运算后的值只有 2 种情况,要么为 1,即 True,要么 ...
分类:
编程语言 时间:
2021-03-02 12:01:12
阅读次数:
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
1.方法一:用定时器定时,没跑完定时器,点击按钮无效 <script> var isClick = true; $("button").on("click",function(){ if(isClick) { isClick = false; //事件 console.log('我被点击了'); / ...
分类:
Web程序 时间:
2021-03-02 11:55:14
阅读次数:
0
using System; using System.Text.RegularExpressions; public partial class RegexEx { /// <summary> /// 验证输入字符串是否与模式字符串匹配,匹配返回true /// </summary> /// <pa ...
分类:
其他好文 时间:
2021-03-02 11:46:45
阅读次数:
0
环境:ubuntu-server18.4 with desktop installed 问题:安装ubuntu之后启动系统网卡没有自动启动,然后我就在 /etc/netplan/xxxx-netcfg.yaml文件下面加上了下面的信息: ethernets: ens33: dhcp4: true d ...
分类:
Web程序 时间:
2021-03-02 11:45:10
阅读次数:
0
public class demo4 { //逻辑运算符 public static void main(String[] args) { //与(&&)或(||)非(!) boolean a = true; boolean b = false; System.out.println(a && b) ...
分类:
其他好文 时间:
2021-03-01 14:15:22
阅读次数:
0