上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 57 下一页
摘要: A. 4000. 排位 题目链接:https://www.acwing.com/problem/content/4003/ 题目大意:略。 解题思路:小明的位置 \(\ge max(a+1, n-b)\) 示例程序: #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2022-04-12 12:34 quanjun 阅读(28) 评论(0) 推荐(0)
摘要: A. 3997. 整数幂 题目链接:https://www.acwing.com/problem/content/4000/ 题目大意:略。 解题思路:只要 l % k == 0 就执行 l /= k ,判断最终 l 是否变为 1。特判初始 l == 1 是 NO,因为 n 是正整数。 示例程序: 阅读全文
posted @ 2022-04-12 10:42 quanjun 阅读(34) 评论(0) 推荐(0)
摘要: A. 3994. 水果派 题目链接:https://www.acwing.com/problem/content/3997/ 题目大意:略。 解题思路:向上取整。 示例程序: #include <bits/stdc++.h> using namespace std; int T, a, b, c, 阅读全文
posted @ 2022-04-11 21:43 quanjun 阅读(28) 评论(0) 推荐(0)
摘要: A. 3991. 满足条件的01串 题目链接:https://www.acwing.com/problem/content/3994/ 题目大意:略。 解题思路:简单模拟一遍即可。 示例程序: #include <bits/stdc++.h> using namespace std; int T, 阅读全文
posted @ 2022-04-11 18:33 quanjun 阅读(24) 评论(0) 推荐(0)
摘要: A. 3988. 不同的数 题目链接:https://www.acwing.com/problem/content/3991/ 题目大意:从n个数中找出k个不同的数,输出下标。 解题思路:用 set 记录有没有出现过,用 vector 保存数据。 示例程序: #include <bits/stdc+ 阅读全文
posted @ 2022-04-11 17:10 quanjun 阅读(27) 评论(0) 推荐(0)
摘要: A. 3971. 最小的商 题目链接:https://www.acwing.com/problem/content/3974/ 题目大意:从数组中找最大的 k 的因数,并输出 k 除以它的商。 解题思路:循环一遍就可以了。 示例程序: #include <bits/stdc++.h> using n 阅读全文
posted @ 2022-04-11 16:40 quanjun 阅读(25) 评论(0) 推荐(0)
摘要: A. 3955. 统一大小写 题目链接:https://www.acwing.com/problem/content/3958/ 题目大意:略。 解题思路:循环一轮记录大小写字母出现次数,然后相应地进行大小写转换。 示例程序: #include <bits/stdc++.h> using names 阅读全文
posted @ 2022-04-11 16:19 quanjun 阅读(25) 评论(0) 推荐(0)
摘要: A. 3826. 青蛙跳 题目链接:https://www.acwing.com/problem/content/3829/ 题目大意:略。 解题思路:简单数学题。 示例程序: #include <bits/stdc++.h> using namespace std; int T; long lon 阅读全文
posted @ 2022-04-11 15:53 quanjun 阅读(41) 评论(0) 推荐(0)
摘要: A. 3821. 区间选数 题目链接:https://www.acwing.com/problem/content/3824/ 题目大意:在两个区间选两个不相同的数。 解题思路:\(l_1, l_2\) ,不行就 \(l_1,l_2 + 1\)。 示例程序: #include <bits/stdc+ 阅读全文
posted @ 2022-04-11 09:44 quanjun 阅读(27) 评论(0) 推荐(0)
摘要: A. 3811. 排列 题目链接:https://www.acwing.com/problem/content/3814/ 题目大意:构造一个 \(a_i \neq i\) 的排列。 解题思路:顺移一位。 示例程序: #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2022-04-10 22:47 quanjun 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 57 下一页