【置顶】 点我
#include<bits/stdc++.h>
using namespace std;
const int maxn=6005, mod=998244353;
int n, dp[maxn][maxn][4], siz[maxn];
int head[maxn], edgenum;
struct edge{
int nxt;
int to;
}edge[maxn<<1];
void add(int from,int to)
{
edge[++edgenum].nxt=head[from];
edge[edgenum].to=to;
head[from]=edgenum;
}
void dfs(int u,int fa)
{
dp[u][0][0]=dp[u][1][1]=1;
siz[u]++;
for(int i=head[i];i;i=edge[i].nxt)
{
int v=edge[i].to;
if(v==fa) continue;
dfs(v, u);
for(int i=siz[u];i>=0;i--)
{
for(int j=siz[v];j>=0;j--)
{
}
}
siz[u]+=siz[j];
}
}
int main()
{
// freopen("show.in","r",stdin);
// freopen("show.out","w",stdout);
cin>>n;
for(int i=1;i<n;i++)
{
int u, v;
cin>>u>>v;
add(u, v), add(v, u);
}
dfs(1, 0);
for(int i=0;i<=n;i++)
{
cout<<(dp[1][i][0]+dp[1][i][1]+dp[1][i][2])%mod<<" ";
}
return 0;
}http://183.6.8.202:8888/d/contest/contest xagxyz_zhouyiran 6
https://unigravityqwq.github.io/
https://apppc.eyxedu.com/login?redirect=%2Fcourse-review
https://study.xiaoe-tech.com/t_l/learnIndex#/muti_index
https://cz.jingdian985.com/#/login
https://www.geogebra.org/geometry
https://www.cnblogs.com/Chencgy/p/17068294.html
https://qoj.ac/files/OItrainer-main/start.html
https://oj.gxyzh.com/d/gxyznoi/file/507/ikuuu_V3.yml
https://oj.gxyzh.com/d/hzoj/user/507/file/507/Clash%20for%20Windows.7z
https://www.gxyzoj.com/d/hzoj/file/507/Clash%20for%20Windows.7z
https://www.zhihu.com/question/383894896/answer/1149465930
https://www.zhihu.com/question/383894896/answer/1149465930
https://www.luogu.com.cn/article/9sxilb3x
https://www.zhihu.com/question/264569988
https://www.luogu.com.cn/article/6g0nse8t
#include<bits/stdc++.h>
using namespace std;
const int maxn=105;
int n, m, a[maxn], d[maxn][maxn];
struct edge{
int nxt;
int to;
int w;
}edge[maxn<<1];// 短文填空great能
void add(int from,int to,int w)
{
edge[++edgenum].nxt=head[from];
edge[edgenum].to=to;
edge[edgenum].w=w;
head[from]=edgenum;
swap(from, to);
edge[++edgenum].nxt=head[from];
edge[edgenum].to=to;
edge[edgenum].w=0;
head[from]=edgenum;
}
bool bfs(int s,int t)
{
memset(dep, 0, sizeof(dep));
memset(cur, 0, sizeof(cur));
queue<int> q;
q.push(s);
dep[s]=1;
cur[s]=head[s];
while(!q.empty())
{
int u=q.front();
q.pop();
for(int i=head[u];i;i=edge[i].nxt)
{
int v=edge[i].to;
if(edge[i].w>0&&dep[v]==0)
{
dep[v]=dep[u]+1;
cur[v]=head[v];
if(v==t) return 1;
q.push(v);
}
}
}
return 0;
}
int dfs(int s,int flow)
{
if(s==t) return flow;
int res=0;
for(int i=cur[s];i&&flow;i=edge[i].nxt)
{
cur[s]=i;
int v=edge[i].to;
if(edge[i].w>0&&dep[v]==dep[s]+1)
{
int k=dfs(v, min(flow, edge[i].w));
if(k==0) dep[v]=inf;
edge[i].w-=k;
edge[i^1].w+=k;
res+=k;
flow-=k;
}
}
return res;
}
int Dinic(int s,int t)
{
int ans=0;
while(bfs(s, t))
{
ans+=dfs(s, inf);
}
return ans;
}
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
int cnt=0;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n-i+1;j++)
{
cnt++;
cin>>d[i][j];
}
}
return 0;
} <script type="application/ld+json">
"@type": "BlogPosting",
window.cnblogsConfig = {
info: {
name: 'zhouyiran2011', // 用户名
startDate: '2024-04-06', // 入园时间,年-月-日。入园时间查看方法:鼠标停留园龄时间上,会显示入园时间
avatar: 'https://pic.cnblogs.com/face/3422521/20240818193021.png ', // 用户头像,请自己添加一个图片链接
},
banner: {
home: {
title: [
'每一个不曾起舞的日子,都是对生命的辜负。',
'公主死去了,屠龙的少年还在燃烧',
'当你真心渴望追求某种事物的话,整个宇宙都会联合起来帮你完成。',
'无可奈何花落去,似曾相识燕归来。',
'时光可以倒流,只要你握住我的手。',
'为你,千千万万遍......',
'南风知我意,吹梦到西洲。',
'你好',
],
},
},
loading: {
rebound: {
tension: 16,
},
spinner: {
id: 'spinner',
radius: 90,
}
},
progressBar: {
color : '#F08080',
},
animate: {
homeBanner: {
enable: false, //这是背景动画,如果需要可以改成true,但是会消耗电脑资源
options: {
radius: 15,
}
},
background: {
enable: false, //这是背景动画,如果需要可以改成true,但是会消耗电脑资源
},
},
code: {
options: {
macStyle: false,
line: true,
},
},
links: { //友链设置,具体要求请务必查看主题文档 https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v2/#/Docs/Customization/config?id=page-%e5%8f%8b%e9%93%be%e9%a1%b5
page: [
{
name: 'zhouyiran2011', // 昵称
avatar: 'https://pic.cnblogs.com/avatar/3422521/20241125223210.png', // 头像
},
],
},
sidebar: { // 列表数据 ['导航名称', '链接', 'icon']
navList: [
['博客园', 'https://www.cnblogs.com/', 'icon-cnblogs'],
['洛谷','https://www.luogu.com.cn/user/571937'],
],
titleMsg: '欢迎来到我的世界~',
infoBackground: 'https://s2.loli.net/2024/04/09/fZo9kI4SB25vRCd.jpg', //请自己添加一个图片链接
customList: {
"我的": { // 标题
"data": [ // 列表数据 ['列表', '链接']
['日记', 'https://www.cnblogs.com/zhouyiran2011/diary/2024/10/14/18464828'],
['收藏', 'https://wz.cnblogs.com/'],
['写随笔', 'https://i.cnblogs.com/posts/edit'],
['写文章', 'https://i.cnblogs.com/articles/edit'],
['写日记', 'https://i.cnblogs.com/diaries/edit'],
],
"icon": "icon-shoucang" // 配置图标,参考文档:定制化/字体图标库
},
},
},
}
</script>
<script src="https://cdn.jsdelivr.net/gh/BNDong/Cnblogs-Theme-SimpleMemory@v2.1.0/dist/simpleMemory.js" defer></script>Angel Libera
“傍晚的月亮照着花开的田野…”
| 问题规模 | ||||||
|---|---|---|---|---|---|---|
| n≤11 | √ | √ | √ | √ | √ | √ |
| n≤25 | √ | √ | √ | √ | √ | × |
| n≤5000 | √ | √ | √ | √ | × | × |
| n≤1e6 | √ | √ | √ | × | × | × |
| n≤1e7 | √ | √ | × | × | × | × |
| n≤1e8 | √ | × | × | × | × | × |
https://www.luogu.com/article/gbpkw48t
https://blog.csdn.net/EQUINOX1/article/details/136519351
https://www.cnblogs.com/XSC062/p/14383610.html
即使现在失败也没关系,扛过去,一直朝着目标坚持就可以啦。
我需启程
翻越山丘穿过绿荫
跨越阳光遮蔽的土地
沿着奔流到海的银溪
云层与繁星之下
冬日黎明跨过积雪
终于踏上回家的小径
备忘录:
UOJ用户名+密码 同校OJ
CF用户名:zhouyiran_2011_4869 密码同洛谷
Vjudge用户名+密码 同校OJ

