#include<stdio.h>
void main()
{
int size,count,i,j,x;
int num[100000];
scanf("%d %d",&size,&count);
for(i=0;i<size;i++)
scanf("%d",&num[i]);
num[size] = '\0';
for(j=0;j<count;j++){
for(i=1;i<size;i++){
if(num[i-1] > num[i]){
x = num[i-1];
num[i-1] = num[i];
num[i] = x;
}
}
}
for(i=0;i<size;i++)
printf("%d ",num[i]);
//system("PAUSE");
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1352 KB |
Output is correct |
2 |
Correct |
0 ms |
1352 KB |
Output is correct |
3 |
Correct |
0 ms |
1352 KB |
Output is correct |
4 |
Correct |
0 ms |
1348 KB |
Output is correct |
5 |
Correct |
0 ms |
1352 KB |
Output is correct |
6 |
Correct |
0 ms |
1348 KB |
Output is correct |
7 |
Correct |
0 ms |
1348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
1348 KB |
Output is correct |
2 |
Correct |
0 ms |
1356 KB |
Output is correct |
3 |
Correct |
0 ms |
1348 KB |
Output is correct |
4 |
Correct |
0 ms |
1348 KB |
Output is correct |
5 |
Correct |
0 ms |
1352 KB |
Output is correct |
6 |
Correct |
3 ms |
1356 KB |
Output is correct |
7 |
Correct |
0 ms |
1352 KB |
Output is correct |
8 |
Correct |
0 ms |
1352 KB |
Output is correct |
9 |
Correct |
0 ms |
1352 KB |
Output is correct |
10 |
Correct |
7 ms |
1348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
2 |
Execution timed out |
1000 ms |
1352 KB |
Program timed out |
3 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
4 |
Correct |
253 ms |
1356 KB |
Output is correct |
5 |
Correct |
24 ms |
1352 KB |
Output is correct |
6 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
7 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
8 |
Execution timed out |
1000 ms |
1344 KB |
Program timed out |
9 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
10 |
Execution timed out |
1000 ms |
1344 KB |
Program timed out |
11 |
Correct |
47 ms |
1348 KB |
Output is correct |
12 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
13 |
Correct |
29 ms |
1348 KB |
Output is correct |
14 |
Correct |
114 ms |
1348 KB |
Output is correct |
15 |
Correct |
115 ms |
1352 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
2 |
Execution timed out |
1000 ms |
1344 KB |
Program timed out |
3 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
4 |
Correct |
39 ms |
1352 KB |
Output is correct |
5 |
Correct |
112 ms |
1348 KB |
Output is correct |
6 |
Execution timed out |
1000 ms |
1344 KB |
Program timed out |
7 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |
8 |
Correct |
32 ms |
1352 KB |
Output is correct |
9 |
Execution timed out |
1000 ms |
1344 KB |
Program timed out |
10 |
Correct |
49 ms |
1348 KB |
Output is correct |
11 |
Execution timed out |
1000 ms |
1352 KB |
Program timed out |
12 |
Correct |
108 ms |
1352 KB |
Output is correct |
13 |
Execution timed out |
1000 ms |
1344 KB |
Program timed out |
14 |
Correct |
253 ms |
1352 KB |
Output is correct |
15 |
Execution timed out |
1000 ms |
1348 KB |
Program timed out |