結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-10-19 14:13:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 239 bytes |
コンパイル時間 | 1,469 ms |
コンパイル使用メモリ | 160,884 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-22 15:17:28 |
合計ジャッジ時間 | 3,947 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 24 RE * 10 |
ソースコード
#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]; s++; }; cout<<s<<endl; return 0; }