蓝桥备赛(六)- C/C++输入输出

news2025/4/14 6:11:17

一、OJ题目输入情况汇总

OJ(online judge)

接下来会有例题 , 根据一下题目 , 对这些情况进行分析

1.1 单组测试用例

单在 --> 程序运行一次 , 就处理一组

练习一:计算 (a+b)/c 的值

B2009 计算 (a+b)/c 的值 - 洛谷

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int a,b,c;
	cin >> a >> b >> c;
	cout << (a+b)/c << endl;
	return 0;
}

练习二:与 7 无关的数

B2081 与 7 无关的数 - 洛谷

这题也是多个测试点 , 但是运行一次 , 仅仅处理一组数据!

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int i = 1 ;
	int sum = 0;
	while(i <= n)
	{
		if(i % 7 != 0 && i % 10 != 7 && i / 10 % 10 != 7)
			sum += (i*i);
		i++; 
	}
	cout << sum << endl;
	return 0;
}

1.2 多组测试用例

多组 : 程序运行一次 , 处理多组 。就像我们前面做的题目 , n次访问。

测试数据组数已知:

练习一:多组输入 a+b||

登录—专业IT笔试面试备考平台_牛客网

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int a,b;
	while(n--)
	{
		cin >> a >> b;
		cout << a + b << endl;
	}
	return 0;
}

练习二:斐波那契数列

B2064 斐波那契数列 - 洛谷

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int a = 0;
	int ret[40] = {0,1,1};
	for(int i = 3; i<30; i++)
	{
		ret[i] = ret[i-1] + ret[i-2];
	}
	while(n--)
	{
		cin >> a;
		cout<< ret[a] << endl;
	}
	return 0;
}

练习三:制糊串

B3769 [语言月赛202305] 制糊串 - 洛谷

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

int main()
{
	string s,t;
	cin >> s >> t;
	int q = 0;
    cin >> q;
	int l1,r1,l2,r2;
	while(q--)
	{
		cin >> l1 >> r1 >> l2 >> r2;
		string s1 = s.substr(l1 -1 , r1 - l1 + 1); 
		string s2 = t.substr(l2 -1 , r2 - l2 + 1); 
		//比较
		if(s1 > s2) 
			cout << "erfusuer" <<endl;
		else if(s1 < s2)
			cout << "yifusuyi" << endl;
		else
			cout << "ovo" << endl;
	}
	return 0;
}

题目中说“有q次询问” , 意思是程序要处理q组数据 , (也就是对应q次循环) , 需要针对每一次的访问 , 给出一个结果。

就是之前的单组测试 变成了 q 组测试 , 在之前代码加上while 循环即可 。当进行q次访问的时候 , 使用while(q--) , 是非常方便的 !!!

测试数据组数未知:

练习一:多组输入a+b

登录—专业IT笔试面试备考平台_牛客网

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

int main()
{
	int a , b;
	while(cin >> a >> b)
	{
		cout << a + b << endl;
	}
	return 0;
}

这道题的难点就是 , 怎么去判断读取结束呢?

1 . cin >> a ; 会返回一个流对象的引用 , 即cin本身  在C++中 , 流对象可以被用作布尔值来检查流的状态。流的状态良好 --> true ;                                                                                                            发生错误(如遇到输入结束符或类型不匹配) -->false 

2. 所以在while(cin >> a >> b) 语句中 , 流成功读取两个值 , 返回流对象cin 被转化为 true,循环继续 。如果读取失败 , 返回false , 循环停止 。

练习二:数字三角形

登录—专业IT笔试面试备考平台_牛客网

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

int main()
{
	int n;
	while(cin >> n)
	{
		for(int i = 1;i <= n;i++)
		{
			for(int j = 1;j <=i ; j++)
			{
				cout << j << " ";
			}
			cout << endl;
		}
	}
	return 0;
}

练习三:定位查找

登录—专业IT笔试面试备考平台_牛客网

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

const int N = 25;
int arr[N];
int main()
{
	int n = 0;
	int m = 0;
	int i = 0;
	while(cin >> n)
	{
		//输入n组数据,存储在数组arr 
		for( i = 0;i < n;i++)
		{
			cin >> arr[i];
		}
		//处理数据
		cin >> m;
		for( i = 0;i < n;i++)
		{
			if(arr[i] == m)
			{
				cout << i << endl;
				break;//找到第一个,直接结束这组数据查找	
			}	
		} 
		//走到这里,没有找到m
		//如果不加i==n,那么无论什么情况都会打印No 
		if(i == n)
			cout << "No" << endl; 
	}	
	return 0;
}

注意 , 打印No的时候 , 需要条件 , 否则无论是否找到 , 都会打印No;

方法二 : 用一个flag ,记录是否找到

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

const int N = 25;
int arr[N];
int main()
{
	int n = 0;
	int m = 0;
	while(cin >> n)
	{
		int flag = 0; 
		//输入n组数据,存储在数组arr 
		for(int i = 0;i < n;i++)
		{
			cin >> arr[i];
		}
		//处理数据
		cin >> m;
		for(int i = 0;i < n;i++)
		{
			if(arr[i] == m)
			{
				cout << i << endl;
				flag = 1;
				break;//找到第一个,直接结束这组数据查找	
			}	
		} 
		//走到这里,没有找到m
		if(flag == 0)
			cout << "No" << endl; 
	}	
	return 0;
}

注意 : 这里的flag 需要放在while 循环体内  否则 , 一次循环结束 , flag 将不会被重置为0

特殊值结束测试数据:

练习一:字符统计

登录—专业IT笔试面试备考平台_牛客网

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

//方法一
int main()
{
	int ch;
	int Letters = 0;
	int Digits = 0;
	int Others = 0;
	while((ch = getchar()) != '?')
	{
		if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
			Letters++;
		else if(ch >= '0' && ch <= '9') 
			Digits++;
		else
			Others++;
	}
	cout << "Letters=" << Letters << endl;
	cout << "Digits=" << Digits << endl;
	cout << "Others=" << Others << endl;
	return 0;
 } 

灵活运用库函数 ---> isalpha 、 isdigit

记得加上头文件 <cctype> 

#include <iostream>
#include <cstdio>
#include <string>
#include <cctype>
using namespace std;

//方法二 -- 借助库函数isalpha、isdigit 
int main() 
{
	int ch;
	int Letters = 0;
	int Digits = 0;
	int Others = 0;
	while((ch = getchar()) != '?')
	{
		if(isalpha(ch))
			Letters++;
		else if(isdigit(ch)) 
			Digits++;
		else
			Others++;
	}
	cout << "Letters=" << Letters << endl;
	cout << "Digits=" << Digits << endl;
	cout << "Others=" << Others << endl;
	return 0;
 } 

方法三:直接输入整个字符 , 但问号不需要统计 , 那么可以借助  pop_back() , 来删掉问好

#include <iostream>
#include <cstdio>
#include <string>
#include <cctype>
using namespace std;

//方法三 
int main() 
{
	string s;
	int Letters = 0;
	int Digits = 0;
	int Others = 0;
	getline(cin,s);
	
	//此字符串是以?结束的,不想统计?
	s.pop_back() ; 
	 
	for(auto e:s)
	{	
		if(isalpha(e))
			Letters++;
		else if(isdigit(e)) 
			Digits++;
		else
			Others++;
	}
	cout << "Letters=" << Letters << endl;
	cout << "Digits=" << Digits << endl;
	cout << "Others=" << Others << endl;
	return 0;
 } 

练习二:多组数据a+b III

登录—专业IT笔试面试备考平台_牛客网

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

int main()
{
	int a,b;
	while(cin >> a >> b)
	{
		if(a==0 && b==0)
			break;
		cout << a+b << endl; 
	}
	return 0;
}

方法二:借助逗号表达式 

1) 从左到右依次计计算

2)整个表达式的结果是  最后一个表达式的结果

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;

int main()
{
	int a,b;
	while(cin >> a >> b,a&&b)
	{
		cout << a+b << endl; 
	}
	return 0;
}

 以下是逗号表达式的举例讲解 :

二、输入中的特殊技巧

2.1 技巧1:含空格字符串的特殊处理方式

根据我们已经所学的知识 , 处理含有空格的字符串 可以使用 : fgets , scanf , getchar , getline 。具体使用需要据题目分析 ,有时候只是为了读取单词 , 忽略空格 。 

练习:统计数字字符个数

B2109 统计数字字符个数 - 洛谷

方法一:一次性处理整个字符串 ;然后再遍历字符串 , 如果是数字 , 就用计数器统计出来。

#include <iostream>
#include <cstdio>
#include <string>
#include <cctype>
using namespace std;

//方法一:一次性处理整个字符串 
int main()
{
	string s;
	int c = 0;
	getline(cin,s);
	for(auto e:s)
	{
		if(isdigit(e))
			c++;
	}
	cout << c << endl;
	return 0;
}

方法二 : 逐个字母处理

1 . cin 读取字符串的时候 , 遇到空格就会停止 ;借助这一个特点 , 在while (cin >> s ) 中 , 整个字符串如果遇到空格就会跳过 , 继续处理下一个单词 。 

2 . 当cin 读取失败后 , 返回false , while 循环结束

#include <iostream>
#include <cstdio>
#include <string>
#include <cctype>
using namespace std;

//方法二:逐个单词处理 
int main()
{
	int c = 0;
	string s;
	//cin 读取字符串的时候,不会读取空格
	//遇到空格就停止
	//运用cin的特性,while这里遇到空格就会跳过 
	while(cin >> s)
	{
		for(auto e:s)
		{
			if(isdigit(e))
				c++;
		}
	}
	cout << c << endl;
	return 0;
}

2.2 技巧2:数字的特殊处理

当我们程序运行的时候 , 在控制台输入 123 的时候 , 这时候的 123 是3个字符,123是一个字符序列 , 程序会根据代码中的数据类型 , 可能将123解析成整型 , 也可能将123 解析成字符串 。

练习:小乐乐改数字

小乐乐改数字_牛客题霸_牛客网

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	
	int ret = 0;
	int i = 0;//记录处理到多少位
	while(n)
	{
		if(n % 10 % 2 != 0)
			ret += pow(10,i);
		n /= 10;
		i++;
	}
	cout << ret << endl;
} 

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;

int main()
{
	string s;
	cin >> s;
	for(int i = 0; i < s.size() ;i++)
	{
		if(s[i] % 2 == 0)
		{
			s[i] = '0';	
		}	
		else
			s[i] = '1';
	} 
	cout << stoi(s) << endl;
	return 0;
}

三、scanf/printf  和 cin/cout 的区别

scanf 和 printf 是C语言中标准输入输出函数 而 cin 和 cout 是 C++语言中的标准输入输出流对象 。各自有优缺点 , 整体上来说 , cin 和 cout 会更加方便 ; 但是有时候不得不使用scanf 和 printf !!!

3.1 使用上的差异

1 ) scanf 和 printf 不能自动识别输入数据的类型 , 需要手动指定格式字符串 , 容易出现格式错误 。使用时候 需要确保 格式字符串和变量类型匹配 , 否则会出现未定义行为。

2 )cin 和 cout 会根据变量类型自动处理输入输出 , 避免格式化错误 。 相对scanf 和 printf,C++ 会更加易用。

3 ) scanf 和 printf : 格式化输出更加精确直观 , 非常适合复杂格式的输入输出 , 比如需要特定的格式化输出的时候 。

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	float a = 3.50;
	double d = 16.50;

	cout << "cout: " <<a << " "<< d <<endl;
	printf("printf: %f %lf\n", a, d);
	return 0;
}

3.2 性能差异

案例演示

结论 : scanf 和 printf 通常比cin 和 cout 快

案例一:数字游戏

使用cin / cout :

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;

int t, x;
int main()
{
 	cin >> t;
 	while (t--)
 	{
 		cin >> x;
 		int ret = 0;
	 	while (x)
 		{
 			int count = 0, high = 0;
			int tmp = x;
				while (tmp)
			 	{
			 	//计算最右边的1代表的值
					 int low = tmp & -tmp;
					 //如果low中剩余的1就是最后一个1
					 //就是最左边的1
					 if (tmp == low)
			 			{
							 high = low;
		 				}
					 //去掉最右边的1
					 tmp -= low;
					 count++;
		 		}
			 if (count % 2 == 0)
			 {
				 x -= high;
			 }
			 else
			 {
			 x ^= 1;
			 }
 		ret++;
 		}
 	cout << ret << endl;
 	}
 	return 0;
}

 使用scanf / printf :

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;

int t, x;
int main()
{
 	scanf("%d", &t);
 	while (t--)
 	{
 		scanf("%d", &x);
 		int ret = 0;
	 	while (x)
 		{
 			int count = 0, high = 0;
			int tmp = x;
				while (tmp)
			 	{
			 	//计算最右边的1代表的值
					 int low = tmp & -tmp;
					 //如果low中剩余的1就是最后一个1
					 //就是最左边的1
					 if (tmp == low)
			 			{
							 high = low;
		 				}
					 //去掉最右边的1
					 tmp -= low;
					 count++;
		 		}
			 if (count % 2 == 0)
			 {
				 x -= high;
			 }
			 else
			 {
			 x ^= 1;
			 }
 		ret++;
 		}
 	printf("%d\n", ret);
 	}
 	return 0;
}

 案例二:求第 k 小的数

P1923 【深基9.例4】求第 k 小的数 - 洛谷

使用cin / cout : 

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;

const int N = 5000010;
int arr[N];
int main()
{
	 int n, k;
	 cin >> n >> k;
	 for (int i = 0; i < n; i++)
	 {
	 	cin >> arr[i];
	 }
	sort(arr, arr + n);
	cout << arr[k] << endl;
	return 0;
}

 使用scanf / printf :

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;

const int N = 5000010;
int arr[N];
int main()
{
	 int n, k;
	 cin >> n >> k;
	 for (int i = 0; i < n; i++)
	 {
	 	scanf("%d", &arr[i]);
	 }
	sort(arr, arr + n);
	cout << arr[k] << endl;
	return 0;
}

 上面两个案例中,输入的数据量都比较大,在输入数据的时候如果使用 cin ,都会出现超时的问题,但是换成是 scanf 的方式就能正确的通过。这就是因为两者性能上的差异导致的。

优化方式:

ios::sync_with_stdio(false); // 取消C风格I/O的同步

cin.tie(0); // 解除cin与cout的绑定

总结一下其实就是两个点:

1. C++中为了支持混合使用 cin/cout scanf/printf C++ 标准库默认会将 cin 、 cout

等 C++ 流对象与 stdin 、 stdout 等 C 标准库的流对象同步在⼀起。 这种同步操作意味着次
使⽤ cin cout 时,都会自动刷新 C 标准库的缓冲区,以确保 C++ 和 C 的 I/O 是一致的。这就导致了性能的下降。
2. 在默认情况下, cin cout 之间存在⼀种绑定关系。这种绑定意味着,每当从 cin 读取数据时 ,任何之前通过 cout 输出的内容都会被强制刷新到屏幕上。 这种绑定也可能导致性能问题,特别是在需要频繁读取⼤量数据的情况下。

 所以,对于数据量较大 , 使用scanf / printf 。

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

企微审批中MySQL字段TEXT类型被截断的排查与修复实践

在MySQL中&#xff0c;TEXT类型字段常用于存储较大的文本数据&#xff0c;但在一些应用场景中&#xff0c;当文本内容较大时&#xff0c;TEXT类型字段可能无法满足需求&#xff0c;导致数据截断或插入失败。为了避免这种问题&#xff0c;了解不同文本类型&#xff08;如TEXT、M…

[ISP] AE 自动曝光

相机通过不同曝光参数&#xff08;档位快门时间 x 感光度 x 光圈大小&#xff09;控制进光量来完成恰当的曝光。 自动曝光流程大概分为三部分&#xff1a; 1. 测光&#xff1a;点测光、中心测光、全局测光等&#xff1b;通过调整曝光档位使sensor曝光在合理的阈值内&#xff0…

小程序画带圆角的圆形进度条

老的API <canvas id"{{canvasId}}" canvas-id"{{canvasId}}" style"opacity: 0;" class"canvas"/> startDraw() {const { canvasId } this.dataconst query this.createSelectorQuery()query.select(#${canvasId}).bounding…

16. LangChain实战项目2——易速鲜花内部问答系统

需求简介 易束鲜花企业内部知识库如下&#xff1a; 本实战项目设计一个内部问答系统&#xff0c;基于这些内部知识&#xff0c;回答内部员工的提问。 在前面课程的基础上&#xff0c;需要安装的依赖包如下&#xff1a; pip install docx2txt pip install qdrant-client pip i…

FPGA开发,使用Deepseek V3还是R1(8):FPGA的全流程(简略版)

以下都是Deepseek生成的答案 FPGA开发&#xff0c;使用Deepseek V3还是R1&#xff08;1&#xff09;&#xff1a;应用场景 FPGA开发&#xff0c;使用Deepseek V3还是R1&#xff08;2&#xff09;&#xff1a;V3和R1的区别 FPGA开发&#xff0c;使用Deepseek V3还是R1&#x…

微服务学习(1):RabbitMQ的安装与简单应用

目录 RabbitMQ是什么 为什么要使用RabbitMQ RabbitMQ的安装 RabbitMQ架构及其对应概念 队列的主要作用 交换机的主要作用 RabbitMQ的应用 通过控制面板操作&#xff08;实现收发消息&#xff09; RabbitMQ是什么 RabbitMQ是一个开源的消息队列软件&#xff08;消息代理…

Starrocks入门(二)

1、背景&#xff1a;考虑到Starrocks入门这篇文章&#xff0c;安装的是3.0.1版本的SR&#xff0c;参考&#xff1a;Starrocks入门-CSDN博客 但是官网的文档&#xff0c;没有对应3.0.x版本的资料&#xff0c;却有3.2或者3.3或者3.4或者3.1或者2.5版本的资料&#xff0c;不要用较…

【北京迅为】itop-3568 开发板openharmony鸿蒙烧写及测试-第1章 体验OpenHarmony—烧写镜像

瑞芯微RK3568芯片是一款定位中高端的通用型SOC&#xff0c;采用22nm制程工艺&#xff0c;搭载一颗四核Cortex-A55处理器和Mali G52 2EE 图形处理器。RK3568 支持4K 解码和 1080P 编码&#xff0c;支持SATA/PCIE/USB3.0 外围接口。RK3568内置独立NPU&#xff0c;可用于轻量级人工…

Electron一小时快速上手

1. 什么是 Electron? Electron 是一个跨平台桌面应用开发框架&#xff0c;开发者可以使用 HTML、CSS、JavaScript 等 Web 技术来构建桌面应用程序。它的本质是结合了 Chromium 和 Node.js&#xff0c;现在广泛用于桌面应用程序开发。例如&#xff0c;以下桌面应用都使用了 El…

算法004——盛最多水的容器

力扣——盛最多水的容器点击即可跳转 当我们选择1号线和8号线时&#xff0c;下标为 1 和 8 形成容器的容积的高度是由 较矮的决定的&#xff0c;即下标为 8 的位置&#xff1b; 而宽度则是 1到8 之间的距离&#xff0c;为 8-17&#xff0c;此时容器的容积为 7 * 7 49。 当我…

Java Web-Filter

Filter 在 Java Web 开发中&#xff0c;Filter&#xff08;过滤器&#xff09;是 Servlet 规范中的一个重要组件&#xff0c;它可以对客户端与服务器之间的请求和响应进行预处理和后处理。以下从多个方面详细介绍 Java Web 中的 Filter&#xff1a; 一、概念和作用 概念&…

DeepSeek-R1训练时采用的GRPO算法数学原理及算法过程浅析

先来简单看下PPO和GRPO的区别&#xff1a; PPO&#xff1a;通过奖励和一个“评判者”模型&#xff08;critic 模型&#xff09;评估每个行为的“好坏”&#xff08;价值&#xff09;&#xff0c;然后小步调整策略&#xff0c;确保改进稳定。 GRPO&#xff1a;通过让模型自己生…

七星棋牌 6 端 200 子游戏全开源修复版源码(乐豆 + 防沉迷 + 比赛场 + 控制)

七星棋牌源码 是一款运营级的棋牌产品&#xff0c;覆盖 湖南、湖北、山西、江苏、贵州 等 6 大省区&#xff0c;支持 安卓、iOS 双端&#xff0c;并且 全开源。这个版本是 修复优化后的二开版本&#xff0c;新增了 乐豆系统、比赛场模式、防沉迷机制、AI 智能控制 等功能&#…

CSDN博客导出设置介绍

在CSDN编辑博客时&#xff0c;如果想导出保存到本地&#xff0c;可以选择导出为Markdown或者HTML格式。其中导出为HTML时有这几种选项&#xff1a;jekyll site&#xff0c;plain html&#xff0c;plain text&#xff0c;styled html&#xff0c;styled html with toc。分别是什…

音视频-WAV格式

1. WAV格式说明&#xff1a; 2. 格式说明&#xff1a; chunkId&#xff1a;通常是 “RIFF” 四个字节&#xff0c;用于标识文件类型。&#xff08;wav文件格式表示&#xff09;chunkSize&#xff1a;表示整个文件除了chunkId和chunkSize这 8 个字节外的其余部分的大小。Forma…

apload-lab打靶场

1.提示显示所以关闭js 上传<?php phpinfo(); ?>的png形式 抓包&#xff0c;将png改为php 然后放包上传成功 2.提示说检查数据类型 抓包 将数据类型改成 image/jpeg 上传成功 3.提示 可以用phtml&#xff0c;php5&#xff0c;php3 4.先上传.htaccess文件&#xff0…

sentinel详细使用教学

sentinel源码地址&#xff1a; https://github.com/alibaba/Sentinel/wiki/%E4%BB%8B%E7%BB%8D sentinel官方文档&#xff1a; https://sentinelguard.io/zh-cn/docs/introduction.html Sprong Cloud alibaba Sentinel文档【小例子】 : https://github.com/alibaba/spring-cl…

python django

官网地址 https://www.djangoproject.com/ 安装 控制台输入命令 pip install django 或者可以指定版本号 pip install django3.2.4 创建项目 在控制台找个目录存放生成好的项目&#xff0c;输入命令 django-admin startproject demo_django 然后用pycharm打开项目可以…

SuperMap iClient3D for WebGL 影像数据可视范围控制

在共享同一影像底图的服务场景中&#xff0c;如何基于用户权限体系实现差异化的数据可视范围控制&#xff1f;SuperMap iClient3D for WebGL提供了自定义区域影像裁剪的方法。让我们一起看看吧&#xff01; 一、数据制作 对于上述视频中的地图制作&#xff0c;此处不做讲述&am…

OpenHarmony4.1-轻量与小型系统ubuntu开发环境

因OpenHarmony官网提供包含轻量、小型与标准系统的全量代码非常宠大&#xff0c;解包后大概需要70G以上硬盘空间&#xff0c;如要编译标准系统则需要140G以上空间。 如硬盘空间有限与只使用轻量/小型OpenHarmony系统&#xff0c;则可以下载并直接使用本人裁剪源码过的ubuntu硬盘…