练练快排罢了不用参考
参考代码:
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int i; int cmp(const int *a,const int *b){ return *(int*)b-*(int*)a; } int main(){ int n=0; int arr[100001]; while(n<100001){ scanf("%d",&arr[n]); if(arr[n]==-1){ break; } n++; } qsort(arr,n,sizeof(int),cmp); printf("%d",arr[0]); return 0; }
0.0分
0 人评分
C语言训练-斐波纳契数列 (C语言代码)浏览:788 |
点我有惊喜!你懂得!浏览:1395 |
C语言程序设计教程(第三版)课后习题1.6 (C语言代码)浏览:584 |
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)for循环浏览:1126 |
简单的a+b (C语言代码)浏览:530 |
计算质因子 (C++代码)浏览:1643 |
WU-蓝桥杯算法提高VIP-勾股数 (C++代码)浏览:1606 |
1908题解浏览:640 |
1017题解浏览:605 |
简单的a+b (C语言代码)浏览:488 |