蓝桥杯2014年第五届真题-斐波那契(详细解答) 摘要:在解答本题前,我会先介绍一些待会会用到的知识。1、取模公式:(a+b)%p=(a%p+b%p)%p; (a-b)%p=(a%p-b%p)%p; …… 题解列表 2023年05月07日 0 点赞 0 评论 825 浏览 评分:9.9
指针/引用练习之交换数字 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;void swap(int &a,int &b){ int *p=&a,*q=&b;…… 题解列表 2023年05月07日 0 点赞 0 评论 411 浏览 评分:0.0
星期判断机 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; switch…… 题解列表 2023年05月07日 0 点赞 0 评论 384 浏览 评分:0.0
矩阵的对角线之和 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a[5][5],sum=0,sum1=0; …… 题解列表 2023年05月07日 0 点赞 0 评论 459 浏览 评分:0.0
罗列完美数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int wanmei(int n){ int sum=0; for(in…… 题解列表 2023年05月07日 0 点赞 0 评论 433 浏览 评分:0.0
完美数的判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int x,sum=0; cin>>x; …… 题解列表 2023年05月07日 0 点赞 0 评论 358 浏览 评分:0.0
java实现链表升序合并 摘要:解题思路: 1.用输入的数据创建好两个链表。2.将两个无序链表合并成一个链表:用一个变量记录链表1的尾结点,使其下个节点指向链表2。3. 对合并后的链表进行排序:排序采取排序算法中的归并排序。个人认为…… 题解列表 2023年05月07日 1 点赞 0 评论 641 浏览 评分:9.9
60行代码!!! 摘要:解题思路:1.先创建p,q两个链表数组(我也不知道叫什么,随便取的,大佬勿喷) 2.输入数据 3.合并数组(为了后面的排序) &nbs 题解列表 2023年05月07日 0 点赞 0 评论 340 浏览 评分:0.0
switch请求出战(比if else用更少的运行时间) 摘要:#include<stdio.h>int main(){ int i,bonus=0; scanf("%d",&i); switch(i/100000){ cas…… 题解列表 2023年05月07日 0 点赞 0 评论 306 浏览 评分:0.0
新学小知识,哈哈,按位取反 摘要:解题思路:注意事项: v&(~x<<a)&(~x>>31-b);//二进制左移低位补0,二进制右移高位补0 其实这里就相当于下面,这就是取反符号的作…… 题解列表 2023年05月07日 0 点赞 0 评论 423 浏览 评分:0.0