- 博客(4)
- 收藏
- 关注
原创 hdu-1000?tdsourcetag=s_pctim_aiomsg
问题链接:hdu-1000?tdsourcetag=s_pctim_aiomsg 问题简述:两个整数的相加 程序分析:输入A B 求和 问题分析:注意语句中存在的小陷阱 each、process; 程序说明: #include using namespace std; int main() { int x, y; while (cin >> x >> y) { cout...
2018-12-06 21:51:34 5603
原创 CodeForces-266A
问题链接:CodeForces-266A 问题简述:一行 n个石头 可变三色 取出最少的个数 使相邻的两颗没有相同颜色; 程序分析:输入石头个数 n(1~50) 输入n个石头分别的颜色 :R B G 输出取出的个数; 问题分析:该问题考察数组的赋值以及for、if语句的嵌套使用。 程序说明:#include using namespace std; int main() { char z[51]...
2018-12-06 21:26:08 108
原创 CodeForces-467A
问题链接:CodeForces-467A 问题简述:两人住同一间房 酒店有n个房间 此时各个房间有p个人住 该房间允许q个人住 (p<=q) 数出有多少个房间能够让两人入住 程序分许:输入n(1~100) 输入每房人数p 输入每房最大容量q 求出可用房间 问题分析:该问题考察二维数组与for语句的联用。 程序说明: #include using namespace std; int mai...
2018-12-06 19:50:40 93
原创 CodeForces-118A
问题链接:CodeForces-118A 问题简述:将输入的字符串中含有的元音字母删去,辅音字母改为小写,并在前面加一个“.”。 问题分析:该题考察 if、for语句 ascll值以及对题目的理解能力。 程序说明:#include using namespace std; int main() { int i; char x[101]; cin >> x; if (x == '...
2018-12-06 18:31:24 183
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人