Simple java code 0 ms beats 100 %
\n# Complexity\n- \n\n# Code\n\nclass Solution {\n    public int fillCups(int[] amount) {\n        int max=0,sum=0;\n        for(int i:amount){\n            max
\n# Complexity\n- \n![image.png](https://assets.leetcode.com/users/images/0ebfc0d1-5b7f-4da6-91de-cf74580c1443_1704859802.2224016.png)\n# Code\n```\nclass Solution {\n    public int fillCups(int[] amount) {\n        int max=0,sum=0;\n        for(int i:amount){\n            max=Math.max(max,i);\n            sum+=i;\n        }\n        int x=(sum + 1)/2;\n\n        return Math.max(max,x);\n    }\n}\n```
['Java']