Play with Chain Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) [Problem Description] YaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n. At first, t…
题目大意 给一个数列,初始时为 1, 2, 3, ..., n,现在有两种共 m 个操作 操作1. CUT a b c 表示把数列中第 a 个到第 b 个从原数列中删除得到一个新数列,并将它添加到新数列中第 c 个数的后面 操作2. FLIP a b 表示把数列中第 a 个数到第 b 个数翻转 经过 m 个操作之后,输出这个数列 1≤n, m≤3*100000 做法分析 这题也不好用线段树做,用 Splay 很快就搞出来了 对于"操作1. CUT a b c" ,只需要将 a-1 旋转…
Queue-jumpers Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3139 Accepted Submission(s): 848 Problem Description Ponyo and Garfield are waiting outside the box-office for their favorite mo…
Robotic Sort Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3340 Accepted Submission(s): 1423 Problem Description Somewhere deep in the Czech Technical University buildings, there are labor…
Play with Chain Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5426 Accepted Submission(s): 2185 Problem Description YaoYao is fond of playing his chains. He has a chain containing n diamon…