蛇行矩阵 (C++代码) 摘要:每一行的规律很好看出来每行的第n个数为前n-1个数之和,很容易求出该数字为(n*n+n)/2;继续分析第m行的第n个数(n*n+n)/2+1-m;代码如下#include<iostream>using…… 题解列表 2018年08月02日 0 点赞 0 评论 1144 浏览 评分:0.0
momoc:题解1513:蓝桥杯算法提高VIP-大数加法 (C语言代码)附题解 摘要:解题思路:1.用字符串保持输入的数 2.对输入的字符串进行逆序并转换成数组保持到整数数组 3.对数组相加对相加后的数进行取模,并把进位的数保…… 题解列表 2018年08月02日 6 点赞 0 评论 2104 浏览 评分:0.0
The 3n + 1 problem (C++代码) 摘要:数字本身也正在运行次数类,所以最后的max要加1每次循环结束记得要k归0,最大值也要归零#include<iostream>using namespace std;int main() { long …… 题解列表 2018年08月02日 0 点赞 0 评论 579 浏览 评分:0.0
蓝桥杯基础练习VIP-高精度加法 (C++代码) 摘要:参考代码:#include<bits/stdc++.h> using namespace std; typedef long long LL; const LL BASE = 100000000…… 题解列表 2018年08月02日 0 点赞 0 评论 1539 浏览 评分:0.0
The 3n + 1 problem (C++代码) 摘要:解题思路:求最大循环长度注意事项:参考代码:#include <iostream>#include <cstdio>using namespace std;int main(){int m,n;whi…… 题解列表 2018年08月02日 0 点赞 0 评论 624 浏览 评分:0.0
蓝桥杯算法提高VIP-高精度乘法 (C++代码)(压位 17ms) 摘要:解题思路: 压到极限的千万进制,也就是 7 位存一次。 想起来我以前写的朴素乘法,惨不忍睹。 &nbs 题解列表 2018年08月02日 1 点赞 0 评论 1432 浏览 评分:6.0
蓝桥杯算法提高VIP-大数加法 (C++代码) (再写一种-.-) 摘要:#include "iostream" #include "cstdio" #include "algorithm" #include "cstring" using namespace st…… 题解列表 2018年08月02日 1 点赞 0 评论 1942 浏览 评分:0.0
蓝桥杯基础练习VIP-高精度加法 (C++代码) 摘要:解题思路: 逆序字符串转换 → 相加 → 进位 → 反向输出数组。#include "stdio.h" #include "string.h" const int …… 题解列表 2018年08月02日 1 点赞 0 评论 1314 浏览 评分:0.0
【出圈】 (C++代码)按题目来写就好了 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int n,m,a[1001]; int main(){ while(cin>…… 题解列表 2018年08月02日 2 点赞 0 评论 1215 浏览 评分:9.3
蓝桥杯算法提高VIP-分苹果 (C++代码)(线段树 lazy 练习) 摘要:解题思路: ( 反正没人看,注释不想写,写花了更难看,跑得挺慢的参考代码:#include<bits/stdc++.h> using namespace std; const i…… 题解列表 2018年08月02日 0 点赞 0 评论 1569 浏览 评分:0.0