<!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
题目链接: http://codeforces.com/problemset/problem/1516/B 题意 一个含有 n 个非负数的数组,定义某种操作可以把相邻的两个数通过 XOR 合并为一个数,即每次操作后数组的元素个数都会减 1。问是否可以经过若干次这样的操作使得数组中的元素都相等? 思路 ...
分类:
其他好文 时间:
2021-04-24 13:14:41
阅读次数:
0
//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
笔试算法题中,有时候是要自己处理输入,比如从键盘中接收一个数,整理了一些常用的,真正笔试之前可以看一看。 输入 循环输入: Scanner sc = new Scanner(System.in); while (sc.hasNextLine()){ String s = sc.nextLine(); ...
分类:
编程语言 时间:
2021-04-23 12:06:51
阅读次数:
0
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
水题。 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 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
#!/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
二分查找的基本框架 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