摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19859/B ###题目分析 很简单的一道数位统计的题目 - 其中年和月是乘法原理。(固定住年和月,枚举该月有几天,所以是乘法原理) - 当`x=0`并且`month using namespace std; 阅读全文
posted @ 2023-06-02 14:12 想个昵称好难ABCD 阅读(6) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1043 ###题目分析 模拟就完事,代码写的很屎山,估计哪里死循环了,要不就是TLE,明天改。 ###未AC代码 ```c++ #include #include #include using na 阅读全文
posted @ 2023-05-30 22:06 想个昵称好难ABCD 阅读(3) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1050 ###题目分析 因为要求最小编号,并且该编号是以读者的编号结尾,这边直接排序+翻转,找开头的数。 记录是因为看到某个大佬非常好的思路,直接对编号进行取模,就是末尾的数。 **如果想得到末尾的 阅读全文
posted @ 2023-05-30 18:21 想个昵称好难ABCD 阅读(9) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1046 ###解题思路: 10进制转x进制,只要反复`%x、/x`即可。 `%x`取出末尾的数字,因为末尾的数字已经取出,所以将该数字`\`掉 可以一起算也可以循环,**取模不会影响除数**。 ## 阅读全文
posted @ 2023-05-30 16:48 想个昵称好难ABCD 阅读(14) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1035 ###题目分析 将每个数每一位都进行拆分即可。 ###AC代码 ```c++ #include using namespace std; int n, p = 1, num = 1; int 阅读全文
posted @ 2023-05-29 10:03 想个昵称好难ABCD 阅读(13) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1033 ###题目分析 这题好坑,乒乓球的比分如果相差` using namespace std; // 统计11分制和21分制的比分 string s; int main() { char t; 阅读全文
posted @ 2023-05-28 19:36 想个昵称好难ABCD 阅读(8) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1027 ###题目分析 画图模拟就完事了,分成了四类 **上半部分** 1.x在第`1`行上:x先左再下,直到y等于1。 2.y在第`1`行上:y先下再上,直到x等于1。 **下半部分** 3.x在 阅读全文
posted @ 2023-05-28 15:41 想个昵称好难ABCD 阅读(16) 评论(0) 推荐(0) 编辑
摘要: ###题目链接: https://ac.nowcoder.com/acm/contest/19306/1026 ###题目分析 这种题,画个图,模拟就对啦。 ###TLE代码 ```c++ #include using namespace std; int n, cnt; int w[25][25] 阅读全文
posted @ 2023-05-28 11:33 想个昵称好难ABCD 阅读(2) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/20960/1004 ###题目分析 注意当第i位为9是,此时进位就是0,但是`0 using namespace std; // 利用第i+1位判断第i位是否要进位 // 用x标记着结束 int n, t, p 阅读全文
posted @ 2023-05-26 13:01 想个昵称好难ABCD 阅读(7) 评论(0) 推荐(0) 编辑
摘要: ###题目链接 https://ac.nowcoder.com/acm/contest/19306/1051 ###题目分析 用a、b进行映射。map或者模拟都可以。 注意两点即可: - a中的所有字母必须在b中出现,那么我们统计b中的所有字符再来判断a。 - a、b不能矛盾,将b[i]储存在idx 阅读全文
posted @ 2023-05-25 21:22 想个昵称好难ABCD 阅读(6) 评论(0) 推荐(0) 编辑