题解 1268: 第K极值

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

P1001-题解(C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int sort(int a[], int n, int k);int func(int n);in……

P1001-题解(C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>void jj(int n){ int p=0; if(n<=1) printf("NO\n"); else { for(int i=……

(c语言) P1001

摘要:```c //1.输入 //2.排序 //3.做差 //4.判断差值是否为质数(素数) //5.输出 #include long long a[11000]={0};//定义较大的数组需……

编写题解 1268: P1001(python代码)

摘要:解题思路:注意事项:参考代码:def isprime(x):     ls=[1,3,7,9]     lis=[2,3,5,7]     if x <1:         return 0 ……

P1001C++排序+素数

摘要:解题思路:就一个排序(直接使用sort即可)和判定素数注意事项:参考代码:#include <iostream>#include <string>#include <algorithm>using n……

简单题解,一看就懂!

摘要:  由题目可推导出要达到满分要做两件事:  (1):从“求出整个序列中第k大的数字减去第k小的数字的值m”我们可以知道我们应该先对该输入序列做一个排序,而快排是最好的选择,因此我们可以这么做:    ……

C# 1268: 第K极值

摘要:```cpp #include using namespace std; int n,k,a[10005]; int m; bool fun(int x){ int j=0; if ……

C语言最简单代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int sum(int n){//判断质数  int i; int h=0; for(i=2;i<n;i……