1985: 分段计算 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; if(x<3)…… 题解列表 2022年01月02日 0 点赞 0 评论 218 浏览 评分:0.0
最小公倍数 最大公约数 摘要:解题思路:无注意事项:无参考代码:#include <iostream>using namespace std;int func(int a, int b){ return a % b == 0 ? …… 题解列表 2022年01月02日 0 点赞 0 评论 289 浏览 评分:0.0
2023: 求逆序对个数 摘要:解题思路:其实就是求逆序数的问题,以题目给出的测试数据为例4 2 2 8 5 2 7 3对于第一个4来说,后面有4个比它小的数,依次类推,4+4+2+1=11这里采用冒泡排序将数组排序,用z表示需要用…… 题解列表 2022年01月02日 0 点赞 0 评论 335 浏览 评分:9.9
顺序赋值再输出 摘要:解题思路:顺序赋值注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] arg…… 题解列表 2022年01月02日 0 点赞 0 评论 388 浏览 评分:9.9
2016: 新生的入队仪式 摘要:解题思路:让我们先来读一下题,如果新生是最高的,就站在之前最高的右面,否则老师会让他站在最高的左边或者右边的队列里按照身高站(1表示左,2表示右)参考代码:#include <stdio.h> …… 题解列表 2022年01月02日 0 点赞 0 评论 387 浏览 评分:9.9
2018: 飞奔的马 摘要:解题思路:每交换一次就加上两位置之差*2参考代码:#include <stdio.h> #include <stdlib.h> int main() { int i,j,k; in…… 题解列表 2022年01月02日 0 点赞 0 评论 296 浏览 评分:9.9
2019: 滚动的榜单 摘要:解题思路:对k前面的数进行排序,然后找到k的位置,因为是从小到大排的序,所以用k-i来输出参考代码:#include <stdio.h> #include <stdlib.h> int gg(…… 题解列表 2022年01月02日 0 点赞 0 评论 256 浏览 评分:9.9
2022: 合并区间 摘要:解题思路:注意到题解里面没有c语言的题解,所以来补充一下做题思路很暴力,将数合并到一个数组内,然后使用c语言自带的排序函数进行排序,然后将数组内的元素依次对比参考代码:#include <stdio.…… 题解列表 2022年01月02日 0 点赞 0 评论 371 浏览 评分:9.9
1730: 剩下的树-C语言 摘要:```c //剩下的树 #include #include #define max 10000 int main() { int L, M,A[max],a,b,sum; …… 题解列表 2022年01月02日 0 点赞 0 评论 315 浏览 评分:0.0
优质题解 2020: 快速排序练习(c语言自带的排序函数) 摘要:解题思路:c语言自带排序函数qsort,在头文件stdlib.h中,它是用快速排序实现的。void qsort(void *base, size_t nitems, size_t size, int …… 题解列表 2022年01月02日 0 点赞 0 评论 899 浏览 评分:9.9