Submission #383119

# Submission time Handle Problem Language Result Execution time Memory
383119 2021-03-28T20:44:22 Z Benmath Rice Hub (IOI11_ricehub) C++14
42 / 100
1000 ms 492 KB
int besthub(int r,int l, int x[],long long int b){   int maxi=1;
 for(int i=0;i<r;i++){
      long long int sum2=0;
      for(int j=i-1;j>=0;j--){
         sum2=sum2+x[i]-x[j];
         long long int sum3=0;
         for(int k=i;k<r;k++){
            sum3=sum3+x[k]-x[i];
            long long int sum=sum2+sum3;
            if(sum<=b){
               int x1=k-j+1;
               if(x1>maxi){
                  maxi=x1;
               }
            }
         }
      }
      
}
return maxi;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 2 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 34 ms 364 KB Output is correct
22 Correct 34 ms 364 KB Output is correct
23 Correct 30 ms 364 KB Output is correct
24 Correct 30 ms 364 KB Output is correct
25 Correct 31 ms 364 KB Output is correct
26 Correct 30 ms 364 KB Output is correct
27 Correct 33 ms 364 KB Output is correct
28 Correct 32 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 2 ms 364 KB Output is correct
3 Correct 164 ms 376 KB Output is correct
4 Correct 164 ms 364 KB Output is correct
5 Correct 34 ms 364 KB Output is correct
6 Correct 33 ms 364 KB Output is correct
7 Correct 259 ms 384 KB Output is correct
8 Correct 261 ms 492 KB Output is correct
9 Correct 34 ms 364 KB Output is correct
10 Correct 34 ms 364 KB Output is correct
11 Correct 134 ms 364 KB Output is correct
12 Correct 135 ms 384 KB Output is correct
13 Correct 223 ms 376 KB Output is correct
14 Correct 218 ms 364 KB Output is correct
15 Correct 33 ms 364 KB Output is correct
16 Correct 34 ms 364 KB Output is correct
17 Correct 112 ms 364 KB Output is correct
18 Correct 117 ms 364 KB Output is correct
19 Correct 219 ms 364 KB Output is correct
20 Correct 222 ms 364 KB Output is correct
21 Execution timed out 1089 ms 364 KB Time limit exceeded
22 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1079 ms 492 KB Time limit exceeded
2 Halted 0 ms 0 KB -