QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#352265#8284. Cats and Fishberarchegas#WA 1ms3816kbC++20863b2024-03-13 05:55:262024-03-13 05:55:27

Judging History

This is the latest submission verdict.

  • [2024-03-13 05:55:27]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3816kb
  • [2024-03-13 05:55:26]
  • Submitted

answer

#include <bits/stdc++.h>
 
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
 
mt19937 rng((int) chrono::steady_clock::now().time_since_epoch().count());
    
const int MOD = 1e9 + 7;
const int MAXN = 3e3 + 5;
const ll INF = 2e18;

set<int> v[MAXN];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int m, n, t;
    cin >> m >> n >> t;
    vector<int> cat(n);
    for (int &x : cat) {
        cin >> x;
        v[0].insert(x);
    }
    int cnt = n;
    for (int i = 0; i < t; i++) {
        for (int x : v[i]) {
            if (m) {
                m--;
                v[i + x].insert(x);
            }
            else {
                cnt--;
            }
        }
    }
    cnt -= (int)v[t].size();
    cout << m << ' ' << cnt << '\n';
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3772kb

input:

2 1 1
1

output:

1 0

result:

ok 2 number(s): "1 0"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3748kb

input:

8 3 5
1 3 4

output:

0 1

result:

ok 2 number(s): "0 1"

Test #3:

score: 0
Accepted
time: 1ms
memory: 3752kb

input:

4 5 1
5 4 3 2 1

output:

0 3

result:

ok 2 number(s): "0 3"

Test #4:

score: 0
Accepted
time: 1ms
memory: 3772kb

input:

1 1 10
1

output:

0 0

result:

ok 2 number(s): "0 0"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

14 3 10
1 40 50

output:

2 2

result:

ok 2 number(s): "2 2"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

8 2 7
12 13

output:

6 2

result:

ok 2 number(s): "6 2"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

1 1 1
2

output:

0 1

result:

ok 2 number(s): "0 1"

Test #8:

score: 0
Accepted
time: 1ms
memory: 3736kb

input:

12 2 11
8 3

output:

6 2

result:

ok 2 number(s): "6 2"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

2 2 12
24 1

output:

0 1

result:

ok 2 number(s): "0 1"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

562 8 232
17 26 800 12 77 32 11 2

output:

368 7

result:

ok 2 number(s): "368 7"

Test #11:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

562 8 1
17 26 800 12 77 32 11 1

output:

554 7

result:

ok 2 number(s): "554 7"

Test #12:

score: -100
Wrong Answer
time: 1ms
memory: 3740kb

input:

3656 13 123
1887 26 800 12 77 32 11 1 77 32 77 32 155

output:

3496 12

result:

wrong answer 1st numbers differ - expected: '3484', found: '3496'