摘要: Description 一个1-n1−n的排列满足所有相邻数字奇偶性不同,那么称该排列为奇偶交错排列。按字典序输出1-n1−n的所有奇偶交错排列。Input 输入一个整数n( 2 \le n \le 11)n(2≤n≤11)Output 输出若干行,每行一个排列。相邻... 阅读全文
posted @ 2019-01-25 21:36 black_hole6 阅读(493) 评论(0) 推荐(0)
摘要: Description 有一环形地铁,一共有nn站,编号1-n1−n。正向行驶地铁会按照1->2->3->⋯->n->1的方向行驶反向则按照1->n->⋯->3->2->1的方向行驶。给定相邻两站之间的地铁行驶时间(正向、反向时间相同),现在有mm组询问,每次询问从第... 阅读全文
posted @ 2019-01-25 21:32 black_hole6 阅读(327) 评论(0) 推荐(0)
摘要: You are given n k-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the ... 阅读全文
posted @ 2019-01-25 18:30 black_hole6 阅读(270) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/327/H来源:牛客网 题目描述处女座进行了一场c语言的考试,要求很简单,输出2000个正整数,并且满足以下条件:1. 任意两个数互质2. 任意两个数x,y,满足,其中为... 阅读全文
posted @ 2019-01-25 12:03 black_hole6 阅读(193) 评论(0) 推荐(0)