hdu 5548 Mahjong ccpc 2015(dp 套 dp)

The problem asks for the number of unique ways to form a winning mahjong hand with k different types of tiles, each having 4 copies, when m tiles are drawn. It's a dynamic programming (dp) problem from CCPC 2015." 134275130,15843461,结构正则化深度聚类在无监督域适应中的应用,"['机器学习', '深度学习', '无监督学习', '聚类算法', '域适应']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

题意:k类麻将牌,没类4张,抽取m张胡牌的方案有多少种,方案不同指抽取的k张牌不同

http://acm.hdu.edu.cn/showproblem.php?pid=5548

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <queue>

using namespace std;


#define N (300010)
#define M (2000020) 
#define LL long long
#define ULL unsigned long long
#define eps 1e-8
#define pii pair<int, int> 
#define MP make_pair
#define ls (i<<1)
#define rs (i<<1|1)
#define md (ll+rr>>1)
#define lson ll, md, ls
#define rson md+1, rr, rs
#define mod 1000000007
#define DEBUG 0

int g[M][5];
int dp[202][202][200];
int ans[202][202];
int tot;
bool mark[200];
int id[N];
map<LL, int> mp;

int get_id(LL st) {
	if(!mp.count(st)) mp[st] = tot++;
	return mp[st];
}
int code(int a, int b, int c) {
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值