QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#605990#7904. Rainbow Subarrayucup-team1849Compile Error//C++142.0kb2024-10-02 21:14:272024-10-02 21:14:28

详细

answer.code: In function ‘void solve()’:
answer.code:2:5: error: ‘ll’ was not declared in this scope
    2 |     ll n, k;
      |     ^~
answer.code:3:5: error: ‘cin’ was not declared in this scope
    3 |     cin >> n >> k;
      |     ^~~
answer.code:3:12: error: ‘n’ was not declared in this scope
    3 |     cin >> n >> k;
      |            ^
answer.code:3:17: error: ‘k’ was not declared in this scope
    3 |     cin >> n >> k;
      |                 ^
answer.code:4:5: error: ‘vector’ was not declared in this scope
    4 |     vector<ll> a(n + 1);
      |     ^~~~~~
answer.code:4:16: error: ‘a’ was not declared in this scope
    4 |     vector<ll> a(n + 1);
      |                ^
answer.code:10:5: error: ‘multiset’ was not declared in this scope
   10 |     multiset<ll> s1, s2;
      |     ^~~~~~~~
answer.code:10:18: error: ‘s1’ was not declared in this scope
   10 |     multiset<ll> s1, s2;
      |                  ^~
answer.code:10:22: error: ‘s2’ was not declared in this scope
   10 |     multiset<ll> s1, s2;
      |                      ^~
answer.code:13:7: error: expected ‘;’ before ‘ans’
   13 |     ll ans = 0;
      |       ^~~~
      |       ;
answer.code:14:7: error: expected ‘;’ before ‘sum1’
   14 |     ll sum1 = 0, sum2 = 0;
      |       ^~~~~
      |       ;
answer.code: In lambda function:
answer.code:18:12: error: ‘siz2’ was not declared in this scope
   18 |         if(siz2 > siz1 + 1){
      |            ^~~~
answer.code:18:19: error: ‘siz1’ was not declared in this scope
   18 |         if(siz2 > siz1 + 1){
      |                   ^~~~
answer.code:20:23: error: ‘now’ was not declared in this scope
   20 |             s1.insert(now);
      |                       ^~~
answer.code:21:13: error: ‘sum1’ was not declared in this scope
   21 |             sum1 += now;
      |             ^~~~
answer.code:22:13: error: ‘sum2’ was not declared in this scope
   22 |             sum2 -= now;
      |             ^~~~
answer.code:27:23: error: ‘now’ was not declared in this scope
   27 |             s2.insert(now);
      |                       ^~~
answer.code:28:13: error: ‘sum2’ was not declared in this scope
   28 |             sum2 += now;
      |             ^~~~
answer.code:29:13: error: ‘sum1’ was not declared in this scope
   29 |             sum1 -= now;
      |             ^~~~
answer.code:30:22: error: ‘prev’ was not declared in this scope
   30 |             s1.erase(prev(s1.end()));
      |                      ^~~~
answer.code: In function ‘void solve()’:
answer.code:33:22: error: ‘ll’ is not a type
   33 |     auto insert =[&](ll x) -> void{
      |                      ^~
answer.code: In lambda function:
answer.code:34:38: error: ‘sum2’ was not declared in this scope
   34 |         if(s2.empty()) s2.insert(x), sum2 += x;
      |                                      ^~~~
answer.code:39:17: error: ‘sum2’ was not declared in this scope
   39 |                 sum2 += x;
      |                 ^~~~
answer.code:43:17: error: ‘sum1’ was not declared in this scope
   43 |                 sum1 += x;
      |                 ^~~~
answer.code: In function ‘void solve()’:
answer.code:49:26: error: ‘ll’ does not name a type
   49 |     auto query =[&]() -> ll{
      |                          ^~
answer.code:55:21: error: ‘ll’ is not a type
   55 |     auto erase =[&](ll x) -> void{
      |                     ^~
answer.code: In lambda function:
answer.code:56:58: error: ‘sum1’ was not declared in this scope
   56 |         if(s1.find(x) != s1.end()) s1.erase(s1.find(x)), sum1 -= x;
      |                                                          ^~~~
answer.code:57:36: error: ‘sum2’ was not declared in this scope
   57 |         else s2.erase(s2.find(x)), sum2 -= x;
      |                                    ^~~~
answer.code: In function ‘void solve()’:
answer.code:61:25: error: ‘ll’ does not name a type
   61 |     auto ques =[&]() -> ll{
      |                         ^~
answer.code:74:11: error: expected ‘;’ before ‘siz’
   74 |         ll siz = s1.size() + s2.size();
      |           ^~~~
      |           ;
answer.code:75:9: error: ‘ans’ was not declared in this scope
   75 |         ans = max(ans, siz);
      |         ^~~
answer.code:75:24: error: ‘siz’ was not declared in this scope
   75 |         ans = max(ans, siz);
      |                        ^~~
answer.code:75:15: error: ‘max’ was not declared in this scope
   75 |         ans = max(ans, siz);
      |               ^~~
answer.code:78:5: error: ‘cout’ was not declared in this scope
   78 |     cout << ans << '\n';
      |     ^~~~
answer.code:78:13: error: ‘ans’ was not declared in this scope
   78 |     cout << ans << '\n';
      |             ^~~