私はgdbで次のコードを実行しようとしましたが、gdbではセグメンテーションフォルトは表示されませんがgdbはありませんスタンドアロンモードで次のコードを実行すると、このコードは、セグメントツリーを使用して実装された範囲合計クエリに関連しています。 #include <iostream>
#include <vector>
using namespace std;
class segmen
query()の最後の6行のロジックを理解するのに苦労しています。 これはspojの問題GSS1のコードです。 link #include <cstdio>
#include <algorithm>
#define MAX 70000
using namespace std;
struct no {
int lsum, rsum, msum;
};
int array[ MAX