题解列表
素数算法,时间复杂度降低版
摘要:#include<bits/stdc++.h>
using namespace std;
bool su(int n)
{
if(n<2)
return false;
……
自守数问题,简单明了,C语言
摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ long s,j; printf("0"); for(long i=1; i<=200000……
1204: 大小写转换
摘要:核心: name = 'Hello World' print(name.lower()) # 大写转小写 print(name.upper()) # 小写转大写 ……
蓝桥杯算法提高VIP-删除数组中的0元素
摘要:解题思路:注意事项:参考代码:void del(int arr[], int n){ int count = 0;//统计非0元素个数 for (int i = 0; i < n; i++) { i……
拿捏,已知元素从小到大排列的两个数组x[]和y[],请写出一个程序算出两个数组彼此之间差的绝对值中最小的一个,这叫做数组的距离
摘要:解题思路:输入,迭代器迭代,做差,比较,赋值,输出注意事项:调试信息屏蔽掉参考代码:#include <iostream>
#include <vector>
#include <cmath>
……
我们就要设置一个安全的密码,安全密码的检验,easy
摘要:解题思路:yixie c++的字符串基本操作注意事项:bool arr[4] = {true};只会将第一个元素设置为true;参考代码:#include <iostream>
#include <……
蓝桥杯2024年第十五届省赛真题-好数
摘要:解题思路:注意事项:参考代码:void check(int i,int flag,int* pc){ if (i > 0) { if (flag == 0 && (i % 10) % 2 == 1)……