F(N) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4078 Accepted Submission(s): 1432 Problem Description Giving the N, can you tell me the answer of F(N)? Input Each test case contains a…
F题 Problem F Philosopher’s Walk 题意:给你n,m,n代表一个长宽都为2的n次方的格子里,m代表走了从左下角开始走了m米,求最后的坐标. 思路: 看上图很容易便可以看出规律,每幅图都是由上一幅图在自身的四个区域进行不同的变化的到的,如第二幅图中,第一区域是第一副图向左转90度得到的,第二第三区域都是横纵坐标偏移,第四区域是向右转90度且向右移动了一个区域. 那么就可以得出转移的规律: 第一区域:向左转90度只要每个点的横纵坐标互换即可如:2(2,1) 变成 2 (1…
Problem Description Giving the N, can you tell me the answer of F(N)? Input Each test case contains a single integer N(1<=N<=10^9). The input is terminated by a set starting with N = 0. This set should not be processed. Output For each test case, ou…