| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 8187 | 欧阳漌 | 药房管理 | C++ | Accepted | 100 | 0 MS | 256 KB | 261 | 2020-10-31 16:53:54 |
#include<bits/stdc++.h> using namespace std; int main(){ int m,a[101],n,count=0; cin>>m>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ if(m<a[i]){ m+=a[i]; count++; } m-=a[i]; } cout<<count; return 0; }