随笔分类 -  洛谷

摘要:猪国杀解题的思考过程 阅读全文
posted @ 2023-03-18 20:36 Revc 阅读(297) 评论(0) 推荐(1) 编辑
摘要:单个跑正常,多个跑异常;因为上一个测试的输入内容还没有被读完就 goto/break/continue 了。 这种情况,需要读取上一个输入中剩余的部分。 例子: std::getline(std::cin, s); // read the leftovers 问题来源:https://www.luo 阅读全文
posted @ 2023-03-06 20:20 Revc 阅读(27) 评论(0) 推荐(0) 编辑
摘要:如果英文字符串只使用空格作为分隔符,在进行全词匹配时,可以为搜索内容前后加上空格,再进行搜索。 参考资料 题解 P1308 【统计单词数】 阅读全文
posted @ 2023-03-05 22:54 Revc 阅读(61) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.luogu.com.cn/problem/P1980 术语 以下的英文术语均可以翻译为数字。 digit: 一个数字字符,十进制就是 0-9 之间的一个字符; numeral: 用来表示数字的符号化表示,如 “Three”、“3”、“III”; number: 一种 阅读全文
posted @ 2023-02-02 23:35 Revc 阅读(182) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.luogu.com.cn/problem/P1014 有理数可枚举 In 1873 Cantor proved the rational numbers countable, i.e. they may be placed in one-one correspond 阅读全文
posted @ 2023-01-29 21:10 Revc 阅读(416) 评论(0) 推荐(0) 编辑
摘要:题目链接: https://www.luogu.com.cn/problem/P1008 置顶题解 暴力,加简化的判断,数学原理,2个集合内所有数相加相乘结果一样,2个集合的内容一样(没错我自己编得,灵感并不是我自己的,感谢帮我的大大) 置顶的题解中的数学原理应该是存在问题。我尝试证明的整体思路是不 阅读全文
posted @ 2023-01-21 11:25 Revc 阅读(266) 评论(0) 推荐(0) 编辑
摘要:题目地址:https://www.luogu.com.cn/problem/P1538 #include <iostream> int main() { /* * # Seven-segment Display * * The way how the program prints decimal n 阅读全文
posted @ 2023-01-20 11:33 Revc 阅读(22) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示