码迷,mamicode.com
首页 >  
搜索关键字:for while until    ( 29426个结果
双向链表插入删除反序
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi ...
分类:其他好文   时间:2021-04-26 13:25:21    阅读次数:0
Codeforces 1516B AGAGA XOOORRR
题目链接: http://codeforces.com/problemset/problem/1516/B 题意 一个含有 n 个非负数的数组,定义某种操作可以把相邻的两个数通过 XOR 合并为一个数,即每次操作后数组的元素个数都会减 1。问是否可以经过若干次这样的操作使得数组中的元素都相等? 思路 ...
分类:其他好文   时间:2021-04-24 13:14:41    阅读次数:0
PHP获取指定范围内的日期
//php获取指定范围内的日期 function periodDate($startDate, $endDate) { $startTime = strtotime($startDate); $endTime = strtotime($endDate); $arr = []; while ($sta ...
分类:Web程序   时间:2021-04-23 12:27:28    阅读次数:0
多线程售票员卖票问题
要求: 1、 假设现在有一个售票员进行售票,票价为5元,初始状态:票数不限,票售员手中有1张10元钱; 2、 每来一个顾客买票,相当于是创建一个线程,注意,此时顾客共享的资源是售票员及其手中的钱; 3、 当一个顾客到达后相当于创建一个线程,创建该线程时有两个参数,一是线程名,也就是顾客的名字,二是顾 ...
分类:编程语言   时间:2021-04-23 12:20:53    阅读次数:0
【Java笔试】输入输出模板
笔试算法题中,有时候是要自己处理输入,比如从键盘中接收一个数,整理了一些常用的,真正笔试之前可以看一看。 输入 循环输入: Scanner sc = new Scanner(System.in); while (sc.hasNextLine()){ String s = sc.nextLine(); ...
分类:编程语言   时间:2021-04-23 12:06:51    阅读次数:0
linux shell while循环
1、测试1 [root@centos7 test2]# i=0 [root@centos7 test2]# max=5 [root@centos7 test2]# while((i<max));do echo $i;((i++));done 0 1 2 3 4 ...
分类:系统相关   时间:2021-04-23 12:03:54    阅读次数:0
L1-063 吃鱼还是吃肉 (10 分)
水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; ...
分类:其他好文   时间:2021-04-23 11:57:55    阅读次数:0
linux shell脚本中流程控制语句 if 、for、while、case
linux shell脚本中流程控制语句 if、for、while、case 1、if语句 [root@centos7 test2]# ls test.sh [root@centos7 test2]# pwd /home/test2 [root@centos7 test2]# cat test.sh ...
分类:系统相关   时间:2021-04-22 16:20:40    阅读次数:0
while 循环初认识
#!/usr/bin/env python #-*- coding:utf-8 -*- num=0 while num<=10: print(num,end="\t") num +=1 print("**************************") num2=0 sum_all=0 whil ...
分类:其他好文   时间:2021-04-22 16:16:24    阅读次数:0
leetcode-二分查找相关
二分查找的基本框架 int binarySearch(int[] nums, int target) { int left = 0, right = ...; while(...) { int mid = left + (right - left) / 2; if (nums[mid] == tar ...
分类:其他好文   时间:2021-04-22 15:54:34    阅读次数:0
29426条   上一页 1 ... 16 17 18 19 20 ... 2943 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!