{"action":"created","issue":{"url":"https://api.github.com/repos/appirio-tech/arena-web/issues/328","labels_url":"https://api.github.com/repos/appirio-tech/arena-web/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/appirio-tech/arena-web/issues/328/comments","events_url":"https://api.github.com/repos/appirio-tech/arena-web/issues/328/events","html_url":"https://github.com/appirio-tech/arena-web/issues/328","id":52073695,"number":328,"title":"[$30] Error message overlap with the Dialog Scroll bars","user":{"login":"sdgun","id":4592712,"avatar_url":"https://avatars.githubusercontent.com/u/4592712?v=3","gravatar_id":"","url":"https://api.github.com/users/sdgun","html_url":"https://github.com/sdgun","followers_url":"https://api.github.com/users/sdgun/followers","following_url":"https://api.github.com/users/sdgun/following{/other_user}","gists_url":"https://api.github.com/users/sdgun/gists{/gist_id}","starred_url":"https://api.github.com/users/sdgun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdgun/subscriptions","organizations_url":"https://api.github.com/users/sdgun/orgs","repos_url":"https://api.github.com/users/sdgun/repos","events_url":"https://api.github.com/users/sdgun/events{/privacy}","received_events_url":"https://api.github.com/users/sdgun/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appirio-tech/arena-web/labels/fix+me","name":"fix me","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-16T04:56:38Z","updated_at":"2015-01-04T04:34:20Z","closed_at":null,"body":"Description\r\n-----------------------------------------------------------------\r\nError message overlap with the Dialog Scroll bars\r\n\r\n\r\nSteps\r\n-----------------------------------------------------------------\r\nGo to https://qa.arena.topcoder.com/#/a/home\r\nLogin as valid user\r\nGo to the Contest\r\nClick ENTER\r\nWhen the coding phase is ready\r\nOpen the Problem (eg:RandomPaintingOnABoard2)\r\nEnter the code\r\n\r\n\r\nimport java.util.Arrays;\r\nimport java.math.BigDecimal;\r\n\r\npublic class RandomPaintingOnABoard2 {\r\n    public double expectedSteps(String[] prob) {\r\n        int n = prob.length;\r\n        int m = prob[0].length();\r\n        int[][] a;\r\n        if (n > m) {\r\n            a = new int[m][n];\r\n            for (int i = 0; i < n; i ++)\r\n                for (int j = 0; j < m; j ++)\r\n                    a[j][i] = prob[i].charAt(j) - '0';\r\n            int t = n;\r\n            n = m;\r\n            m = t;\r\n        } else {\r\n            a = new int[n][m];\r\n            for (int i = 0; i < n; i ++)\r\n                for (int j = 0; j < m; j ++)\r\n                    a[i][j] = prob[i].charAt(j) - '0';\r\n        }\r\n        int s = 0;\r\n        for (int i = 0; i < n; i ++)\r\n            for (int j = 0; j < m; j ++)\r\n                s += a[i][j];\r\n\r\n        int[] c = new long[s + 1];\r\n        long[][][] f = new long[m + 1][s + 1][2];\r\n        Arrays.fill(c, 0);\r\n        for (int mask = 0; mask < 1 << n; mask ++) {\r\n            int[] cnt = new int[m];\r\n            Arrays.fill(cnt, 0);\r\n            int ss = 0;\r\n            for (int i = 0; i < n; i ++)\r\n                for (int j = 0; j < m; j ++)\r\n                    if ((mask & 1 << i) != 0) {\r\n                        ss += a[i][j];\r\n                    } else {\r\n                        cnt[j] += a[i][j];\r\n                    }\r\n            for (int i = 0; i <= m; i ++)\r\n                for (int j = 0; j <= s - ss; j ++) {\r\n                    f[i][j][0] = 0;\r\n                    f[i][j][1] = 0;\r\n                }\r\n            f[0][0][0] = 1;\r\n            for (int i = 0; i < m; i ++)\r\n                for (int j = 0; j <= s - ss; j ++) {\r\n                    f[i + 1][j][0] += f[i][j][0];\r\n                    f[i + 1][j][1] += f[i][j][1];\r\n                    if (j + cnt[i] <= s - ss) {\r\n                        f[i + 1][j + cnt[i]][1] += f[i][j][0];\r\n                        f[i + 1][j + cnt[i]][0] += f[i][j][1];\r\n                    }\r\n                }\r\n            for (int i = 0; i <= s - ss; i ++)\r\n                for (int k = 0; k < 2; k ++) {\r\n                    int t = k + Integer.bitCount(mask);\r\n                    if (t % 2 == 1) {\r\n                        c[s - (i + ss)] += f[m][i][k];\r\n                    } else {\r\n                        c[s - (i + ss)] -= f[m][i][k];\r\n                    }\r\n                }\r\n        }\r\n\r\n        BigDecimal ans = BigDecimal.ONE;\r\n        for (int i = 1; i < s; i ++) {\r\n            BigDecimal tmp = BigDecimal.valueOf(i);\r\n            tmp = tmp.divide(BigDecimal.valueOf(s - i), 100, BigDecimal.ROUND_HALF_EVEN);\r\n            tmp = tmp.multiply(BigDecimal.valueOf(c[i]));\r\n            ans = ans.add(tmp);\r\n        }\r\n        return ans.doubleValue();\r\n    }\r\n\r\n    public String checkData(String[] prob) {\r\n        int n = prob.length;\r\n        if (n < 1 || n > 21) {\r\n            return \"prob should contain between 1 and 21 elements, inclusive.\";\r\n        }\r\n        int m = prob[0].length();\r\n        if (m < 1 || m > 21) {\r\n            return \"Each element of prob should be between 1 and 21 characters long, inclusive.\";\r\n        }\r\n        if (n * m > 150) {\r\n            return \"The total number of cells (i.e., the total number of digits in prob) should be between 1 and 150, inclusive.\";\r\n        }\r\n        boolean[] row = new boolean[n];\r\n        Arrays.fill(row, false);\r\n        boolean[] column = new boolean[m];\r\n        Arrays.fill(column, false);\r\n        for (int i = 0; i < n; i ++) {\r\n            if (prob[i].length() != m) {\r\n                return \"The elements of prob should be of the same length.\";\r\n            }\r\n            for (int j = 0; j < m; j ++) {\r\n                char x = prob[i].charAt(j);\r\n                if ('0' > x || x > '9') {\r\n                    return \"Each element of prob should consist of digits only ('0'-'9').\";\r\n                }\r\n                if (x != '0') {\r\n                    row[i] = true;\r\n                    column[j] = false;\r\n                }\r\n            }\r\n        }\r\n        for (int i = 0; i < n; i ++)\r\n            if (! row[i]) {\r\n                return \"In each row there must be at least one non-zero digit.\";\r\n            }\r\n        for (int i = 0; i < m; i ++)\r\n            if (! column[i]) {\r\n                return \"In each column there must be at least one non-zero digit.\";\r\n            }\r\n        return \"\";\r\n    }\r\n}\r\n\r\n\r\n\r\nClick Compile\r\nCheck the Error\r\nIf the error message won't come; compile again and again\r\n\r\n\r\n\r\nExpected Result\r\n-----------------------------------------------------------------\r\nMust fix the Issue.\r\n- Must not overlap with the scroll bars\r\n\r\n\r\nActual Result\r\n-----------------------------------------------------------------\r\nError message overlap with the Dialog Scroll bars\r\n\r\n\r\nEnvironment\r\n-----------------------------------------------------------------\r\nIE 11, Safari 5.1.7, Chrome 39.0.2171.95 m and FF 34.0.5 in Windows 7 Pro 64bit\r\n\r\n\r\nImage\r\n-----------------------------------------------------------------\r\n![41](https://cloud.githubusercontent.com/assets/4592712/5448810/e2c896d6-850d-11e4-8653-43ab54bba801.png)\r\n\r\n\r\nBug Hunt\r\n-----------------------------------------------------------------\r\nWeb Arena QA for 201412 Release"},"comment":{"url":"https://api.github.com/repos/appirio-tech/arena-web/issues/comments/68620754","html_url":"https://github.com/appirio-tech/arena-web/issues/328#issuecomment-68620754","issue_url":"https://api.github.com/repos/appirio-tech/arena-web/issues/328","id":68620754,"user":{"login":"huangqun","id":6045894,"avatar_url":"https://avatars.githubusercontent.com/u/6045894?v=3","gravatar_id":"","url":"https://api.github.com/users/huangqun","html_url":"https://github.com/huangqun","followers_url":"https://api.github.com/users/huangqun/followers","following_url":"https://api.github.com/users/huangqun/following{/other_user}","gists_url":"https://api.github.com/users/huangqun/gists{/gist_id}","starred_url":"https://api.github.com/users/huangqun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangqun/subscriptions","organizations_url":"https://api.github.com/users/huangqun/orgs","repos_url":"https://api.github.com/users/huangqun/repos","events_url":"https://api.github.com/users/huangqun/events{/privacy}","received_events_url":"https://api.github.com/users/huangqun/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T04:34:20Z","updated_at":"2015-01-04T04:34:20Z","body":"@phasebeta  btw the above screens was from Chrome on Mac, on Firefox it seems to be working."}}