摘要:
这个红SP题过水,入门coders可自行食用! 老规矩,先看题目。 显然题目不难理解,就是让我们在看到42之前,输出所有输入的数字。这题我们讲解两种做法:一个是递归,一个是while的不断输入用法! 代码 一、递归法 (注释版) 1 #include<bits/stdc++.h>//万能头文件 2 阅读全文
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 int tot,n,m,s,ver[2*5000010],head[2*500010],nxt[2*500010],f[500010][30],d[500010]; 4 void add(int x 阅读全文