Submission #625773

# Submission time Handle Problem Language Result Execution time Memory
625773 2022-08-10T18:57:11 Z inwbear Catfish Farm (IOI22_fish) C++17
100 / 100
675 ms 100472 KB
//#include "fish.h"
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define imx INT_MAX
const long long MMX = (long long)(1e18);
typedef long long LL;
vector<pair<int,LL> > dw[100005],val[100005];
vector<pair<int,pair<int,int> > >up[100005];
vector<pair<LL,int> >lup[100005],ldw[100005],lze[100005];
vector<LL>rup[100005];
int c1,c2,si1,si2,c3,cr,crr;
LL ze[100005],rr,rrdw,rrup,ans;

long long max_weights(int N,int M,vector<int>X,vector<int>Y,vector<int>W){
  for(int i=0;i<M;i++){
    up[X[i]+2].pb({Y[i]+1,{W[i],-1}});
    up[X[i]].pb({Y[i]+1,{W[i],1}});
    dw[X[i]].pb({Y[i]+1,W[i]});
    val[X[i]+1].pb({Y[i]+1,W[i]});
  }
  for(int i=1;i<=N;i++){
      sort(all(up[i]));
      sort(all(dw[i]));
      sort(all(val[i]));
  }
  lze[0].pb({0,0});
  for(int i=1;i<=N;i++){
    for(int j=0;j<dw[i].size();j++){
      ldw[i].pb({0,dw[i][j].F});
      if(j!=0)dw[i][j].S+=dw[i][j-1].S;
    }

    c1=lup[i-1].size()-1,c2=ldw[i-1].size()-1,c3=val[i].size()-1,rr=-1;
    rrdw=0;
    for(int j=0;j<val[i].size();j++)rrdw+=val[i][j].S;
    for(int j=ldw[i].size()-1;j>-1;j--){
      cr=ldw[i][j].S;
      if(c1!=-1){
        while(lup[i-1][c1].S>=cr){
          rr=max(rr,lup[i-1][c1].F);
          c1--;
          if(c1==-1)break;
        }
      }
      if(c2!=-1){
        while(ldw[i-1][c2].S>=cr){
          rr=max(rr,ldw[i-1][c2].F);
          c2--;
          if(c2==-1)break;
        }
      }
      if(c3!=-1){
        while(val[i][c3].F>cr){
          rrdw-=val[i][c3].S;
          c3--;
          if(c3==-1)break;
        }
      }
      if(rr==-1)continue;
      ldw[i][j].F=rr+dw[i][j].S-rrdw;
    }

    c1=0,c2=0,c3=0,rrup=0,rrdw=0,rr=-MMX;
    for(int j=0;j<up[i].size();j++){
      rrup+=up[i][j].S.F;
      if(j!=up[i].size()-1){
        if(up[i][j].F==up[i][j+1].F)continue;
      }
      cr=up[i][j].F;
      if(c1!=lup[i-1].size()){
        while(lup[i-1][c1].S<=cr){
          crr=lup[i-1][c1].S;
          if(c2!=val[i-1].size()){
            while(val[i-1][c2].F<=crr){
              rrdw-=val[i-1][c2].S;
              c2++;
              if(c2==val[i-1].size())break;
            }
          }
          if(c3!=val[i].size()){
            while(val[i][c3].F<=crr){
              rrdw-=val[i][c3].S;
              c3++;
              if(c3==val[i].size())break;
            }
          }
          //printf("// %lld",rrdw);
          rr=max(rr,lup[i-1][c1].F+rrdw);
          c1++;
          if(c1==lup[i-1].size())break;
        }
      }
      rup[i].pb(rrup);
      if(rr==-MMX){
        lup[i].pb({0,up[i][j].F});
        continue;
      }
      //printf("=/ %lld %lld",rrup,rr);
      lup[i].pb({rrup+rr,up[i][j].F});
    }

    c1=lze[i-1].size()-1,c2=val[i-1].size()-1,rrdw=0,rr=-1;
    for(int j=0;j<val[i-1].size();j++)rrdw-=val[i-1][j].S;
    for(int j=lup[i].size()-1;j>-1;j--){
      cr=lup[i][j].S;
      if(c1!=-1){
        while(lze[i-1][c1].S>=cr){
          rr=max(rr,lze[i-1][c1].F);
          c1--;
          if(c1==-1)break;
        }
      }
      if(c2!=-1){
        while(val[i-1][c2].F>cr){
          rrdw+=val[i-1][c2].S;
          c2--;
          if(c2==-1)break;
        }
      }
      if(rr==-1)continue;
      //printf("//%d %lld\n",lup[i][j].S,rr+rup[i][j]+rrdw);
      lup[i][j].F=max(lup[i][j].F,rr+rup[i][j]+rrdw);
    }

    c1=0,c2=0,rr=-1,rrdw=0;
    for(int j=0;j<lup[i].size();j++){
      cr=lup[i][j].S;
      if(c1!=lze[i-1].size()){
        while(lze[i-1][c1].S<=cr){
          crr=lze[i-1][c1].S;
          if(c2!=val[i-1].size()){
            while(val[i-1][c2].F<=crr){
              rrdw-=val[i-1][c2].S;
              c2++;
              if(c2==val[i-1].size())break;
            }
          }
          rr=max(rr,lze[i-1][c1].F+rrdw);
          c1++;
          if(c1==lze[i-1].size())break;
        }
      }
      if(rr==-1)continue;
      lup[i][j].F=max(lup[i][j].F,rr+rup[i][j]);
    }
    ze[i]=ze[i-1];
    lze[i].pb({ze[i-1],0});
    si1=lup[i-1].size();
    si2=ldw[i-1].size();
    lup[i-1].pb({0,imx});
    ldw[i-1].pb({0,imx});
    for(c1=0,c2=0;c1<si1||c2<si2;){
      ze[i]=max(ze[i],lup[i-1][c1].F);
      ze[i]=max(ze[i],ldw[i-1][c2].F);
      if(lup[i-1][c1].S<ldw[i-1][c2].S){
        lze[i].pb(lup[i-1][c1]);
        c1++;
      }
      else if(lup[i-1][c1].S>ldw[i-1][c2].S){
        lze[i].pb(ldw[i-1][c2]);
        c2++;
      }
      else{
        lze[i].pb({max(lup[i-1][c1].F,ldw[i-1][c2].F),lup[i-1][c1].S});
        c1++,c2++;
      }
    }
    // printf("=%d=\n",i);
    // for(int j=0;j<lup[i].size();j++)printf("%lld %d\n",lup[i][j].F,lup[i][j].S);
    // for(int j=0;j<ldw[i].size();j++)printf("[%lld %d]\n",ldw[i][j].F,ldw[i][j].S);
    // for(int j=0;j<lze[i].size();j++)printf("{%lld %d}\n",lze[i][j].F,lze[i][j].S);
    for(int j=0;j<lup[i].size();j++)ans=max(ans,lup[i][j].F);
    for(int j=0;j<ldw[i].size();j++)ans=max(ans,ldw[i][j].F);
    for(int j=0;j<lze[i].size();j++)ans=max(ans,lze[i][j].F);
  }
  return ans;
}

Compilation message

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:32:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |     for(int j=0;j<dw[i].size();j++){
      |                 ~^~~~~~~~~~~~~
fish.cpp:39:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   39 |     for(int j=0;j<val[i].size();j++)rrdw+=val[i][j].S;
      |                 ~^~~~~~~~~~~~~~
fish.cpp:68:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |     for(int j=0;j<up[i].size();j++){
      |                 ~^~~~~~~~~~~~~
fish.cpp:70:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   70 |       if(j!=up[i].size()-1){
      |          ~^~~~~~~~~~~~~~~~
fish.cpp:74:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   74 |       if(c1!=lup[i-1].size()){
      |          ~~^~~~~~~~~~~~~~~~~
fish.cpp:77:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   77 |           if(c2!=val[i-1].size()){
      |              ~~^~~~~~~~~~~~~~~~~
fish.cpp:81:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   81 |               if(c2==val[i-1].size())break;
      |                  ~~^~~~~~~~~~~~~~~~~
fish.cpp:84:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   84 |           if(c3!=val[i].size()){
      |              ~~^~~~~~~~~~~~~~~
fish.cpp:88:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   88 |               if(c3==val[i].size())break;
      |                  ~~^~~~~~~~~~~~~~~
fish.cpp:94:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   94 |           if(c1==lup[i-1].size())break;
      |              ~~^~~~~~~~~~~~~~~~~
fish.cpp:107:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  107 |     for(int j=0;j<val[i-1].size();j++)rrdw-=val[i-1][j].S;
      |                 ~^~~~~~~~~~~~~~~~
fish.cpp:130:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  130 |     for(int j=0;j<lup[i].size();j++){
      |                 ~^~~~~~~~~~~~~~
fish.cpp:132:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  132 |       if(c1!=lze[i-1].size()){
      |          ~~^~~~~~~~~~~~~~~~~
fish.cpp:135:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  135 |           if(c2!=val[i-1].size()){
      |              ~~^~~~~~~~~~~~~~~~~
fish.cpp:139:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  139 |               if(c2==val[i-1].size())break;
      |                  ~~^~~~~~~~~~~~~~~~~
fish.cpp:144:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  144 |           if(c1==lze[i-1].size())break;
      |              ~~^~~~~~~~~~~~~~~~~
fish.cpp:176:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  176 |     for(int j=0;j<lup[i].size();j++)ans=max(ans,lup[i][j].F);
      |                 ~^~~~~~~~~~~~~~
fish.cpp:177:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  177 |     for(int j=0;j<ldw[i].size();j++)ans=max(ans,ldw[i][j].F);
      |                 ~^~~~~~~~~~~~~~
fish.cpp:178:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  178 |     for(int j=0;j<lze[i].size();j++)ans=max(ans,lze[i][j].F);
      |                 ~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 67 ms 35360 KB Output is correct
2 Correct 79 ms 38620 KB Output is correct
3 Correct 29 ms 26888 KB Output is correct
4 Correct 30 ms 26844 KB Output is correct
5 Correct 258 ms 81812 KB Output is correct
6 Correct 448 ms 98728 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 16724 KB Output is correct
2 Correct 129 ms 49780 KB Output is correct
3 Correct 159 ms 55872 KB Output is correct
4 Correct 67 ms 35320 KB Output is correct
5 Correct 79 ms 38576 KB Output is correct
6 Correct 8 ms 16724 KB Output is correct
7 Correct 9 ms 16724 KB Output is correct
8 Correct 10 ms 16724 KB Output is correct
9 Correct 8 ms 16696 KB Output is correct
10 Correct 28 ms 26816 KB Output is correct
11 Correct 28 ms 26896 KB Output is correct
12 Correct 83 ms 40196 KB Output is correct
13 Correct 100 ms 44372 KB Output is correct
14 Correct 76 ms 38232 KB Output is correct
15 Correct 85 ms 40444 KB Output is correct
16 Correct 77 ms 38200 KB Output is correct
17 Correct 83 ms 40340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 26848 KB Output is correct
2 Correct 29 ms 26872 KB Output is correct
3 Correct 84 ms 36788 KB Output is correct
4 Correct 66 ms 34496 KB Output is correct
5 Correct 152 ms 46456 KB Output is correct
6 Correct 148 ms 46412 KB Output is correct
7 Correct 155 ms 46464 KB Output is correct
8 Correct 152 ms 46412 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 16732 KB Output is correct
2 Correct 10 ms 16724 KB Output is correct
3 Correct 9 ms 16724 KB Output is correct
4 Correct 9 ms 16724 KB Output is correct
5 Correct 9 ms 16724 KB Output is correct
6 Correct 9 ms 16724 KB Output is correct
7 Correct 9 ms 16660 KB Output is correct
8 Correct 9 ms 16724 KB Output is correct
9 Correct 9 ms 16852 KB Output is correct
10 Correct 11 ms 17108 KB Output is correct
11 Correct 11 ms 16852 KB Output is correct
12 Correct 10 ms 16980 KB Output is correct
13 Correct 9 ms 16724 KB Output is correct
14 Correct 11 ms 16852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 16732 KB Output is correct
2 Correct 10 ms 16724 KB Output is correct
3 Correct 9 ms 16724 KB Output is correct
4 Correct 9 ms 16724 KB Output is correct
5 Correct 9 ms 16724 KB Output is correct
6 Correct 9 ms 16724 KB Output is correct
7 Correct 9 ms 16660 KB Output is correct
8 Correct 9 ms 16724 KB Output is correct
9 Correct 9 ms 16852 KB Output is correct
10 Correct 11 ms 17108 KB Output is correct
11 Correct 11 ms 16852 KB Output is correct
12 Correct 10 ms 16980 KB Output is correct
13 Correct 9 ms 16724 KB Output is correct
14 Correct 11 ms 16852 KB Output is correct
15 Correct 13 ms 16768 KB Output is correct
16 Correct 10 ms 17136 KB Output is correct
17 Correct 38 ms 25340 KB Output is correct
18 Correct 41 ms 27260 KB Output is correct
19 Correct 38 ms 27064 KB Output is correct
20 Correct 37 ms 26528 KB Output is correct
21 Correct 43 ms 26416 KB Output is correct
22 Correct 66 ms 35920 KB Output is correct
23 Correct 15 ms 18772 KB Output is correct
24 Correct 32 ms 23428 KB Output is correct
25 Correct 9 ms 16980 KB Output is correct
26 Correct 16 ms 18516 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 16732 KB Output is correct
2 Correct 10 ms 16724 KB Output is correct
3 Correct 9 ms 16724 KB Output is correct
4 Correct 9 ms 16724 KB Output is correct
5 Correct 9 ms 16724 KB Output is correct
6 Correct 9 ms 16724 KB Output is correct
7 Correct 9 ms 16660 KB Output is correct
8 Correct 9 ms 16724 KB Output is correct
9 Correct 9 ms 16852 KB Output is correct
10 Correct 11 ms 17108 KB Output is correct
11 Correct 11 ms 16852 KB Output is correct
12 Correct 10 ms 16980 KB Output is correct
13 Correct 9 ms 16724 KB Output is correct
14 Correct 11 ms 16852 KB Output is correct
15 Correct 13 ms 16768 KB Output is correct
16 Correct 10 ms 17136 KB Output is correct
17 Correct 38 ms 25340 KB Output is correct
18 Correct 41 ms 27260 KB Output is correct
19 Correct 38 ms 27064 KB Output is correct
20 Correct 37 ms 26528 KB Output is correct
21 Correct 43 ms 26416 KB Output is correct
22 Correct 66 ms 35920 KB Output is correct
23 Correct 15 ms 18772 KB Output is correct
24 Correct 32 ms 23428 KB Output is correct
25 Correct 9 ms 16980 KB Output is correct
26 Correct 16 ms 18516 KB Output is correct
27 Correct 11 ms 17828 KB Output is correct
28 Correct 158 ms 59260 KB Output is correct
29 Correct 214 ms 73036 KB Output is correct
30 Correct 236 ms 83128 KB Output is correct
31 Correct 255 ms 83148 KB Output is correct
32 Correct 198 ms 76476 KB Output is correct
33 Correct 244 ms 83240 KB Output is correct
34 Correct 248 ms 83276 KB Output is correct
35 Correct 98 ms 44216 KB Output is correct
36 Correct 241 ms 81868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 26848 KB Output is correct
2 Correct 29 ms 26872 KB Output is correct
3 Correct 84 ms 36788 KB Output is correct
4 Correct 66 ms 34496 KB Output is correct
5 Correct 152 ms 46456 KB Output is correct
6 Correct 148 ms 46412 KB Output is correct
7 Correct 155 ms 46464 KB Output is correct
8 Correct 152 ms 46412 KB Output is correct
9 Correct 174 ms 52744 KB Output is correct
10 Correct 127 ms 40832 KB Output is correct
11 Correct 296 ms 65096 KB Output is correct
12 Correct 9 ms 16664 KB Output is correct
13 Correct 9 ms 16724 KB Output is correct
14 Correct 9 ms 16724 KB Output is correct
15 Correct 9 ms 16724 KB Output is correct
16 Correct 11 ms 16724 KB Output is correct
17 Correct 9 ms 16748 KB Output is correct
18 Correct 28 ms 26864 KB Output is correct
19 Correct 31 ms 26904 KB Output is correct
20 Correct 29 ms 26832 KB Output is correct
21 Correct 30 ms 26828 KB Output is correct
22 Correct 239 ms 51976 KB Output is correct
23 Correct 362 ms 73664 KB Output is correct
24 Correct 321 ms 76560 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 67 ms 35360 KB Output is correct
2 Correct 79 ms 38620 KB Output is correct
3 Correct 29 ms 26888 KB Output is correct
4 Correct 30 ms 26844 KB Output is correct
5 Correct 258 ms 81812 KB Output is correct
6 Correct 448 ms 98728 KB Output is correct
7 Correct 9 ms 16724 KB Output is correct
8 Correct 129 ms 49780 KB Output is correct
9 Correct 159 ms 55872 KB Output is correct
10 Correct 67 ms 35320 KB Output is correct
11 Correct 79 ms 38576 KB Output is correct
12 Correct 8 ms 16724 KB Output is correct
13 Correct 9 ms 16724 KB Output is correct
14 Correct 10 ms 16724 KB Output is correct
15 Correct 8 ms 16696 KB Output is correct
16 Correct 28 ms 26816 KB Output is correct
17 Correct 28 ms 26896 KB Output is correct
18 Correct 83 ms 40196 KB Output is correct
19 Correct 100 ms 44372 KB Output is correct
20 Correct 76 ms 38232 KB Output is correct
21 Correct 85 ms 40444 KB Output is correct
22 Correct 77 ms 38200 KB Output is correct
23 Correct 83 ms 40340 KB Output is correct
24 Correct 28 ms 26848 KB Output is correct
25 Correct 29 ms 26872 KB Output is correct
26 Correct 84 ms 36788 KB Output is correct
27 Correct 66 ms 34496 KB Output is correct
28 Correct 152 ms 46456 KB Output is correct
29 Correct 148 ms 46412 KB Output is correct
30 Correct 155 ms 46464 KB Output is correct
31 Correct 152 ms 46412 KB Output is correct
32 Correct 10 ms 16732 KB Output is correct
33 Correct 10 ms 16724 KB Output is correct
34 Correct 9 ms 16724 KB Output is correct
35 Correct 9 ms 16724 KB Output is correct
36 Correct 9 ms 16724 KB Output is correct
37 Correct 9 ms 16724 KB Output is correct
38 Correct 9 ms 16660 KB Output is correct
39 Correct 9 ms 16724 KB Output is correct
40 Correct 9 ms 16852 KB Output is correct
41 Correct 11 ms 17108 KB Output is correct
42 Correct 11 ms 16852 KB Output is correct
43 Correct 10 ms 16980 KB Output is correct
44 Correct 9 ms 16724 KB Output is correct
45 Correct 11 ms 16852 KB Output is correct
46 Correct 13 ms 16768 KB Output is correct
47 Correct 10 ms 17136 KB Output is correct
48 Correct 38 ms 25340 KB Output is correct
49 Correct 41 ms 27260 KB Output is correct
50 Correct 38 ms 27064 KB Output is correct
51 Correct 37 ms 26528 KB Output is correct
52 Correct 43 ms 26416 KB Output is correct
53 Correct 66 ms 35920 KB Output is correct
54 Correct 15 ms 18772 KB Output is correct
55 Correct 32 ms 23428 KB Output is correct
56 Correct 9 ms 16980 KB Output is correct
57 Correct 16 ms 18516 KB Output is correct
58 Correct 11 ms 17828 KB Output is correct
59 Correct 158 ms 59260 KB Output is correct
60 Correct 214 ms 73036 KB Output is correct
61 Correct 236 ms 83128 KB Output is correct
62 Correct 255 ms 83148 KB Output is correct
63 Correct 198 ms 76476 KB Output is correct
64 Correct 244 ms 83240 KB Output is correct
65 Correct 248 ms 83276 KB Output is correct
66 Correct 98 ms 44216 KB Output is correct
67 Correct 241 ms 81868 KB Output is correct
68 Correct 174 ms 52744 KB Output is correct
69 Correct 127 ms 40832 KB Output is correct
70 Correct 296 ms 65096 KB Output is correct
71 Correct 9 ms 16664 KB Output is correct
72 Correct 9 ms 16724 KB Output is correct
73 Correct 9 ms 16724 KB Output is correct
74 Correct 9 ms 16724 KB Output is correct
75 Correct 11 ms 16724 KB Output is correct
76 Correct 9 ms 16748 KB Output is correct
77 Correct 28 ms 26864 KB Output is correct
78 Correct 31 ms 26904 KB Output is correct
79 Correct 29 ms 26832 KB Output is correct
80 Correct 30 ms 26828 KB Output is correct
81 Correct 239 ms 51976 KB Output is correct
82 Correct 362 ms 73664 KB Output is correct
83 Correct 321 ms 76560 KB Output is correct
84 Correct 299 ms 79340 KB Output is correct
85 Correct 281 ms 81332 KB Output is correct
86 Correct 610 ms 98808 KB Output is correct
87 Correct 591 ms 100472 KB Output is correct
88 Correct 10 ms 16724 KB Output is correct
89 Correct 675 ms 100380 KB Output is correct
90 Correct 469 ms 94888 KB Output is correct
91 Correct 338 ms 86888 KB Output is correct