![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础算法
zsj9
这个作者很懒,什么都没留下…
展开
-
幂求模
#includeusing namespace std;float powerFl(float a,int n){if(n==1) return a;float ret;if(n%2==0){ret=powerFl(a,n/2);return ret*ret;}else{ret=powerFl(a,(n-1)/2);return ret*ret*a;转载 2015-06-11 23:52:41 · 227 阅读 · 0 评论 -
STL+sstream+统计单词数
#include<iostream>#include<cstdio>#include<set>#include<cstring>#include<sstream>using namespace std;char s[1000000];int main(){ while(gets(s)){ set<string>p; if(!strcmp(s,"#原创 2015-09-17 19:40:12 · 291 阅读 · 0 评论 -
HDU4167
A university’s computer system assigns user names according to the following set of rules:The maximum length of a username is MAXLEN characters. (The value of MAXLEN will be specified in the input for翻译 2015-09-18 21:26:37 · 296 阅读 · 0 评论