题解列表

筛选

输出二进制(负数时数据有错的看这个)

摘要:解题思路:抛弃传统的短除法求二进制的策略,引入math库函数,运用减法求二进制,避免事后的倒序处理;同时,因为负数是采取补码运算的方式,所以为了简便过程,我们将符号位处理之后便可将数据化为对应的正数进……

汽水瓶题解

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>/* run this program using the console pauser o……

动态规划解决问题

摘要:#include #include #define N 100005 #define M 25 int v[M]; int w[M]; int dp[N]; int maximum(in……

2818: 分离整数的各个数位

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     string str;     cin>>st……

2817: 级数求和

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int n;     int pos=0; ……

2812: 球弹跳高度的计算

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     double meter,sum=0,s=0;……