#include <stdio.h>
int main(void)
{
FILE *in;
in=stdin;//fopen("input.txt","r");
int i,n,a[100001],j,temp,c=0,cn,k;
fscanf(in,"%d %d",&n,&cn);
for(i=0;i<n;i++){
fscanf(in,"%d",&a[i]);
}
for(i=0;i<n;i++){
for(j=i+1;j<n;j++){
c++;
if(a[i]>a[j]){
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
if(c==cn){
for(k=0;k<n;k++){
printf("%d ",a[k]);
}
return 0;
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
1356 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
1356 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
1356 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
15 ms |
1352 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
3 |
Incorrect |
22 ms |
1348 KB |
Output isn't correct |
4 |
Incorrect |
25 ms |
1356 KB |
Output isn't correct |
5 |
Incorrect |
28 ms |
1352 KB |
Output isn't correct |
6 |
Incorrect |
33 ms |
1356 KB |
Output isn't correct |
7 |
Incorrect |
28 ms |
1352 KB |
Output isn't correct |
8 |
Incorrect |
34 ms |
1352 KB |
Output isn't correct |
9 |
Incorrect |
13 ms |
1352 KB |
Output isn't correct |
10 |
Incorrect |
21 ms |
1356 KB |
Output isn't correct |
11 |
Incorrect |
33 ms |
1352 KB |
Output isn't correct |
12 |
Incorrect |
37 ms |
1352 KB |
Output isn't correct |
13 |
Incorrect |
26 ms |
1348 KB |
Output isn't correct |
14 |
Incorrect |
31 ms |
1352 KB |
Output isn't correct |
15 |
Incorrect |
27 ms |
1356 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
2 |
Incorrect |
24 ms |
1352 KB |
Output isn't correct |
3 |
Incorrect |
29 ms |
1352 KB |
Output isn't correct |
4 |
Incorrect |
31 ms |
1348 KB |
Output isn't correct |
5 |
Incorrect |
26 ms |
1356 KB |
Output isn't correct |
6 |
Incorrect |
29 ms |
1352 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
1356 KB |
Output isn't correct |
10 |
Incorrect |
26 ms |
1356 KB |
Output isn't correct |
11 |
Incorrect |
21 ms |
1348 KB |
Output isn't correct |
12 |
Incorrect |
23 ms |
1352 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
1348 KB |
Output isn't correct |
14 |
Incorrect |
0 ms |
1356 KB |
Output isn't correct |
15 |
Incorrect |
16 ms |
1348 KB |
Output isn't correct |