码迷,mamicode.com
首页 >  
搜索关键字:read case while    ( 57414个结果
linux 系统中read命令
1、read从键盘读入 [root@centos7 test]# echo $a [root@centos7 test]# read a 123456 [root@centos7 test]# echo $a 123456 2、-p 参数 加入提示 [root@centos7 test]# unse ...
分类:系统相关   时间:2021-04-22 15:41:37    阅读次数:0
L1-071 前世档案 (20 分)
二进制水题~。 int n,m; int main() { cin>>n>>m; while(m--) { string s; cin>>s; int res=0; for(int i=0;i<s.size();i++) if(s[i] == 'n') res+=1<<(n-1-i); cout<< ...
分类:其他好文   时间:2021-04-22 15:39:34    阅读次数:0
【问题记录】pycharm控制台搜狗输入法输入中文逗号会自动变为英文逗号
#多维列表(嵌套列表) #[[姓名,年龄,工资],[姓名,年龄,工资],[姓名,年龄,工资],[姓名,年龄,工资]] #字符串:"姓名,年龄,工资"例如: "张三,30,2000" emp_list = [] while True: info = input("请输入员工信息:") if info ...
分类:其他好文   时间:2021-04-22 15:26:09    阅读次数:0
c语言实现单链表的倒叙
bool upsidedown_list(LinkList L) { Lnode *head, *tmp, *oldhead; head = L; tmp = L->next; oldhead = L; while (tmp) { oldhead->next = tmp->next; tmp->ne ...
分类:编程语言   时间:2021-04-22 15:16:52    阅读次数:0
并查集Union-find的优化问题
并查集可以有两个优化方案, 1,平衡性优化:对每个结点标记一个重量值,在进行union操作时,将重量小的添加到重量大的节点上。 2,路径压缩:在进行find操作时,顺便对路径进行压缩 private int find(int x) { while (parent[x] != x) { // 进行路径 ...
分类:其他好文   时间:2021-04-22 15:12:28    阅读次数:0
【事件类】雅思口语
【事件】 bike trip Describe an unforgettable bike trip you had You should say: When and where you had the trip Who you went with Why you had the trip by b ...
分类:其他好文   时间:2021-04-21 12:57:26    阅读次数:0
链表反转实现
方法一:双指针法 采用就地反转,不用额外开辟空间 注意:接收链表的head节点,返回当前节点 方法二:递归法 代码如下: class Node(object): def __init__(self, item, next=None): self.item = item self.next = nex ...
分类:其他好文   时间:2021-04-21 12:23:41    阅读次数:0
linux 监控服务器流量
linux 监控服务器流量 #!/bin/bash ethn=$1 while true do RX_pre=$(cat /proc/net/dev | grep $ethn | sed 's/:/ /g' | awk '{print $2}') TX_pre=$(cat /proc/net/dev ...
分类:系统相关   时间:2021-04-21 12:03:54    阅读次数:0
java学习之字符串
Java字符串 三个字符串类 String (不可变) StringBuilder (可变) StringBuffer(可变) 空字符串不是null,空字符串分配了空间,而null没有分配空间 不可变字符串的创建 package chapter8; public class chapt01 { pu ...
分类:编程语言   时间:2021-04-21 12:02:46    阅读次数:0
CodeForces-1178F1 Short Colorful Strip 区间DP
CodeForces-1178F1 Short Colorful Strip 区间DP 题意 给定$0-n$ 一共 $n+1$种颜色,现有$m$段初始时刻颜色都是0的纸,对这张纸的段进行操作,第$i$次操作会选择第$l$段到第$r$段纸进行区间染色,条件是这段此时必须为同种颜色,染为$i$。给出最终 ...
分类:其他好文   时间:2021-04-21 11:55:16    阅读次数:0
57414条   上一页 1 ... 37 38 39 40 41 ... 5742 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!