Submission #14063

# Submission time Handle Problem Language Result Execution time Memory
14063 2015-04-26T03:46:46 Z kipa00 버블 정렬 (OJUZ10_bubblesort) C++
34 / 100
1000 ms 1472 KB
#include <cstdio>

int arr[100000];
int main() {
    int N, K, i, j;
    scanf("%d %d", &N, &K);
    for (i=0; i<N; ++i) {
        scanf("%d", arr+i);
    }
    for (i=0; i<K; ++i) {
        for (j=1; j<N; ++j) {
            if (arr[j-1] > arr[j]) {
                arr[j-1] ^= arr[j] ^= arr[j-1] ^= arr[j];
            }
        }
    }
    for (i=0; i<N; ++i) {
        printf("%d ", arr[i]);
    }
    printf("\n");
    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 0 ms 1472 KB Output is correct
2 Correct 4 ms 1472 KB Output is correct
3 Correct 8 ms 1472 KB Output is correct
4 Correct 4 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 5 ms 1472 KB Output is correct
8 Correct 0 ms 1472 KB Output is correct
9 Correct 0 ms 1472 KB Output is correct
10 Correct 3 ms 1472 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 1472 KB Output is correct
2 Execution timed out 1000 ms 1468 KB Program timed out
3 Correct 63 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 Correct 23 ms 1472 KB Output is correct
8 Execution timed out 1000 ms 1468 KB Program timed out
9 Execution timed out 1000 ms 1468 KB Program timed out
10 Correct 156 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 349 ms 1472 KB Output is correct
15 Correct 164 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 59 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 Correct 165 ms 1472 KB Output is correct
7 Correct 161 ms 1472 KB Output is correct
8 Correct 37 ms 1472 KB Output is correct
9 Execution timed out 1000 ms 1468 KB Program timed out
10 Correct 351 ms 1472 KB Output is correct
11 Correct 29 ms 1472 KB Output is correct
12 Execution timed out 1000 ms 1468 KB Program timed out
13 Execution timed out 1000 ms 1468 KB Program timed out
14 Execution timed out 1000 ms 1468 KB Program timed out
15 Execution timed out 1000 ms 1468 KB Program timed out