PAT乙级 部分题目解答(仅是记录自己的学习过程,有错误欢迎指正)

PAT刷题笔记——基础编程题目集 6-3 简单求和 错误代码 int Sum ( int List[], int N ){ for(int i=0;i<N;i++){ int Sum=0; Sum=Sum+List[i]; } return Sum; } 正确答案 int Sum ( int List[], int N ){ int Sum=0; for(int i=0;i<N;i++){ Sum=Sum+List[i]; } return 阅读详情

 (本次包括所有15分值的题目与个别20分的题目,仅为记录自己的代码方便翻看。当让如果能帮助到你最好了。)

刷题要先有自己的想法与实现,然后debug,还是有通不过的测试用例则可以查看其他同学的实现,是个很好的过程。

加油。

 

#include<iostream>
#include<string.h>
#include<stdio.h>
using namespace std;

int main(){
	char str[81];
	gets(str); //gets() 可以读取空格,但是不会接受换行符;
                   //getline()可以接受换行符,所以getline()之后还需要getchar()来吸收\n 
	int i = 0;
	for(i=strlen(str); i>0; --i){
		if(str[i] == ' '){
			printf("%s ",&str[i+1]);//读取i处空格后的整个单词字符串 
			str[i] = '\0';//讲空格处改为\0,这样之后的字符串输出才能在空格处结束 
		}
	} 
	printf("%s",&str[i]);//以字符串的格式输出,从str[i]的地址开始直到遇到\0 
	return 0;
}

 

#include<iostream>

using namespace std;

int main(){
	int M;
	cin >> M;
	int a;
	for(int i=0; i<M; ++i)
	{
		cin >> a;
		int flag;
		for(int N=1; N<10; ++N)
		{
			flag = 1;
			int rst = N * a * a;
			//cout << rst << endl;
			int t1 = rst;
			int t2 = a;
			while(t2){
				
				int r1 = t2%10;
				int r2 = t1%10;
				if(r1 != r2){
					flag = 0;
				}
				t2 /= 10;
				t1 /= 10; 
			}
			if(flag == 1){
				cout << N << " " << rst << endl;
				break;
			}
		}
		if(flag == 0) {
				cout << "No" << endl;
			}
	}
	return 0;
}

#include<iostream>

using namespace std;

int main(){
	int A,B;
	cin >> A >> B;
	int R = A * B;
	if(R==0){
		cout << "0";
	}
	int flag = 0; 
	int tmp = 0;
	while(R!=0)//容易忽略的情况,当第一个0出现时不输出,
                   //但是输出第一个不为零的数后,之后的零就必须输出 
	{
		tmp = R % 10;
		if((tmp != 0) && (flag == 0)){
			cout << tmp;
			flag = 1;
		}
		else if(flag == 1){
			cout << tmp;
		}
		R = R / 10;
	}
	cout << endl;
	return 0;
}

#include<iostream>
#include<string.h> 
#include<cctype>
//#include<string>

using namespace std;

/*分析:非空字符串,每个字符串以回车结束,但是
        字符串里面可能会有空格,所以不能直接用cin,
		要用getline接收一行字符。在接收完n后要getchar()
		读取一下换行符才能用getline,否则换行符会被读进getline中
*/
int main()
{
	int N;
	//string str[101];
	cin >> N;
	getchar();
	for(int i=0; i<N; ++i){
		string str;
		int flag_n = 0, flag_c = 0, flag_oth = 0;
		//cin >> str;
		//int len = 0;
		//const string temp = str[i];
		
		getline(cin,str);
		int len = str.length();
		if(len < 6){
			cout << "Your password is tai duan le." << endl;
			continue;
		}
		for(int j=0; j<len; ++j)
		{
			if(isdigit(str[j])){
				flag_n = 1;
			}
			else if((str[j]<='z') && (str[j]>='A')){
				flag_c = 1;
			}
			else if(str[j]!='.' && !isalnum(str[j])){
				flag_oth = 1;
			}
		}
		//cout << flag_n << flag_c << flag_oth << endl;
		if(flag_oth == 1){
			cout << "Your password is tai luan le." << endl;
		}
		else if(flag_n == 0){
			cout << "Your password needs shu zi." << endl;
		}
		else if(flag_c == 0){
			cout << "Your password needs zi mu." << endl;
		}
		else{
			cout << "Your password is wan mei." << endl;
		}
	} 
	return 0;
}

#include<iostream>
#include<string.h>
//#include<stdlib.h>
using namespace std;

int main(){
	int N;
	cin >> N;
	char a,b; 
	for(int i=0; i<N; ++i)
	{
		for(int j=0; j<4; ++j)
		{
			scanf("%c-%c ",&a,&b);
			if(a=='A' && b=='T'){
				cout << "1";
			}
			else if (a=='B' && b=='T'){
				cout << "2";
			}
			else if(a=='C' && b=='T'){
				cout << "3";
			}
			else if(a=='D' && b=='T'){
				cout << "4";
			}
			
		}
		
		
		
		/* 
		string str[4] = {0};
		
		for(int j=0; j<8; ++j)
		{
			cin >> str[j];
			if(strcmp("A-T",str[j])){
				cout << "1";
			}
			else if(strcmp("B-T",str[j])){
				cout << "2";
			}
			else if(strcmp("C-T",str[j])){
				cout << "3";
			}
			else if(strcmp("D-T",str[j])){
				cout << "4";
			}
		}*/ 
	/*	char str[15];
		cin >> str;
		printf("%c,%c,%c,%c",str[2],str[6],str[10],str[14]);
		//cout << str[2] << str[6] << str[10] << str[14] << endl;
		if(str[2] == 'T'){
			cout << "1";
		}
		else if(str[6] == 'T'){
			cout << "2";
		}
		else if(str[10] == 'T'){
			cout << "3";
		}
		else if(str[14] == 'T'){
			cout << "4"; 
		}*/
	}
	cout << endl;
	
	//system("pause");
	return 0;
}

#include<iostream>

using namespace std;

int main()
{
	int T,K;
	cin >> T >> K;
	//cout << K << endl;
	for(int i=0; i<K; ++i)
	{
		int n1,b,t,n2;
		cin >> n1 >> b >> t >> n2;
		if(T < t){
			cout << "Not enough tokens.  Total = " << T << "." << endl;
		}
		else if(b==1 && n2>n1){
			T += t;
			cout << "Win " << t << "!  " << "Total = " << T << "." << endl; 
		}
		else if(b==0 && n2<n1){
			T += t;
			cout << "Win " << t << "!  " << "Total = " << T << "." << endl; 
		}
		else{
		   	  T -= t;
			  if(T == 0){
			   cout << "Lose " << t << ".  " << "Total = " << T << "." << endl;	
			   cout << "Game Over." << endl; 
			   return 0;
			  }
			  else{
			  	cout << "Lose " << t << ".  " << "Total = " << T << "." << endl;
			  }
			
		}
	}
	return 0;
} 

#include<iostream>

using namespace std;

int main()
{
	int M,N,A,B,rp;
	int pht[501][501];
	cin >> M >> N >> A >> B >> rp;
	for(int i=0; i<M; ++i)
	{
		for(int j=0; j<N; ++j)
		{
			cin >> pht[i][j];
			if((pht[i][j]>=A) && (pht[i][j]<=B)){
				pht[i][j] = rp;
			}
		}
	}
	int i,j;
	for(i=0; i<M; ++i)
	{
		for (j=0; j<N-1; ++j){
			printf("%03d ",pht[i][j]);
		}
		printf("%03d\n",pht[i][j]);
	}
	return 0;
}

#include<iostream>

using namespace std;

int main(){
	
	int N,M;
	cin >> N >> M;
	int wth[101];
	int ans[101];
	int qust[101][101];
	for(int i=0; i<M; ++i)
	{
		cin >> wth[i];
	} 
	for(int i=0; i<M; ++i)
	{
		cin >> ans[i];
	} 
	for(int i=0; i<N; i++)
	{
		for(int j=0; j<M; ++j)
	    {
			cin >> qust[i][j];
  	   	}
		int sum = 0;
		for(int k=0; k<M; ++k){
			if(qust[i][k]==ans[k]){
				sum += wth[k];
			}
		} 
		cout << sum << endl;
	}
	return 0;
}

#include<iostream>

using namespace std;

int main(){
	int N;
	int a[10];
	cin >> N;
	for(int i=0; i<N; ++i)
	{
		cin >> a[i];
	}
	int sum = 0;
	for(int i=0; i<N; ++i)
	{
		for(int j=0; j<N; ++j)
		{
			if(i!=j){
				sum += ((a[i]*10)+a[j]);
			}
		}
	}
	cout << sum << endl;
	
	return 0;
}

#include<iostream>
#include<math.h>
using namespace std;

/* From CSDN Hunter
 * 1. C语言有三角函数库,位于 <math.h>
 * 2. C语言的格式化输出保留小数,默认四舍五入,在接近0的负数四舍五入之后不输出0.00,而是-0.00。
 */

int main()
{
	double R1,P1,R2,P2;
	cin >> R1 >> P1 >> R2 >> P2;
	double A1,B1,A2,B2;
	A1 = R1 * cos(P1);
	B1 = R1 * sin(P1);
	A2 = R2 * cos(P2);
	B2 = R2 * sin(P2);
	double A = (A1*A2) - (B1*B2);
	double B = (B1*A2) + (A1*B2);
	if(A<0 && A>-0.005){
		A = 0.00;
	}
	if(B<0 && B>-0.005){
		B = 0.00;
	}
	
	printf("%.2f%+.2fi\n",A,B);
                // %+:有符号,值若>=0,在值前显示加号;若为负,则在值前显示负号
	
	/*if(B<0 && A!=0){
		B = -B;
		printf("%.2f-%.2fi\n",A,B);
	}
	else if(B<0 && A==0){
		B = -B;
		printf("-%.2fi\n",B);
	}
	else if(B==0){
		printf("%f.2\n",A);
	}
	else if (A==0 && B>0){
		printf("%f.2i\n",B);
	}
	else{
		printf("%f.2+%f.2i\n",A,B);
	}*/
	return 0;
} 

#include<iostream>

using namespace std;

int main(){
	
	int N;
	cin >> N;
	int A[101][4];
	int J=0, Y=0;
	for(int i=0; i<N; ++i)
	{
		cin >> A[i][0] >> A[i][1] >> A[i][2] >> A[i][3]; 
		int R = A[i][0] + A[i][2];
		if(R==A[i][1] && R!=A[i][3]){
			++Y;
		}
		else if(R!=A[i][1] && R==A[i][3]){
			++J;
		}
	}
	
	cout << J << " " << Y << endl;
	return 0;
}

#include<iostream>

using namespace std;

typedef struct student
{
	string num;
	int t;
	int r;
}student;

int main(){
	int N;
	cin >> N;
	student str[1001];
	for(int i=0; i<N; ++i)
	{
		cin >> str[i].num >> str[i].t >> str[i].r;
	}
	int M;
	int a[1001];
	cin >> M;
	for(int i=0; i<M; i++)
	{
		cin >> a[i];
	}
	for(int i=0; i<M; ++i)
	{
		for(int j=0; j<N; ++j)
		{
			if(a[i]==(str[j].t)){
				cout << str[j].num << " " << str[j].r<< endl;
			}
		}
	}
		
	return 0;
} 

#include<iostream>

using namespace std;

int main(){
	float n;
	char c;
	int h = 0;
	cin >> n >> c;
	if(n<3 || n>20){
		cout << "input error" << endl;
		return -1;
	}
	int t = (n / 2)*100;
	if((t%100)>=50){
		h = (int)(n/2)+1-2;
	}
	else{
		h = (int)n/2 - 2;
	}
	
	for(int i=0; i<n; ++i){
		cout << c;
	}
	cout << endl;
	for(int i=0; i<h; ++i){
		cout << c;
		for(int j=1; j<(n-1); ++j){
			cout << " ";
		}
		cout << c << endl;
	}
	for(int i=0; i<n; ++i){
		cout << c;
	}
	//cout << endl;
	return 0;
}

#include<iostream>

using namespace std;

int main(){
	int n;
	const int a[]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
	const char M[]={'1','0','X','9','8','7','6','5','4','3','2'};
	cin >> n;
	int num = 0;
	for(int i=0; i<n; i++){
		char str[19];
		cin >> str;
		int sum = 0;
		int flag = 0;
		for(int j=0; j<17; ++j){
			int t = str[j]-'0';
			if(t>9 || t<0){
				flag = 1;
				num++;
				break;
			}
			else{
				sum += (t * a[j]);
			}
		}
		int Z = sum % 11;
		int temp = str[17]-'0';
		int comp = M[Z]-'0';
		if(flag ==1 || temp != comp){
			cout << str << endl;
			num++;
		}	
	}
	if(num==0){
		cout << "All passed" << endl;
	}
	return 0;
} 

 

#include<iostream>

using namespace std;

int main()
{
	int a,b,n;
	cin >> a >> b;
	int t = b-a;
	if(t<=0){
		cout << "error" << endl;
		return -1;
	}
	if(t%100 >= 50) 
 	 {
	   	n = t /100 + 1;
 	 }
	else {
		n = t / 100;
	}
	//cout << n << endl;
	int s = n % 60;
	//cout << s << endl;
	n = n / 60;
	int m = n % 60;
	n = n / 60;
	int h = n % 60;
	
	printf("%02d:%02d:%02d\n",h,m,s);
/*	if(h<10){
		cout << "0" << h << ":";
	}
	else{
		cout << h << ":";
	}
	if(m<10){
		cout << "0" << m << ":";
	}
	else{
		cout << m << ":";
	}
	if(s<10){
		cout << "0" << s << endl;
	}
	else{
		cout << s << endl;
	}
	*/
	return 0;
}

 

#include<iostream>
#include<string.h>

using namespace std;

int main()
{
	string n;
	cin >> n;
	int a[10];
	memset(a,0,sizeof(a));//把数组a清零 
	
	for(int i=0; i<n.length(); ++i)
	{
		a[n[i]-'0']++; 
	}
	
	for(int i=0; i<10; ++i)
	{
		if(a[i] != 0)
		{
			cout << i << ":" << a[i] << endl;
		}
	}
	return 0;
}

 

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

int main()
{
	int a,b,c,d;
	cin >> a >> b >> c >> d;
	int numa = 0, numc = 0;
	while(a!=0)
	{
		if(a %10 == b) numa++;
		a = a / 10;
	}
	while(c!=0)
	{
		if(c %10 == d) numc++;
		c = c / 10;
	}
	
	int sum_a = 0, sum_c = 0;
	for (int i=0; i<numa; i++)
	{
		sum_a = sum_a + b * pow(10,i);
	}
	for (int i=0; i<numc; i++)
	{
		sum_c = sum_c + d * pow(10,i);
	}
	
	cout << sum_a + sum_c << endl;
	return 0;
} 

#include<iostream>

using  namespace std;

int main()
{
	int T;
	cin >> T;
	for(int k=1; k<=T; k++)
	{
		long a,b,c;
		cin >> a >> b >> c;
		if(a+b>c)
		{
			cout << "Case #" << k << ": true" << endl;
		}
		else
		{
			cout << "Case #" << k << ": false" <<endl; 
		}
	}
	return 0;
}

 

#include<iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int a = n % 10;
	n = n / 10;
	int b = n %10;
	n = n / 10;
	int c = n % 10;
	for(int i=0; i<c; i++)
	{
		cout << "B" ;
	}
	for(int i=0; i<b; i++)
	{
		cout << "S" ;
	}
	for(int i=1; i<=a; i++)
	{
		cout << i ;
	}
	
	cout << endl;
	return 0;
} 

#include<iostream>

using namespace std;

typedef struct student{
	string name;
	string num;
	int score;
}student; 

int  main()
{
	
	int N;
	cin >> N;
	student S[N];
	int high = 0, low = 100;
	int flag_h = 0, flag_l = 0;
	for(int i=0; i<N; ++i)
	{
		cin >> S[i].name >> S[i].num >> S[i].score;
		if(S[i].score > high){
			high = S[i].score;
			flag_h = i;
		}
		if(S[i].score < low){
			low = S[i].score;
			flag_l = i;
		}
	}
	cout << S[flag_h].name << " " << S[flag_h].num << endl;
	cout << S[flag_l].name << " " << S[flag_l].num << endl; 
	return 0;
} 

#include<stdio.h>
#include<string.h>

int main()
{
    int n;
    scanf("%d",&n);
    for(int i=0; i<n; ++i)
    {
        char a[101];
		scanf("%s",a);
        int len = strlen(a);
        //int flag = 0;
        int loc_p =0, loc_t=0, nump=0, isRight=1, numt=0;
        int left=0, center=0, right=0;
        for(int j=0; j<len; ++j)
        {
            if(a[j]=='P')
            {
                loc_p = j;
                nump++;
            }
            else if(a[j]=='T')
            {
                loc_t = j;
                numt++;
            }
            else if(a[j] != 'A')
            {
                isRight = 0;
                break;
            }
        }
        if( nump==1 && numt==1 && isRight ){
			left = loc_p;
        	right = len - loc_t - 1;
        	center = loc_t - loc_p - 1;
       	 	if(left * center == right && center > 0){
         	    printf("YES\n");
         	    continue;
        	}
        }
        printf("NO\n");
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char a[1000];
    gets(a);
    int sum = 0;
    int n = strlen(a);
    
    for(int i=0; i< n; ++i)
    {
    	a[i] = a[i] - 48;
    	sum += (a[i]%10);
    }
    
    //if(sum<0) return 0;
/*    
    while(n!=0)
    {
        sum += (n%10);
        n /= 10;
    }
    */
    
    int stack[10];
    int p = 0;
    
    while(sum!=0)
    {
        stack[p++] = sum%10;
        sum /= 10;
    }

    int num = 0;

    while(p!=0)
    {
        int k = stack[--p];
        if(num!=0) printf(" ");
        if(num==0) {
            if(k==0) break;
        }
        num++;
        switch(k)
        {
            case 0: printf("ling"); break;
            case 1: printf("yi"); break;
            case 2: printf("er"); break;
            case 3: printf("san"); break;
            case 4: printf("si"); break;
            case 5: printf("wu"); break;
            case 6: printf("liu"); break;
            case 7: printf("qi"); break;
            case 8: printf("ba"); break;
            case 9: printf("jiu"); break;
           // default: printf("error");
        }
    }
    printf("\n");
    return 0;
}

 

#include<stdio.h>

int main(){
    int n;
    scanf ("%d",&n);
    int num = 0;
    while(n!=1)
    {
        if(n%2==0)
        {
            n /= 2;
        }
        else{
            n = (3*n + 1)*0.5;
        }
        num++;
    }

    printf("%d\n",num);
    return 0;
}

 

#include<iostream>

using namespace std;

void sort(int a[], int n)
{
	int flag, tmp;
	for(int i=n-1; i>=1; --i){
		flag = 0;
		for(int j=1; j<=i; ++j){
			if(a[j-1] > a[j]){
				tmp = a[j];
				a[j] = a[j-1];
				a[j-1] = tmp;
				flag = 1;
			}
		}
        if(flag == 0){
				return;
			}
	}
}

int main(){
	int K;
	cin >> K;
	int C[101];
	for(int i=0; i<K; ++i){
		cin >> C[i];
	}
	for(int i=0; i<K; ++i)
	{
		int t = C[i];
		if(t == 0) continue;
		while(t > 1){
			if(t%2 == 0){
				t /= 2;
			}
			else{
				t = (3*t + 1)/2; 
			}
			for(int j=0; j<K; ++j){
				if(t == C[j]){
					C[j] = 0;
		   	        break;
				}    
			}
		}
	}
	sort(C,K);
	//for(int k=0; k<K; ++k)
	//{
	//	cout << C[k];
	//}
	//cout << endl;
	int flag = 1;
	for(int i=K-1; i>=0; --i)
	{
		if(C[i]!=0 && flag==1){
			cout << C[i];
			flag = 0;
		}
		else if(C[i]!=0 && flag==0){
			cout << " " << C[i];
		}
	}
	//cout << endl;
	return 0;
}

 

 

山东科技大学pta题库浙大版《C语言程序设计(第3版)》题目集 浙大版《C语言程序设计(第3版)》题目集 函数体 练习5-1 求m到n之和 (10 分) int sum( int m, int n ) { int res=0; for(int i=m;i<=n;i++) res+=i; return res; } 练习5-2 找两个数中最大者 (10 分) int max( int a, int b ) { return a>b?a:b; } 练习5-3 数字金字塔 (15 分) /* 你的代码将被嵌在这里 阅读详情

相关推荐

浙大PAT甲级题目1081-1100详细代码解答|标准答案|C++语言|浙软机考

浙大PAT甲级题目1081-1100详细代码解答 文章目录浙大PAT甲级题目1081-1100详细代码解答1081 Rational Sum 数学 有理数加法1082 Read Number in Chinese 进位制1083 List Grades 模拟1084 Broken Keyboard 字符串 模拟1085 Perfect Sequence 双指针1086 Tree Traversals Again 树1087 All Roads Lead to Rome 图 最短路1088 Rational

Joe_Morningstar的博客 1565

PAT 基础编程题目集(编程题1-38)题解

PAT 基础编程题目集(编程题1-38)题解

weixin_41801682的博客 1万+

华为灵衢UB总线介绍

华为发布"灵衢"(UB)超节点互联协议,旨在构建支持AI大模型计算的基础设施。该协议采用统一内存语义和对等架构,使设备可直接访问远程内存,实现资源池化。技术突破包括2.1微秒超低时延和TB级带宽,支持64节点、52万张昇腾卡的集群互联。相比传统RDMA,"灵衢"更注重系统级资源调度,而非单纯数据传输。华为开放技术规范,推动生态建设,已有厂商开发兼容IP核。"灵衢"可适应x86、RISC-V等架构,未来将扩展至百万卡规模集群。

技术引领业务创新 4491

C语言之指针

指针与自增、自减运算符 # include<stdio.h> # include<stdlib.h> # include<string.h> //只有比后增优先级高的操作符,才会作为一个整体,如()、[] int main() { int a[3] = { 2,7,8 }; int *p; int j; p = a; j = *p++;//先把*p的值赋给j,然后对p加1,p为指针变量 printf("a[0]=%d,j=%d,*p=%d\n",a[0],j

a2347123的博客 1307

大模型训练方法全面解析:SFT、RFT、TRPO、DPO、PPO、GRPO、RLH、RLHF技术深度剖析

大模型训练方法全面解析 本文系统介绍了当前主流的大模型训练和对齐技术,包括监督微调(SFT)、拒绝采样微调(RFT)、信任域策略优化(TRPO)、直接偏好优化(DPO)、近端策略优化(PPO)等。这些方法各有特点:SFT简单高效但数据依赖性强;RFT通过质量筛选提升输出质量;TRPO训练稳定但计算复杂;PPO是RLHF核心算法,平衡探索与利用。文章详细分析了各方法的实现原理、优势劣势及适用场景,为开发者选择合适的大模型训练策略提供参考。

2830

【Autosar】学习总结-MCAL

一、简介 MCAL:微控制器抽象层;位于BSW层中的最下层; MCAL细分,可将驱动分为:微控制器驱动、存储器驱动、通信驱动、IO驱动: 二、MCAL的配置(EB-Tresos) 1.PORT 我理解的PORT:MCAL层中的IO驱动组中的pin脚总体配置: Port就是芯片上的每个pin脚,可以配置成DIO ADC PWM ICU等单引脚的功能,也能配置成CAN的TX或者RX、SPI的MOSI等等其他功能的单个pin脚功能; 总之,PORT就是芯片上的具体的某个引脚。 配置

zDavid_2018的博客 3万+

PAT : 基础编程题目集_函数题答案(6-1 ~ 6-13)(C语言)

题目地址

qq_42571014的博客 5462

EGO-Planner文章解读(一)——论文原理和算法实现

详细解读egoplanner论文和代码

fegxg的博客 4012

PAT 黄金级(题目及答案)

PAT Basic 黄金级

m0_73225340的博客 1974

ATGM332D模块串口配置保姆级教程:从9600波特率到NMEA数据过滤,一次搞定

本文提供ATGM332D模块串口配置的详细教程,涵盖从基础硬件连接到高级NMEA数据过滤的全过程。内容包括波特率优化、数据输出频率调整、NMEA语句过滤等实用技巧,帮助开发者快速掌握GNSS模块配置,提升定位系统性能。

weixin_30664051的博客 523

am62x A53与R5F通信

AM62x是Ti的一款异构多核芯片。remoteproc驱动,硬编码(写死)了R5F/M4F固件的名字,这样驱动启动时,就会找硬件编码的固件,下面是其对应关系。值得注意的是,linux内核中的M4F remoteproc驱动启动M4F,而linux内核中的R5F remoreteproc驱动不启动R5F,相反,它attach到已经在boot阶段启动的R5F固件上。在/lib/firmware的真实固件名:,而我们生成的固件名如下所示,没有直接对应的,经确认,.out文件就是我们需要的,重命名后即可。

鹰之翔 1371

PAT 乙级 1003. 我要通过!

PAT 乙级 1003. 我要通过!最近在尝试PAT的一些试题,在这道题上卡了一些时间,学习了很多,分享一些经验。原题“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于PAT的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。得到“答案正确”的条件是: 字符串中必须仅有P, A, T这三种字符,不可以包含其它字符; 任意形如 xPATx 的

ericwang_1992的博客 388

YOLO26涨点改进 | 独家创新,特征融合改进篇 | TGRS 2025 | 引入FFM特征融合模块,实现特征的全局交互与融合,含多种组合创新改进,适合小目标检测、助力YOLO26有效涨点

本文提出了一种改进YOLO26目标检测模型的FFM模块,该模块通过跨模态注意力机制实现全局特征融合,显著提升模型对小目标、密集目标和复杂场景的检测性能。FFM采用多头跨注意力机制建模不同模态间的复杂关系,同时引入可调节下采样率降低计算复杂度。实验表明,在WHU-OPT-SAR等数据集上,FFM模块使mIoU提升0.75%,OA提升0.32%。文章详细介绍了FFM的结构原理、核心代码实现,并提供了两种改进YOLO26的yaml配置文件方案,包括FFM单独使用以及与FCM模块的组合方案。

Ai缝合怪、助力小伙伴高效发论文 202

卡拉兹猜想c语言_PAT乙级1005 继续(3n+1)猜想 (25 分)

1005 继续(3n+1)猜想 (25 分)卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对 n=5、8、4、2 进行验证的时候,就可以直接判定卡拉兹猜想的真伪,而不需要重复计算,因为这 4 个数已...

weixin_39753397的博客 236

Codex 100个真实案例 - 用AI生成Blender 3D建模脚本(建模师要失业了?)

本案例将展示如何用 Codex 生成 Blender Python API(bpy)脚本,自动创建完整的 3D 模型。我们将从基础几何体开始,逐步实现布尔运算、材质设置、光照配置,最终完成一张精美桌子的 3D 建模——包括桌面、桌腿、倒角、木纹材质。还会实现参数化批量生成不同风格的桌子、渲染输出 PNG 图片、以及 360 度旋转动画。全程用自然语言驱动 Codex,让建模从"点鼠标"变成"说人话"!

yueyeguzhuo的专栏 655

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

PAT (Basic Level) Practice (中文)答案合集

准备复试专用,目标刷完全部中文题!

博客标题不能为空我也没办法 1万+

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

PAT基础级-青铜段位样卷1(含答案)

这道超级简单的题目没有任何输入。你只需要在第一行中输出程序员钦定名言“Hello World”,并且在第二行中输出更新版的“Hello New World”就可以了。

m0_60740687的博客 435

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

PTA 程序设计天梯赛(1~180题)

文章目录1、Hello World (5 分)2、打印沙漏 (20 分)3、个位数统计 (15 分)4、计算摄氏温度 (5 分)5、考试座位号 (15 分)6、连续因子 (20 分)7、A-B (20 分)8、计算指数 (5 分)9、 计算阶乘和 (10 分)10、 简单题 (5 分)11、 跟奥巴马一起画方块 (15 分)12、查验身份证 (15 分)13、 到底有多二 (15 分)14、大笨钟 (10 分)15、 谁先倒 (15 分)16、 帅到没朋友 (20 分)17、 重要的话说三遍 (5 分)18

qq_27494201的博客 2万+

C语言刷题(14):编写一个函数,由实参传来一个字符串,统计此字符串中字母,数字,空格和其他字符的个数

#include <stdio.h> #include <string.h> int lett=0,dig=0,spac=0,oth=0; void main() { void count(char a[]); char a[100]; puts("input string:"); gets(a); count(a); pri...

qq_1316238389的博客 1万+

PAT题目答案与经验总结1(持续更新,大家放心关注)

PAT—甲级1139 First Contact (30 分)题目链接AC代码注意事项PAT 1142. Maximal Clique (25分)题目链接AC代码注意事项1143 Lowest Common Ancestor (30 分)题目链接AC代码注意事项 1139 First Contact (30 分) 题目链接 https://pintia.cn/problem-sets/994805342720868352/problems/994805344776077312 AC代码 #include&l

ljhsq的博客 5150

【PAT乙级】刷题记录+答案(总)

【1001】害死人不偿命的(3n+1)猜想 #include <stdio.h> int main() { int i=0,n; scanf("%d",&n); while(n!=1){ if(n%2==0){ n=n/2; i++; }else{ n=(3*n+1)/2; i++; } } printf("%d\n",i); r...

The Home of Antoni 9253

PTA 浙大版《C语言程序设计(第4版)》题目集 参考答案(函数题)

PTA 浙大版《C语言程序设计(第4版)》题目集 参考答案(函数题) 本答案配套详解教程专栏,欢迎订阅https://blog.csdn.net/weixin_40171190/category_12034686.html?spm=1001.2014.3001.5482

少侠PSY的博客 6万+

PTA 基础编程题 题解

7-1厘米换算英尺英寸(15point(s)) 查看题解 7-2然后是几点(15point(s)) 查看题解 7-3逆序的三位数(10point(s)) 查看题解 7-4BCD解密(10point(s)) 查看题解 7-5 表格输出 (5 point(s)) 查看题解 ...

忘梦心的博客 1万+

PAT 基础编程题目集(函数题1-13)题解

PAT 基础编程题目集(函数题1-13)题解

weixin_41801682的博客 4583

PAT : 基础编程题目集_编程题答案(7-1 ~ 7-38)(纯C编写)

题目地址 7-1 #include&lt;stdio.h&gt; int main(int argc,char** argv) { int cm; scanf("%d",&amp;cm); float x=cm/0.3048/100; float a=(x-(int)x)*12.0; int b=(int)x; printf("%d %d\n",b,(int)a); ...

Belous的博客 1万+

浙大 PAT 乙级 1001-1075 目录索引

1001. 害死人不偿命的(3n+1)猜想1002. 写出这个数1003. 我要通过!1004. 成绩排名1005. 继续(3n+1)猜想 1006. 换个格式输出整数1007. 素数对猜想1008. 数组元素循环右移问题1009. 说反话1010. 一元多项式求导 1011. A+B和C1012. 数字分类1013. 数素数1014. 福尔摩斯的约会1015. 德才论 1016. 部分...

邢永胜 - Kyle 300
下一篇: PAT甲级1051 Pop Sequence 题解
Perrysky
博客等级 码龄11年 16粉丝 85原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值