摘要: http://www.bnuoj.com/bnuoj/problem_show.php?pid=20838【题意】: 有点长,略。【code】: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 double rat[220][220];11 double drat[220][220];12 13 struct Nod14 {15 int id;16 double rt;17 }node[220];18 19 int ... 阅读全文
posted @ 2013-09-23 17:43 crazy_apple 阅读(208) 评论(0) 推荐(0) 编辑
摘要: http://www.bnuoj.com/bnuoj/problem_show.php?pid=20832【题意】:给你一串字符串,求一个ST(0 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 int getST(char *names)11 {12 int a[100];13 int len = strlen(names);14 int i;15 int ST;16 int b[1000],cnt=0;17 f... 阅读全文
posted @ 2013-09-23 17:38 crazy_apple 阅读(315) 评论(0) 推荐(0) 编辑
摘要: http://www.bnuoj.com/bnuoj/problem_show.php?pid=20834【题意】:每次减少一半的空格,问经过多少次操作能得到每个单词之间的空格为1,输入字符串大小小于等于1MB【题解】:1、如果单词之间最大的空格数为2的n次方,那么输出22、否则输出n+1注意字符串大小1MB,这里用C++中string进行处理【code】: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 int main()10 {11 string ... 阅读全文
posted @ 2013-09-23 17:19 crazy_apple 阅读(337) 评论(0) 推荐(1) 编辑