QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#597876 | #8936. Team Arrangement | ucup-team1074 | WA | 153ms | 524060kb | C++23 | 1.4kb | 2024-09-28 19:14:28 | 2024-09-28 19:14:29 |
Judging History
answer
// Problem: L - Random Numbers
// Contest: Virtual Judge - The 3rd Universal Cup. Stage 8: Cangqian + The 3rd Universal Cup. Stage 7: Warsaw
// URL: https://vjudge.net/contest/658753#problem/L
// Memory Limit: 1014 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 5e05+10;
const LL mod = 1e09+7;
const int inf = 0x3f3f3f3f;
#define int long long
const LL llinf = 5e18;
const int B = 500;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
vector<int>tmp(65 , 0);
vector<vector<int>>ans;
void dfs(int step , int now){
if(step == 61){
if(now == 60){
ans.pb(tmp);
}
return;
}
if(now == 60){
ans.pb(tmp);
return;
}
if(now + step > 60){
return;
}
for(int i = 0 ; step * i + now <= 60 ; i ++){
tmp[step] += i;
now += step * i;
dfs(step + 1 , now);
now -= step * i;
tmp[step] -= i;
}
return;
}
void solve()
{
dfs(1 , 0);
cout << ans.size() << endl;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout.precision(10);
int t=1;
//cin>>t;
while(t--)
{
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 153ms
memory: 524060kb
input:
3 2 3 1 2 2 2 4 5 100
output:
966467
result:
wrong answer 1st lines differ - expected: '9', found: '966467'