Submission #446797

#TimeUsernameProblemLanguageResultExecution timeMemory
446797Valaki2Colouring a rectangle (eJOI19_colouring)C++14
10 / 100
63 ms7652 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int n, m; void solve_n_1() { vector<ll> a(n + m - 1, 0); vector<ll> b(n + m - 1, 0); for(ll &x : a) cin >> x; for(ll &x : b) cin >> x; reverse(b.begin(), b.end()); ll ans = 0; for(ll i = 0; i < n + m - 1; ++i) ans += min(a[i], b[i]); cout << ans << "\n"; } void solve_bf_1010() { } void solve() { cin >> n >> m; if(n == 1) { solve_n_1(); return; } if(n <= 20 && m <= 20) { solve_bf_1010(); return; } } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...