题解列表

筛选

1287: 最大质因数

摘要:```cpp #include using namespace std; bool fun(int x) { int y; for(y=x-1;y>1;y--) ……

1286: 最大配对

摘要:```cpp #include #include using namespace std; const int N=1e5+10; int a[N],b[N]; int main() {……

1285: 阶乘末尾的K位

摘要:```cpp #include #include using namespace std; long long jiecheng(int n) { long long sum=1;……

1284: 冗余关系

摘要:```cpp #include using namespace std; int pre[1001],sum; int find(int x) { int r=x; wh……

1282: 公交汽车

摘要:```cpp #include #define MAX 101 #define INF 50001 #define A_JOURNEY 10 using namespace std; in……

2838: 有趣的跳跃

摘要:解题思路:抛砖引玉,欢迎讨论。用最笨的办法,完成题目注意事项:如果水平足够可以直接写代码,如果水平不够就慢慢来,把思路捋清楚,一步一步做测试,最终把代码完成参考代码:#include <iostrea……

用数组方法解决报数问题

摘要:解题思路: 用一个数组num[]代表n个人,用下标代表初始号数,一开始令num[0]到num[n-1]都为1,然后用一个循环,当第x个人的报数为3时,令num[x]=0,直到数组num[]中只有一个1……

暴力枚举求解

摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main() {      int i,j = 0;      int n;  ……