# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
789263 | 2023-07-21T08:43:36 Z | Dan4Life | Bulldozer (JOI17_bulldozer) | C++17 | 1 ms | 212 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(a) begin(a),end(a) vector<array<int,3>> v; int32_t main() { int n; cin >> n; int sum = 0, ans=0; for(int i = 0; i < n; i++){ int x,y,z; cin>>x>>y>>z; v.pb({x,y,z}); } sort(all(v)); for(auto [x,y,z] : v) sum+=z;ans=max(ans,sum), sum=max(sum,0ll); cout << ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |