0 Compile Error

foo.cc: In function 'int main()':
foo.cc:21:8: error: invalid operands of types 'int' and 'int [105]' to binary 'operator-'
       m-a=a[i];
       ~^~

代码

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,a[105];
    cin>>n>>m;
    int t=n;
    for(int i=1;i<=n;i++)
{
    cin>>a[i];
}
for(int i=1;i<=n;i++)
{
    if(a[i]>m)
    {
        continue;
    }
    else
    {
      t--;
      m-a=a[i];
    }
}
cout<<t;
return 0;
}

信息

递交者
题目
DJKS1009  药房管理
比赛
2024年3月等考一级题单
语言
C++ 14
递交时间
11 个月前
评测时间
11 个月前
分数
0
总耗时
0ms
峰值内存
0 Bytes