题解列表

筛选

文科生的悲哀 (C++代码)

摘要:解题思路:n=1,ans=1;n=2,ans=1;n=3,ans=2;n=4,ans=5……ans 和 n 的关系满足n(1,2,……,N)->ans(1,1,3,5,8,13,……)//显然是斐波那……

奖学金 (C++代码)

摘要:解题思路:注意事项:不能多组输入参考代码:#include<cstdio> #include<iostream> #include<algorithm> using namespace std;……

校门外的树 (C++代码)

摘要:解题思路:1、使用数组模拟树2、有树的位置为1,移除树的位置为03、统计最后为 1 的位置的数目,即为最后剩余树的数目注意事项:参考代码:#include<iostream> using names……
优质题解

弟弟的作业 (C++代码)

摘要:解题思路:c++ STL的string类包含了多种对字符串的处理方式。本题可用string.find()找到运算符号的位置,得到位置后用string.substr()划分数字与运算符。注意事项:str……

小O的质数 (C++代码)

摘要:解题思路:注意事项:参考代码:#include <iostream> #include <string> #include <cstdio> #include <map> #include <……