結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-10-19 14:12:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 231 bytes |
コンパイル時間 | 1,524 ms |
コンパイル使用メモリ | 161,808 KB |
実行使用メモリ | 16,968 KB |
最終ジャッジ日時 | 2024-11-22 15:17:17 |
合計ジャッジ時間 | 212,992 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 34 |
ソースコード
#include<bits/stdc++.h> using namespace std; int a[10000]; int main(){ int l,n; cin>>l; cin>>n; for(int i=0;i<n;i++)cin>>a[i]; sort(a,a+n); int s=0; while(s<n||l>=0){ l-=a[s]; }; cout<<s<<endl; return 0; }