• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
奚政
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 30 下一页

2017年3月19日

hdu1233 还是畅通工程 最小生成树
摘要: 给出修建边的边权,求连通所有点的最小花费 最小生成树裸题 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 6 struct seg{ 7 int a,b,l; 8 bool 阅读全文
posted @ 2017-03-19 04:34 奚政 阅读(141) 评论(0) 推荐(0)
 
hdu1166 敌兵布阵 树状数组/线段树
摘要: 数列的单点修改、区间求和 树状数组或线段树入门题 1 #include<stdio.h> 2 #include<string.h> 3 4 int c[50005],N; 5 6 void add(int x,int a){ 7 while(x<=N){ 8 c[x]+=a; 9 x+=(x&-x) 阅读全文
posted @ 2017-03-19 04:30 奚政 阅读(172) 评论(0) 推荐(0)
 
hdu1097
摘要: hdu1097 求a^b的末位数 打表O(1) 1 import java.util.*; 2 3 public class Main { 4 static int [][]a = new int[15][15]; 5 static int []num = new int[15]; 6 public 阅读全文
posted @ 2017-03-19 04:26 奚政 阅读(198) 评论(0) 推荐(0)
 
hdu1029
摘要: hdu1029 找出数列中出现(N+1)/2次的数,暴力模拟 1 #include<stdio.h> 2 #include<map> 3 using namespace std; 4 5 int main(){ 6 int n; 7 while(scanf("%d",&n)!=EOF){ 8 map 阅读全文
posted @ 2017-03-19 04:22 奚政 阅读(224) 评论(0) 推荐(0)
 
hdu2099
摘要: hdu2099 模拟 1 #include<stdio.h> 2 int m[100]; 3 int main(){ 4 long long a,b,t; 5 while(scanf("%I64d%I64d",&a,&b)!=EOF&&(a!=0&&b!=0)){ 6 t=a*100; 7 long 阅读全文
posted @ 2017-03-19 04:18 奚政 阅读(193) 评论(0) 推荐(0)
 
hdu2098 分拆素数和 素数筛
摘要: 将一个偶数拆成两个素数的和,欧拉筛暴力 1 #include<stdio.h> 2 #include<string.h> 3 #define N 10001 4 int prime[10001]; 5 bool check[10001]; 6 int n,i,ans,tot=0,j; 7 8 voi 阅读全文
posted @ 2017-03-19 04:17 奚政 阅读(191) 评论(0) 推荐(0)
 
hdu2090-2097
摘要: hdu2090 模拟 1 #include<stdio.h> 2 int main(){ 3 char b[100]; 4 double price=0,a1,a2; 5 int i=0; 6 while(scanf("%s%lf%lf",b,&a1,&a2)!=EOF){ 7 price+=a1* 阅读全文
posted @ 2017-03-19 04:16 奚政 阅读(271) 评论(0) 推荐(0)
 
hdu2089 不要62 数位DP
摘要: 数字中不能出现4或者连续的62,数位DP裸题 1 #include<stdio.h> 2 #include<string.h> 3 long long ans; 4 bool a[1000000]; 5 void fun(){ 6 for(long long i=0;i<=1000000;i++){ 阅读全文
posted @ 2017-03-19 04:08 奚政 阅读(200) 评论(0) 推荐(0)
 
hdu2088
摘要: hdu2088 1 #include<stdio.h> 2 #include<algorithm> 3 using namespace std; 4 int h[55]; 5 int main(){ 6 int N,t=0; 7 while(scanf("%d",&N)!=EOF&&N!=0){ 8 阅读全文
posted @ 2017-03-19 04:06 奚政 阅读(269) 评论(0) 推荐(0)
 
hdu2087 剪花布条 暴力/KMP
摘要: 在字符串中不可重叠地寻找子串数量,暴力/KMP 1 #include<stdio.h> 2 #include<string.h> 3 4 int main(){ 5 char a[1005],b[1005]; 6 while(scanf("%s",a)!=EOF&&a[0]!='#'){ 7 sca 阅读全文
posted @ 2017-03-19 04:05 奚政 阅读(387) 评论(0) 推荐(0)
 
 
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 30 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3