📌  相关文章
📜  在线免费将c代码转换为java - C++代码示例

📅  最后修改于: 2022-03-11 14:44:45.126000             🧑  作者: Mango

代码示例1
#include
#include
using namespace std;
int cmp(int &a,int &b)
{
    return a>b;
}
int main()
{
    int n;
    long int b;
    long int sum;
    int i;
    int count;
    int cows[20000];
    cin>>n>>b;
    for(i=0;i>cows[i];
    sort(cows,cows+n,cmp);
    sum=0;
    count=0;
    for(i=0;i=b)
            break;
        sum+=cows[i];
        count++;
    }
    cout<