結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
asdfghjkl;
|
| 提出日時 | 2019-11-11 20:28:46 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 531 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 29,184 KB |
| 実行使用メモリ | 7,040 KB |
| 最終ジャッジ日時 | 2024-09-15 05:24:52 |
| 合計ジャッジ時間 | 13,112 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 33 |
ソースコード
#include <stdio.h>
int main(void){
int l,n,w[10000];
int count,sum=0;
int min,hoji,ans=0;
scanf("%d",&l);
scanf("%d",&n);
for(count=0;count<=n;count++){
scanf("%d",&w[count]);
}
for(;;){
for(count=0;count<=n;count++){
if(min>w[count]){
min=w[count];
hoji=count;
}
}
w[hoji]=111111;
ans=ans+min;
sum++;
if(ans>=l){break;}
}
printf("%d\n",sum);
return 0;
}
asdfghjkl;