Submission #00069
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include<stdio.h> int main(){ int m,n,i,j; scanf ( "%d %d" ,&m,&n); int r[m]; for (i=0;i<m;i++){ scanf ( "%d" ,&r[i]); } for (i=0;i<m-1;i++){ for (j=0;j<m-i-1;j++){ if (r[j]<r[j+1]){ int temp; temp = r[j]; r[j] = r[j+1]; r[j+1] = temp; } } } for (i=0;i<n;i++){ printf ( "%d\n" ,r[i]); } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - お〜い お |
ユーザー名 | ei1601 |
投稿日時 | 2016-07-05 15:30:57 |
言語 | C++11 |
状態 | Time Limit Exceeded |
得点 | 0 |
ソースコード長 | 359 Byte |
最大実行時間 | 1000 ms |
最大メモリ使用量 | 812 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 40 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 23 ms | 476 KB |
1
|
in2.txt | AC | 13 ms | 464 KB |
1
|
in3.txt | AC | 10 ms | 448 KB |
1
|
in4.txt | AC | 11 ms | 436 KB |
1
|
in5.txt | TLE | 1000 ms | 812 KB |
1
|
in6.txt | AC | 12 ms | 412 KB |
1
|