QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#489770#8811. Heat Strokebambam#0 0ms3744kbC++17729b2024-07-25 00:32:332024-07-25 00:32:33

Judging History

This is the latest submission verdict.

  • [2024-07-25 00:32:33]
  • Judged
  • Verdict: 0
  • Time: 0ms
  • Memory: 3744kb
  • [2024-07-25 00:32:33]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);

    int k;
    cin >> k;
    vector<int> c(k);
    for (auto& i : c) cin >> i;
    int n;
    cin >> n;
    vector<int> x(n);
    for (auto& i : x) cin >> i, --i;
    int ans = 0;
    for (int mask = 0; mask < (1 << n); ++mask) {
        auto d = c;
        int cur = 0;
        for (int i = 0; i < n; ++i) {
            int d1 = (mask >> i & 1);
            int d2 = (mask >> i & 1);
            if (c[x[i] + d1] > 0) c[x[i] + d1]--;
            else if (c[x[i] + d2] > 0) c[x[i] + d2]--;
            else cur++;
        }
        ans = max(ans, cur);
        c = d;
    }
    cout << ans;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 6
Accepted
time: 0ms
memory: 3604kb

input:

2
0 0
1
1

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3608kb

input:

2
0 1
1
1

output:

1

result:

wrong answer 1st lines differ - expected: '0', found: '1'

Subtask #2:

score: 0
Wrong Answer

Test #33:

score: 0
Wrong Answer
time: 0ms
memory: 3744kb

input:

3
1 1 1
3
1 2 1

output:

2

result:

wrong answer 1st lines differ - expected: '1', found: '2'

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #6:

0%

Subtask #8:

score: 0
Skipped

Dependency #1:

0%