QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#231901#7063. Space Stationucup-team1001WA 1ms7528kbC++201.2kb2023-10-29 17:52:302023-10-29 17:52:31

Judging History

你现在查看的是最新测评结果

  • [2023-10-29 17:52:31]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:7528kb
  • [2023-10-29 17:52:30]
  • 提交

answer

#include<bits/stdc++.h>

#define ull unsigned long long
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define ll long long
int tot = 0;
#define irep(i, l, r) for(int i = l; i <= r; ++ i)

int state[1380000][55];
int sum[1380000];
array<ll, 55> temp;
ll pw[55] = {1, 1};
int n0 = 52;
const int N = 1380000;

struct my_hash {
    auto operator()(const array<ll, 55> &arr) const {
        int hs = 0;
        irep(i, 1, 50) {
            hs += arr[i] * pw[i];
        }
        return hs;
    }
};

unordered_map<array<ll, 55>, int, my_hash> mp;

inline int read() {
    int x;
    cin >> x;
    return x;
}


void dfs(int n, int lst) {
    if (n < 0)return;
//    int hs = 0;

    irep(i, 1, 50) {
//        hs += temp[i] * pw[i];
        state[tot][i] = temp[i];
    }

    mp[temp] = tot;
    sum[tot] = n0 - n;
    ++tot;

    for (int i = lst; i <= n; ++i) {
        temp[i]++;
        dfs(n - i, i);
        temp[i]--;
    }
}

const int mod = 1e9 + 7;

ll f[N];

int main() {
    IOS
    int n = read();

    irep(i, 2, 52) {
        pw[i] = pw[i - 1] * 13331;
    }
    dfs(n, 1);


}
/*
204226 * 50
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
2 1 2 3

output:


result:

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