跳到正文

科技·工程

vector.h

Fyq_20约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include<vector>
namespace std
{
    template<typename T>
    class vector_in_io:public vector<T>
    {
    public:
        //using vector<T>::vector<T>();
        int l,r;
        vector_in_io()
        {
            l=r=-1;
        }
        vector_in_io &operator()(int len)
        {
            l=0,r=len-1;
            return *this;
        }
        vector_in_io &operator()(int _l,int _r)
        {
            l=_l-1;
            r=_r-1;
            return *this;
        }
    };
}
#define vector vector_in_io
原文