什么在内存和CPU使用方面更有效 - 一个booleans或BitSet 数组?不使用特定的BitSet方法,只对数组进行get/set/clear(==,=,Arrays.fill).
有简单的密码将数字翻译成系列 . ( )
为了加密这个表示的数字(0 ... 2147483647),我(我想)我需要:
0 . 6 (()())
1 () 7 (...())
2 (()) 8 ((.()))
3 (.()) 9 (.(()))
4 ((())) 10 (().())
5 (..()) 11 (....())
227 (................................................())
2147483648 ((..........()))
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
static class P
{
static List<int> _list = new List<int>();
public static int Nth(int n)
{ …Run Code Online (Sandbox Code Playgroud)