码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
5457. 和为奇数的子数组数目
1 int numOfSubarrays(int* arr, int arrSize){ 2 int i,j,k,n=0; 3 // long a[arrSize+1]; 4 int index=0; 5 while(n <= arrSize){//当子数组长度等于原数组长度说明所有子数组已经遍历完 ...
分类:编程语言   时间:2020-07-30 01:36:49    阅读次数:70
AcWing 839. 模拟堆
AcWing 839. 模拟堆 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; // h[N]存储堆中的值, h[1]是堆顶,x的左儿子是2x, 右儿子是2x + 1 // ph[k]存储第k个插入的点在堆中的位置 ...
分类:Windows程序   时间:2020-07-30 01:35:46    阅读次数:90
hdu6761 Mininum Index // lyndon分解 + duval贪心 + 秦九韶算法
link:http://acm.hdu.edu.cn/showproblem.php?pid=6761 建议学习该博客:https://blog.csdn.net/wayne_lee_lwc/article/details/107528945 √ AC代码:(基本搬运...看了半天才懂了一点点... ...
分类:编程语言   时间:2020-07-30 01:31:32    阅读次数:80
JS中的DFS和BFS
示例对象: { name: 'a', next: [ { name: 'b', next: [ { name: 'd', next: [] }, { name: 'e', next: [] } ] }, { name: 'c', next: [ { name: 'f', next: [] }, { ...
分类:Web程序   时间:2020-07-29 21:58:21    阅读次数:115
expect脚本
Expect脚本批量执行命令 #!/bin/bash cat /root/iplist|while read line do a=($line) expect <<EOF set timeout 3 spawn ssh root@${a[0]} expect { "*yes/no" { send " ...
分类:其他好文   时间:2020-07-29 21:53:49    阅读次数:77
gai ip
# coding=utf-8 # This script is uesd to modify Agent IP at the first time of machine started. import requests import json import time import os import ...
分类:其他好文   时间:2020-07-29 17:54:47    阅读次数:80
工作小问题
2020/07/29 bootstrap bootstrapTable在设置固定列宽的时候要先在table标签上加 style="table-layout: fixed;word-break:break-all; word-wrap:break-all;" 不然,width无效。 table-lay ...
分类:其他好文   时间:2020-07-29 17:48:25    阅读次数:67
LG P5056 【模板】插头dp
Descriprion 给出$n\times m$ 的方格,有些格子不能铺线,其它格子必须铺,形成一个闭合回路。问有多少种铺法? Solution 使用括号表示法记录状态,记1为 '(' ,2为 ')' ,0为无插头,分8种情况讨论: 1:当前格子有障碍,此时必须下插头和右插头为0,转移后状态不变 ...
分类:其他好文   时间:2020-07-29 17:30:42    阅读次数:68
Acwing 2171. EK求最大流
地址 https://www.acwing.com/problem/content/description/2173/ 给定一个包含 n 个点 m 条边的有向图,并给定每条边的容量,边的容量非负。 图中可能存在重边和自环。求从点 S 到点 T 的最大流。 输入格式 第一行包含四个整数 n,m,S,T ...
分类:Windows程序   时间:2020-07-29 15:40:20    阅读次数:78
sql-批量删除数据
--每次删多少 DECLARE @BatchSize INT = 100 WHILE 1 = 1 BEGIN DELETE TOP (@BatchSize) FROM tb WHERE id>30 IF @@ROWCOUNT < @BatchSize BREAK END ...
分类:数据库   时间:2020-07-29 15:33:08    阅读次数:69
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!