• 个人简介

    倘 若 执 念 破 去 , 梦 境 醒 来 。 我 们 再 谈 救 赎 。


    My  Blog\Huge {\mathscr{My\ \ }\mathfrak{Blog}}

    2025/11/25:通过数 700700

    A͓̋̊̕ŗ̭̦̭̣̞̈́̃ͧe̖͗ ̣ͪ̽y̪͈̜͐ͥo̥̅̆̊ͥ̄͜u̮͆ ̵̸̺̤̰̾̑ͨ͟l͙̜̖̗ͩ̃ͥͣ͠o̸̰̜̣̜̾ͦs̠͔̽̌͑̾ͅt͍́ͩ͗

    %%%\%\%\% 究极dalao\mathfrak {dalao}


    ----r_rp_p+_++_+--------------
    r_rp_p+_++_+ Noivelist r^rp^p+^++^+-
    --------------r^rp^p+^++^+----

    数字帝国(超绝计算工具,省去你的数学能力)

    化学帝国(可以帮你配平等等)

    原题机

    CP Editor

    CP Editor(Gitee)

    HINT自动机

    洛谷LaTeX\Large洛谷\LaTeX\large^手_册

    $\Large洛谷\Large{\frac{\mathcal{Mark}}{\mathcal{Down}}}\large^手_册$


    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{我常常}\textcolor{#6366f1}{追忆}\textcolor{#0ea5e9}{过去。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【私はしば}\textcolor{#fb7185}{しば追憶に}\textcolor{#f97316}{ふける。】}}}}}{\textcolor{#e9d5ff}{【I\ often\ find\ my}\textcolor{#bfdbfe}{self\ drifting\ in}\textcolor{#a7f3f0}{to\ reverie.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{生命瞬间定格在脑海。我将}\textcolor{#6366f1}{背后的时间裁剪、折叠、蜷曲,}\textcolor{#0ea5e9}{揉捻成天上朵朵白云。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【生命の一瞬が脳裏に焼き付く。背後に}\textcolor{#fb7185}{続く時間を裁ち、折り畳み、丸め、こねて、}\textcolor{#f97316}{天上に浮かぶ幾つもの雲へと変える。】}}}}}{\textcolor{#e9d5ff}{【Life's\ moments\ are\ frozen\ in\ the\ canvas\ of}\textcolor{#bfdbfe}{\ my\ mind.\ I\ snip,\ fold,\ curl,\ and\ knead\ the\ trailing\ threads\ of}\textcolor{#a7f3f0}{\ time\ into\ puffs\ of\ cloud\ drifting\ across\ the\ sky.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{云朵之间亦有分别:}\textcolor{#6366f1}{积云厚重,而}\textcolor{#0ea5e9}{卷云飘渺。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【雲にもそれぞれの姿があ}\textcolor{#fb7185}{る。積乱雲は重々しく、巻雲は}\textcolor{#f97316}{かすんで揺らめく。】}}}}}{\textcolor{#e9d5ff}{【Even\ among\ clouds,\ distinctions}\textcolor{#bfdbfe}{\ arise:\ cumulus,\ dense\ and\ impos}\textcolor{#a7f3f0}{ing;\ cirrus,\ ethereal\ wisps.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{生命里震撼的场景}\textcolor{#6366f1}{掠过我的思绪便}\textcolor{#0ea5e9}{一生无法忘怀,}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【人生の衝撃的な光景}\textcolor{#fb7185}{は心を掠めると一生忘れ}\textcolor{#f97316}{えぬものとなり、】}}}}}{\textcolor{#e9d5ff}{【The\ seismic\ scenes\ of}\textcolor{#bfdbfe}{\ life\ sweep\ through\ my\ though}\textcolor{#a7f3f0}{ts,\ indelible\ forever,】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{而更为普通平常的}\textcolor{#6366f1}{记忆在时间的冲刷下只}\textcolor{#0ea5e9}{留下些许残骸。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【より平凡な記憶は時}\textcolor{#fb7185}{の流れに洗われてわずかな}\textcolor{#f97316}{残骸を残すのみ。】}}}}}{\textcolor{#e9d5ff}{【while\ the\ mundane\ wash}\textcolor{#bfdbfe}{\ away\ with\ time's\ tide,\ leaving}\textcolor{#a7f3f0}{\ only\ scattered\ shards.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{追忆宛如入梦,太过清楚则}\textcolor{#6366f1}{无法愉悦自己的幻想,过}\textcolor{#0ea5e9}{分模糊却又坠入虚无。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【追憶は夢を見ることに似て、}\textcolor{#fb7185}{鮮明すぎれば幻想の愉しみは消え、}\textcolor{#f97316}{曖昧すぎれば虚無へと落ちていく。】}}}}}{\textcolor{#e9d5ff}{【To\ dwell\ in\ memory\ is\ akin\ to\ dreaming;}\textcolor{#bfdbfe}{\ too\ vivid,\ and\ the\ sweet\ illusion\ shatters;}\textcolor{#a7f3f0}{\ too\ faint,\ and\ you\ plummet\ into\ the\ void.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{只有薄雾间的山水,面纱下的}\textcolor{#6366f1}{女子,那恰到好处的朦胧,才}\textcolor{#0ea5e9}{能满足我对美的苛求。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【ただ、靄に包まれた山水、ベールの向}\textcolor{#fb7185}{こうの女性——その絶妙な朧げさのみが、私の美に対する}\textcolor{#f97316}{厳しい求めを満たしてくれるのだ。】}}}}}{\textcolor{#e9d5ff}{【Only\ the\ mountains\ veiled\ in\ mist,\ the\ woman\ glimpsed}\textcolor{#bfdbfe}{\ behind\ a\ sheer\ curtain\ -\ that\ perfect,\ elusive\ haze\ -\ can\ satis}\textcolor{#a7f3f0}{fy\ my\ exacting\ thirst\ for\ beauty.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{追忆总在不经}\textcolor{#6366f1}{意间将我裹进泛}\textcolor{#0ea5e9}{黄的纸页里。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【追憶はいつも、気づか}\textcolor{#fb7185}{ぬうちに私を黄ばんだ}\textcolor{#f97316}{紙の頁に包み込む。】}}}}}{\textcolor{#e9d5ff}{【Memory,\ unannounced,\ wraps}\textcolor{#bfdbfe}{\ me\ in\ the\ yellowed\ }\textcolor{#a7f3f0}{pages\ of\ forgotten\ books.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{分别又重聚的}\textcolor{#6366f1}{朋友,推倒又重}\textcolor{#0ea5e9}{建的街道,}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【別れまた巡り合}\textcolor{#fb7185}{う友、壊されまた建て}\textcolor{#f97316}{直された街路、】}}}}}{\textcolor{#e9d5ff}{【Friends\ parted\ and}\textcolor{#bfdbfe}{\ reunited,\ streets\ demolished}\textcolor{#a7f3f0}{\ and\ rebuilt—\ 】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{种种线索协助着我从}\textcolor{#6366f1}{一个具体的时刻出发沿时}\textcolor{#0ea5e9}{间的河逆流而上。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【様々な手がかりが、私をある}\textcolor{#fb7185}{特定の瞬間から出発さ}\textcolor{#f97316}{せ、時の川を遡らせる。】}}}}}{\textcolor{#e9d5ff}{【these\ strands\ guide\ me\ upstream}\textcolor{#bfdbfe}{\ along\ the\ river\ of\ time,\ departing\ from}\textcolor{#a7f3f0}{\ a\ single,\ sharp\ moment.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{曾经的日子无}\textcolor{#6366f1}{法重来,我只不过}\textcolor{#0ea5e9}{是一个过客。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【過ぎ去った日々は戻ら}\textcolor{#fb7185}{ない。私はただの通りすがり}\textcolor{#f97316}{の旅人に過ぎない。】}}}}}{\textcolor{#e9d5ff}{【Those\ days\ can}\textcolor{#bfdbfe}{not\ return;\ I\ am\ but}\textcolor{#a7f3f0}{\ a\ passerby.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{但我仍然渴望在}\textcolor{#6366f1}{每一次追忆之旅中}\textcolor{#0ea5e9}{留下闲暇时间,}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【それでもなお、追}\textcolor{#fb7185}{憶の旅ごとに少し}\textcolor{#f97316}{の余暇を残し、】}}}}}{\textcolor{#e9d5ff}{【Yet,\ I\ yearn\ to\ linger}\textcolor{#bfdbfe}{\ on\ each\ journey\ thr}\textcolor{#a7f3f0}{ough\ the\ past,】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{在一个场景前驻足,在岁月}\textcolor{#6366f1}{的朦胧里瞭望过去的自己,}\textcolor{#0ea5e9}{感受尽可能多的甜蜜。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【一つの情景の前に佇み、歳月の朧}\textcolor{#fb7185}{げさの中で過去の自分を眺め、できるだけ多く}\textcolor{#f97316}{の甘美を感じたいと切望する。】}}}}}{\textcolor{#e9d5ff}{【to\ pause\ before\ a\ scene,\ to\ gaze\ through}\textcolor{#bfdbfe}{\ the\ haze\ of\ years\ at\ the\ self\ I\ was,\ and\ to\ savor}\textcolor{#a7f3f0}{\ whatever\ sweetness\ remains.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{美好的时光曾}\textcolor{#6366f1}{流过我的身体,我}\textcolor{#0ea5e9}{便心满意足。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【良き時代がかつてこの}\textcolor{#fb7185}{身を流れ去った、それだけ}\textcolor{#f97316}{で私は満ち足りるのだ。】}}}}}{\textcolor{#e9d5ff}{【That\ such\ beauty\ once\ flowed}\textcolor{#bfdbfe}{\ through\ me,\ this\ is}\textcolor{#a7f3f0}{\ contentment\ enough.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{过去已经凝固,我带着回忆向}\textcolor{#6366f1}{前,只是时常疏于保管,回}\textcolor{#0ea5e9}{忆也在改变着各自的形态。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【過去はすでに凝固している。私は記憶}\textcolor{#fb7185}{を携えて前に進む。ただ、しばしば手入れを怠り}\textcolor{#f97316}{、記憶自体も姿を変えていく。】}}}}}{\textcolor{#e9d5ff}{【The\ past\ has\ solidified.}\textcolor{#bfdbfe}{\ I\ carry\ it\ forward,\ yet\ often\ neglect\ its\ tending.\ The\ memories}\textcolor{#a7f3f0}{\ themselves\ shift\ and\ reshape,\ 】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{这给我的追}\textcolor{#6366f1}{忆旅程带来}\textcolor{#0ea5e9}{些许挑战。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【それは私の追憶}\textcolor{#fb7185}{の旅にいくばくかの}\textcolor{#f97316}{難題をもたらす。】}}}}}{\textcolor{#e9d5ff}{【lending\ a\ subtle\ chall}\textcolor{#bfdbfe}{enge\ to\ my\ voyages}\textcolor{#a7f3f0}{\ of\ recollection.】}}}}} $$

     \

    $$\textrm{\textit{\textbf{\large \textcolor{#8b5cf6}{我该在哪}\textcolor{#6366f1}{里停留?我}\textcolor{#0ea5e9}{问我自己。}}}} $$$$\textstyle \mathcal {\small {^{\frac{\textrm{\textit{\textbf{\textcolor{#f472b6}{【私はどこで立ち}\textcolor{#fb7185}{止まるべきか? そう}\textcolor{#f97316}{自らに問う。】}}}}}{\textcolor{#e9d5ff}{【Where\ shall\ }\textcolor{#bfdbfe}{I\ pause?\ I}\textcolor{#a7f3f0}{\ ask\ myself.】}}}}} $$

    调试AI: 接下来我要跟你讨论一些OI竞赛题目的解题方法,这些题目的出处是NOIp,HDU,AtCoder,CodeForce和一些原创题等等。
    这些题目不会简单,只会比较难,我会给你数据范围,如果我没有特殊说明,时间限制则为1000ms,所以你处理下面问题的时候思考时间复杂度可以参考这个表格:
    时间复杂度 n的取值范围
    o(log2n) 大的离谱
    O(n) 10e8
    O(nlog(n)) 10e6
    O(nsqrt(n))) 10e5
    O(n^2) 5000
    O(n^3) 300
    O(2^n) 25
    O(3^n) 15
    O(n!) 11
    你给出的参考代码需要严格遵守以下规则(并不会很困难):
    1.使用C++11的语言语言特征
    2.使用OI竞赛的码风
    3.在必要的地方写简短的注释
    4.除了邻接表等算法特别需要的地方以外,不要使用动态数组vector,尽量使用原生环境的静态数组
    5.对于我给你的输入输出案例,你要保证你给出的程序输出的数据与案例输出严格一致
    6.你给出的参考程序中的自定义变量名不要超过5个英文字符长度,也就是尽量提高代码的可读性
    7.代码格式化按照K&R风格(Kernighan & Ritchie) 8.请你使用#include<bits/stdc++.h>头文件
    如果你同意遵守以上规则,请输出一个"NoiV"


    如果你会:
      取模取了吗?
      算法对拍了吗?
      有没有保留小数据的暴力?
      有没有清空?
      精度够吗?
      时间复杂度真的正确嘛?
      会不会炸空间?
      最大数据会不会炸?
      自己造数据!
    
    如果你不会:
      有没有想最低分的dp? dp 也是一种暴力
      会不会写暴力分?
      暴力能否优化?
      暴力打表看看有没有非常明显的规律,有的黑题的规律就是cout<<N*N;
      能否分块暴力?
      有没有想最低分的dp?
      那个dp能否优化?
      不要往深的地方思考,想浅一点多想点
    

    冷静冷静再冷静!

    对拍对拍再对拍!

    十年 OIOI 一场空

    不开 LLLL 见祖宗

    过去都是假的

    回忆是一条没有归途的路

    以往的一切春天都无法复原

    即使最狂热最坚贞的爱情

    归根结底也不过是一种瞬息即逝的现实

    唯有孤独永恒。

    快去看道诡异仙!

    快去玩明日方舟!

    模拟赛1

    模拟赛2

    模拟赛3

    模拟赛4

    模拟赛5

    模拟赛6

    模拟赛7

    模拟赛8

    模拟赛9

    模拟赛10

    模拟赛11

    #include<iostream>
    #include<cstdio>
    #define MAXN 1000001
    using namespace std;
    unsigned long long Num_Of_Initial_Array,Number_Of_Query,Initial_Array[MAXN],
    Sum_Of_Segment_Interval[MAXN<<2],Lazy_Tag[MAXN<<2];
    inline long long Left_Son_Of_Now(long long Now_Interval){
    	return Now_Interval<<1;
    }
    inline long long Right_Son_Of_Now(long long Now_Interval){
    	return Now_Interval<<1|1;
    }
    void Input_The_Initial_Array(){
        cin>>Num_Of_Initial_Array>>Number_Of_Query;
        for(long long iterator=1;iterator<=Num_Of_Initial_Array;iterator++)scanf("%lld",&Initial_Array[iterator]);
    }
    inline void Push_Up_Segment_Tree_Interval
    (long long Index_Of_This_Interval){
        Sum_Of_Segment_Interval[Index_Of_This_Interval]=
    	Sum_Of_Segment_Interval[Left_Son_Of_Now(Index_Of_This_Interval)]+
    	Sum_Of_Segment_Interval[Right_Son_Of_Now(Index_Of_This_Interval)];
    }
    void Build_Segment_Tree
    (long long Index_Of_This_Interval,
     long long Left_Now_Interval_Of_Segment,
     long long Right_Now_Interval_Of_Segment){
        Lazy_Tag[Index_Of_This_Interval]=0;
        if(Left_Now_Interval_Of_Segment==Right_Now_Interval_Of_Segment){
    		Sum_Of_Segment_Interval[Index_Of_This_Interval]=
    		Initial_Array[Left_Now_Interval_Of_Segment];
    		return ;
    	}
        long long Middle_Of_Interval=(Left_Now_Interval_Of_Segment+Right_Now_Interval_Of_Segment)>>1;
        Build_Segment_Tree(Left_Son_Of_Now(Index_Of_This_Interval),
    	Left_Now_Interval_Of_Segment,Middle_Of_Interval);
        Build_Segment_Tree(Right_Son_Of_Now(Index_Of_This_Interval),
    	Middle_Of_Interval+1,Right_Now_Interval_Of_Segment);
        Push_Up_Segment_Tree_Interval(Index_Of_This_Interval);
    } 
    inline void Calculate_Tag_Pushed
    (long long Index_Of_This_Interval,
     long long Left_Now_Interval_Of_Segment,
     long long Right_Now_Interval_Of_Segment,
     long long Interval_Value_To_Update){
        Lazy_Tag[Index_Of_This_Interval]=Lazy_Tag[Index_Of_This_Interval]+Interval_Value_To_Update;
        Sum_Of_Segment_Interval[Index_Of_This_Interval]=
    	Sum_Of_Segment_Interval[Index_Of_This_Interval]+
    	Interval_Value_To_Update*(Right_Now_Interval_Of_Segment-Left_Now_Interval_Of_Segment+1);
    }
    inline void Push_Down_Lazy_Tag
    (long long Index_Of_This_Interval,
     long long Left_Now_Interval_Of_Segment,
     long long Right_Now_Interval_Of_Segment){
        long long Middle_Of_Interval=(Left_Now_Interval_Of_Segment+Right_Now_Interval_Of_Segment)>>1;
        Calculate_Tag_Pushed(Left_Son_Of_Now(Index_Of_This_Interval),
    	Left_Now_Interval_Of_Segment,Middle_Of_Interval,Lazy_Tag[Index_Of_This_Interval]);
        Calculate_Tag_Pushed(Right_Son_Of_Now(Index_Of_This_Interval),
    	Middle_Of_Interval+1,Right_Now_Interval_Of_Segment,Lazy_Tag[Index_Of_This_Interval]);
        Lazy_Tag[Index_Of_This_Interval]=0;
    }
    inline void Update_Interval_Segment_Tree
    				  (long long Left_Interval_To_Update,
    				   long long Right_Interval_To_Update,
    				   long long Left_Now_Interval_Of_Segment,
    				   long long Right_Now_Interval_Of_Segment,
    				   long long Index_Of_This_Interval,
    				   long long Interval_Value_To_Update){
        if(Left_Interval_To_Update<=Left_Now_Interval_Of_Segment
    	&&Right_Now_Interval_Of_Segment<=Right_Interval_To_Update){
            Sum_Of_Segment_Interval[Index_Of_This_Interval]+=Interval_Value_To_Update*
    		(Right_Now_Interval_Of_Segment-Left_Now_Interval_Of_Segment+1);
            Lazy_Tag[Index_Of_This_Interval]+=Interval_Value_To_Update;
            return ;
        }
        Push_Down_Lazy_Tag(Index_Of_This_Interval,Left_Now_Interval_Of_Segment,Right_Now_Interval_Of_Segment);
        long long Middle_Of_Interval=(Left_Now_Interval_Of_Segment+Right_Now_Interval_Of_Segment)>>1;
        if(Left_Interval_To_Update<=Middle_Of_Interval)
    		Update_Interval_Segment_Tree(Left_Interval_To_Update,Right_Interval_To_Update,
    		Left_Now_Interval_Of_Segment,Middle_Of_Interval,Left_Son_Of_Now(Index_Of_This_Interval),
    		Interval_Value_To_Update);
        if(Right_Interval_To_Update>Middle_Of_Interval) 
    		Update_Interval_Segment_Tree(Left_Interval_To_Update,Right_Interval_To_Update,
    		Middle_Of_Interval+1,Right_Now_Interval_Of_Segment,Right_Son_Of_Now(Index_Of_This_Interval),
    		Interval_Value_To_Update);
        Push_Up_Segment_Tree_Interval(Index_Of_This_Interval);
    }
    long long Query_IntervalSum_Of_Segment_Tree
    		(long long Left_Interval_Of_Query,
    		 long long Right_Interval_Of_Query,
    	     long long Left_Now_Interval_Of_Segment,
    		 long long Right_Now_Interval_Of_Segment,
    		 long long Index_Of_This_Interval){
        long long Result_Of_Interval_Of_This_query=0;
        if(Left_Interval_Of_Query<=Left_Now_Interval_Of_Segment
    	&&Right_Now_Interval_Of_Segment<=Right_Interval_Of_Query)
    		return Sum_Of_Segment_Interval[Index_Of_This_Interval];
        long long Middle_Of_Interval=(Left_Now_Interval_Of_Segment+Right_Now_Interval_Of_Segment)>>1;
        Push_Down_Lazy_Tag(Index_Of_This_Interval,Left_Now_Interval_Of_Segment,Right_Now_Interval_Of_Segment);
        if(Left_Interval_Of_Query<=Middle_Of_Interval)
    		Result_Of_Interval_Of_This_query+=
    		Query_IntervalSum_Of_Segment_Tree(Left_Interval_Of_Query,Right_Interval_Of_Query,
    		Left_Now_Interval_Of_Segment,Middle_Of_Interval,Left_Son_Of_Now(Index_Of_This_Interval));
        if(Right_Interval_Of_Query>Middle_Of_Interval) 
    		Result_Of_Interval_Of_This_query+=
    		Query_IntervalSum_Of_Segment_Tree(Left_Interval_Of_Query,Right_Interval_Of_Query,
    		Middle_Of_Interval+1,Right_Now_Interval_Of_Segment,Right_Son_Of_Now(Index_Of_This_Interval));
        return Result_Of_Interval_Of_This_query;
    }
    int main(){
        long long Operator;
    	long long Query_Lift_Interval;
    	long long Query_Right_Interval;
    	long long Query_Value_To_Update;
        Input_The_Initial_Array();
        Build_Segment_Tree(1,1,Num_Of_Initial_Array);
        while(Number_Of_Query--){
            scanf("%lld",&Operator);
            switch(Operator){
                case 1:{
                    scanf("%lld%lld%lld",&Query_Lift_Interval,&Query_Right_Interval,&Query_Value_To_Update);
                    Update_Interval_Segment_Tree
    				(Query_Lift_Interval,Query_Right_Interval,1,Num_Of_Initial_Array,1,Query_Value_To_Update);
                    break;
                }
                case 2:{
                    scanf("%lld%lld",&Query_Lift_Interval,&Query_Right_Interval);
                    printf("%lld\n",Query_IntervalSum_Of_Segment_Tree
    				(Query_Lift_Interval,Query_Right_Interval,1,Num_Of_Initial_Array,1));
                    break;
                }
            }
        }
        return 0;
    }
    
    
  • 最近活动