Submission #922744

# Submission time Handle Problem Language Result Execution time Memory
922744 2024-02-06T05:19:17 Z SuPythony Self Study (JOI22_ho_t2) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int n,m; cin>>n>>m;
    vector<ll> a(n), b(n);
    for (auto &i: a) cin>>i;
    for (auto &i: b) cin>>i;
    priority_queue<pair<ll,int>> q;
    for (int i=0; i<n; i++) q.push({0ll,i});
    for (int i=0; i<n*m; i++) {
        auto t=q.top(); q.pop();
        q.push({t.first+b[t.second],t.second});
    }
    cout<<q.top().first;
    return 0;   
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -