![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
新手
KingITech
已转到博客园: http://www.cnblogs.com/noking
展开
-
输出频率最高的那个单词
输出频率最高的那个单词Sample Input 5 //表示本组测试数据单词个数 green red blue red red 3 pink orange pink 0 //0控制结束Sample Output red pinkC#include<stdio.h>#include<string.h>int main(){ char原创 2015-12-03 01:52:16 · 502 阅读 · 0 评论 -
计划
1.最短路(Floyd、Dijstra,BellmanFord) 2.最小生成树(先写个prim,kruscal要用并查集,不好写) 3.大数(高精度)加减乘除 4.二分查找. (代码可在五行以内) 5.叉乘、判线段相交、然后写个凸包. 6.BFS、DFS,同时熟练hash表(要熟,要灵活,代码要简) 7.数学上的有:辗转相除(两行内),线段交点、多角形面积公式. 8.调转载 2015-12-03 02:19:01 · 298 阅读 · 0 评论 -
1025解题--学习
A 这个题有个坑点 就是得到的组合不能重复 注意这个就好了#include<stdio.h>#include<string.h>#include<stdlib.h>#include<algorithm>using namespace std;int main(){ int t,n,k,a[1000],b[2200],c[2200]; scanf("%d",&t);转载 2015-12-03 15:04:37 · 274 阅读 · 0 评论 -
hdu1237-简单计算器
Problem Description 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。Input 测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。Output 对每个测试用例输出1行,即该表达式的值,精确到小数点后2位。Sample I转载 2015-12-03 14:53:11 · 378 阅读 · 0 评论 -
栈--二进制转化
c#include <stdio.h>//将十进制转换成二进制数字int main(){ int stack[10000],top=0;//创建一个栈 int m; scanf("%d",&m); printf("(%d)10 == (",m); while(m!=0){ stack[top++]=m%2;//将元素推进栈中 m/原创 2015-12-03 14:38:29 · 504 阅读 · 0 评论 -
汉诺塔
1#include<stdio.h>void move(char x,char y){ printf("%c-->%c\n",x,y);}void hanoi(int n,char one ,char two,char three){ if(n==1) move(one,three); else { hanoi(n-1,one,three,t原创 2015-12-04 22:13:07 · 376 阅读 · 0 评论 -
E-栈--括号匹配
#include<stack>#include<string.h>#include<stdio.h>using namespace std;char s[2000];int main(){ while(gets(s)) { stack<char >x; int len=strlen(s); int z=0;原创 2015-12-04 21:18:18 · 399 阅读 · 0 评论 -
E-斐波那契数
1#include<stdio.h>long long int abc[100]={0,1,2,3,5};int sum=0,pos=4;//No.1long long int fun();long long int fun(int n){ sum++; long long int x=0,y=0; int k; if (n<=pos) return abc[n原创 2015-12-04 20:38:58 · 472 阅读 · 0 评论 -
E-括号匹配
Brackets! Brackets!Description There are six kinds of brackets: ‘(‘, ‘)’, ‘[‘, ‘]’, ‘{’, ‘}’. dccmx’s girl friend is now learning java programming language, and got mad with brackets! Now give you a原创 2015-12-03 14:45:42 · 345 阅读 · 0 评论 -
E- 1-42随机数
#include<stdio.h>#include<time.h>#include<stdlib.h>int main(){ srand(time(0)); for(int i=0;i<10;i++) { printf("%d\n",rand()%42+1); }}原创 2015-12-03 02:21:12 · 643 阅读 · 0 评论 -
大数除法
#include <iostream>#include<string.h>#include<stdio.h>#define MAX_LEN 200char szLine1[MAX_LEN + 10];char szLine2[MAX_LEN + 10];int an1[MAX_LEN + 10]; //被除数, an1[0]对应于个位int an2[MAX_LEN + 10]; //除数,原创 2015-12-03 01:58:34 · 577 阅读 · 0 评论 -
大数乘法
#include<stdio.h>#include<string.h>int main(){ int f; int i,j,an,bn,k,d; char a[1000],b[1000]; int af[1000]={0},bf[1000]={0},c[1000]={0}; while(scanf("%s%s",a,b)!=EOF) { an=strlen(a); bn=s原创 2015-12-03 01:57:29 · 341 阅读 · 0 评论 -
大数减法
#include<stdio.h>#include<string.h>int compare(char *a,char *b){ int an,bn; an=strlen(a); bn=strlen(b); if(strcmp(a,b)==0) return 0; if(an>bn) return 1; else if(an==bn) return strcmp(a,b原创 2015-12-03 01:56:46 · 314 阅读 · 0 评论 -
大数加法
1#include<stdio.h>#include<string.h>int main(){ int f; int i,an,bn,k; char a[1000],b[1000]; int af[1000]={0},bf[1000]={0},c[1000]; while(scanf("%s%s",a,b)!=EOF) { an=strlen(a); bn=strlen(原创 2015-12-03 01:55:58 · 320 阅读 · 0 评论 -
cf-e
/*aeiouy*/#include<stdio.h>char*J="bidirectional",c; ///bidirectionalmain(){ while((c=getchar())&64&&(~c&1|J[c/2&15]&1&&putchar('.')&&putchar(c&32?c:c+32),1));}/*15:000111161:011110164:10原创 2017-01-28 21:57:07 · 179 阅读 · 0 评论