ZISUOJ 高级语言程序设计实训-基础C(部分题)

说明:

        有几个题是不会讲的,我只能保证大家拿保底分。

题目列表:

fcaaa896e3ad4a6c9195e530572734a9.png

问题 A: 求平均数1 

3b4b3a663863450188ef61372e399263.png 

思路:

        送分题……

参考题解:

#include <iostream>
#include <iomanip>
using std::cin;
using std::cout;

int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	double avg = 0;
	int tmp,cnt = 0;
	while(cin >> tmp){
		avg+=tmp,cnt++;
	}
	cout << std::fixed << std::setprecision(2) << avg/cnt << std::endl;
	return 0;
} 

问题 B: 粘墙三角形 

12f5df494d344207a1a99cf2b312fab3.png

 思路:

        题目说<=26,那就很简单了,写个二重循环秒了。

参考题解:

#include <iostream>
using std::cin;
using std::cout;

int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	int n;
	while(cin >> n){
		for(int i = 1;i<=n;i++){
			cout << 'a';
			for(int j = 1;j<=n-i;j++) cout << ' ';
			for(int j = 1;j<=i;j++) cout << char('a'+j-1);
			cout << '\n';
		}
		cout << '\n';
	}
	return 0;
} 

 问题 C: 门帘设计

807090d235ee4eba9c272c97f090b2d3.png 

思路:

        注意这里的输出中间都是有空格的。门帘的上面是对2取模为1的输出字符,否则输出空格;门帘的下面是对4取模为1的输出字符,否则输出空格。

参考题解:

#include <iostream>
using std::cin;
using std::cout;

int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	char c;int a,b;
	while(cin >> c >> a >> b){
		for(int i = 1;i<=a;i++){
			if(i<=b){
				for(int j = 1;j<=29;j++){
					if(j&1) cout << c;
					else cout << ' ';
				}
			}else{
				for(int j = 1;j<=29;j++){
					if(j%4==1) cout << c;
					else cout << ' ';
				}
			}
			cout << '\n';
		}
		cout << '\n';
	}
	return 0;
} 

问题 D: 倒置排序 

acc1f88b0d6d48cab86d673320f738e5.png 

思路:

        求一下倒置后的数字,都放进一个pair或者结构体中排序后输出即可。

参考题解:

#include <iostream>
#include <vector>
#include <algorithm>
using std::cin;
using std::cout;
using std::vector;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	constexpr int N = 1e2+5;
	int _ = 1;
	cin >> _;
	auto solve = [&](){
		int n;cin >> n;
		vector<std::pair<int,int>> ans(N+1);
		for(int i = 1;i<=n;i++){
			int tmp;cin >> tmp;
			ans[i].second = tmp;
			int rev = 0;
			while(tmp){
				rev = rev*10+tmp%10;
				tmp/=10;
			}
			ans[i].first = rev;
		}
		std::sort(ans.begin()+1,ans.begin()+1+n);
		for(int i = 1;i<=n;i++) cout << ans[i].second << " \n"[i==n];
	};
	while(_--) solve();
	return 0;
} 

问题 E: 按日期排序 

a351f2aafc314e66a741b4ab0f1b25a0.png 

思路:
        这题是为数不多用C++的输入输出流不好读入的情况,那就用scanf和printf来实现输入输出,一个日期是一个结构体,在结构体内重载一下小于号,然后sort()一遍输出即可。

参考题解:

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using std::vector;
int main(){
	struct node{
		int m,d,y;
		bool operator < (const node &W) const {
			if(y!=W.y) return y<W.y;
			else if(m!=W.m) return m<W.m;
			else return d<W.d;
		}
	};
	vector<node> ans;
	int month,day,year;
	while(~scanf("%d/%d/%d",&month,&day,&year)){
		ans.push_back({month,day,year});
	}
	std::sort(ans.begin(),ans.end());
	for(auto &t:ans){
		printf("%02d/%02d/%04d\n",t.m,t.d,t.y);
	}
	return 0;
} 

 问题 F: 统计图

83e923fc37b343dc81d9ec593cd44ba1.png 

思路:

        这个题也要注意输出的时候每两个字符之间都是有空格的,之前没发现WA了一次。具体思路是使用getline()或者gets()整行整行读,使用map对所有的大写字母进行计数,还需要统计这其中字符出现的最多的次数用于判断输出的行数(记为maxn),每行遍历时对应判断该行的行数(行数是从maxn到1的)是否小于等于该字母出现的次数。

参考题解:

#include <iostream>
#include <string>
#include <map>
#include <algorithm>
using std::cin;
using std::cout;
using std::string;
using std::map;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	string line;
	map<char,int> mp;
	while(getline(cin,line)){
		for(auto &c:line){
			if(c>='A'&&c<='Z') mp[c]++;
		}
	}
	int maxn = -1;
	for(auto &i:mp) maxn = std::max(maxn,i.second);
	for(int i = maxn;i>=1;i--){
		for(int j = 1;j<=51;j++){
			if(j&1){
				if(i<=mp['A'+(j+1)/2-1]) cout << '*';
				else cout << ' ';
			}else{
				cout << ' ';
			}
		}
		cout << '\n';
	}
	for(int i = 1;i<=51;i++){
		if(i&1){
			cout << char('A'+(i+1)/2-1);
		}else{
			cout << ' ';
		}
	}
	cout << '\n';
	return 0;
} 

问题 G: 找子串

616aa45ab8ce45b8807c94ff47b69d88.png 

思路:

        使用<string>的find()库函数即可。

参考题解:

#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::string;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	string s,t;
	while(cin >> s >> t){
		cout << (s.find(t)==string::npos?"No\n":"Yes\n");
	}
	return 0;
} 

问题 H: 火星数排序 

0838717bbee54768bb91896e2b1b976d.png 

 思路:

        注意看清题目,读入的是火星数,要我们排序后输出排序后的火星数。具体思路就是读入火星数,然后转换成地球数进行排序(以地球数为第一关键字),输出最终的结果即可。储存这些两个数可以分别用两个数组,或者是一个结构体数组,也可以是一个pair数组。

参考题解:

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
using std::cin;
using std::cout;
using std::string;
using std::vector;
using std::map;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	map<int,int> mp = {{0,0},{8,1},{1,2},{5,3},{2,4},{3,5},{9,6},{4,7},{7,8},{6,9}};
	int _ = 1;
	cin >> _;
	auto solve = [&](){
		int n;cin >> n;
		vector<std::pair<int,int>> a;
		for(int i = 0;i<n;i++){
			int Mars;cin >> Mars;
			int tmp = Mars;
			vector<int> v;
			while(tmp){
				v.emplace_back(tmp%10);
				tmp/=10;
			}
			int earth = 0;
			std::reverse(v.begin(),v.end());
			for(auto &j:v){
				earth = earth*10 + mp[j];
			}
			a.emplace_back(earth,Mars);
		}
		std::sort(a.begin(),a.end());
		for(int i = 0;i<a.size();i++){
			cout << a[i].second << ' ';
		}
		cout << '\n';
	};
	while(_--) solve();
	return 0;
} 

问题 I: 字串数 

34f4edb52009452383072406f2f00ebf.png 

思路:

        推出公式:ans = (sum!)/(a1!*a2!*...*an!)。其中,sum表示数组a的和。因为数据会非常大,使用C++写的话,会爆long long,那要写高精度。如果图方便的话,就直接用Java的大整数类来写了。当然,python也能写,只不过ZISUOJ平台的python解释器有点问题,有数据读入的情况就会出错。

参考题解1(C++高精度实现):

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<int> div(vector<int> &A,ll b){//高精度除法 (高精度数 除以 非高精度数)
    ll r = 0;
    vector<int> C;
    for (int i = A.size()-1; i>=0;i--){
        r = r * 10 + A[i];
        C.push_back(r / b);
        r %= b;
    }
    reverse(C.begin(),C.end());
    while (C.size()>1&&C.back()==0) C.pop_back();//去除高位零
    return C;
}
vector<int> mult1(int sum){//高精度阶乘
    vector<int> C;
    C.push_back(1);
    int i, j, temp = 0;
    int item = 0;
    for(i = 2; i <= sum; i++){
        for (j = 0; j < C.size(); j++) {
            item = C[j] * i + temp;
            C[j] = item % 10;
            temp = item / 10;
        }
        while(temp){
            C.push_back(temp % 10);
            temp /= 10;
        }
    }
    return C;
}
int mult2(int n){//普通阶乘
    int sum = 1;
    for (int i = 2; i <= n; i++) sum *= i;
    return sum;
}
int main(){
	ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
    int n;
    while(cin >> n){
        if (n == 0) break;
        int sum = 0;
        long long a[27];
        for(int i = 1;i<=n; i++){
            cin >> a[i];
            sum += a[i];
        }
        vector<int> C = mult1(sum);
        for(int i = 1; i <= n; i++){      //运用累除的方法可以简化为高精度除以非高精度 我事先判断了12的阶乘在int的存储范围内
            C = div(C, mult2(a[i]));
        }
        for(int i = C.size() - 1;i>=0;i--) cout << C[i];
        cout << endl;
    }
    return 0;
}

参考题解2(Java大整数类实现):

import java.util.Scanner;
import java.math.BigInteger;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        while(sc.hasNextInt()){
            n = sc.nextInt();
            if(n==0) break;
            long sum = 0;
            int[] a = new int[27];
            for(int i = 1;i<=n;i++){
                a[i] = sc.nextInt();
                sum += a[i];
            }
            BigInteger ans = BigInteger.ONE;
            for(int i = 1;i<=sum;i++){
                ans = ans.multiply(BigInteger.valueOf(i));
            }
            for(int i = 1;i<=n;i++){
                long tmp = 1;
                for(int j = 1;j<=a[i];j++){
                    tmp = tmp * j;
                }
                ans = ans.divide(BigInteger.valueOf(tmp));
            }
            System.out.println(ans);
        }
    }
}

 参考题解3(Python整型再大也能存的下):

from math import factorial
from sys import stdin

for line in stdin:
    n = int(line.strip())
    if n == 0:
        break
    a = list(map(int, stdin.readline().strip().split()))
    sum_a = sum(a)
    ans = factorial(sum_a)
    for num in a:
        ans //= factorial(num)
    print(ans)

问题 J: 寻找素数对

e5e7a3fa101c4c4b9b08a86011e08d1e.png 

思路:

        从n/2开始往左找(循环体变量假设为i),如果i和n-i都是素数直接输出并且break掉循环。

参考题解:

#include <iostream>
using std::cin;
using std::cout;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	auto isPrime = [&](int num)->bool{
		if(num<2) return false;
		for(int i = 2;i<=num/i;i++) if(num%i==0) return false;
		return true;
	};
	int m;
	while(cin >> m,m){
		int mid = m/2;
		for(int i = mid;i>=2;i--){
			if(!isPrime(i)) continue;
			if(isPrime(m-i)){
				cout << i << ' ' << m-i << '\n';
				break;
			}
		}
	}
	return 0;
} 

问题 K: 水果 

c72d0da288f94170972de5ea496e2407.png 

思路:
        最快最直接的方法就是用二维map来存,然后直接输出(它甚至都不需要任何的排序,因为map内部是红黑树实现,默认就是有序的)。

参考题解:

#include <iostream>
#include <map>
#include <string>
using std::cin;
using std::cout;
using std::map;
using std::string;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	auto solve = [&](){
		map<string,map<string,int>> mp;
		int n;cin >> n;
		for(int i = 1;i<=n;i++){
			string fruit,province;int num;
			cin >> fruit >> province >> num;
			mp[province][fruit]+=num;
		}
		for(auto &pro:mp){
			cout << pro.first << '\n';
			for(auto &fru:pro.second){
				cout << "   |----" << fru.first << '(' << fru.second << ")\n";
			}
		}
		cout << '\n';
	};
	int _ = 1;
	cin >> _;
	while(_--) solve();
	return 0;
} 

问题 L: 排名次

5268484f48844dc78a203b18da7f6028.png 

思路:

        结构体排序的基本题(当然用pair也可以)。

参考题解:

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using std::cin;
using std::cout;
using std::string;
using std::vector;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	vector<std::pair<int,string>> ans;
	int n;cin >> n;
	for(int i = 1;i<=n;i++){
		string name;int score;cin >> name >> score;
		ans.emplace_back(score,name);
	}
	std::sort(ans.begin(),ans.end(),[&](const std::pair<int,string> &p1,const std::pair<int,string> &p2){
		if(p1.first!=p2.first) return p1.first>p2.first;
		else return p1.second<p2.second;
	});
	for(auto &t:ans) cout << t.second << ' ' << t.first << '\n';
	return 0;
} 

问题 M: 奇怪的处理器

753c35921aeb4f55aa564524a3e4e9ff.png 

思路:

        看懂题目就很好写了,实际上题目就是让我们从左往右找第一个出现'1'的位置,如果没出现'1',那么答案就是整个长度。如果用string读入,用<string>的库函数find_first_of()可以直接秒。

参考题解:

#include <bits/stdc++.h>
using namespace std;
int main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int n;cin >> n;
	string s;cin >> s;
	cout << (s.find_first_of('0')!=string::npos?s.find_first_of('0')+1:n) << '\n'; 
	return 0;
}

问题 N: 打印格子

c33fb2ca68d9401cad17e973ea08c788.png 

思路:

        第一第二行都比较好写,第三行和第四行模拟一下从对应的最初位置开始到碰到边界结束即可。

参考题解:

#include <iostream>
using std::cin;
using std::cout;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	int n,x,y;cin >> n >> x >> y;
	for(int i = 1;i<=n;i++) cout << '(' << x << ',' << i << ')' << " \n"[i==n];
	for(int i = 1;i<=n;i++) cout << '(' << i << ',' << y << ')' << " \n"[i==n];
	int tmpx = x,tmpy = y;
	while(tmpx!=1&&tmpy!=1){
		--tmpx,--tmpy;
	}
	while(tmpx!=n+1&&tmpy!=n+1){
		cout << '(' << tmpx << ',' << tmpy << ')' << " \n"[tmpx==n||tmpy==n];
		++tmpx,++tmpy;
	}
	tmpx = x,tmpy = y;
	while(tmpx!=n&&tmpy!=1){
		++tmpx,--tmpy;
	}
	while(tmpx!=0&&tmpy!=n+1){
		cout << '(' << tmpx << ',' << tmpy << ')' << " \n"[tmpx==1||tmpy==n];
		--tmpx,++tmpy;
	}
	return 0;
} 

问题 P: 孜谦的双重素数

a6aec08517fd4bb0bf1347c6dc092121.png 

思路:

        1.暴力法:如果直接外层跑for循环(假设循环变量为i),内层先判断i是否为素数跑循环,再判断i的各位数之和是否为素数,那会TLE超时;正确的做法是,内层循环先判断i的各位数之和是否为素数,再去判断i是否为素数。因为i可能会很大,如果先直接判断i的素性,那么时间复杂度最坏是O(T*((R-L+1)*sqrt(R))),最坏大约是3e10的数据量,在5s内肯定处理不了。

        2.欧拉筛(也称线性筛)+前缀和预处理:用使用欧拉筛法预处理出1~3e6内所有数的素性,在遍历一遍1~3e6(假设循环遍历为i),计算出i的各位数之和,如果i和i的各位数之和都为素数,则prefix[i]=prefix[i-1]+1否则prefix[i]=prefix[i-1]。欧拉筛和前缀和的预处理的时间复杂度都为O(n),预处理的数据量为3e6左右,而处理查询的时间复杂度是O(1)。

参考题解1(暴力法):

#include <bits/stdc++.h>
using namespace std;
bool isPrime(int num){
	if(num<2) return false;
	for(int i = 2;i<=num/i;i++) if(num%i==0) return false;
	return true;
}
void solve(){
	int l,r;cin >> l >> r;
	int cnt = 0;
	for(int i = l;i<=r;i++){
		int tmp = i,sum = 0;
		while(tmp){
			sum+=tmp%10;
			tmp/=10;
		}
		if(!isPrime(sum)) continue;
		if(!isPrime(i)) continue;
		cnt++;
	}
	cout << cnt << '\n';
}
int main() {
	ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
	int T = 1;
	cin >> T;
	while(T--) solve();
	return 0;
}

参考题解2(欧拉筛+前缀和):

#include <iostream>
using std::cin;
using std::cout;
constexpr int N = 3e6+5;
int cnt,prime[N],sum[N];
int prefix[N];
bool vis[N];
void get_primes(int n){
    for(int i = 2;i<=n;i++){
        if(!vis[i]) prime[cnt++]=i;
        for(int j = 0;prime[j]<=n/i;j++){
            vis[prime[j]*i]=1;
            if(i%prime[j]==0) break;
        }
    }
}
int main(){
	std::ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
	get_primes(int(3e6));
	vis[0]=vis[1]=1;
	for(int i = 1;i<=3e6;i++){
		int t = i,tmp = 0;
		while(t){
			tmp+=t%10;
			t/=10;
		}
		sum[i]=tmp;
	}
	for(int i = 1;i<=3e6;i++){
		if(!vis[sum[i]]&&!vis[i]) prefix[i]=prefix[i-1]+1;
		else prefix[i]=prefix[i-1];
	}
	int _ = 1;cin >> _;;
	while(_--){int l,r;cin >> l >> r;cout << prefix[r]-prefix[l-1] << '\n';}
	return 0;
}

问题 Q: 矩阵的局部极大值

5b7688efe5ff44c6b9cb24fe365b4e8b.png 

思路:
        从内层矩形开始遍历判断即可,满足条件就放进vector,最后先判断vector的大小,如果为0,要特殊处理输出,否则,顺序输出结果即可(因为遍历的时候就是有序的,所以不用再排序了)。

参考题解:

#include <iostream>
#include <vector>
#pragma GCC O(2)
using std::cin;
using std::cout;
using std::pair;
using std::vector;
int main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	constexpr int N = 25;
	int g[N][N];
	int dx[] = {0,0,-1,1};
	int dy[] = {-1,1,0,0};
	vector<pair<pair<int,int>,int>> ans; 
	int n,m;cin >> n >> m;
	for(int i = 1;i<=n;i++) for(int j = 1;j<=m;j++) cin >> g[i][j];
	for(int i = 2;i<=n-1;i++){
		for(int j = 2;j<=m-1;j++){
			int flag = 1;
			for(int k = 0;k<4;k++){
				int u = i+dx[k],v = j+dy[k];
				if(g[i][j]<=g[u][v]){
					flag = 0;
					break;
				}
			}
			if(flag) ans.push_back({{i,j},g[i][j]});
		}
	}
	if(!ans.size()) cout << "None " << n << ' ' << m << '\n';
	else{
		for(auto &t:ans){
			cout << t.second << ' ' << t.first.first << ' ' << t.first.second << '\n';
		}
	}
	return 0;
}

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/579281.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

C++项目在Linux下编译动态库

一、说明 最近在Windows下开发了一个C线程池项目&#xff0c;准备移植到Linux下&#xff0c;并且编译成动态库进行使用。现将具体过程在此记录。 二、准备 1、项目文件 我的项目文件如下&#xff0c;其中除main.cpp是测试文件之外&#xff0c;其他都是线程池项目相关的 将C…

双系统下删除ubuntu

絮絮叨叨 由于我在安装Ubuntu的时候没有自定义安装位置&#xff0c;而是使用与window共存的方式让Ubuntu自己选择安装位置&#xff0c;导致卸载时我不知道去格式化哪个分区&#xff0c;查阅多方资料后无果&#xff0c;后在大佬帮助下找到解决方案 解决步骤 1、 插上Ubuntu安…

【IR 论文】DPR — 最早提出使用嵌入向量来检索文档的模型

论文&#xff1a;Dense Passage Retrieval for Open-Domain Question Answering ⭐⭐⭐⭐⭐ EMNLP 2020, Facebook Research Code: github.com/facebookresearch/DPR 文章目录 一、论文速读二、DPR 的训练2.1 正样本和负样本的选取2.2 In-batch negatives 技巧 三、实验3.1 数据…

医学影像增强:空间域方法与频域方法等

医学影像图像增强是一项关键技术,旨在改善图像质量,以便更好地进行疾病诊断和评估。增强方法通常分为两大类:空间域方法和频域方法。 一、 空间域方法 空间域方法涉及直接对医学影像的像素值进行操作,以提高图像的视觉质量。以下是一些常用的空间域方法: 对比度调整:通过…

双向链表的介绍

引入 特点 操作 定义 插入 删除 小结 整合代码&#xff1a; //定义 typedef struct node{int data;node* next,prior; }Dlnode,*Dlinklist;//初始 void init(Dlinklist &l){Dlnode lnew Dlnode;l->nextNULL;l->priorNULL; }//插入&#xff1a;插入指定位置&#…

buuctf-misc-rar

13.rar 题目&#xff1a;直接破解就可以了 这个借用工具Aparch进行4位纯数字暴力破解&#xff0c;根据题目的提示是4位的纯数字&#xff0c;那我们就选择数字的破解 在长度这里&#xff0c;把最小口令长度和最大口令长度都选择为4 获得密码后进行解压。

各省财政涉农支出统计数据集(2001-2022年)

01、数据简介 财政涉农支出是指在政府预算中&#xff0c;用于支持农业、农村和农民发展的财政支出。这些支出旨在促进农村经济的发展&#xff0c;提高农民收入&#xff0c;改善农村生产生活条件&#xff0c;推进农业现代化。 在未来的发展中&#xff0c;各省将继续加大财政涉…

【研发管理】产品经理知识体系-产品设计与开发工具

导读&#xff1a;产品设计与开发工具的重要性体现在多个方面&#xff0c;它们对于产品的成功开发、质量提升以及市场竞争力都具有至关重要的影响。产品设计工具可以帮助设计师更高效地创建和优化产品原型。开发工具在产品开发过程中发挥着至关重要的作用。产品设计与开发工具还…

这三个AI导航站,你绝对用得到!!

Hi&#xff0c;这里是前端后花园&#xff0c;专注分享前端软件网站、工具资源。不得不说AI正在慢慢改变我们学习和工作方式&#xff0c;今天带来这三个AI导航站&#xff0c;总有一个你用得到&#xff0c;记得收藏啊&#xff01; AI工具集 https://ai-bot.cn/ 网站汇集了700 …

Linux多线程(三) 线程池C++实现

一、线程池原理 我们使用线程的时候就去创建一个线程&#xff0c;这样实现起来非常简便。但如果并发的线程数量很多&#xff0c;并且每个线程都是执行一个时间很短的任务就结束了&#xff0c;这样频繁创建线程就会大大降低系统的效率&#xff0c;因为频繁创建线程和销毁线程需…

华为MRS服务使用记录

背景&#xff1a;公司的业务需求是使用华为的这一套成品来进行开发&#xff0c;使用中发现&#xff0c;这个产品跟原生的Hadoop的那一套的使用&#xff0c;还是有很大的区别的&#xff0c;现记录一下&#xff0c;避免以后忘了 一、原始代码的下载 下载地址&#xff1a;MRS样例…

STM32HAL库++ESP8266+cJSON连接阿里云物联网平台

实验使用资源&#xff1a;正点原子F1 USART1&#xff1a;PA9P、A10&#xff08;串口打印调试&#xff09; USART3&#xff1a;PB10、PB11&#xff08;WiFi模块&#xff09; DHT11&#xff1a;PG11&#xff08;采集数据、上报&#xff09; LED0、1&#xff1a;PB5、PE5&#xff…

input框添加验证(如只允许输入数字)中文输入导致显示问题的解决方案

文章目录 input框添加验证(如只允许输入数字)中文输入导致显示问题的解决方案问题描述解决办法 onCompositionStart与onCompositionEnd input框添加验证(如只允许输入数字)中文输入导致显示问题的解决方案 问题描述 测试环境&#xff1a;react antd input (react的事件与原生…

浅谈在Java代码中创建线程的多种方式

文章目录 一、Thread 类1.1 跨平台性 二、Thread 类里的常用方法三、创建线程的方法1、自定义一个类&#xff0c;继承Thread类&#xff0c;重写run方法1.1、调用 start() 方法与调用 run() 方法来创建线程&#xff0c;有什么区别&#xff1f;1.2、sleep()方法 2、自定义一个类&…

嵌入式常见存储器

阅读引言&#xff1a; 在看一款芯片的数据手册的时候&#xff0c; 无意间翻到了它的启动模式(Boot Mode), 发现这种这么多种ROM&#xff0c;所以就写下了这篇文章。 目录 一、存储器汇总 二、易失性存储器(RAM) 1. SRAM 1.1 单口SRAM 1.2 双口SRAM 2. DRAM 2.1 SDRAM 2…

Fast-DetectGPT 无需训练的快速文本检测

本文提出了一种新的文本检测方法 ——Fast-DetectGPT&#xff0c;无需训练&#xff0c;直接使用开源小语言模型检测各种大语言模型&#xff0c;如GPT等生成的文本内容。 Fast-DetectGPT 将检测速度提高了 340 倍&#xff0c;将检测准确率相对提升了 75%&#xff0c;超过商用系…

有哪些好用电脑端时间定时软件?桌面日程安排软件推荐 桌面备忘录

随着现代生活节奏的加快&#xff0c;人们对于时间管理和任务提醒的需求越来越大。为了满足这一需求&#xff0c;市场上涌现出了众多桌面便签备忘录软件&#xff0c;它们不仅可以帮助我们记录待办事项&#xff0c;还能定时提醒我们完成任务。在这篇文章中&#xff0c;我将为大家…

计算机研究生如何在顶级会议了解行业方向

以为例子论文可视化 |WACV 2022 年 (thecvf.com)https://wacv2022.thecvf.com/papers-visualizations?filterprimary_subject_area&search3DComputerVision 这些图表适用于IEEE/CVF 计算机视觉冬季会议 (WACV) 2022。顶部图表是根据彼此相似性分布的会议主要会议论文的可…

微电子领域材料生长方法(六)液相外延(LPE)

微电子领域材料生长方法&#xff08;六&#xff09;液相外延&#xff08;LPE&#xff09; 液相外延&#xff08;Liquid Phase Epitaxy, LPE&#xff09;是一种用于生长单晶薄膜的技术&#xff0c;特别是在半导体材料的制备中。LPE技术允许在较低的温度下从熔体中生长出高质量的…

Visual 下载 NuGet包速度变慢

Visual 下载 NuGet包速度变慢 最近遇到一个问题&#xff0c;即我在使用 Visual Studio 下载 Nuget 包的时候会发现变得特别慢&#xff0c;那么该如何解决该问题呢 Visual Studio → 工具 → NuGet 包管理项 → 程序包管理设置 → 程序包源 从上面我们可以看到我使用的包源地址…
最新文章