题解列表

筛选

蓝桥杯2023年第十四届省赛真题-子串简写(Java代码)

本文仅供参考理解解题思路,a、b、c、d、e、f输出皆正确,但提交错误。a、b、c、d、e均为时间超限,其中a、b、c为95分;d是c的简化版,但为0分;e有两种思路c1和c2可以调换先后顺序,但两种皆为24分;f最简便,但显示编译错误。importjava.util.*;publicclassL31

字符串p型编码

摘要:解题思路:注意事项:参考代码:myStr=input().strip()myStr1=""i=1for t in range(len(myStr)-1):    if myStr[t+1]==mySt……

来个C++的题解

摘要:解题思路:以先序遍历为基础,找到root后在中序遍历中找root的位置并设置好范围len,变换pre和in数组的head指针参考代码:#include<bits/stdc++.h>#define re……

不能没落的strcmp和strcpy!!!

解题思路:strcmp函数:若返回值为0,说明两个字符串相等。若返回值小于0,说明str1小于str2。若返回值大于0,说明str1大于str2。作用:用于比较两个字符串。函数原型:intstrcmp(constchar*str1,constchar*str2);返回值:返回一个整数,表示比较的结果。

题解 2913: 整数去重

#includeusingnamespacestd;inta[20000],b[20000];intn,m,sum;intmain(){cin>>n;for(inti=0;i>m;a[m]++;if(a[m]==1){cout

双循环+boolean

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {    public static void main(String[] args……