結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-10-19 14:11:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 1,669 ms |
コンパイル使用メモリ | 161,848 KB |
実行使用メモリ | 17,096 KB |
最終ジャッジ日時 | 2024-11-22 15:13:35 |
合計ジャッジ時間 | 212,811 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; }