2013年12月9日

uva 10878 - Decode the tape

摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1819这题很简单,就是一个ascii转换,不过代码写的好丑啊,buff数组开大点,他没说上限多少行,还是要注意的。 1 #include 2 #include 3 #include 4 using namespace std; 5 void string_replace(string &src){ 6 for(int i=0;i<src.size();i++){ 7 阅读全文

posted @ 2013-12-09 20:55 云在心 阅读(166) 评论(0) 推荐(0)

uva 409 - Excuses, Excuses!

摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=350这题没什么难度,一定要注意的地方是单词的判断,比如搜索单词word ,如果出现dword是不算的。这题一次性ac#include#include#includeusing namespace std;void convert(int len,string src[],string dis[]){ //拷贝到复制数组进行大小写转换 for(int i=0;i>k>&g 阅读全文

posted @ 2013-12-09 15:53 云在心 阅读(140) 评论(0) 推荐(0)

uva 537 - Artificial Intelligence?

摘要: 这题看题目时要细心,讲一下做题步骤1.得到 P,I,U的double值,可以用string类型中搜索法2.确定精度3.得到目标值因为在输出时忘记打印P=,U=,I=,还wa了一次#include#include#include#include#includeusing namespace std;int main(){ int n,num=1; string annotation[]={"P=","I=","U="}; string character[]={"W","A","V&qu 阅读全文

posted @ 2013-12-09 11:00 云在心 阅读(200) 评论(0) 推荐(0)

导航