eof shell lt
abc072d <贪心>
[D - Derangement](https://atcoder.jp/contests/abc072/tasks/arc082_b) ``` // https://atcoder.jp/contests/abc072/tasks/arc082_b // // 令0表示p[i]!=i, 1表示p[ ......
abc071d <递推>
[D - Coloring Dominoes](https://atcoder.jp/contests/abc071/tasks/arc081_b) ``` // https://atcoder.jp/contests/abc071/tasks/arc081_b // #include #inclu ......
abc070d <简单树上dfs>
[D - Transit Tree Path](https://atcoder.jp/contests/abc070/tasks/abc070_d) ``` // https://atcoder.jp/contests/abc070/tasks/abc070_d // #include #inclu ......
介绍Linux shell脚本学习 -- 系列文章
当前标签:Linux Shell 06- Shell脚本学习--其它 05- Shell脚本学习--函数 04- Shell脚本学习--条件控制和循环语句 03- Shell脚本学习--字符串和数组 02- Shell脚本学习--运算符 01- Shell脚本学习--入门 出处:https://ww ......
abc069d <构造>
[D - Grid Coloring](https://atcoder.jp/contests/abc069/tasks/arc080_b) ``` // https://atcoder.jp/contests/abc069/tasks/arc080_b // #include #include # ......
abc068d <思维 + 构造>
[D - Decrease (Contestant ver.)](https://atcoder.jp/contests/abc068/tasks/arc079_b) 逆向构造(操作)思维 ~ ``` // https://atcoder.jp/contests/abc068/tasks/arc07 ......
linux shell编程中 break和exit的区别
break是跳出循环exit是退出脚本。 看下面的例子。 001、break [root@PC1 test02]# cat test.txt ## 测试数据 3 4 5 6 7 [root@PC1 test02]# cat test.sh ## 测试程序 #!/bin/bash for i in $ ......
abc067d <博弈 + dfs>
[D - Fennec VS. Snuke](https://atcoder.jp/contests/abc067/tasks/arc078_b) ``` // https://atcoder.jp/contests/abc067/tasks/arc078_b // // 关键点: 双方的最优策略一 ......
oracle 数据库备份shell脚本
#!/bin/bash # 设置 Oracle 环境变量export ORACLE_HOME=/path/to/oracle/homeexport ORACLE_SID=your_oracle_sidexport PATH=$ORACLE_HOME/bin:$PATH # 定义备份目录backup_ ......
abc066d <组合>
[D - 11](https://atcoder.jp/contests/abc066/tasks/arc077_b) ``` // https://atcoder.jp/contests/abc066/tasks/arc077_b // // 总组合数减去重复部分 // 对于本题求组合数方法: / ......
Linux shell:cat << EOF
Linux shell:cat << EOF 大川搬砖 2023-07-05 12:01 发表于北京 收录于合集 #linux14个 #shell5个 #EOF1个 1. 用途 从标准输入(stdin) 读取一段文本,遇到 "EOF" 就停止读取,然后将文本输出到标准输出(stdout) 中。 2. ......
abc065d <贪心+最小生成树> [lambda表达式]
[D - Built?](https://atcoder.jp/contests/abc065/tasks/arc076_b) ``` // https://atcoder.jp/contests/abc065/tasks/arc076_b // 贪心+最小生成树 // 关键在于意识到, 连接x或y ......
shell参数使用
shell参数使用说明 参数 说明 $0 执行脚本本身的名字。 $1 传递给脚本的第一个参数。 $# 脚本的参数个数。 $* 脚本的所有参数。当被双引号("$*")包含时,会将所有参数当作一个整体来输出。 $@ 与$*类似,但是可以当作数组用。当被双引号("$@")包含时,会将各个参数分开。 $? ......
shell自定义函数
PrintInfo(){ Info=$* printf "%-20s%-60s" "`date '+%Y-%m-%d %H:%M:%S'`" "${Info}"} CheckResult(){ Result=$? if [ ${Result} -ne 0 ] then echo "ERROR" ex ......
Linux,shell入门,第二篇
````bash #!/bin/bash #显示出本机的ip地址方法一 #ip a|grep dynamic|tr -s ' ' \/|cut -d'/' -f3 #显示出本机的ip地址方法二 ip a|sed -rn 's/(.*inet )([0-9].*)(\/[0-9].*)( brd.*) ......
linux shell template
Replace environment variables in a file with their actual values? # config.xml <property> <name>instanceId</name> <value>$INSTANCE_ID</value> </proper ......
<DP>总结
# DP总结 ## 常规DP ### [[USACO1.5] [IOI1994]数字三角形 Number Triangles](https://www.luogu.com.cn/problem/P1216) #### 解题思路 **对于到达(i,j)点时的最大值,其状态仅由(i-1,j)和(i-1, ......
shell 变量多行原样输出,支持\n 回车换行
假设: git 的 commit 提交说明是多行内容,要给一个变量。 但要保持原来样式,比如原来是是3行,在变量输出时候也是3行。 **经验:要想原样显示,就要在变量上加双引号;单引号和不加 会显示成一行**。 1.原始样式: ```bash git log -1 --format="%B" ``` ......
abc309e <dfs>
[E - Family and Insurance](https://atcoder.jp/contests/abc309/tasks/abc309_e) ``` // https://atcoder.jp/contests/abc309/tasks/abc309_e // // 关键在于意识到, ......
abc309f <线段树 + 离散化 + 双指针>
[F - Box in Box](https://atcoder.jp/contests/abc309/tasks/abc309_f) ``` // https://atcoder.jp/contests/abc309/tasks/abc309_f // [unique + lower_bound ......
abc064d <贪心/前缀和>
[D - Insertion](https://atcoder.jp/contests/abc064/tasks/abc064_d) > [另一种做法](https://www.bilibili.com/read/cv24447317),注意这两种写法: >1. `max_element` >2. ......
Vue详解设置路由导航的两种方法<router-link to=“”>和router.push(...)
1.<router-link to=""> to里的值可以是一个字符串,也可以是一个描述地址的对象。 // 字符串 <router-link to="apple"> to apple</router-link> // 对象 <router-link :to="{path:'apple'}"> to ......
abc063d <二分答案>
[D - Widespread](https://atcoder.jp/contests/abc063/tasks/arc075_b) 对二分答案的特点要敏感!!! ``` // https://atcoder.jp/contests/abc063/tasks/arc075_b // 二分答案 #i ......
abc062d <优先队列>
[D - 3N Numbers](https://atcoder.jp/contests/abc062/tasks/arc074_b) [参考](https://blog.csdn.net/awow80285/article/details/101550652) ``` // https://atc ......
COMP 23T2 shell程序
COMP(2041|9044) 23T2 — Assignment 1: Pigs1/8Assignment 1: Pigsversion: 1.3 last updated: 2022-07-04 930AimsThis assignment aims to give youpractice in ......
嵌入式shell介绍和学习
# 前言 在 Linux 中,Shell 是一个应用程序 ,他是用户与 Linux 内核沟通的桥梁。 它负责接收用户输入的命令,根据用户的输入找到其他程序并运行,Shell负责将应用层或者用户输入的命令传递给系统内核,由操作系统内核来完成相应的工作,然后将结果反馈给应用层或者用户。 而在STM32中 ......
Shell - printf
jira_description="Errors in log file ${log}:" sep_line=" " errors=$(grep "gpg: error\|$err_msg" $log) actions="Actions to take: " jira_description=$(p ......
<折半搜索>题型总结
# 折半搜索 **meet in the middle** 算法 (又叫 split and merge 算法) 顾名思义这种算法就是同时从**两个点往中间搜索,直到碰头为止** **而使等式两边未知数个数相等或尽量均匀分布是用 meet in the middle 算法解决等式问题的常见方法** ......
解决远程主机的默认 shell 为 fish 时,vscode remote 无法连接的问题
问题描述 我主要用的 shell 就是 fish,主打一个开箱即用,虽然也配置过 zsh,但是感觉配置好的 zsh 在易用性上也就是 fish 的水平。 此前,一直以来默认的 shell 都是 bash,ssh 或者 vscode remote 远程连接上去之后,再输入 fish 来进行手动切换,后 ......
makefile 定义shell函数
How to define global shell functions in a Makefile? makfile with shell code block and function ......