摘要: Solution:对股票出价进行排序,然后按照价格递增的次序依次设定p的价格并求成交量。1. //prove that the result of price(maximum--maxprice) is info[k].price: //If not,the nearest data that is 阅读全文
posted @ 2017-04-13 23:58 congmingyige 阅读(325) 评论(0) 推荐(0) 编辑
摘要: Solution: dfs 对于dfs: //遇到map[u][v]==c,则不用再搜 //因为通过(u,v)到达的其它点(p,q), //之前从(u,v)开始肯定能到达(p,q),(p,q)已经被填充了 注意: if (map[x1][i]=='-' || map[x1][i]=='+') map 阅读全文
posted @ 2017-04-13 17:08 congmingyige 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 1.char s[][]; scanf("%s",s[i]); s[i]就是地址,不用加& 2.char c; scanf("%c",&c); 像long,double等都要加& &是取地址,把数输入到这个地址的存储单元中,存储x个单元(根据%d,%lf,%c等而定,如果是%s,以输入‘\0'结束) 阅读全文
posted @ 2017-04-13 16:29 congmingyige 阅读(712) 评论(0) 推荐(0) 编辑