Submission #52169


ソースコード

ステータス

項目 データ
問題 1072 - セグメントツリー技術基礎
ユーザー名 もけ
投稿日時 2019-07-31 23:01:35
言語 C++14
状態 Compile Error
得点 0
ソースコード長 7270 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:66:1: error: expected initializer before ‘g’
 g(N, 0, [](int a, int b) { return a + b; }); rep(i, N) minseg[i] = maxseg[i] = 0; minseg.build(); m
 ^
./Main.cpp:66:43: error: expected primary-expression before ‘)’ token
 g(N, 0, [](int a, int b) { return a + b; }); rep(i, N) minseg[i] = maxseg[i] = 0; minseg.build(); m
                                           ^
./Main.cpp:66:99: error: ‘m’ was not declared in this scope
 g(N, 0, [](int a, int b) { return a + b; }); rep(i, N) minseg[i] = maxseg[i] = 0; minseg.build(); m
                                                                                                   ^
./Main.cpp:67:96: error: ‘struct SegmentTree<long long int>’ has no member named ‘upda’; did you mean ‘update’?
 axseg.build(); string q; int a, b; rep(i, M) { cin >> q >> a >> b; if (q == "update") { minseg.upda
                                                                                                ^~~~
                                                                                                update
./Main.cpp:68:32: error: ‘sumseg’ was not declared in this scope
 te(a, b); maxseg.update(a, b); sumseg.update(a, b); } else if (q == "add") { minseg.add(a, b); maxs
                                ^~~~~~
./Main.cpp:68:32: note: suggested alternative: ‘maxseg’
 te(a, b); maxseg.update(a, b); sumseg.update(a, b); } else if (q == "add") { minseg.add(a, b); maxs
                                ^~~~~~
                                maxseg
./Main.cpp:68:96: error: ‘maxs’ was not declared in this scope
 te(a, b); maxseg.update(a, b); sumseg.update(a, b); } else if (q == "add") { minseg.add(a, b); maxs
                                                                                                ^~~~
./Main.cpp:68:96: note: suggested alternative: ‘maxseg’
 te(a, b); maxseg.update(a, b); sumseg.update(a, b); } else if (q == "add") { minseg.add(a, b); maxs
                                                                                                ^~~~
                                                                                                maxseg
./Main.cpp:69:15: error: ‘sumseg’ was not declared in this scope
 eg.add(a, b); sumseg.add(a, b); } else if (q == "getMin") cout << minseg.query(a, b) << "\n"; else
               ^~~~~~
./Main.cpp:69:15: note: suggested alternative: ‘maxseg’
 eg.add(a, b); sumseg.add(a, b); } else if (q == "getMin") cout << minseg.query(a, b) << "\n"; else
               ^~~~~~
               maxseg
./Main.cpp:70:69: error: ‘sumseg’ was not declared in this scope
 if (q == "getMax") cout << maxseg.query(a, b) << "\n"; else cout << sumseg.query(a, b) << "\n"; }
                                                                     ^~~~~~
./Main.cpp:70:69: note: suggested alternative: ‘maxseg’
 if (q == "getMax") cout << maxseg.query(a, b) << "\n"; else cout << sumseg.query(a, b) << "\n"; }
                                                                     ^~~~~~
                                                                     maxseg

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #