Submission #82537
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #include <stdio.h> int main() { int n; scanf ( "%d" , &n); int arr[n]; for ( int i = 0; i < n; i++) { scanf ( "%d" , &arr[i]); } for ( int i = 0; i < n; i++) { for ( int j = 0; j < n-1-i; j++) { if (arr[j] > arr[j+1]) { int tmp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = tmp; } } } for ( int i = 0; i < n; i++) { printf ( "%d\n" , arr[i]); } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 1777 - 小さい順 |
ユーザー名 | ei2501 |
投稿日時 | 2025-04-11 17:40:05 |
言語 | C |
状態 | Accepted |
得点 | 1234 |
ソースコード長 | 511 Byte |
最大実行時間 | 23 ms |
最大メモリ使用量 | 584 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1234 / 1234 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 23 ms | 504 KB |
1
|
in2.txt | AC | 15 ms | 528 KB |
1
|
in3.txt | AC | 17 ms | 584 KB |
1
|
in4.txt | AC | 18 ms | 420 KB |
1
|
in5.txt | AC | 21 ms | 432 KB |
1
|