随笔分类 - ACM----字符串
string
摘要:java大法好啊 思路:单独拿出整数部分分隔 题目链接
阅读全文
摘要:前缀式计算 时间限制:1000 ms | 内存限制:65535 KB 难度:3 前缀式计算 时间限制:1000 ms | 内存限制:65535 KB 难度:3 先说明一下什么是中缀式: 如2+(3+4)*5这种我们最常见的式子就是中缀式。 而把中缀式按运算顺序加上括号就是:(2+((3+4)*5))
阅读全文
摘要:Digital Roots Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 77503 Accepted Submission(s): 24224
阅读全文
摘要:/* Name: hdu--1711--Number Sequence Author: shen_渊 Date: 16/04/17 19:58 Description: 第一次知道,KMP能用在整形数组 o(╯□╰)o */ #include #include using namespace std; int kmp(); void getFail(); i...
阅读全文
摘要:/* Name: hdu--1358--Period Author: 日天大帝 Date: 20/04/17 10:24 Description: 长度/向后移动的位数 = 出现的次数 kmp其实匹配到了第str.size()位,这一位原本是'\0'的, 但是由于里面的递推下一位的关系,这一位其实也...
阅读全文
摘要:/* Name: HDU-2017-字符串统计 Date: 18/04/17 20:19 Description: 水过 */ #include using namespace std; int main(){ int n;cin>>n; while(n--){ string str;cin>>str; int ct =...
阅读全文
摘要:/* Name: NYOJ--241--字母统计 Date: 18/04/17 17:12 Description: 水过,C++11特性不能用,尴尬 */ #include using namespace std; int main(){ // freopen("in.txt","r",stdin) ; int t;cin>>t; while(...
阅读全文
摘要:/* Name: NYOJ--113--字符串替换 Author: shen_渊 Date: 18/04/17 15:41 Description: 字符串水题,秒过 */ #include using namespace std; int main(){ ios::sync_with_stdio(false); string str; ...
阅读全文
摘要:/* Name: 字符串--hdu--3783--ZOJ Author: shen_渊 Date: 17/04/17 20:58 Description: 明天开始刷字符串的题,先来道水题 */ #include #include using namespace std; int ct[27]; int main(){ string str; ...
阅读全文
摘要:#include #include #include #include using namespace std; int main() { double a; while(cin>>a) { char ch; if(a == 0){ if((ch=getchar())== '\n')break; }else getchar(); stack s; while(!s....
阅读全文
摘要:主要思路: 十进制为例个位:10百位:10*10千位:10^3 那么这个题就是:个位:2百位:2*3千位:2*3*5 算法: 1.将输入转化为10进制 2.计算 3.转化为火星文输出 4.over
阅读全文