• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Andromeda_Galaxy
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  1-题解-hdu

 
二维树状数组
摘要:#include #include #include #include //#define y1 y11 using namespace std; const int maxn=1e3+10; int lowbit(int x){return x&(-x); } int a[maxn][maxn]; int b[maxn][maxn]; int n=1e3+9; void update(int ... 阅读全文
posted @ 2019-01-21 16:35 Andromeda_Galaxy 阅读(173) 评论(0) 推荐(0)
hdu6440 Dream(费马小定理)
摘要:保证 当 n^p=n(mod p) 是成立 只要保证n*m=n*m(mod p); 阅读全文
posted @ 2018-08-27 15:16 Andromeda_Galaxy 阅读(240) 评论(0) 推荐(0)
hdu6441 Find Integer (费马大定理)
摘要:#include using namespace std; int main() { int T; scanf("%d",&T); while(T--) { int n,a; scanf("%d %d",&n,&a); if(n==1) printf("%d %d\n",a,2*a); else if(n==2) ... 阅读全文
posted @ 2018-08-27 08:34 Andromeda_Galaxy 阅读(180) 评论(0) 推荐(0)
hdu5173 How Many Maos Does the Guanxi Worth
摘要:#include using namespace std; #define INF 0x3f3f3f3f int dis[35]; int visit[35]; int SSSP[35][35]; void dijkstra(int x,int n) { int pos; int minn; for(int i=1;i>n>>m; if(n==0&&m==0) ... 阅读全文
posted @ 2018-08-21 08:44 Andromeda_Galaxy 阅读(194) 评论(0) 推荐(0)
hdu 1556 A - Color the ball 其他做法
摘要:#include using namespace std; const int maxn=1e6+10; int c[maxn]; int n; int main() { while(1) { cin>>n; if(n==0) break; memset(c,0,sizeof(c)); for(int i=1;i>a... 阅读全文
posted @ 2018-08-16 15:27 Andromeda_Galaxy 阅读(185) 评论(0) 推荐(0)
hdu 1556 A - Color the ball 数状数组做法
摘要:#include<bits/stdc++.h> using namespace std; const int maxn=1e6+10; int n; int c[maxn]; int lowbit(int x) { return x&(-x); } void update(int num,int v 阅读全文
posted @ 2018-08-16 15:18 Andromeda_Galaxy 阅读(197) 评论(0) 推荐(0)
 

公告


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