题解列表
第一次用pair数对
摘要:#include<bits/stdc++.h>
using namespace std;
pair<int,int>a[10];
int main()
{
int sum1=0,sum2=……
[竞赛入门]简单的a+b(C++)
摘要:解题思路:定义a,b,输入各值,输出a+b就可以了注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; ……
太经典了,链表的经典操作 链表数据求和操作
摘要:解题思路:还是前面讲的链表的经典操作注意事项:链表的使用,注意删除节点参考代码:#includeusing namespace std;
typedef struct ListPlural{
……
递归和迭代求解斐波那契数列
摘要:递归:#include <stdio.h>
int Input()
{
int N;
scanf("%d", &N);
return N;
}
int Fib……
set集合的使用(插入与遍历)
摘要:#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
while(cin>>n>>m)
{
ve……
2968: 区间内的真素数
摘要:```cpp
#include
using namespace std;
int ss(int a){
if(ax>>y;
for(int i=x;i……
2981: 二进制分类
摘要:```cpp
#include
using namespace std;
int A,B;
bool turn(int x)
{
int a=0,b=0;
while(x!=0)
……
题解 2807:计算金额(for)
摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().strip().split())for i in range(c): b *= (1+a/100)print(int(b……
题解 2808: 买房子
摘要:解题思路:注意事项:参考代码:# 输入年薪N和房价增长率K n, k = map(int, input().strip().split()) # 初始化变量 a = n # 程序员积攒的总……