Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
23747 yihang 接水问题 C++ 通过 8 MS 260 KB 184 2023-07-16 17:06:02

Tests(10/10):


#include"bits/stdc++.h" using namespace std; int s[1005]; int main(){ int n,m,d; cin>>n>>m; while(n--){ cin>>d; sort(s,s+m); s[0]+=d;} sort(s,s+m); cout<<s[m-1]; }


测评信息: