| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 555623 | Jarif_Rahman | 운세 보기 2 (JOI14_fortune_telling2) | C++17 | 3067 ms | 1876 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k; cin >> n >> k;
vector<ll> A(n), B(n);
vector<ll> T(k);
for(int i = 0; i < n; i++) cin >> A[i] >> B[i];
for(int i = 0; i < k; i++) cin >> T[i];
ll ans = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j < k; j++){
if(T[j] >= A[i]) swap(A[i], B[i]);
}
ans+=A[i];
}
cout << ans << "\n";
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
