burnside
原创 2023-02-16 11:32:32
13阅读
题意 n个点m条单向边 计算 从1到每一个点的权值(除了1) 和每个点回到1 的权值之和 正向跑一次 反向跑一次即可 #include<bits/stdc++.h> using namespace std; //input by bxd #define rep(i,a,b) for(int i=(a
转载 2019-04-25 19:35:00
55阅读
2评论
Exchange CardsTime Limit:2 Seconds Memory Limit:65536 KBAs a basketball fan, Mike is also fond of collecting basketball player cards. But as a student...
转载 2015-08-06 01:05:00
40阅读
2评论
// Problem: C. K-special Tables // Contest: Codeforces - Codeforces Round #342 (Div. 2)
原创 2022-08-16 14:53:12
57阅读
题目链接: "戳我" 看落咕上有一些题解用公式把题做出来了,我也不会这种数论方法,(而且好像是解法被hack了 这里介绍burnside+dp的做法。 设dp[i][j][k]表示对于当前这种置换,三种颜色分别使用i,j,k个的染色方案个数。转移的话,我们将置换拆成循环,要从上一个没有使用这种颜色染
原创 2021-07-15 14:26:39
49阅读
Invitation CardsTime Limit: 8000MSMemory Limit: 262144KTotal Submissions: 15101Accepted: 4897DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. T
原创 2021-07-29 16:22:39
89阅读
http://acm.hdu.edu.cn/showproblem.php?pid=1535这道题两遍spfa,第一遍sfpa之后,重新建图,所有的边逆向建边,再一次spfa就可以了。 1 #include 2 #include 3 #include 4 #include 5 #includ...
转载 2014-04-25 21:23:00
41阅读
2评论
Invitation Cards 翻译: 描述 在电视时代,没有多少人参加戏剧表演。 Malidinesia古董喜剧演员知道这个事实。他们想传播戏剧,最重要的是古董喜剧。他们已经印制了包含所有必要信息和程序的邀请卡。许多学生被聘请将这些邀请分发给人们。每个学生志愿者都分配了一个公交车站,并且他或她在
转载 2018-06-29 16:04:00
56阅读
2评论
题目描述 小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目前小春只有3种颜色:红色,蓝色,绿色.他询问Sun有多少种染色方案,Sun很快就给出了答案. 进一步,小春要求染出Sr张红色,Sb张蓝色,Sg张绿色.他又询问有多少种方案,Sun想了一下,又给出了正确答案. 最后小春发明了M种不同的洗
转载 2017-10-22 14:51:00
31阅读
2评论
看了一下polya和burnside定理,感觉还行(就是不会证……)这题用的是burnsideans=在每个置换群下不动的方案数之和除以置换数这题有个难点在取模关于对p(p为素数)取模(涉及到了除法),我总结了两种方法:已知x mop p=y,要求x/z mod p=?大体思路是利用乘法逆,将/z转... Read More
转载 2014-06-20 13:29:00
29阅读
2评论
Problem Description:When Serezha was three years old,nto words in the way which formed the boy's mother favorite numbe...
原创 2023-06-28 15:32:40
87阅读
前言:很久没写博客了,虽然做了好多题,太懒了,这道题单纯就一个爬虫题目文章目录​​思路​​​​wp​​思路我们在每次请求都会有一个SecretState参数,用来保存游戏状态,并且在客户端和服务端同步。这个参数没法篡改。每次请求,服务端都会生成一个新的SecretState,但是旧的SecretState并不失效,问题就出在于此。 游戏如果赢了,就更新SecretState,如果输了,则不更新Se
原创 2022-11-06 16:59:31
198阅读
点击打开链接 题意为 从1出发到其他所有点 路费多少 再从各点回来 路费多少 两者相加 其他都是废话 比赛时题意就没理解 #include <stdio.h> #include <vector> #define N 9999999999 using namespace std; struct node { int v; int w; }; vec...
原创 2022-06-15 21:24:47
26阅读
题意:给你一个只有‘.’和'#'的n*n的格子,问所有的'#'是不是只属于一个十字叉,如果不是输出NO,否则输出YES。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int n; 7 char g[200][200]...
转载 2015-01-25 14:02:00
36阅读
2评论
#include<iostream> //Dijkstra+优先队列 1735MS!#include<queue>#define maxn 1000002using namespace std;struct Edge { int v; int weight; int next;}Vertex[maxn];int head[maxn],curr; const __int64 inf=(__int64)1<<63-1; int cases,p,e,i,j,edge[maxn][3];void graph(int tag){ int u,v,w; curr=0;
转载 2011-07-22 22:34:00
57阅读
原题链接 考察:最短路 思路: 较水,正反向建图求和. 1 #include <iostream> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 typedef long long LL; 6 typedef pai
转载 2021-05-01 23:40:00
64阅读
2评论
CARDSTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 1033Accepted: 544DescriptionAlice and Bob have a set of N cards labelled with numbers 1 ... N (so that no two cards have the same label) and a shuffle machine. We assume that N is an odd integer. The shuffle machine accepts the set of car
转载 2012-09-04 15:46:00
80阅读
2评论
[HNOI2008]Cards 加上元置换(必须加上),共(m+1)个置换 考虑每个置换不动点 类似dfs暴力找环 方案只和环个数和大小有关。 而颜色数量有限制 于是dp dp[i][j][k][l]表示前i个环,三种颜色分别用了j,k,l次的染色方案数。每个环颜色必须相等。 然后枚举环用的颜色即可
F. Cards and Joy 题目大意: 给你n个人,每一个人恰好选k张牌。 第一行是 n 和 k 第二行有n*k个数,代表有n*k张牌,每张牌上的数字 第三行有n个数,代表第i个人喜欢的数字 第四行有k个数,代表有如果一个人可以拿到 i 张喜欢的牌,那么快乐值+h[i] 然后就是让你分配这些牌
转载 2019-10-07 18:59:00
57阅读
2评论
第i个位置的牌是a[i],一次交换后第i个位置的牌变成a[a[i]]。序列所有位置经过一次交换为一次交换, 已知交换m次之后的序列,求原先序列 思路: 给出a[i]为4 7 5 6 1 2 3 进行一次变换 1 2 3 4 5 6 7 4 7 5 6 1 2 3 1 2 3 4 5 6 7 * =4
转载 2020-01-02 16:02:00
28阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5