- 博客(40)
- 资源 (1)
- 问答 (2)
- 收藏
- 关注
原创 项目中go mod版本与本地go版本不一致,invalid go version ‘1.20.1‘: must match format 1.23
must match format 1.23
2023-12-24 20:23:53
5583
原创 Linux中swap分区出现:dd: memory exhausted by input buffer of size 1073741824 bytes (1.0 GiB)
dd: memory exhausted by input buffer of size 1073741824 bytes (1.0 GiB)
2023-12-22 19:40:09
705
原创 剑指offer _14 字符串中的变位词拓展(找到字符串中所有字母异位词)
/ 如果两个计数器相等,则找到一个异位词子串。// 移动窗口左边界,并更新窗口内字符计数。起始索引等于 0 的子串是 "cba", 它是 "abc" 的变位词。起始索引等于 6 的子串是 "bac", 它是 "abc" 的变位词。// 窗口大小达到p的长度时,开始比较字符计数。// 更新s中当前窗口的字符计数。的子串,返回这些子串的起始索引。不考虑答案输出的顺序。// 计算p中各字符的出现次数。指字母相同,但排列不同的字符串。
2023-11-13 15:56:01
29
原创 2023.1.4
打印矩阵#include <iostream>using namespace std;//二维数组的 值传递void print2D(int a[100][100], int row, int col){ for(int i=0; i<row;i++){ for(int j=0; j<col; j++) cout << a[i][j] <<' '; cout &l
2023-01-04 16:18:48
67
原创 2023.1.3
#include <iostream>using namespace std;int main(){ string s,sub; while(cin >> s>>sub) { int j=0; for(int i=0;i<s.size();i++)//如果后一项比前一项大,就交换下标。 if(s[i] > s[j]) {
2023-01-03 19:32:16
65
原创 2023.1.1
#include <iostream>#include <string.h>using namespace std;int main(){ int n; string x,y; cin >>n; while(n--) { cin>>x>>y; int a=x.size(),b=y.size(); if (a - b == -1 || a - b
2023-01-01 20:16:12
102
原创 2022.12.31
数组的左上半部分#include<iostream>#include<cstdio>using namespace std;int main(){ double M[12][12],sum=0; char op; cin>>op; //遍历二维数组 for(int i=0;i<12;i++) for(int j=0;j<12;j++) { cin>>M[
2022-12-31 18:14:02
59
原创 2022.12.30
#include<bits/stdc++.h>using namespace std;int main(){ int x; for(int i=0;i<10;i++){ cin>>x; if(x>0) { cout<<"X["<<i<<"] = "<<x<<endl; }else{
2022-12-30 16:42:44
35
求具体实现过程的具体代码
2021-11-20
求每个语句的含义!!
2021-11-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人