#include<stdio.h>
int main(){
int n,k,i,j;
scanf("%d %d",&n,&k);
int arr[n];
for(i=0;i<n;i++){
scanf("%d",&arr[i]);
}
for(i=0;i<=n*k;i++){
if(arr[i+1]<arr[i]){
int t=arr[i+1];
arr[i+1]=arr[i];
arr[i]=t;
}
}
for(i=0;i<n;i++){
printf("%d ",arr[i]);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1084 KB |
SIGSEGV Segmentation fault |
2 |
Runtime error |
0 ms |
1084 KB |
SIGSEGV Segmentation fault |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
0 ms |
1084 KB |
Output is correct |
5 |
Runtime error |
0 ms |
1084 KB |
SIGSEGV Segmentation fault |
6 |
Runtime error |
0 ms |
1084 KB |
SIGSEGV Segmentation fault |
7 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
2 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
3 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
4 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
5 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
6 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
7 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
8 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
9 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
10 |
Runtime error |
0 ms |
1080 KB |
SIGSEGV Segmentation fault |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1344 KB |
SIGSEGV Segmentation fault |
2 |
Runtime error |
19 ms |
1344 KB |
SIGSEGV Segmentation fault |
3 |
Incorrect |
22 ms |
1232 KB |
Output isn't correct |
4 |
Incorrect |
17 ms |
1352 KB |
Output isn't correct |
5 |
Runtime error |
0 ms |
1348 KB |
SIGSEGV Segmentation fault |
6 |
Runtime error |
0 ms |
1348 KB |
SIGSEGV Segmentation fault |
7 |
Incorrect |
33 ms |
1356 KB |
Output isn't correct |
8 |
Runtime error |
7 ms |
1104 KB |
SIGSEGV Segmentation fault |
9 |
Runtime error |
13 ms |
1344 KB |
SIGSEGV Segmentation fault |
10 |
Runtime error |
0 ms |
1348 KB |
SIGSEGV Segmentation fault |
11 |
Runtime error |
0 ms |
1300 KB |
SIGSEGV Segmentation fault |
12 |
Runtime error |
11 ms |
1268 KB |
SIGSEGV Segmentation fault |
13 |
Incorrect |
20 ms |
1348 KB |
Output isn't correct |
14 |
Runtime error |
23 ms |
1348 KB |
SIGSEGV Segmentation fault |
15 |
Runtime error |
0 ms |
1348 KB |
SIGSEGV Segmentation fault |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
9 ms |
1272 KB |
SIGSEGV Segmentation fault |
2 |
Incorrect |
24 ms |
1348 KB |
Output isn't correct |
3 |
Runtime error |
0 ms |
1352 KB |
SIGSEGV Segmentation fault |
4 |
Runtime error |
13 ms |
1304 KB |
SIGSEGV Segmentation fault |
5 |
Incorrect |
32 ms |
1352 KB |
Output isn't correct |
6 |
Runtime error |
0 ms |
1344 KB |
SIGSEGV Segmentation fault |
7 |
Runtime error |
12 ms |
1344 KB |
SIGSEGV Segmentation fault |
8 |
Incorrect |
23 ms |
1232 KB |
Output isn't correct |
9 |
Runtime error |
17 ms |
1348 KB |
SIGSEGV Segmentation fault |
10 |
Incorrect |
0 ms |
1356 KB |
Output isn't correct |
11 |
Runtime error |
0 ms |
1108 KB |
SIGSEGV Segmentation fault |
12 |
Runtime error |
24 ms |
1352 KB |
SIGSEGV Segmentation fault |
13 |
Runtime error |
0 ms |
1348 KB |
SIGSEGV Segmentation fault |
14 |
Runtime error |
10 ms |
1348 KB |
SIGSEGV Segmentation fault |
15 |
Runtime error |
14 ms |
1352 KB |
SIGSEGV Segmentation fault |