Submission #14142

# Submission time Handle Problem Language Result Execution time Memory
14142 2015-05-02T08:25:54 Z minchurl 버블 정렬 (OJUZ10_bubblesort) C++
34 / 100
1000 ms 1472 KB
#include<stdio.h>
int b[100005],n,k;
int main(){
    int temp,i,j;
    scanf("%d %d",&n,&k);
    for(i=0;i<n;i++) scanf("%d",&b[i]);
    for(i=1;i<=k;i++){
        for(j=0;j<n-i;j++){
            if(b[j]>b[j+1]){
                temp=b[j];
                b[j]=b[j+1];
                b[j+1]=temp;
            }
        }
    }
    for(i=0;i<n;i++) printf("%d ",b[i]);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1472 KB Output is correct
2 Correct 0 ms 1472 KB Output is correct
3 Correct 0 ms 1472 KB Output is correct
4 Correct 0 ms 1472 KB Output is correct
5 Correct 0 ms 1472 KB Output is correct
6 Correct 0 ms 1472 KB Output is correct
7 Correct 0 ms 1472 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1472 KB Output is correct
2 Correct 0 ms 1472 KB Output is correct
3 Correct 0 ms 1472 KB Output is correct
4 Correct 0 ms 1472 KB Output is correct
5 Correct 5 ms 1472 KB Output is correct
6 Correct 0 ms 1472 KB Output is correct
7 Correct 2 ms 1472 KB Output is correct
8 Correct 3 ms 1472 KB Output is correct
9 Correct 3 ms 1472 KB Output is correct
10 Correct 0 ms 1472 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1000 ms 1468 KB Program timed out
2 Execution timed out 1000 ms 1468 KB Program timed out
3 Correct 19 ms 1472 KB Output is correct
4 Execution timed out 1000 ms 1468 KB Program timed out
5 Execution timed out 1000 ms 1468 KB Program timed out
6 Execution timed out 1000 ms 1468 KB Program timed out
7 Execution timed out 1000 ms 1468 KB Program timed out
8 Correct 238 ms 1472 KB Output is correct
9 Execution timed out 1000 ms 1468 KB Program timed out
10 Correct 48 ms 1472 KB Output is correct
11 Execution timed out 1000 ms 1468 KB Program timed out
12 Correct 114 ms 1472 KB Output is correct
13 Correct 132 ms 1472 KB Output is correct
14 Correct 39 ms 1472 KB Output is correct
15 Execution timed out 1000 ms 1468 KB Program timed out
# Verdict Execution time Memory Grader output
1 Execution timed out 1000 ms 1468 KB Program timed out
2 Correct 108 ms 1472 KB Output is correct
3 Execution timed out 1000 ms 1468 KB Program timed out
4 Execution timed out 1000 ms 1468 KB Program timed out
5 Execution timed out 1000 ms 1468 KB Program timed out
6 Execution timed out 1000 ms 1468 KB Program timed out
7 Correct 48 ms 1472 KB Output is correct
8 Execution timed out 1000 ms 1468 KB Program timed out
9 Correct 240 ms 1472 KB Output is correct
10 Correct 115 ms 1472 KB Output is correct
11 Execution timed out 1000 ms 1468 KB Program timed out
12 Execution timed out 1000 ms 1468 KB Program timed out
13 Execution timed out 1000 ms 1468 KB Program timed out
14 Correct 28 ms 1472 KB Output is correct
15 Correct 0 ms 1472 KB Output is correct