QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#336811#8284. Cats and Fishucup-team1516#WA 0ms3676kbC++201.0kb2024-02-24 21:40:122024-02-24 21:40:13

Judging History

This is the latest submission verdict.

  • [2024-02-24 21:40:13]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3676kb
  • [2024-02-24 21:40:12]
  • Submitted

answer

#include <string.h>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int m,n,x;
    cin >> m >> n >> x;
    vector<int>c(n);
    int c1 = 0,c2 = 0;
    for(int i = 0; i < n; i++) {
        cin >> c[i];
        c2 += x/c[i];
        c1 += (x-1)/c[i];
    }
    if(c2 >= m) {
        cout << 0 << " " << 0 << "\n";
    }
    else {
        int res = n-(c2-c1);
        cout << max(0,m-c2-res) << " " << min(m-c2,res) << "\n";
    }
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3672kb

input:

2 1 1
1

output:

1 0

result:

ok 2 number(s): "1 0"

Test #2:

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

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

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

input:

1 1 10
1

output:

0 0

result:

ok 2 number(s): "0 0"

Test #5:

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

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

input:

1 1 1
2

output:

0 1

result:

ok 2 number(s): "0 1"

Test #8:

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

input:

12 2 11
8 3

output:

6 2

result:

ok 2 number(s): "6 2"

Test #9:

score: -100
Wrong Answer
time: 0ms
memory: 3576kb

input:

2 2 12
24 1

output:

0 0

result:

wrong answer 2nd numbers differ - expected: '1', found: '0'