QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#352264#8284. Cats and Fishberarchegas#RE 0ms3876kbC++20863b2024-03-13 05:54:562024-03-13 05:54:56

Judging History

This is the latest submission verdict.

  • [2024-03-13 05:54:56]
  • Judged
  • Verdict: RE
  • Time: 0ms
  • Memory: 3876kb
  • [2024-03-13 05:54:56]
  • 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 = 1e3 + 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: 0ms
memory: 3612kb

input:

2 1 1
1

output:

1 0

result:

ok 2 number(s): "1 0"

Test #2:

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

input:

8 3 5
1 3 4

output:

0 1

result:

ok 2 number(s): "0 1"

Test #3:

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

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: 0ms
memory: 3680kb

input:

1 1 10
1

output:

0 0

result:

ok 2 number(s): "0 0"

Test #5:

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

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: 3584kb

input:

8 2 7
12 13

output:

6 2

result:

ok 2 number(s): "6 2"

Test #7:

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

input:

1 1 1
2

output:

0 1

result:

ok 2 number(s): "0 1"

Test #8:

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

input:

12 2 11
8 3

output:

6 2

result:

ok 2 number(s): "6 2"

Test #9:

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

input:

2 2 12
24 1

output:

0 1

result:

ok 2 number(s): "0 1"

Test #10:

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

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: 3596kb

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
Runtime Error

input:

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

output:


result: