自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 “浪潮杯”山东省第六届ACM大学生程序设计竞赛 Cube Number

题意:给你若干个数,找两两相乘是立方数的个数。思路:一个数肯定能分解成若干个素数相乘,那么我们就可以除以这些素数的立方,然后再找到能够跟这个数一起组成立方数即可。代码;#include<bits/stdc++.h>using namespace std;int dp[1005];int pri[1005];int num;int k[1000005];void prime(...

2018-05-16 17:12:28 148

原创 “浪潮杯”山东省第六届ACM大学生程序设计竞赛 Square Number

题目:给你若干个数,两两相乘组成平方数的有多少个。思路:一个合数肯定能拆成若干个素数相乘,我们只要除以质数的偶数次幂,找到能与他匹配的余数就可以了代码:#include<bits/stdc++.h>using namespace std;int dp[1005];int pri[1005];int num;int k[1000005];void prime(){ ...

2018-05-16 17:06:19 160

原创 fzu 2270 Two Triangles (几何)

题目链接:http://acm.fzu.edu.cn/problem.php?pid=2270题意:给n个点,从中选出6个不同的点组成两个三角形,使其中一个三角形可以通过另一个三角形平移和旋转得到。问有多少种不同选法?思路:先找全等三角形,然后判断是否能够旋转平移得到,只有对称的是不能得到的,运用叉积判断是否对称,当叉积小于0时对称代码:#include<iostream>#incl...

2018-05-11 17:38:09 186

原创 fzu 2218 Simple String Problem(状压dp)

题目链接:http://acm.fzu.edu.cn/problem.php?pid=2218题意:给出字符串,只包含m个字母。求两个子串,相互间不包含相同字母的长度的乘积最大思路:首先求出每个状态所能达到的最大长度,再求出小于等于这种状态字母数的最大长度,最后求最大乘积。代码:#include<iostream>#include<stdio.h>#include&lt...

2018-05-11 11:04:16 148

原创 fzu2216 The Longest Straight (前缀和+二分+枚举)

题意:给你n张纸牌,代表的数字在1至m区间,0可以充当1到m中任何牌,求出最大的连续区间的长度。思路:算出1到i需要几个0,用num[i]表示,然后枚举左端点,二分搜索用0的个数看看最长区间为多少。代码:#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm&g...

2018-05-10 23:16:36 168

原创 poj1639 Picnic Planning ((最小限制度生成树模板)

Picnic PlanningTime Limit: 5000MS Memory Limit: 10000KTotal Submissions: 11436 Accepted: 4107DescriptionThe Contortion Brothers are a famous set of circus clowns, known worldwide for their incredible ...

2018-05-10 22:33:38 189

原创 poj 3635 Full Tank?(dp+最短路)

Full Tank?Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7866 Accepted: 2547DescriptionAfter going through the receipts from your car trip through Euro

2018-05-07 00:12:18 233 2

原创 poj 3621 Sightseeing Cows(01分数规划+spfa)

Sightseeing CowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11115 Accepted: 3778DescriptionFarmer John has decided to reward his cows for their hard

2018-05-05 22:42:02 187

原创 poj 3613 Cow Relays(floyd+矩阵快速幂)

Cow RelaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8295 Accepted: 3260DescriptionFor their physical fitness program, N (2 ≤ N ≤ 1,000,000) cows h

2018-05-03 23:29:13 144

原创 poj 2449 Remmarguts' Date(第K短路)

Remmarguts' DateTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 33704 Accepted: 9145Description"Good man never makes girls wait or breaks an appointment

2018-05-02 23:10:52 144

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除