博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
POJ 1200 Crazy Search【Hash入门】
阅读量:7045 次
发布时间:2019-06-28

本文共 1665 字,大约阅读时间需要 5 分钟。

 RK法:https://www.cnblogs.com/16crow/p/6879988.html

 

 

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define debug() puts("++++")#define gcd(a,b) __gcd(a,b)#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define fi first#define se second#define pb push_back#define sqr(x) ((x)*(x))#define ms(a,b) memset(a,b,sizeof(a))#define sz size()#define be begin()#define mp make_pair#define pu push_up#define pd push_down#define cl clear()#define lowbit(x) -x&x#define all 1,n,1#define rep(i,x,n) for(int i=(x); i<=(n); i++)#define in freopen("in.in","r",stdin)#define out freopen("out.out","w",stdout)using namespace std;typedef long long LL;typedef unsigned long long ULL;typedef pair
P;const ULL base = 100000007;//33951943const int INF = 0x3f3f3f3f;const LL LNF = 1e18;const int maxn = 16000005+20;const int maxm = 1e6 + 10;const double PI = acos(-1.0);const double eps = 1e-8;const int dx[] = {-1,1,0,0,1,1,-1,-1};const int dy[] = { 0,0,1,-1,1,-1,1,-1};int dir[4][2] = { { 0,1},{ 0,-1},{-1,0},{ 1,0}};const int mon[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};const int monn[] = { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};int t,n,m;char s[maxn];int has[maxn],a[150];int main(){ while(~scanf("%d%d",&n,&m))//将字符串对应到m进制数 { set
st; ms(a,0),ms(has,0); int cnt=0,sum=0,num=0; scanf("%s",s); int len = strlen(s); //按照字符出现的先后顺序确定字符的大小 for(int i=0;i
View Code

 

转载于:https://www.cnblogs.com/Roni-i/p/9447830.html

你可能感兴趣的文章
C++面向对象高级编程(上) 第二周 侯捷
查看>>
Spring Cloud Greenwich 新特性和F升级分享
查看>>
发现可远程控制玩家电脑的Steam漏洞,Valve 7500美元奖励上报人 ...
查看>>
0110-如何给Kerberos环境下的CDH集群添加Gateway节点
查看>>
正火的 Spring Boot 2.0 更新了啥?
查看>>
Kubernetes(K8s)Events介绍(上)
查看>>
Apsara SA系列混合云存储阵列发布
查看>>
携新一代车规级固态激光雷达而来,速腾聚创为助力自动驾驶量产有何新动作?...
查看>>
RStudio: Warning message: Setting LC_CTYPE failed, using "C" 浅析
查看>>
VDSM command failed: The method does not exist / is not available.
查看>>
Netflix Media Database - 起源和数据模型
查看>>
oracle查看执行计划
查看>>
深度强化学习从入门到大师:通过Q学习进行强化学习(第二部分)
查看>>
iptables快速记忆总结
查看>>
专访张银奎:要抓住技术发展趋势,只有不断学习和更新自己?
查看>>
mint-ui 的navbar踩坑记
查看>>
【直播回顾及资料下载】Fusion Design - 企业级UI解决方案揭秘
查看>>
Meta标签大集合
查看>>
Gitea 1.8.0 发布,组织可设置为公开、内部与私有状态
查看>>
Apache Subversion 1.12.0 发布,版本控制系统
查看>>