zoukankan      html  css  js  c++  java
  • 快速获取全局偏移量的研究

     自己研究偏移时的成果,在此备份,所以难得解释。
        public abstract class DcmsCharacteristic {

            
    private static int _offset = 0;
            
    public static int Offset {
                
    get {
                    
    return _offset;
                }

            }


            
    public static int GetOffset(int count) {
                
    int result = _offset;
                _offset 
    += count;
                
    return result;
            }

        }


        
    public static class DcmsCommonUICharacteristic  {

            
    static DcmsCommonUICharacteristic() {
                
    int offset = DcmsCharacteristic.GetOffset(1);
                DocumentAddressCommandService 
    = offset;
            }


            
    public static readonly int DocumentAddressCommandService;
        }

    使用非常方便
    int a = DcmsCommonUICharacteristic.DocumentAddressCommandService;
  • 相关阅读:
    强连通分量(Kosaraju)
    拓扑排序
    树状数组BIT
    差分
    RMQ(ST表)
    LCA(Tarjan)
    LCA(ST倍增)
    海亮SC2019 树上数数(转载)
    海亮SC
    【十二省联考2019】异或粽子/可持久化01trie
  • 原文地址:https://www.cnblogs.com/tansm/p/822203.html
Copyright © 2011-2022 走看看