Is codeforces down? Please let me know guys, my solutions aren't getting submitted.

# | User | Rating |
---|---|---|

1 | tourist | 3845 |

2 | jiangly | 3707 |

3 | Benq | 3630 |

4 | orzdevinwang | 3573 |

5 | Geothermal | 3569 |

5 | cnnfls_csy | 3569 |

7 | jqdai0815 | 3532 |

8 | ecnerwala | 3501 |

9 | gyh20 | 3447 |

10 | Rebelz | 3409 |

# | User | Contrib. |
---|---|---|

1 | maomao90 | 171 |

2 | adamant | 163 |

2 | awoo | 163 |

4 | TheScrasse | 154 |

5 | nor | 153 |

6 | maroonrk | 152 |

6 | -is-this-fft- | 152 |

8 | Petr | 145 |

9 | pajenegod | 144 |

9 | orz | 144 |

Is codeforces down? Please let me know guys, my solutions aren't getting submitted.

Submissions to some old problems (without clear editorials or solutions) are greyed out. How can I know the solution to such problems in Codeforces?

The problem I am trying to learn: https://codeforces.com/gym/102760/problem/F

Words on Editorial: "There is another, more difficult solution. If you know how to find the largest rectangle in the histogram inO(N) using a stack, then you may realize that you can actually apply the exact same strategy to find the largest square. The proof is left to the reader for exercise."

And my solution

```
n = int(input())
arr = list(map(int, input().split()))
def solve(heights):
maxside = 0
pstack, hstack = [], []
currarea, maxside = 0, 0
heights.append(0)
for i in range(len(heights)):
prevwidth = int(1e9)
while hstack != [] and hstack[-1] > heights[i]: # -_
prevwidth = pstack[-1]
width = i - pstack.pop()
height = hstack.pop()
if width == height:
maxside = max(maxside, width)
if maxside < heights[i] or not hstack or hstack[-1] < heights[i]: # _-
hstack.append(heights[i])
pstack.append(min(prevwidth, i))
return maxside
ans = solve(arr)
print(ans)
```

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/20/2024 17:58:24 (k1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|