2018年12月4日

1084 Broken Keyboard

摘要: 水题~ 老是忘记数字和字母的ASCII码。 把两个字符串逐一比较,没有的输出(用数组标记是否输出过) #include<iostream> #include<algorithm> #include<cstdio> #include<string.h> #define maxn 105 using n 阅读全文

posted @ 2018-12-04 21:55 FTA_Macro 阅读(203) 评论(0) 推荐(0) 编辑

1028 List Sorting

摘要: 这题用string和cin会超时,所以要用char。 2个小知识点。 1.id用int类型,输出时用%06d输出 2.strcmp比较char类型字符串,若str1==str2,则返回零;若str1<str2,则返回负数;若str1>str2,则返回正数。 #include<iostream> #i 阅读全文

posted @ 2018-12-04 21:11 FTA_Macro 阅读(270) 评论(0) 推荐(0) 编辑

1031 Hello World for U

摘要: 水题~ N为字符串长度,n1=n3为竖着的个数,n2是横着的个数 n1=n3=(N+2-(N+2)%3)/3,也就是向下接近能整出3的数 #include<iostream> #include<algorithm> #include<string.h> #define maxn 100 using 阅读全文

posted @ 2018-12-04 20:19 FTA_Macro 阅读(179) 评论(0) 推荐(0) 编辑

导航