#include<iostream> #include<cstring> using namespace std; int len; void getNext(char *s, int *nex) { nex[0] = -1; int i = 0, j = -1; while(i < len) { ...
分类:
其他好文 时间:
2020-12-01 12:21:17
阅读次数:
7
code macname@localhost Desktop % cat test.sh while read line;do echo $line; done < a.txt macname@localhost Desktop % macname@localhost Desktop % cat a ...
分类:
系统相关 时间:
2020-11-30 16:14:46
阅读次数:
16
1.上升下降字符串 1 class Solution: 2 def sortString(self, s): 3 num = [0] * 26 4 for ch in s: 5 num[ord(ch) - ord('a')] += 1 6 7 ret = list() 8 while len(ret ...
分类:
其他好文 时间:
2020-11-30 15:46:10
阅读次数:
5
function varargout = tezheng(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_Openi ...
分类:
移动开发 时间:
2020-11-30 15:23:27
阅读次数:
10
1 #include <bits/stdc++.h> 2 using namespace std; 3 int main() { 4 int t; 5 cin >> t; 6 while (t--) { 7 int a, b; 8 string a_line, b_line; 9 cin >> a ...
分类:
其他好文 时间:
2020-11-30 15:20:06
阅读次数:
5
while循环中使用输出语句停止死循环的原因 z1340954953 2018-11-05 16:23:16 3021 收藏 1 分类专栏: 多线程 文章标签: 输出语句中断死循环 直接看代码 public class WhileTest { private boolean flag = true; ...
分类:
其他好文 时间:
2020-11-27 11:13:18
阅读次数:
7
操作系统-操作系统-内核中的屏幕打印(下)接着之前的实现顺序来,对PrintString进行实现intPrintString(constchar*s)//需f要对参数进行判断,如果参数为空,返回-1{intret=0;if(s!=NULL){while(*s){ret+=PrintChar(*s++);//不为空时进行循环,直到遇见结束符结束}}else{ret=-1;}returnret;}//
分类:
其他好文 时间:
2020-11-26 14:25:31
阅读次数:
5
7-1 阅览室,感觉思路还好,但是写的太繁琐了,借鉴一下过的代码,又写了一遍;,代码: #include<bits/stdc++.h> using namespace std; int s[1010],w[1010]; int main() { int n; cin>>n; while(n--) { ...
分类:
其他好文 时间:
2020-11-26 14:11:33
阅读次数:
3
package com.spinlock.spinlock.juc; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class Demo3 { publi ...
分类:
其他好文 时间:
2020-11-25 12:40:31
阅读次数:
5
实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。 示例 1: 输入: haystack = "hello", needle = "ll" ...
分类:
其他好文 时间:
2020-11-25 12:19:34
阅读次数:
5