- 博客(4)
- 收藏
- 关注
原创 HDU 6446 Tree and Permutation(根节点)
这道题我记得当时是在网上找的板子。。。。 http://acm.hdu.edu.cn/showproblem.php?pid=6446 先定义一个数n,n个数有n!种排列方法,然后求两条边的权值之和,显然他是有(n-1)!2种结果,对于两个相邻的点来说,他的计算的次数其实是两个边的节点所形成的树的子树的数量。 #include<iostream> #include<std...
2018-11-29 22:03:55 101
原创 HDU 1176 免费馅饼
http://acm.hdu.edu.cn/showproblem.php?pid=1176 Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接...
2018-11-29 13:37:35 54
原创 二叉树
#include <stdio.h> #include <stdlib.h> #define LEN sizeof(struct student) typedef struct student *stud; struct student{ int score; stud left; stud right; }; static stud* q; static i...
2018-11-27 21:58:10 69
原创 A. Alyona and Numbers(CF ROUND 358 DIV2)
暴力会超时。。。 #include<iostream> using namespace std; int main(){ long long n,m,sum=0; cin>>n>>m; for(int i=1;i<=n;i++){ sum+=(i+m)/5-i/5; } cout<<sum<<endl; retu...
2018-11-27 13:20:32 114
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人