摘要: 题意:变形的约瑟夫环模型,每个人有一个数字a,从第K个人开始出列,如果数字是正的,就往后数a个人出列,如果书负数,就往反方向数。然后用最基本的线段树处理约瑟夫环的方法即可但是题目要求的是第x个出列的人的名字,x为1-N中约数最多的数中的最小的那个。这里需要求反素数,即不大于N约数最多的。写起来比较多... 阅读全文
posted @ 2014-07-13 20:35 acm_roll 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Sad..这么水的题WA了无数发,题目要看仔细啊,留下来做个警告把#include #include #include #include #include #include #include #include #include #include #include #include using nam... 阅读全文
posted @ 2014-07-13 10:44 acm_roll 阅读(280) 评论(0) 推荐(0) 编辑