QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#960675#1137. Packing BiscuitsWansur#0 1ms4692kbC++23848b2025-04-01 18:00:072025-04-01 18:00:07

Judging History

This is the latest submission verdict.

  • [2025-04-01 18:00:07]
  • Judged
  • Verdict: 0
  • Time: 1ms
  • Memory: 4692kb
  • [2025-04-01 18:00:07]
  • Submitted

answer

#include "biscuits.h"
#include <bits/stdc++.h>
#define ent '\n'

using namespace std;
typedef long long ll;

ll a[71];
ll n, k;

long long count_tastiness(long long x, vector<long long> A) {
    while(!A.empty() && A.back() == 0) A.pop_back();
    if(A.empty()) return 1;
    n = x, k = (int)A.size();
    for(int i = 0; i < 70; i++) {
        a[i] = 0;
    }
    for(int i = 0; i < k; i++) {
        a[i] = A[i];
    }
    vector<ll> ans = {0};
    ll sum = 0;
    for(int i = 0; i < 61; i++) {
        int sz = (int)ans.size();
        sum += (a[i] << i);
        sum -= (sum % (1 << i));
        for(int j = 0; j < sz; j++) {
            if(sum - ans[j] >= (1ll << i) * n) {
                ans.push_back({ans[j] + (1ll << i)});
            }
            else break;
        }
    }
    return (ll)ans.size();
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1b32a07d5f5fc55f21038b12a3655e
10
1 1
0
1 1
5
1 1
18
1 1
2664
1 1
97853
2 1
0 4663
3 1
0 0 1567
10 1
0 0 0 0 0 0 0 0 0 97
15 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
60 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

output:

23b69acd873f5d7e892bae7de83615
OK
1
5
17
2049
65537
4097
1025
65
2
1

result:

wrong answer 4th lines differ - expected: '6', found: '5'

Subtask #2:

score: 0
Wrong Answer

Test #15:

score: 0
Wrong Answer
time: 1ms
memory: 4692kb

input:

1b32a07d5f5fc55f21038b12a3655e
10
1 1
0
1 1
5
1 1
18
1 1
2664
1 1
97853
2 1
0 4663
3 1
0 0 1567
10 1
0 0 0 0 0 0 0 0 0 97
15 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
60 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

output:

23b69acd873f5d7e892bae7de83615
OK
1
5
17
2049
65537
4097
1025
65
2
1

result:

wrong answer 4th lines differ - expected: '6', found: '5'

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Time Limit Exceeded

Test #37:

score: 0
Time Limit Exceeded

input:

1b32a07d5f5fc55f21038b12a3655e
1000
1 58154
7524966895
1 8202307
111644679548
1 4657823
572813778574
1 8581224
917709588724
1 2549268
93837813781
1 6469550
461900798305
1 9462249
1237159241753
1 5977464
27903181559
1 6141451
1158318945018
1 2941240
189538399954
1 4053464
31464433253
1 9709136
610950...

output:

Unauthorized output

result:


Subtask #5:

score: 0
Skipped

Dependency #1:

0%