Submission #00123


ソースコード

ステータス

項目 データ
問題 0002 - ghoststudents
ユーザー名 Hoget157
投稿日時 2017-07-07 21:16:01
言語 C++11
状態 Compile Error
得点 0
ソースコード長 2165 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:43:14: エラー: array bound is not an integer constant before ‘]’ token
 int dat[nodes],lind[nodes],rind[nodes],lrange[nodes],rrange[nodes],last = 1;
              ^
./Main.cpp:43:26: エラー: array bound is not an integer constant before ‘]’ token
 int dat[nodes],lind[nodes],rind[nodes],lrange[nodes],rrange[nodes],last = 1;
                          ^
./Main.cpp:43:38: エラー: array bound is not an integer constant before ‘]’ token
 int dat[nodes],lind[nodes],rind[nodes],lrange[nodes],rrange[nodes],last = 1;
                                      ^
./Main.cpp:43:52: エラー: array bound is not an integer constant before ‘]’ token
 int dat[nodes],lind[nodes],rind[nodes],lrange[nodes],rrange[nodes],last = 1;
                                                    ^
./Main.cpp:43:66: エラー: array bound is not an integer constant before ‘]’ token
 int dat[nodes],lind[nodes],rind[nodes],lrange[nodes],rrange[nodes],last = 1;
                                                                  ^
./Main.cpp: 関数 ‘void create(long long int)’ 内:
./Main.cpp:46:9: エラー: ‘lind’ was not declared in this scope
         lind[k] = last;
         ^~~~
./Main.cpp:46:9: 備考: suggested alternative: ‘rand’
         lind[k] = last;
         ^~~~
         rand
./Main.cpp:47:9: エラー: ‘rind’ was not declared in this scope
         rind[k] = last + 1;
         ^~~~
./Main.cpp:47:9: 備考: suggested alternative: ‘rand’
         rind[k] = last + 1;
         ^~~~
         rand
./Main.cpp:48:9: エラー: ‘lrange’ was not declared in this scope
         lrange[last] = lrange[k];
         ^~~~~~
./Main.cpp:48:9: 備考: suggested alternative: ‘lrand48’
         lrange[last] = lrange[k];
         ^~~~~~
         lrand48
./Main.cpp:49:9: エラー: ‘rrange’ was not declared in this scope
         rrange[last] = (lrange[k] + rrange[k]) / 2;
         ^~~~~~
./Main.cpp:49:9: 備考: suggested alternative: ‘srand’
         rrange[last] = (lrange[k] + rrange[k]) / 2;
         ^~~~~~
         srand
./Main.cpp: 関数 ‘void add(long long int, long long int, long long int)’ 内:
./Main.cpp:56:9: エラー: ‘dat’ was not declared in this scope
         dat[k] += x;
         ^~~
./Main.cpp:56:9: 備考: suggested alternative: ‘last’
         dat[k] += x;
         ^~~
         last
./Main.cpp:57:12: エラー: ‘rrange’ was not declared in this scope
         if(rrange[k] - lrange[k] == 1) return;
            ^~~~~~
./Main.cpp:57:12: 備考: suggested alternative: ‘srand’
         if(rrange[k] - lrange[k] == 1) return;
            ^~~~~~
            srand
./Main.cpp:57:24: エラー: ‘lrange’ was not declared in this scope
         if(rrange[k] - lrange[k] == 1) return;
                        ^~~~~~
./Main.cpp:57:24: 備考: suggested alternative: ‘lrand48’
         if(rrange[k] - lrange[k] == 1) return;
                        ^~~~~~
                        lrand48
./Main.cpp:58:12: エラー: ‘lind’ was not declared in this scope
         if(lind[k] == -1) create(k);
            ^~~~
./Main.cpp:58:12: 備考: suggested alternative: ‘rand’
         if(lind[k] == -1) create(k);
            ^~~~
            rand
./Main.cpp:59:12: エラー: ‘lrange’ was not declared in this scope
         if(lrange[lind[k]] <= i && i < rrange[lind[k]]) add(i,x,lind[k]);
            ^~~~~~
./Main.cpp:59:12: 備考: suggested alternative: ‘lrand48’
         if(lrange[lind[k]] <= i && i < rrange[lind[k]]) add(i,x,lind[k]);
            ^~~~~~
            lrand48
./Main.cpp:59:19: エラー: ‘lind’ was not declared in this scope
         if(lrange[lind[k]] <= i && i < rrange[lind[k]]) add(i,x,lind[k]);
                   ^~~~
./Main.cpp:59:19: 備考: suggested alternative: ‘rand’
         if(lrange[lind[k]] <= i && i < rrange[lind[k]]) add(i,x,lind[k]);
                   ^~~~
                   rand
./Main.cpp:59:40: エラー: ‘rrange’ was not declared in this scope
         if(lrange[lind[k]] <= i && i < rrange[lind[k]]) add(i,x,lind[k]);
                                        ^~~~~~
./Main.cpp:59:40: 備考: suggested alternative: ‘srand’
         if(lrange[lind[k]] <= i && i < rrange[lind[k]]) add(i,x,lind[k]);
                                        ^~~~~~
                                        srand
./Main.cpp:60:22: エラー: ‘rind’ was not declared in this scope
         else add(i,x,rind[k]);
                      ^~~~
./Main.cpp:60:22: 備考: suggested alternative: ‘rand’
         else add(i,x,rind[k]);
                      ^~~~
                      rand
./Main.cpp: 関数 ‘long long int sum(long long int, long long int, long long int)’ 内:
./Main.cpp:64:17: エラー: ‘lrange’ was not declared in this scope
         if(b <= lrange[k] || rrange[k] <= a) return 0;
                 ^~~~~~
./Main.cpp:64:17: 備考: suggested alternative: ‘lrand48’
         if(b <= lrange[k] || rrange[k] <= a) return 0;
                 ^~~~~~
                 lrand48
./Main.cpp:64:30: エラー: ‘rrange’ was not declared in this scope
         if(b <= lrange[k] || rrange[k] <= a) return 0;
                              ^~~~~~
./Main.cpp:64:30: 備考: suggested alternative: ‘srand’
         if(b <= lrange[k] || rrange[k] <= a) return 0;
                              ^~~~~~
                              srand
./Main.cpp:65:17: エラー: ‘lrange’ was not declared in this scope
         if(a <= lrange[k] && rrange[k] <= b) return dat[k];
                 ^~~~~~
./Main.cpp:65:17: 備考: suggested alternative: ‘lrand48’
         if(a <= lrange[k] && rrange[k] <= b) return dat[k];
                 ^~~~~~
                 lrand48
./Main.cpp:65:30: エラー: ‘rrange’ was not declared in this scope
         if(a <= lrange[k] && rrange[k] <= b) return dat[k];
                              ^~~~~~
./Main.cpp:65:30: 備考: suggested alternative: ‘srand’
         if(a <= lrange[k] && rrange[k] <= b) return dat[k];
                              ^~~~~~
                              srand
./Main.cpp:65:53: エラー: ‘dat’ was not declared in this scope
         if(a <= lrange[k] && rrange[k] <= b) return dat[k];
                                                     ^~~
./Main.cpp:65:53: 備考: suggested alternative: ‘last’
         if(a <= lrange[k] && rrange[k] <= b) return dat[k];
                                                     ^~~
                                                     last
./Main.cpp:66:12: エラー: ‘lind’ was not declared in this scope
         if(lind[k] == -1) create(k);
            ^~~~
./Main.cpp:66:12: 備考: suggested alternative: ‘rand’
         if(lind[k] == -1) create(k);
            ^~~~
            rand
./Main.cpp:67:24: エラー: ‘lind’ was not declared in this scope
         return sum(a,b,lind[k]) + sum(a,b,rind[k]);
                        ^~~~
./Main.cpp:67:24: 備考: suggested alternative: ‘rand’
         return sum(a,b,lind[k]) + sum(a,b,rind[k]);
                        ^~~~
                        rand
./Main.cpp:67:43: エラー: ‘rind’ was not declared in this scope
         return sum(a,b,lind[k]) + sum(a,b,rind[k]);
                                           ^~~~
./Main.cpp:67:43: 備考: suggested alternative: ‘rand’
         return sum(a,b,lind[k]) + sum(a,b,rind[k]);
                                           ^~~~
                                           rand
./Main.cpp: 関数 ‘int main()’ 内:
./Main.cpp:74:38: エラー: ‘lind’ was not declared in this scope
         for(int i = 0;i < nodes;i++) lind[i] = -1;
                                      ^~~~
./Main.cpp:74:38: 備考: suggested alternative: ‘rand’
         for(int i = 0;i < nodes;i++) lind[i] = -1;
                                      ^~~~
                                      rand
./Main.cpp:75:9: エラー: ‘lrange’ was not declared in this scope
         lrange[0] = 0;
         ^~~~~~
./Main.cpp:75:9: 備考: suggested alternative: ‘lrand48’
         lrange[0] = 0;
         ^~~~~~
         lrand48
./Main.cpp:76:9: エラー: ‘rrange’ was not declared in this scope
         rrange[0] = siz;
         ^~~~~~
./Main.cpp:76:9: 備考: suggested alternative: ‘srand’
         rrange[0] = siz;
         ^~~~~~
         srand

セット

セット 得点 Cases

テストケース

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