水题,排序遍历即可 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; ; int drag[maxn], kn[maxn]; int main() { int n, m, cost; while (cin >> n >> m) { && m == )break; ;i < n;i++)cin >> drag[i…
Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to the lack of predato…
Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to the lack of predato…
C - 贪心 基础 Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The sh…
笔者休息娱乐. ; int n, m, a; ll solve(int n, int m) { ll ans = ; priority_queue<int, vector<int>, greater<int>> dragon, knight; rep(i, , n) { read(a); dragon.push(a); } rep(i, , m) { read(a); knight.push(a); } ; while (true) { if (dragon.empty…