题解列表

筛选

1852: 求1+2+3+...+n的值

摘要:解题思路:用for循环,从1累加到n。注意事项:n<=1000000000,变量得开long long。参考代码:#include<bits/stdc++.h>using namespace std;……

c++的compare就是c的strcmp

摘要:#include<bits/stdc++.h> using namespace std; int main() {     string s[3];     cin>>s[0]>>s[1]>……

STL句子拆分成单词

摘要:#include<bits/stdc++.h> using namespace std; set<string>s; int main() {     string str,c;     ……

绝了,涨知识了, 科学计数法输出

摘要:解题思路:循环加递归加格式化输出注意事项:首先是变量的大小一定要用对,然后输出格式要对参考代码:#include <iostream> #include <vector> #include <io……

2981: 二进制分类

摘要:```cpp #include using namespace std; int A,B; bool turn(int x) { int a=0,b=0; while(x!=0) ……