暴力枚举!!! 摘要:```cpp #include using namespace std; int n; int main(){ cin >> n; for(int i = 0;…… 题解列表 2022年03月18日 0 点赞 0 评论 585 浏览 评分:0.0
yolo_mm 用筛法求之N内的素数 摘要:解题思路: 常规筛,把倍数筛去注意事项: i*i 而不是从2倍筛起,比如i=5,如果是两倍则在i=2的时候就已经筛去了参考代码:#include<bits/stdc++.h>using …… 题解列表 2022年03月18日 0 点赞 0 评论 563 浏览 评分:0.0
汉诺塔 巧妙的递归 参考了许多人的答案,递归这个方法实在巧妙**从整体入手,找子问题,再由子问题逐层上升**```cpp#include#includeusingnamespacestd;intn;voidHano(intn,inta,intb,intc){if(n==1){printf("Move%dfrom%dto% 题解列表 2022年03月17日 0 点赞 0 评论 763 浏览 评分:9.9
C++题解,重点弄清题意 摘要:解题思路:注意事项:分糖果的时候是全部小朋友同时分的参考代码:#include<iostream>using namespace std;const int N = 100;int n;int a[N…… 题解列表 2022年03月17日 0 点赞 0 评论 519 浏览 评分:0.0
蓝桥杯2016年第七届真题-密码脱落 摘要:解题思路:将此字符串倒过来,找它与原串的最长公共子序列,最后用原串的长度减去最长公共子序列的长度即可。参考代码:#include <bits/stdc++.h> using namespace st…… 题解列表 2022年03月17日 0 点赞 0 评论 923 浏览 评分:9.9
蓝桥杯2015年第六届真题-切开字符串 ```cpp#include#include#include#includeusingnamespacestd;stringst;intn,m;booldfs(strings){if(s.length()%2!=0){for(inti=0,j=s.length()-1;i>n;cin>>st;sets 题解列表 2022年03月17日 0 点赞 0 评论 803 浏览 评分:9.9
1512: 蓝桥杯算法提高VIP-多项式输出 摘要:```cpp #include using namespace std; int main() { int n; cin >> n; int* p = new int[n+1]; …… 题解列表 2022年03月17日 0 点赞 0 评论 579 浏览 评分:0.0
1511: 蓝桥杯算法提高VIP-复数求和 ```cpp#includeusingnamespacestd;classnode{public:intdate1;intdate2;node*next;};intmain(){intn;cin>>n;node*head=newnode;head->next=NULL;node*temp=head;f 题解列表 2022年03月17日 0 点赞 0 评论 552 浏览 评分:0.0
自定义函数求一元二次方程 摘要:解题思路:根据判别式(b^2-4ac)的结果分成三类讨论注意事项:这里判别式<0时存在共轭复数根,复根的求法为x1,2=(-b±i√(4ac-b2))/2a参考代码:#include<iostream…… 题解列表 2022年03月17日 0 点赞 0 评论 627 浏览 评分:0.0
编写题解 1465: 蓝桥杯基础练习VIP-回形取数 摘要:解题思路:注意事项:参考代码:#include "iostream"#include "string.h"using namespace std;int main(){ int n,m; …… 题解列表 2022年03月17日 0 点赞 0 评论 605 浏览 评分:0.0