| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 728202 | jampm | 운세 보기 2 (JOI14_fortune_telling2) | C++17 | 3076 ms | 1744 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
//stress test brute force
int main() {
ll n, k, ans = 0, idx = 0; cin >> n >> k;
ll card[2][n], oper[k];
for (int i = 0; i < n; i++) cin >> card[0][i] >> card[1][i];
for (int i = 0; i < k; i++) cin >> oper[i];
for (int i = 0; i < n; i++, idx = 0) {
for (int j = 0; j < k; j++) {
idx ^= (card[idx][i] <= oper[j]);
}
ans += card[idx][i];
}
cout << ans << endl;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
