{"similarity_score": 0.9132743362831859, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "hezhao@localhost assignment1 $ vi assignment1.py\npackage main\n\nimport (\n \"fmt\"\n)\n\nfunc gcd(x, y int) int {\n if y == 0 {\n return x\n }\n return gcd(y, x%y)\n}\n\nfunc main() {\n var a, b, x, y int\n fmt.Scanf(\"%d%d%d%d\", &a, &b, &x, &y)\n c := a*b/gcd(a, b)\n fmt.Println(y/c-(x-1)/c)\n}", "lang": "Go", "bug_code_uid": "c4d28b0edab0bf53cc748d59533381e5", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "2fe5f10c38c6dd47af35f3121ea7327d", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9997384937238494, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar in *bufio.Reader\nvar out *bufio.Writer\n\nfunc printf(x string, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprintf(out, x, a...)\n}\n\nfunc scanf(x string, a ...interface{}) (n int, err error) {\n\treturn fmt.Fscanf(in, x, a...)\n}\n\nfunc scan(a ...interface{}) (n int, err error) {\n\treturn fmt.Fscan(in, a...)\n}\n\nvar err error\n\nfunc next() (n string) {\n\tscan(&n)\n\treturn n\n}\n\nfunc nextInt() (n int) {\n\tscan(&n)\n\treturn n\n}\n\nfunc nextLong() (n int64) {\n\tscan(&n)\n\treturn n\n}\n\nfunc nextDouble() (n float64) {\n\tscan(&n)\n\treturn n\n}\n\nfunc Max(a, b int64) int64 {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nvar (\n\tl, r, pre, post []int\n\tcurr int\n)\n\nfunc solve() {\n\tn, m, q := nextInt(), nextInt(), nextInt()\n\n\tp := make([]int, n)\n\tfor i := range p {\n\t\tp[i] = nextInt()\n\t}\n\n\tedges := [][3]int{}\n\tfor i := 0; i < m; i++ {\n\t\tedges = append(edges, [3]int{nextInt() - 1, nextInt() - 1, 0})\n\t}\n\n\tqs := [][3]int{}\n\tfor i := 0; i < q; i++ {\n\t\tcurr := [3]int{nextInt(), nextInt() - 1, 0}\n\t\tqs = append(qs, curr)\n\t\tif curr[0] == 2 {\n\t\t\tedges[curr[1]][2] = i\n\t\t}\n\t}\n\n\tdsu := make(DSU, n)\n\tfor i := range dsu {\n\t\tdsu[i] = -1\n\t}\n\n\tl, r = make([]int, n), make([]int, n)\n\tfor i := range l {\n\t\tl[i], r[i] = -1, -1\n\t}\n\tfor _, v := range edges {\n\t\ta, b := dsu.par(v[0]), dsu.par(v[1])\n\t\tif v[2] != 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif a == b {\n\t\t\tqs[v[2]][2] = a\n\t\t} else {\n\t\t\tdsu[a], dsu[b] = len(dsu), len(dsu)\n\t\t\tl, r = append(l, a), append(r, b)\n\t\t\tdsu = append(dsu, -1)\n\t\t}\n\t}\n\n\tfor i := q - 1; i >= 0; i-- {\n\t\tif qs[i][0] == 1 {\n\t\t\tqs[i][2] = dsu.par(qs[i][1])\n\t\t} else {\n\t\t\ta, b := dsu.par(edges[qs[i][1]][0]), dsu.par(edges[qs[i][1]][1])\n\t\t\tif a == b {\n\t\t\t\tqs[i][2] = a\n\t\t\t} else {\n\t\t\t\tdsu[a], dsu[b] = len(dsu), len(dsu)\n\t\t\t\tl, r = append(l, a), append(r, b)\n\t\t\t\tdsu = append(dsu, -1)\n\t\t\t}\n\t\t}\n\t}\n\n\tpre, post = make([]int, len(l)), make([]int, len(l))\n\tcurr = 0\n\n\tfor i := len(l) - 1; i >= 0; i-- {\n\t\tif pre[i] == 0 {\n\t\t\tdfs(i)\n\t\t}\n\t}\n\n\ttree := newNode(0, len(l))\n\tfor i, v := range p {\n\t\ttree.upd(pre[i], v)\n\t}\n\n\tfor _, v := range qs {\n\t\tif v[0] == 1 {\n\t\t\ta, b := tree.query(pre[v[2]], post[v[2]])\n\t\t\tprintf(\"%d\\n\", a)\n\t\t\tif a != 0 {\n\t\t\t\ttree.upd(b, 0)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc dfs(i int) {\n\tpre[i], post[i] = curr, curr+1\n\tcurr++\n\tif l[i] != -1 {\n\t\tdfs(l[i])\n\t\tdfs(r[i])\n\t\tpost[i] = post[r[i]]\n\t}\n}\n\ntype Node struct {\n\tl, r, max, ind int\n\tleft, right *Node\n}\n\nfunc newNode(le, ri int) *Node {\n\tres := &Node{le, ri, 0, 0, nil, nil}\n\tif le != ri-1 {\n\t\tres.left = newNode(le, (le+ri)>>1)\n\t\tres.right = newNode((le+ri)>>1, ri)\n\t} else {\n\t\tres.ind = le\n\t}\n\treturn res\n}\n\nfunc (n *Node) upd(ind, v int) {\n\tif n.left == nil {\n\t\tn.max = v\n\t\tn.ind = ind\n\t\treturn\n\t}\n\tif ind < (n.l+n.r)>>1 {\n\t\tn.left.upd(ind, v)\n\t} else {\n\t\tn.right.upd(ind, v)\n\t}\n\tif n.left.max > n.right.max {\n\t\tn.max, n.ind = n.left.max, n.left.ind\n\t} else {\n\t\tn.max, n.ind = n.right.max, n.right.ind\n\t}\n}\n\nfunc (n *Node) query(le, ri int) (max, ind int) {\n\tif le <= n.l && ri >= n.r {\n\t\treturn n.max, n.ind\n\t}\n\n\tif le >= n.r || ri <= n.l {\n\t\treturn 0, 0\n\t}\n\n\ta, b := n.left.query(le, ri)\n\tc, d := n.right.query(le, ri)\n\n\tif a > c {\n\t\treturn a, b\n\t} else {\n\t\treturn c, d\n\t}\n}\n\ntype DSU []int\n\nfunc (d DSU) par(a int) int {\n\tif d[a] < 0 {\n\t\treturn a\n\t}\n\tres := d.par(d[a])\n\td[a] = res\n\treturn res\n}\n\nfunc main() {\n\tin = bufio.NewReaderSize(os.Stdin, 8192)\n\tout = bufio.NewWriterSize(os.Stdout, 8192)\n\tname := \"in\"\n\tfile1, err := os.Open(name + \".in\")\n\tif err == nil {\n\t\tin = bufio.NewReaderSize(file1, 8192)\n\t}\n\t// file2, err := os.Create(name + \".out\")\n\t// if err != nil {\n\t// \tlog.Fatal(err)\n\t// }\n\t// out = bufio.NewWriterSize(file2, 8192)\n\tdefer out.Flush()\n\t// start := time.Now()\n\n\t// for t, i := nextInt(), 1; t > 0; t, i = t-1, i+1 {\n\t// printf(\"Case #%d:\\n\", i)\n\tsolve()\n\t// }\n\n\t// printf(\"%v\\n\", time.Now().Sub(start))\n}\n", "lang": "Go", "bug_code_uid": "37f788672f6d42f938296d24300d1ce9", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "7cb9dbd16651b6d0d85b708316fe9681", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9989542483660131, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar in *bufio.Reader\nvar out *bufio.Writer\n\nfunc printf(x string, a ...interface{}) (n int, err error) {\n\treturn fmt.Fprintf(out, x, a...)\n}\n\nfunc scanf(x string, a ...interface{}) (n int, err error) {\n\treturn fmt.Fscanf(in, x, a...)\n}\n\nfunc scan(a ...interface{}) (n int, err error) {\n\treturn fmt.Fscan(in, a...)\n}\n\nvar err error\n\nfunc next() (n string) {\n\tscan(&n)\n\treturn n\n}\n\nfunc nextInt() (n int) {\n\tscan(&n)\n\treturn n\n}\n\nfunc nextLong() (n int64) {\n\tscan(&n)\n\treturn n\n}\n\nfunc nextDouble() (n float64) {\n\tscan(&n)\n\treturn n\n}\n\nfunc Max(a, b int64) int64 {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nvar (\n\tl, r, pre, post []int\n\tcurr int\n)\n\nfunc solve() {\n\tn, m, q := nextInt(), nextInt(), nextInt()\n\n\tp := make([]int, n)\n\tfor i := range p {\n\t\tp[i] = nextInt()\n\t}\n\n\tedges := [][3]int{}\n\tfor i := 0; i < m; i++ {\n\t\tedges = append(edges, [3]int{nextInt() - 1, nextInt() - 1, -1})\n\t}\n\n\tqs := [][3]int{}\n\tfor i := 0; i < q; i++ {\n\t\tcurr := [3]int{nextInt(), nextInt() - 1, 0}\n\t\tqs = append(qs, curr)\n\t\tif curr[0] == 2 {\n\t\t\tedges[curr[1]][2] = i\n\t\t}\n\t}\n\n\tdsu := make(DSU, n)\n\tfor i := range dsu {\n\t\tdsu[i] = -1\n\t}\n\n\tl, r = make([]int, n), make([]int, n)\n\tfor i := range l {\n\t\tl[i], r[i] = -1, -1\n\t}\n\tfor _, v := range edges {\n\t\ta, b := dsu.par(v[0]), dsu.par(v[1])\n\t\tif v[2] != -1 {\n\t\t\tcontinue\n\t\t}\n\t\tif a == b {\n\t\t\tqs[v[2]][2] = a\n\t\t} else {\n\t\t\tdsu[a], dsu[b] = len(dsu), len(dsu)\n\t\t\tl, r = append(l, a), append(r, b)\n\t\t\tdsu = append(dsu, -1)\n\t\t}\n\t}\n\n\tfor i := q - 1; i >= 0; i-- {\n\t\tif qs[i][0] == 1 {\n\t\t\tqs[i][2] = dsu.par(qs[i][1])\n\t\t} else {\n\t\t\ta, b := dsu.par(edges[qs[i][1]][0]), dsu.par(edges[qs[i][1]][1])\n\t\t\tif a == b {\n\t\t\t\tqs[i][2] = a\n\t\t\t} else {\n\t\t\t\tdsu[a], dsu[b] = len(dsu), len(dsu)\n\t\t\t\tl, r = append(l, a), append(r, b)\n\t\t\t\tdsu = append(dsu, -1)\n\t\t\t}\n\t\t}\n\t}\n\n\tpre, post = make([]int, len(l)), make([]int, len(l))\n\tcurr = 0\n\n\tfor i := len(l) - 1; i >= 0; i-- {\n\t\tif pre[i] == 0 {\n\t\t\tdfs(i)\n\t\t}\n\t}\n\n\ttree := newNode(0, len(l))\n\tfor i, v := range p {\n\t\ttree.upd(pre[i], v)\n\t}\n\n\tfor _, v := range qs {\n\t\tif v[0] == 1 {\n\t\t\ta, b := tree.query(pre[v[2]], post[v[2]])\n\t\t\tprintf(\"%d\\n\", a)\n\t\t\tif a != 0 {\n\t\t\t\ttree.upd(b, 0)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc dfs(i int) {\n\tpre[i], post[i] = curr, curr+1\n\tcurr++\n\tif l[i] != -1 {\n\t\tdfs(l[i])\n\t\tdfs(r[i])\n\t\tpost[i] = post[r[i]]\n\t}\n}\n\ntype Node struct {\n\tl, r, max, ind int\n\tleft, right *Node\n}\n\nfunc newNode(le, ri int) *Node {\n\tres := &Node{le, ri, 0, 0, nil, nil}\n\tif le != ri-1 {\n\t\tres.left = newNode(le, (le+ri)>>1)\n\t\tres.right = newNode((le+ri)>>1, ri)\n\t} else {\n\t\tres.ind = le\n\t}\n\treturn res\n}\n\nfunc (n *Node) upd(ind, v int) {\n\tif n.left == nil {\n\t\tn.max = v\n\t\tn.ind = ind\n\t\treturn\n\t}\n\tif ind < (n.l+n.r)>>1 {\n\t\tn.left.upd(ind, v)\n\t} else {\n\t\tn.right.upd(ind, v)\n\t}\n\tif n.left.max > n.right.max {\n\t\tn.max, n.ind = n.left.max, n.left.ind\n\t} else {\n\t\tn.max, n.ind = n.right.max, n.right.ind\n\t}\n}\n\nfunc (n *Node) query(le, ri int) (max, ind int) {\n\tif le <= n.l && ri >= n.r {\n\t\treturn n.max, n.ind\n\t}\n\n\tif le >= n.r || ri <= n.l {\n\t\treturn 0, 0\n\t}\n\n\ta, b := n.left.query(le, ri)\n\tc, d := n.right.query(le, ri)\n\n\tif a > c {\n\t\treturn a, b\n\t} else {\n\t\treturn c, d\n\t}\n}\n\ntype DSU []int\n\nfunc (d DSU) par(a int) int {\n\tif d[a] < 0 {\n\t\treturn a\n\t}\n\tres := d.par(d[a])\n\td[a] = res\n\treturn res\n}\n\nfunc main() {\n\tin = bufio.NewReaderSize(os.Stdin, 8192)\n\tout = bufio.NewWriterSize(os.Stdout, 8192)\n\tname := \"in\"\n\tfile1, err := os.Open(name + \".in\")\n\tif err == nil {\n\t\tin = bufio.NewReaderSize(file1, 8192)\n\t}\n\t// file2, err := os.Create(name + \".out\")\n\t// if err != nil {\n\t// \tlog.Fatal(err)\n\t// }\n\t// out = bufio.NewWriterSize(file2, 8192)\n\tdefer out.Flush()\n\t// start := time.Now()\n\n\t// for t, i := nextInt(), 1; t > 0; t, i = t-1, i+1 {\n\t// printf(\"Case #%d:\\n\", i)\n\tsolve()\n\t// }\n\n\t// printf(\"%v\\n\", time.Now().Sub(start))\n}\n", "lang": "Go", "bug_code_uid": "039b22c3d23ed5bd9541d38b501aba46", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "7cb9dbd16651b6d0d85b708316fe9681", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.986159169550173, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main \n\nimport \"fmt\"\n\nfunc min(a, b uint64) uint64 {\n if a < b {\n return a\n }\n return b\n}\n\nfunc main() {\n var a, b uint64\n fmt.Scan(&a, &b)\n \n m := min(a, b)\n var res uint64 = 1\n for i:=1; i<=m; i++ {\n res *= i\n }\n fmt.Print(res)\n}", "lang": "Go", "bug_code_uid": "d389bcc2ceae397fccbc078635a2f2fc", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "0d3726a4b26370c5a945681308734285", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9986666666666667, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n)\n\nfunc min(a, b int) int{\n\tif a < b {\n\t\treturn a\n\t}else {\n\t\treturn b\n\t}\n}\n\nfunc main() {\n\tvar n, m int\n\tfmt.Scanln(&n,&m)\n\tfmt.Println(n,m)\n\ta := make([]int, n)\n\tb := make([]int, m)\n\tfor i := 0; i < n; i++{\n\t\tif(i < n-1){\n\t\t\tfmt.Scanf(\"%d\",&a[i])\n\t\t} else {\n\t\t\tfmt.Scanf(\"%d\\n\",&a[i])\n\t\t}\n\t\t//fmt.Printf(\"%d\\n\",a[i])\n\t}\n\tfor i := 0; i < m; i++{\n\t\tif(i < m-1){\n\t\t\tfmt.Scanf(\"%d\",&b[i])\n\t\t} else {\n\t\t\tfmt.Scanf(\"%d\\n\",&b[i])\n\t\t}\n\t\t//fmt.Printf(\"%d\\n\",b[i])\n\t}\n\tsort.Ints(a)\n\tsort.Ints(b)\n\tvar ans int = 99999999\n\tfor i := 0; i < n; i++{\n\t\tfor j := 0; j < m; j++{\n\t\t\tif a[i] == b[j]{\n\t\t\t\tans = min(ans,a[i])\n\t\t\t}\n\t\t}\n\t}\n\tif(ans == 99999999){\n\t\tans = min(a[0] * 10 + b[0], b[0] * 10 + a[0])\n\t}\n\tfmt.Println(ans)\n}", "lang": "Go", "bug_code_uid": "4e78437e7b3db929ff770e6eb0215bfc", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "90402b7b9b18c78cd1a8f699f584df2a", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7421383647798742, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 10, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n)\n\nfunc min(a, b int) int{\n\tif a < b {\n\t\treturn a\n\t}else {\n\t\treturn b\n\t}\n}\n\nfunc main() {\n\tvar n, m int\n\tfmt.Scanf(\"%d %d\\n\",&n,&m)\n\ta := make([]int, n)\n\tb := make([]int, m)\n\tfor i := 0; i < n; i++{\n\t\tif i != n-1{\n\t\t\tfmt.Scanf(\"%d\",&a[i])\n\t\t}else{\n\t\t\tfmt.Scanf(\"%d\\n\",&a[i])\n\t\t}\n\t}\n\tfor i := 0; i < m; i++{\n\t\tif i != m-1{\n\t\t\tfmt.Scanf(\"%d\",&b[i])\n\t\t}else{\n\t\t\tfmt.Scanf(\"%d\\n\",&b[i])\n\t\t}\n\n\t}\n\tsort.Ints(a)\n\tsort.Ints(b)\n\tvar ans int = 99999999\n\tfor i := 0; i < n; i++{\n\t\tfor j := 0; j < m; j++{\n\t\t\tif a[i] == b[j]{\n\t\t\t\tans = min(ans,a[i])\n\t\t\t}\n\t\t}\n\t}\n\tif(ans == 99999999){\n\t\tans = min(a[0] * 10 + b[0], b[0] * 10 + a[0])\n\t}\n\tfmt.Println(ans)\n", "lang": "Go", "bug_code_uid": "372c42a49875220ef58eac1005e12333", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "90402b7b9b18c78cd1a8f699f584df2a", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7842323651452282, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tw := 0\n\tfmt.Scanf(\"%d\\n\", &w)\n\n\tcanDivided := \"NO\"\n\n\tfor i := 1; i <= w/2; i++ {\n\t\tif i%2 == 0 {\n\t\t\tcanDivided = \"YES\"\n\t\t}\n\t}\n\n\tfmt.Println(canDivided)\n}\n", "lang": "Go", "bug_code_uid": "f3d79cddfe5b26e6e233714c68d9520b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "29dd0fa57d2575aba2b3952b62e54f16", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.967930029154519, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar i float64\n\tfmt.Scan(&i)\n\tif math.Mod(i/2, 2) == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "a996cd5bac8359cf743b7e8cee26b774", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9e55d3f23f8f08cb9fab8369a5a9f933", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9668874172185431, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar weight int32\n\t_, err := fmt.Scanf(\"%d\", &weight)\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t}\n\n\tif weight&1 == 1 {\n\t\tfmt.Print(\"NO\")\n\t\treturn\n\t}\n\tfmt.Print(\"YES\")\n}\n", "lang": "Go", "bug_code_uid": "49fd2c10ad631536c820d9581034f488", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5383962a5a0cc1ad906ec4fd31353a61", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.5772357723577236, "equal_cnt": 11, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "package main \n \nimport \"fmt\"\n \n// main function \nfunc main() {\n var int temp\n fmt.Scanln(&temp)\n if(temp%2 == 0)\n {\n if((temp/2)%2 == 0) fmt.Println(\"YES\")\n else fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "0adea72770ee53d261f8b6be148a48d9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c90874270a2686a5479999fc9f6485ca", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9928057553956835, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\n// main function\nfunc main() {\n\tvar temp int = 8\n\tfmt.Scanln(&temp)\n\tif temp < 4 {\n\t\tfmt.Print(\"NO\")\n\t\treturn\n\t} else if temp%2 == 0 {\n\t\tif (temp/2)%2 == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "70bdaf1e282e47f286351e6fe32659cc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c90874270a2686a5479999fc9f6485ca", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5514834205933682, "equal_cnt": 15, "replace_cnt": 6, "delete_cnt": 6, "insert_cnt": 3, "fix_ops_cnt": 15, "bug_source_code": "import (\n \"bufio\"\n \"fmt\"\n \"os\"\n \"strconv\"\n \"strings\"\n)\n\nfunc main() {\n reader := bufio.NewReader(os.Stdin)\n text, _ := reader.ReadString('\\n')\n text = strings.Replace(text, \"\\n\", \"\", -1)\n\n num, err := strconv.Atoi(text)\n if err != nil {\n fmt.Print(\"NO\")\n return\n }\n\n if num <= 0 || num > 100 || num%2 != 0 {\n fmt.Printf(\"NO\")\n return\n }\n\n fmt.Printf(\"YES\")\n}", "lang": "Go", "bug_code_uid": "76397711dd66116485185a2aaa5f37f8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2a847efefe16ad1a0742f7987ec40876", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9947089947089947, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var num int\n\n fmt.Scanf(\"%d\", &num)\n\n if num <= 0 || num > 100 || num%2 != 0 {\n fmt.Printf(\"NO\")\n return\n }\n\n fmt.Printf(\"YES\")\n}", "lang": "Go", "bug_code_uid": "fd3be64d84286fade8e04ca2f251dd98", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2a847efefe16ad1a0742f7987ec40876", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5675675675675675, "equal_cnt": 10, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "package main\n\nimport (\n \"bufio\"\n \"strconv\"\n)\n\nfunc main() {\n scanner := bufio.NewScanner(os.Stdin)\n for scanner.Scan() {\n i, _ := strconv.Atio(scanner.Text())\n if i % 2 == 0 {\n println(i) \n }\n }\n}", "lang": "Go", "bug_code_uid": "538f7ffbb7e83bd0c6dc51d2bfb298ba", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "bba8afe1240d06ec29471a3740480724", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8247078464106845, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tscanner := bufio.NewScanner(os.Stdin)\n\tfor scanner.Scan() {\n\t\ti, _ := strconv.Atoi(scanner.Text())\n\t\tif i%2 == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "46663cfd37d15ea4a6a85b331f1fc55a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "bba8afe1240d06ec29471a3740480724", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9670781893004116, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar ves int\n\tfmt.Scan(&ves)\n\tif ves < 1 || ves > 100 {\n\t\tfmt.Println(\"Таких арбузов не бывает\")\n\t} else {\n\t\tif ves%2 == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "02890ed75833d13ef56442f6c9048d7b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2bae69869446ec77ee6f4380dcbe4653", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8495575221238938, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "// test\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\n\tvar a int\n\tfmt.Scanln(&a)\n\tif a%2 == 1 {\n\t\tfmt.Println(\"NO\")\n\t} else if a < 2 {\n\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "d770a6d051e664f9e7487e014fe15c1c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4db2a51dd48cbcb0e88115a2005fd35b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8459214501510574, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\n\tvar weight int\n\n\t_, _ = fmt.Scanf(\"%d\", &weight)\n\n\tif weight/2%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "0b9373e125b1d827fc6b5c0d5e6c6825", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "48e36e38d2534072cf06937cea3f55a8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9120992761116856, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar reader *bufio.Reader = bufio.NewReader(os.Stdin)\nvar writer *bufio.Writer = bufio.NewWriter(os.Stdout)\n\nfunc scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }\nfunc printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }\n\nfunc main() {\n\tdefer writer.Flush()\n\tvar number int\n\tscanf(\"%d\", &number)\n\tif number == 2 {\n\t\tprintf(\"YES\")\n\t} else if number%2 == 0 {\n\t\tprintf(\"YES\")\n\t} else {\n\t\tprintf(\"NO\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "27d4832dc919a713d3cd005467729762", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b0fd1f80abdc71d44f8427e54ae69247", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9867256637168141, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar reader *bufio.Reader = bufio.NewReader(os.Stdin)\nvar writer *bufio.Writer = bufio.NewWriter(os.Stdout)\nfunc printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }\nfunc scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }\n\n\nfunc main() {\n\tvar a int\n\tscanf(\"%d\\n\", &a)\n\n\tif !(a % 2 == 0) && a != 2 {\n\t\tprintf(\"%s\", \"NO\")\n\t} else {\n\t\tprintf(\"%s\", \"YES\")\n\t}\n\n\twriter.Flush()\n}\n", "lang": "Go", "bug_code_uid": "216f738c1400ce25fc7e12b81b129aa0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2b1c59c05f7390b016d2c2e23f73e18", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9815016322089227, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar reader *bufio.Reader = bufio.NewReader(os.Stdin)\nvar writer *bufio.Writer = bufio.NewWriter(os.Stdout)\nfunc printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }\nfunc scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }\n\n\nfunc main() {\n\tvar a int\n\tscanf(\"%d\\n\", &a)\n\n\tif !(a % 2 == 0) || a == 2 {\n\t\tprintf(\"%s\", \"NO\")\n\t\treturn\n\t}\n\n\tprintf(\"%s\", \"YES\")\n\n\twriter.Flush()\n}\n", "lang": "Go", "bug_code_uid": "364004df1034db1311b8f6b553b39eba", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2b1c59c05f7390b016d2c2e23f73e18", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9897142857142858, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar reader *bufio.Reader = bufio.NewReader(os.Stdin)\nvar writer *bufio.Writer = bufio.NewWriter(os.Stdout)\n\nfunc printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }\nfunc scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }\n\nfunc main() {\n\tdefer writer.Flush()\n\n\tvar a int\n\tscanf(\"%d\\n\", &a)\n\n\tif !(a%2 == 0) || a == 2 {\n\t\tprintf(\"NO\")\n\t}\n\tprintf(\"YES\")\n}\n", "lang": "Go", "bug_code_uid": "3113cb8703a2e7b65e8f3bfd91b6b245", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2b1c59c05f7390b016d2c2e23f73e18", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.5359801488833746, "equal_cnt": 30, "replace_cnt": 12, "delete_cnt": 10, "insert_cnt": 8, "fix_ops_cnt": 30, "bug_source_code": "\npackage main\n\nimport (\n \"bufio\" \"fmt\")\n\nfunc main() {\n reader := bufio.NewReader(os.Stdin)\ntext:= reader.ReadString('\\n')\nif text > 2 $ text % 2 == 0{\nfmt.Println('YES')\n}\nelse{\n fmt.Println('NO')\n}\n}", "lang": "Go", "bug_code_uid": "0aa72d1c22ef08e47c7c5d1fde9d3dda", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "34a9213aef56318d56f6618b8b244179", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9315068493150684, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\nvar i int \nvar two = 2;\n fmt.Scanf(\"%d\", &i);\n if i > two {\n if i% two == 0{\n fmt.Print(\"YES\");\n }\n }else{\nfmt.Print(\"NO\");\n }\n}", "lang": "Go", "bug_code_uid": "279662f0c4c5801b4a8e732879f6934b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "34a9213aef56318d56f6618b8b244179", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8717948717948718, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 6, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\n//https://codeforces.com/problemset/problem/4/A\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\", &w)\n\tif w >= 1 && w <= 100 {\n\t\tif w%2 == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "30f3c8890e3624168fb7a2717b63c625", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d92e06815eda5dbe8f59b43de5b35ec8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9483146067415731, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc isDivide(k uint8) string {\n\tvar i uint8\n\tif i%2 != 0 {\n\t\treturn \"NO\"\n\t}\n\tif i == 2 {\n\t\treturn \"NO\"\n\t}\n\treturn \"YES\"\n}\n\nfunc main() {\n\tvar k uint8\n\tfmt.Scanln(&k)\n\tfmt.Println(isDivide(k))\n\n}\n", "lang": "Go", "bug_code_uid": "02d308af6d14520dc02eabef33f78730", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a4c38d49dec4e7a1fe691589ccb40e31", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9272237196765498, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar k uint8\n\tfmt.Scanln(&k)\n\tif k == 2 {\n\t\tfmt.Println(\"NO\")\n\t}\n\tif k%2 != 0 {\n\t\tfmt.Println(\"NO\")\n\t}\n\tfmt.Println(\"yes\")\n}\n", "lang": "Go", "bug_code_uid": "f56e343f7bfe71260027d3928b4683dc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a4c38d49dec4e7a1fe691589ccb40e31", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.6796875, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "package main\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"bufio\"\n\t\"strconv\"\n\t)\nfunc main() {\n reader := bufio.NewReader(os.Stdin)\n text, _ := reader.ReadString('\\n')\n number, _ := strconv.Atoi(text)\n if number > 2 && number % 2 == 0 {\n fmt.Println(\"YES\")\n }else{\n fmt.Println(\"NO\")\n }\n \n}\n", "lang": "Go", "bug_code_uid": "017b0596b2abec0efcff613a9b9fc411", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ee55b09292ddc6708a9afd4cc0e85b43", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9414414414414415, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"bufio\"\n\t\"strconv\"\n\t)\nfunc main() {\n number := 0\n fmt.Scanf(\"%d\\n\", &number)\n if number > 2 && number % 2 == 0 {\n fmt.Println(\"YES\")\n }else{\n fmt.Println(\"NO\")\n }\n \n}\n", "lang": "Go", "bug_code_uid": "23d71a7040fcff27510d56eb7f4f43cd", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ee55b09292ddc6708a9afd4cc0e85b43", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.3506666666666667, "equal_cnt": 16, "replace_cnt": 12, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc main() {\n\tr := bufio.NewReader(os.Stdin)\n\n\tvar n int\n\tfmt.Fscanf(r, \"%d\\n\", &n)\n\n\tvar s string\n\tfmt.Fscanf(r, \"%s\\n\", &s)\n\n\tcount := 0\n\n\tredo := true\n\tfor redo {\n\t\tredo = false\n\t\tmp := make(map[int]bool)\n\t\tfor i := 0; i < len(s)-1; i++ {\n\t\t\tif s[i] == s[i+1]+1 {\n\t\t\t\tfor i < len(s)-1 && s[i] == s[i+1]+1 {\n\t\t\t\t\tmp[i] = true\n\t\t\t\t\tredo = true\n\t\t\t\t\tcount++\n\t\t\t\t\ti++\n\t\t\t\t}\n\t\t\t} else if s[i] == s[i+1]-1 {\n\t\t\t\tfor i < len(s)-1 && s[i] == s[i+1]-1 {\n\t\t\t\t\tmp[i+1] = true\n\t\t\t\t\tredo = true\n\t\t\t\t\tcount++\n\t\t\t\t\ti++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tb := new(strings.Builder)\n\t\tfor i := 0; i < len(s); i++ {\n\t\t\tif !mp[i] {\n\t\t\t\tfmt.Fprintf(b, \"%c\", s[i])\n\t\t\t}\n\t\t}\n\n\t\ts = b.String()\n\t}\n\n\tfmt.Printf(\"%d\\n\", count)\n}\n", "lang": "Go", "bug_code_uid": "a5569d68ab265c339901425214abdcd1", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "ad566ff188bca9ae410ddfd8887c93e3", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7793313069908815, "equal_cnt": 15, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 10, "fix_ops_cnt": 14, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t. \"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc run(_r io.Reader, _w io.Writer) {\n\tin := bufio.NewReader(_r)\n\tout := bufio.NewWriter(_w)\n\tdefer out.Flush()\n\n\tvar n int\n\tvar s []byte\n\tFscan(in, &n, &s)\n\n\tif n == 1 {\n\t\tFprintln(out, 0)\n\t\treturn\n\t}\n\ts = append([]byte{0}, s...)\n\ts = append(s, 0)\n\n\tans := 0\n\ts2 := []byte{}\n\tfor i := byte('z'); i >= 'a'; i-- {\n\t\tlp := 0\n\t\tfor j, b := range s {\n\t\t\t//if j > 0 && lc == 0 {\n\t\t\t//\tlc = s[j-1]\n\t\t\t//}\n\t\t\tif b == i && (s[j]-1 == s[lp] || s[j]-1 == s[j+1]) {\n\t\t\t\tans++\n\n\t\t\t} else {\n\t\t\t\ts2 = append(s2, b)\n\t\t\t\tlp = j\n\t\t\t}\n\t\t}\n\t\ts = s2\n\t\ts2 = []byte{}\n\t}\n\n\tFprintln(out, ans)\n\n}\n\nfunc main() { run(os.Stdin, os.Stdout) }\n", "lang": "Go", "bug_code_uid": "3077b0934efbcb2e0d3054c388288243", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "3f9668dc7a48a9ba0c2c68ba22402e0d", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.6869384934346925, "equal_cnt": 15, "replace_cnt": 10, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 14, "bug_source_code": "// Author: sighduck\n// URL: https://codeforces.com/problemset/problem/1321/C\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc Solve(n int, s string) int {\n\ta := make([]int, n)\n\tfor i, elem := range s {\n\t\ta[i] = int(elem)\n\t}\n\tfor i := 122; i >= 97; i-- {\n\t\tfor j := 0; j < len(a); j++ {\n\t\t\tif a[j] == i && ((j+1 < len(a) && a[j+1] == i-1) || (j-1 >= 0 && a[j-1] == i-1)) {\n\t\t\t\ta = append(a[:j], a[j+1:]...)\n\t\t\t\tj -= 1\n\t\t\t}\n\t\t}\n\t}\n\treturn n - len(a)\n}\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\twriter := bufio.NewWriter(os.Stdout)\n\tdefer writer.Flush()\n\n\tvar n int\n\tvar s string\n\tfmt.Fscanf(reader, \"%d\\n%s\\n\", &n, &s)\n\n\tfmt.Fprintf(writer, \"%d\\n\", Solve(n, s))\n}\n", "lang": "Go", "bug_code_uid": "9f552b779fbcc49325dc5678ed665dd8", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "2b8fa7f87e6b6ecd459cd089a40b521e", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9703549703549703, "equal_cnt": 17, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 16, "bug_source_code": "/*\nURL:\nhttps://codeforces.com/problemset/problem/992/B\n*/\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n)\n\n/********** FAU standard libraries **********/\n\n//fmt.Sprintf(\"%b\\n\", 255) \t// binary expression\n\n/********** I/O usage **********/\n\n//str := ReadString()\n//i := ReadInt()\n//X := ReadIntSlice(n)\n//S := ReadRuneSlice()\n//a := ReadFloat64()\n//A := ReadFloat64Slice(n)\n\n//str := ZeroPaddingRuneSlice(num, 32)\n//str := PrintIntsLine(X...)\n\n/*******************************************************************/\n\nconst (\n\t// General purpose\n\tMOD = 1000000000 + 7\n\tALPHABET_NUM = 26\n\tINF_INT64 = math.MaxInt64\n\tINF_BIT60 = 1 << 60\n\tINF_INT32 = math.MaxInt32\n\tINF_BIT30 = 1 << 30\n\tNIL = -1\n\n\t// for dijkstra, prim, and so on\n\tWHITE = 0\n\tGRAY = 1\n\tBLACK = 2\n)\n\nfunc init() {\n\t// bufio.ScanWords <---> bufio.ScanLines\n\tReadString = newReadString(os.Stdin, bufio.ScanWords)\n\tstdout = bufio.NewWriter(os.Stdout)\n}\n\nvar (\n\tl, r, x, y int64\n)\n\nfunc main() {\n\tl, r, x, y = ReadInt64_4()\n\n\tans := 0\n\tfor i := x; i*i <= y; i += x {\n\t\tif y%i == 0 {\n\t\t\ta := i\n\t\t\tb := y / i\n\n\t\t\t// bはxを約数に保たない\n\t\t\tif Gcd(b, x) != 1 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tb *= x\n\n\t\t\tif l <= a && a <= r && l <= b && b <= r && Gcd(a, b) == x && Lcm(a, b) == y {\n\t\t\t\tif a == b {\n\t\t\t\t\tans++\n\t\t\t\t} else {\n\t\t\t\t\tans += 2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfmt.Println(ans)\n}\n\n// Gcd returns the Greatest Common Divisor of two natural numbers.\n// Gcd only accepts two natural numbers (a, b >= 1).\n// 0 or negative number causes panic.\n// Gcd uses the Euclidean Algorithm.\nfunc Gcd(a, b int64) int64 {\n\tif a < 0 || b < 0 {\n\t\tpanic(errors.New(\"[argument error]: Gcd only accepts two NATURAL numbers\"))\n\t}\n\n\tif a == 0 {\n\t\treturn b\n\t}\n\tif b == 0 {\n\t\treturn a\n\t}\n\n\tif a < b {\n\t\ta, b = b, a\n\t}\n\n\t// Euclidean Algorithm\n\tfor b > 0 {\n\t\tdiv := a % b\n\t\ta, b = b, div\n\t}\n\n\treturn a\n}\n\n// Lcm returns the Least Common Multiple of two natural numbers.\n// Lcd only accepts two natural numbers (a, b >= 1).\n// 0 or negative number causes panic.\n// Lcd uses the Euclidean Algorithm indirectly.\nfunc Lcm(a, b int64) int64 {\n\tif a <= 0 || b <= 0 {\n\t\tpanic(errors.New(\"[argument error]: Gcd only accepts two NATURAL numbers\"))\n\t}\n\n\t// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2\n\t// a' and b' are relatively prime numbers\n\t// gcd consists of prime numbers, that are included in a and b\n\tgcd := Gcd(a, b)\n\n\t// not (a * b / gcd), because of reducing a probability of overflow\n\treturn (a / gcd) * b\n}\n\n/*******************************************************************/\n\n/*********** I/O ***********/\n\nvar (\n\t// ReadString returns a WORD string.\n\tReadString func() string\n\tstdout *bufio.Writer\n)\n\nfunc newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {\n\tr := bufio.NewScanner(ior)\n\tr.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces\n\tr.Split(sf)\n\n\treturn func() string {\n\t\tif !r.Scan() {\n\t\t\tpanic(\"Scan failed\")\n\t\t}\n\t\treturn r.Text()\n\t}\n}\n\n// ReadInt returns an integer.\nfunc ReadInt() int {\n\treturn int(readInt64())\n}\nfunc ReadInt2() (int, int) {\n\treturn int(readInt64()), int(readInt64())\n}\nfunc ReadInt3() (int, int, int) {\n\treturn int(readInt64()), int(readInt64()), int(readInt64())\n}\nfunc ReadInt4() (int, int, int, int) {\n\treturn int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())\n}\n\n// ReadInt64 returns as integer as int64.\nfunc ReadInt64() int64 {\n\treturn readInt64()\n}\nfunc ReadInt64_2() (int64, int64) {\n\treturn readInt64(), readInt64()\n}\nfunc ReadInt64_3() (int64, int64, int64) {\n\treturn readInt64(), readInt64(), readInt64()\n}\nfunc ReadInt64_4() (int64, int64, int64, int64) {\n\treturn readInt64(), readInt64(), readInt64(), readInt64()\n}\n\nfunc readInt64() int64 {\n\ti, err := strconv.ParseInt(ReadString(), 0, 64)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn i\n}\n\n// ReadIntSlice returns an integer slice that has n integers.\nfunc ReadIntSlice(n int) []int {\n\tb := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadInt()\n\t}\n\treturn b\n}\n\n// ReadInt64Slice returns as int64 slice that has n integers.\nfunc ReadInt64Slice(n int) []int64 {\n\tb := make([]int64, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadInt64()\n\t}\n\treturn b\n}\n\n// ReadFloat64 returns an float64.\nfunc ReadFloat64() float64 {\n\treturn float64(readFloat64())\n}\n\nfunc readFloat64() float64 {\n\tf, err := strconv.ParseFloat(ReadString(), 64)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn f\n}\n\n// ReadFloatSlice returns an float64 slice that has n float64.\nfunc ReadFloat64Slice(n int) []float64 {\n\tb := make([]float64, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadFloat64()\n\t}\n\treturn b\n}\n\n// ReadRuneSlice returns a rune slice.\nfunc ReadRuneSlice() []rune {\n\treturn []rune(ReadString())\n}\n\n/*********** Debugging ***********/\n\n// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.\n// For debugging use.\nfunc ZeroPaddingRuneSlice(n, digitsNum int) []rune {\n\tsn := fmt.Sprintf(\"%b\", n)\n\n\tresidualLength := digitsNum - len(sn)\n\tif residualLength <= 0 {\n\t\treturn []rune(sn)\n\t}\n\n\tzeros := make([]rune, residualLength)\n\tfor i := 0; i < len(zeros); i++ {\n\t\tzeros[i] = '0'\n\t}\n\n\tres := []rune{}\n\tres = append(res, zeros...)\n\tres = append(res, []rune(sn)...)\n\n\treturn res\n}\n\n// Strtoi is a wrapper of strconv.Atoi().\n// If strconv.Atoi() returns an error, Strtoi calls panic.\nfunc Strtoi(s string) int {\n\tif i, err := strconv.Atoi(s); err != nil {\n\t\tpanic(errors.New(\"[argument error]: Strtoi only accepts integer string\"))\n\t} else {\n\t\treturn i\n\t}\n}\n\n// PrintIntsLine returns integers string delimited by a space.\nfunc PrintIntsLine(A ...int) string {\n\tres := []rune{}\n\n\tfor i := 0; i < len(A); i++ {\n\t\tstr := strconv.Itoa(A[i])\n\t\tres = append(res, []rune(str)...)\n\n\t\tif i != len(A)-1 {\n\t\t\tres = append(res, ' ')\n\t\t}\n\t}\n\n\treturn string(res)\n}\n\n// PrintIntsLine returns integers string delimited by a space.\nfunc PrintInts64Line(A ...int64) string {\n\tres := []rune{}\n\n\tfor i := 0; i < len(A); i++ {\n\t\tstr := strconv.FormatInt(A[i], 10) // 64bit int version\n\t\tres = append(res, []rune(str)...)\n\n\t\tif i != len(A)-1 {\n\t\t\tres = append(res, ' ')\n\t\t}\n\t}\n\n\treturn string(res)\n}\n\n// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)\nfunc PrintfDebug(format string, a ...interface{}) {\n\tfmt.Fprintf(os.Stderr, format, a...)\n}\n\n// PrintfBufStdout is function for output strings to buffered os.Stdout.\n// You may have to call stdout.Flush() finally.\nfunc PrintfBufStdout(format string, a ...interface{}) {\n\tfmt.Fprintf(stdout, format, a...)\n}\n", "lang": "Go", "bug_code_uid": "a897e225039f71f6e5f34d4caa12c5e7", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "7e9c32324984933912f78745068c0ad8", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.24855491329479767, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar sum, xor int\n\tfmt.Scan(&sum, &xor)\n\n\tif ((sum - xor) % 2) != 0 {\n\t\tfmt.Println(0)\n\t\treturn\n\t}\n\txorbits := 0\n\tsumbits := 0\n\tmask := 1\n\n\tfor mask <= xor && mask <= sum {\n\t\tif xor&mask > 0 {\n\t\t\txorbits++\n\t\t}\n\t\tif sum&mask > 0 {\n\t\t\tsumbits++\n\t\t}\n\t\tmask <<= 1\n\t}\n\txorbits *= 2\n\n\tif sum&xor == sum {\n\t\txorbits -= sumbits\n\t}\n\tfmt.Println(xorbits)\n}\n", "lang": "Go", "bug_code_uid": "b8cd198da3223674310572af4a2b23c1", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "0060acd83bc4ca4223bbc2227040965d", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9504132231404959, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Println(\"vim-go\")\n\n\tvar s string\n\tfmt.Scan(&s)\n\n\tp := len(s)\n\tfor s[p-1] == '0' {\n\t\tp--\n\t}\n\n\tfor i := 0; i < p; i++ {\n\t\tif s[i] != s[p-1-i] {\n\t\t\tfmt.Println(\"NO\")\n\t\t\treturn\n\t\t}\n\t}\n\tfmt.Println(\"YES\")\n}\n", "lang": "Go", "bug_code_uid": "e8f49fda6a0254e015d72dffe95ef828", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "6e5c41418bad205e95335111d239d250", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.7522935779816514, "equal_cnt": 11, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 11, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar n int\n\n\tfmt.Scanf(\"%d\", &n)\n\tfmt.Println(math.Pow(2.0, float64(n)))\n}\n", "lang": "Go", "bug_code_uid": "8e87cb46f3e07dfda37fb402cb8afe46", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "d44e584b2b44d8780b8f80d88345c12c", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9523809523809523, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar i, n int64\n\t\n\tfmt.Scanf(\"%d\", &n)\n\n\ttotal := 0\n\tfor i = 1; i <= n; i++ {\n\t\ttotal += int64(math.Pow(2.0, float64(i)))\n\t}\n\tfmt.Println(total)\n}\n", "lang": "Go", "bug_code_uid": "050a2e8cc2958b553ab0d06e8f525baa", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "d44e584b2b44d8780b8f80d88345c12c", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9925373134328358, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar n float64\n\tfmt.Scanf(\"%f\", &n)\n\tfmt.Println(int64(math.Pow(2, n+1) - 2))\n}", "lang": "Go", "bug_code_uid": "80de10be36c6fa4e45306e214393039e", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "64ee9f356acc69edffd88b4e2a06ba59", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.912621359223301, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 6, "bug_source_code": "package main\n \nimport \"fmt\"\n \nfunc main() {\n var w int\n fmt.Scanln(&w)\n if w % 4 == 0\n fmt.Println(\"YES\")\n else\n fmt.Println(\"NO\")\n}", "lang": "Go", "bug_code_uid": "109b91b2c4b208e91d9428ac3c56c2b3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3aa414c733d745ed9629dc8ddb4ae17b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9467084639498433, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "package main\n \nimport \"fmt\"\n \nfunc main() {\n var w int\n fmt.Scanln(&w)\n if w % 4 == 0 {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "21f50c86e5a50192df30544dfaa0e7a9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3aa414c733d745ed9629dc8ddb4ae17b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7470588235294118, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tinput, _ := strconv.Atoi(os.Args[1])\n\tif input%2 == 0 {\n\t\tfmt.Print(\"YES\")\n\t\treturn\n\t}\n\tfmt.Print(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "1367c2e9c65ea09bbd9befa1a0947153", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7e58b519fa79981e2757da9d505c5a85", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9881656804733728, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar input int\n\tfmt.Scanf(\"%d\", &input)\n\tif input > 2 || input%2 == 0 {\n\t\tfmt.Print(\"YES\")\n\t\treturn\n\t}\n\tfmt.Print(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "fdf7479f644ba607a3c7767afaae65d7", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7e58b519fa79981e2757da9d505c5a85", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9942528735632183, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar weight int\n\tfmt.Scanf(\"%d\", &weight)\n\tif weight > 0 && weight%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "07d4f4e335722c5b60e1865a7724f6f0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1fd1ec93b7225410ce07d3e40e70a175", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7292817679558011, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "func main() {\n\tfmt.Println(\"Enter weight of the watermelon: \")\n\tvar wt int\n\t// Taking input from user\n\tfmt.Scanln(&wt)\n\n\tif wt%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t}\n\tfmt.Println(\"NO\")\n\n}", "lang": "Go", "bug_code_uid": "2d89974cf39b60adc8063a82d75065ca", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "67912ec98d95d8200acdb3bd1b950499", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9745042492917847, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar wt int\n\t// Taking input from user\n\tfmt.Scanln(&wt)\n\n\tif wt%2 == 0 && wt != 2 {\n\t\tfmt.Println(\"YES\")\n\t}\n\tfmt.Println(\"NO\")\n\n}\n", "lang": "Go", "bug_code_uid": "329fdd888bac374cfc95b72342ead4a2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "67912ec98d95d8200acdb3bd1b950499", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.962457337883959, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tw := 0\n\tfmt.Scanf(\"%d\", &w)\n\tif w%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "5dc4d06d795cecff3c99f9f6aa5cedb2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "30b3ed051435152cee8670016b177327", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.6648501362397821, "equal_cnt": 18, "replace_cnt": 3, "delete_cnt": 5, "insert_cnt": 9, "fix_ops_cnt": 17, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\n\tmelon, _ := strconv.Atoi(os.Args[1])\n\tif melon % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "f78ca5c5010690d8068fc90211115683", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1cfcbfb9f1b1c521d7f32f00152087f6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7521367521367521, "equal_cnt": 14, "replace_cnt": 5, "delete_cnt": 7, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\n\tt, _ := reader.ReadString('\\n')\n\n\tw, _ := strconv.Atoi(t)\n\tif w <= 100 && w >= 1 {\n\t\tif w%2 == 0 && w != 2 {\n\t\t\tfmt.Print(\"YES\")\n\t\t} else {\n\t\t\tfmt.Print(\"NO\")\n\t\t}\n\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "9638609158b74c5a920a8c173de17957", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1cfcbfb9f1b1c521d7f32f00152087f6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.8856304985337243, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar a int\n\tfmt.Scan(&a)\n\tif a%2==0&&a>0&&a<101 {\n\t\tfmt.Println(\"YES\")\n\t} else{\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "a14ff4c4240e5711987e560570b6e7ad", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "bf432e900d9c6f8f9cc0cf1cfaadba59", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9739130434782609, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\", &w)\n\n\tif w == 1 {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\tfor i := 2; i <= w/2; i++ {\n\t\tif w%i == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t\treturn\n\t\t}\n\t}\n\tfmt.Println(\"NO\")\n}", "lang": "Go", "bug_code_uid": "8cf5e0601cb443dfbed9852b50c8a582", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "05b9848043fe34af1b61e3c41aa45a63", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9945054945054945, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport(\n\"fmt\"\n)\n\nfunc main(){\n\tvar weight int\n\t_, _ = fmt.Scanf(\"%d\", &weight)\n\tif weight % 2 == 0 && weight > 1{\n\t\tfmt.Println(\"YES\")\n\t}else{\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "d7f4c4605c11727e7ca9d82544682ebc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ba54adc3aaaa7aa4229ef2c41f586174", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9979838709677419, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport(\n\t\"bufio\"\n\t\"strings\"\n\t\"strconv\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"io\"\n)\n\nfunc main(){\n\tfmt.Print(getStatus())\n}\n\nfunc getInput() int{\n\treader := bufio.NewReader(os.Stdin)\n\ts, err := reader.ReadString('\\n')\n\n\tif err != nil && err != io.EOF{\n\t\tlog.Fatal(err)\n\t}\n\ts = strings.TrimRight(s, \"\\r\\n\")\n\n\tw, err := strconv.Atoi(s)\n\tif err != nil && err != io.EOF{\n\t\tlog.Fatal(err)\n\t}\n\treturn w\n}\n\nfunc getStatus() string{\n\tw := getInput()\n\t\n\tif w%2 == 0 && w > 1{\n\t\treturn \"YES\"\n\t}\n\treturn \"NO\"\n}", "lang": "Go", "bug_code_uid": "83ace6efb6547588813b4c64bfcfc069", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3658919670e119d685e0f89c8f83ce95", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.2634730538922156, "equal_cnt": 5, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var n int\n _, _ = fmt.Scanf(\"%d\\n\", &n)\n if n % 2 == 0 {\n return \"YES\"\n }\n return \"NO\"\n}", "lang": "Go", "bug_code_uid": "e357877ea71a50d259961b07bdf9de15", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1ad4e57c476ca3eed44d1e449b95b7fb", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.3346303501945525, "equal_cnt": 5, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar n int\n\t_, _ = fmt.Scanf(\"%d\\n\", &n)\n\tif n%2 == 0 && (n/2)%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "56a1882fdb7bf64806eb76f66d34dc84", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1ad4e57c476ca3eed44d1e449b95b7fb", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9704918032786886, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\", &n)\n\tif n%2 == 0 {\n\t\tfmt.Printf(\"YES\")\n\t} else {\n\t\tfmt.Printf(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "0a825b1b1e7131150e766b78f6bbbd77", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c168f7491261185395469c17b8aa97c3", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9321266968325792, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main(){\n var i int\n fmt.Scan(&i)\n\n if(i%2==0 && (i/2)%2==0){\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "47d2722918c33b38eb8d9063c28c12e1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1fc6f0d903a29f41fa821844b27c2dd4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9607843137254902, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\\n\", &n)\n\n\tif n%2 == 0 && n > 2 {\n\t\tprintln(\"YES\")\n\t} else {\n\t\tprintln(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "0f60fba007c0d4a5177cf4d0c625cdea", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "674cb0615ff8a186ae89819950288829", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8507936507936508, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc check(weight int) {\n\tif weight%2 != 0 || weight ==2 {\n\t\tfmt.Println(\"NO\")\n\t}else {\n\t\tfmt.Println(\"YES\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "9cf9da608df5f321e8bef5f1234da422", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "91e61f5df9a9d169792c7f3e05eaa24b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.11711711711711711, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "package cf\n\nfunc Watermelon(n int) bool {\n\treturn n%2 == 0\n}\n", "lang": "Go", "bug_code_uid": "5e95b928423b03961a34958cd26f3f39", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d460a7f9e715980ca723e8e1d15a97f4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9986962190352021, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t. \"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nvar inputReader *bufio.Reader\nvar input string\nvar err error\n\nfunc main() {\n\tGo(os.Stdin, os.Stdout)\n}\n\nfunc Go(_r io.Reader, _w io.Writer) {\n\tin := bufio.NewReader(_r)\n\tout := bufio.NewWriter(_w)\n\tdefer out.Flush()\n\n\tvar T int\n\tFscan(in, &T)\n\tif T >= 2 && T%2 == 0 {\n\t\tFprintln(out, \"YES\")\n\t} else {\n\t\tFprintln(out, \"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "0558ed1b3fad06b7c487bb127f51ba2e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d460a7f9e715980ca723e8e1d15a97f4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.8357142857142857, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "import (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar kilo int8\n\t_, _ = fmt.Scan(&kilo)\n\t//reader := bufio.NewReader(os.Stdin)\n\t//text, _ := reader.ReadString('\\n')\n\t//integer, _ := strconv.Atoi(text)\n\n\tif (kilo/2)%2 == 0 {\n\t\tfmt.Print(\"YES\")\n\t} else {\n\t\tfmt.Print(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "7f44b726491dc4d665ddb54a347d8045", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f2bad61d34b0457d112154ec0a9f4a37", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9765100671140939, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar kilo float64\n\t_, _ = fmt.Scan(&kilo)\n\t//reader := bufio.NewReader(os.Stdin)\n\t//text, _ := reader.ReadString('\\n')\n\t//integer, _ := strconv.Atoi(text)\n\n\tif math.Mod(kilo/2.0, 2) == 0 {\n\t\tfmt.Print(\"YES\")\n\t} else {\n\t\tfmt.Print(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "6eece62444e89d654c0b4e2b54ae532a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f2bad61d34b0457d112154ec0a9f4a37", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9212328767123288, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t// \"bufio\"\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\ttext, _, _ := reader.ReadLine()\n\n\tatt1, _ := strconv.ParseInt(text, 10, 0)\n\tif att1%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "8dbca6693f5317ab879934cb35273029", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "09635f51b3755b130efef65a42e39641", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9870550161812298, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t// \"bufio\"\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\ttext, _, _ := reader.ReadLine()\n\n\tstr := string(text)\n\n\tatt1, _ := strconv.ParseInt(str, 10, 0)\n\tif att1%2 == 0 || att1 != 2 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "bd3d6126f31180f1e8416b8f5216b10d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "09635f51b3755b130efef65a42e39641", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.915068493150685, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\nfunc main(){\n var w int\n fmt.Scanf(\"%d\", &w)\n if w % 2 == 0 && w != 0 {fmt.Println(\"Yes\")\n }else {fmt.Println(\"No\")}\n \n}", "lang": "Go", "bug_code_uid": "f0e793528aac8cb2b99202c7511a5661", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e23eba405d87e136f02d36d2ca474254", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9974789465214826, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n)\n\n/*********** I/O ***********/\n\nvar (\n\t// ReadString returns a WORD string.\n\tReadString func() string\n\tstdout *bufio.Writer\n)\n\nfunc init() {\n\tReadString = newReadString(os.Stdin)\n\tstdout = bufio.NewWriter(os.Stdout)\n}\n\nfunc newReadString(ior io.Reader) func() string {\n\tr := bufio.NewScanner(ior)\n\t// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder\n\tr.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces\n\t// Split sets the split function for the Scanner. The default split function is ScanLines.\n\t// Split panics if it is called after scanning has started.\n\tr.Split(bufio.ScanWords)\n\n\treturn func() string {\n\t\tif !r.Scan() {\n\t\t\tpanic(\"Scan failed\")\n\t\t}\n\t\treturn r.Text()\n\t}\n}\n\n// ReadInt returns an integer.\nfunc ReadInt() int {\n\treturn int(readInt64())\n}\nfunc ReadInt2() (int, int) {\n\treturn int(readInt64()), int(readInt64())\n}\nfunc ReadInt3() (int, int, int) {\n\treturn int(readInt64()), int(readInt64()), int(readInt64())\n}\nfunc ReadInt4() (int, int, int, int) {\n\treturn int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())\n}\n\n// ReadInt64 returns as integer as int64.\nfunc ReadInt64() int64 {\n\treturn readInt64()\n}\nfunc ReadInt64_2() (int64, int64) {\n\treturn readInt64(), readInt64()\n}\nfunc ReadInt64_3() (int64, int64, int64) {\n\treturn readInt64(), readInt64(), readInt64()\n}\nfunc ReadInt64_4() (int64, int64, int64, int64) {\n\treturn readInt64(), readInt64(), readInt64(), readInt64()\n}\n\nfunc readInt64() int64 {\n\ti, err := strconv.ParseInt(ReadString(), 0, 64)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn i\n}\n\n// ReadIntSlice returns an integer slice that has n integers.\nfunc ReadIntSlice(n int) []int {\n\tb := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadInt()\n\t}\n\treturn b\n}\n\n// ReadInt64Slice returns as int64 slice that has n integers.\nfunc ReadInt64Slice(n int) []int64 {\n\tb := make([]int64, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadInt64()\n\t}\n\treturn b\n}\n\n// ReadFloat64 returns an float64.\nfunc ReadFloat64() float64 {\n\treturn float64(readFloat64())\n}\n\nfunc readFloat64() float64 {\n\tf, err := strconv.ParseFloat(ReadString(), 64)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn f\n}\n\n// ReadFloatSlice returns an float64 slice that has n float64.\nfunc ReadFloat64Slice(n int) []float64 {\n\tb := make([]float64, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadFloat64()\n\t}\n\treturn b\n}\n\n// ReadRuneSlice returns a rune slice.\nfunc ReadRuneSlice() []rune {\n\treturn []rune(ReadString())\n}\n\n/*********** Debugging ***********/\n\n// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.\n// For debugging use.\nfunc ZeroPaddingRuneSlice(n, digitsNum int) []rune {\n\tsn := fmt.Sprintf(\"%b\", n)\n\n\tresidualLength := digitsNum - len(sn)\n\tif residualLength <= 0 {\n\t\treturn []rune(sn)\n\t}\n\n\tzeros := make([]rune, residualLength)\n\tfor i := 0; i < len(zeros); i++ {\n\t\tzeros[i] = '0'\n\t}\n\n\tres := []rune{}\n\tres = append(res, zeros...)\n\tres = append(res, []rune(sn)...)\n\n\treturn res\n}\n\n/*********** DP sub-functions ***********/\n\n// ChMin accepts a pointer of integer and a target value.\n// If target value is SMALLER than the first argument,\n//\tthen the first argument will be updated by the second argument.\nfunc ChMin(updatedValue *int, target int) bool {\n\tif *updatedValue > target {\n\t\t*updatedValue = target\n\t\treturn true\n\t}\n\treturn false\n}\n\n// ChMax accepts a pointer of integer and a target value.\n// If target value is LARGER than the first argument,\n//\tthen the first argument will be updated by the second argument.\nfunc ChMax(updatedValue *int, target int) bool {\n\tif *updatedValue < target {\n\t\t*updatedValue = target\n\t\treturn true\n\t}\n\treturn false\n}\n\n// NthBit returns nth bit value of an argument.\n// n starts from 0.\nfunc NthBit(num, nth int) int {\n\treturn num >> uint(nth) & 1\n}\n\n// OnBit returns the integer that has nth ON bit.\n// If an argument has nth ON bit, OnBit returns the argument.\nfunc OnBit(num, nth int) int {\n\treturn num | (1 << uint(nth))\n}\n\n// OffBit returns the integer that has nth OFF bit.\n// If an argument has nth OFF bit, OffBit returns the argument.\nfunc OffBit(num, nth int) int {\n\treturn num & ^(1 << uint(nth))\n}\n\n// PopCount returns the number of ON bit of an argument.\nfunc PopCount(num int) int {\n\tres := 0\n\n\tfor i := 0; i < 70; i++ {\n\t\tif ((num >> uint(i)) & 1) == 1 {\n\t\t\tres++\n\t\t}\n\t}\n\n\treturn res\n}\n\n/*********** Arithmetic ***********/\n\n// Max returns the max integer among input set.\n// This function needs at least 1 argument (no argument causes panic).\nfunc Max(integers ...int) int {\n\tm := integers[0]\n\tfor i, integer := range integers {\n\t\tif i == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif m < integer {\n\t\t\tm = integer\n\t\t}\n\t}\n\treturn m\n}\n\n// Min returns the min integer among input set.\n// This function needs at least 1 argument (no argument causes panic).\nfunc Min(integers ...int) int {\n\tm := integers[0]\n\tfor i, integer := range integers {\n\t\tif i == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif m > integer {\n\t\t\tm = integer\n\t\t}\n\t}\n\treturn m\n}\n\n// DigitSum returns digit sum of a decimal number.\n// DigitSum only accept a positive integer.\nfunc DigitSum(n int) int {\n\tif n < 0 {\n\t\treturn -1\n\t}\n\n\tres := 0\n\n\tfor n > 0 {\n\t\tres += n % 10\n\t\tn /= 10\n\t}\n\n\treturn res\n}\n\n// DigitNumOfDecimal returns digits number of n.\n// n is non negative number.\nfunc DigitNumOfDecimal(n int) int {\n\tres := 0\n\n\tfor n > 0 {\n\t\tn /= 10\n\t\tres++\n\t}\n\n\treturn res\n}\n\n// Sum returns multiple integers sum.\nfunc Sum(integers ...int) int {\n\ts := 0\n\n\tfor _, i := range integers {\n\t\ts += i\n\t}\n\n\treturn s\n}\n\n// Kiriage returns Ceil(a/b)\n// a >= 0, b > 0\nfunc Kiriage(a, b int) int {\n\treturn (a + (b - 1)) / b\n}\n\n// PowInt is integer version of math.Pow\n// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).\nfunc PowInt(a, e int) int {\n\tif a < 0 || e < 0 {\n\t\tpanic(errors.New(\"[argument error]: PowInt does not accept negative integers\"))\n\t}\n\n\tif e == 0 {\n\t\treturn 1\n\t}\n\n\tif e%2 == 0 {\n\t\thalfE := e / 2\n\t\thalf := PowInt(a, halfE)\n\t\treturn half * half\n\t}\n\n\treturn a * PowInt(a, e-1)\n}\n\n// AbsInt is integer version of math.Abs\nfunc AbsInt(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}\n\n// Gcd returns the Greatest Common Divisor of two natural numbers.\n// Gcd only accepts two natural numbers (a, b >= 1).\n// 0 or negative number causes panic.\n// Gcd uses the Euclidean Algorithm.\nfunc Gcd(a, b int) int {\n\tif a <= 0 || b <= 0 {\n\t\tpanic(errors.New(\"[argument error]: Gcd only accepts two NATURAL numbers\"))\n\t}\n\tif a < b {\n\t\ta, b = b, a\n\t}\n\n\t// Euclidean Algorithm\n\tfor b > 0 {\n\t\tdiv := a % b\n\t\ta, b = b, div\n\t}\n\n\treturn a\n}\n\n// Lcm returns the Least Common Multiple of two natural numbers.\n// Lcd only accepts two natural numbers (a, b >= 1).\n// 0 or negative number causes panic.\n// Lcd uses the Euclidean Algorithm indirectly.\nfunc Lcm(a, b int) int {\n\tif a <= 0 || b <= 0 {\n\t\tpanic(errors.New(\"[argument error]: Gcd only accepts two NATURAL numbers\"))\n\t}\n\n\t// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2\n\t// a' and b' are relatively prime numbers\n\t// gcd consists of prime numbers, that are included in a and b\n\tgcd := Gcd(a, b)\n\n\t// not (a * b / gcd), because of reducing a probability of overflow\n\treturn (a / gcd) * b\n}\n\n// Strtoi is a wrapper of `strconv.Atoi()`.\n// If `strconv.Atoi()` returns an error, Strtoi calls panic.\nfunc Strtoi(s string) int {\n\tif i, err := strconv.Atoi(s); err != nil {\n\t\tpanic(errors.New(\"[argument error]: Strtoi only accepts integer string\"))\n\t} else {\n\t\treturn i\n\t}\n}\n\n// PrintIntsLine returns integers string delimited by a space.\nfunc PrintIntsLine(A ...int) string {\n\tres := []rune{}\n\n\tfor i := 0; i < len(A); i++ {\n\t\tstr := strconv.Itoa(A[i])\n\t\tres = append(res, []rune(str)...)\n\n\t\tif i != len(A)-1 {\n\t\t\tres = append(res, ' ')\n\t\t}\n\t}\n\n\treturn string(res)\n}\n\n/********** I/O usage **********/\n\n//str := ReadString()\n//i := ReadInt()\n//X := ReadIntSlice(n)\n//S := ReadRuneSlice()\n//a := ReadFloat64()\n//A := ReadFloat64Slice(n)\n\n//str := ZeroPaddingRuneSlice(num, 32)\n//str := PrintIntsLine(X...)\n\n/*******************************************************************/\n\nconst MOD = 1000000000 + 7\nconst ALPHABET_NUM = 26\nconst INF_INT64 = math.MaxInt64\nconst INF_BIT60 = 1 << 60\n\nvar n, m int\n\nvar adjMatrix [10][10]int\nvar dominoMatrix [10][10]int\n\nfunc main() {\n\tn, m = ReadInt2()\n\tfor i := 0; i < m; i++ {\n\t\ta, b := ReadInt2()\n\t\t// 常にaをbより小さくする\n\t\tif a > b {\n\t\t\ta, b = b, a\n\t\t}\n\t\tadjMatrix[a][b] = 1\n\t\tadjMatrix[b][a] = 1\n\t}\n\n\tif n <= 6 {\n\t\tfmt.Println(m)\n\t} else {\n\t\tfmt.Println(sub())\n\t}\n}\n\nfunc sub() int {\n\tres := 0\n\n\t// i, jを同じ数字とする\n\tfor i := 1; i <= n; i++ {\n\t\tfor j := i + 1; j <= n; j++ {\n\t\t\t// ノードにサイコロの目を割り振る\n\t\t\tmemo := make(map[int]int)\n\t\t\tdice := 1\n\t\t\tfor k := 1; k <= n; k++ {\n\t\t\t\tif k == j {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tmemo[k] = dice\n\t\t\t\tdice++\n\t\t\t}\n\t\t\tmemo[j] = memo[i]\n\n\t\t\ttmp := 0\n\t\t\tinitialize()\n\t\t\tfor l := 1; l <= n; l++ {\n\t\t\t\tfor m := l + 1; m <= n; m++ {\n\t\t\t\t\tll, mm := memo[l], memo[m]\n\t\t\t\t\tif adjMatrix[l][m] == 1 && dominoMatrix[ll][mm] == 1 {\n\t\t\t\t\t\ttmp++\n\t\t\t\t\t\tdominoMatrix[ll][mm] = 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tChMax(&res, tmp)\n\t\t}\n\t}\n\n\treturn res\n}\n\nfunc initialize() {\n\tfor i := 1; i <= 6; i++ {\n\t\tdominoMatrix[i][i] = 1\n\t\tfor j := i + 1; j <= 6; j++ {\n\t\t\tdominoMatrix[i][j] = 1\n\t\t}\n\t}\n}\n\n// MODはとったか?\n// 遷移だけじゃなくて最後の最後でちゃんと取れよ?\n\n/*******************************************************************/\n", "lang": "Go", "bug_code_uid": "77646736953db0925dd64b34be78aedc", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "36e9ad53b23730bfebe7f6e575f55b5f", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8915343915343915, "equal_cnt": 9, "replace_cnt": 7, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t. \"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\n// github.com/EndlessCheng/codeforces-go\nfunc Sol1230C(reader io.Reader, writer io.Writer) {\n\tin := bufio.NewReader(reader)\n\tout := bufio.NewWriter(writer)\n\tdefer out.Flush()\n\n\tvar n, m int\n\tFscan(in, &n, &m)\n\tedges := make([][]int, n+1)\n\tshown := map[int]int{}\n\tfor i := 0; i < m; i++ {\n\t\tvar v, w int\n\t\tFscan(in, &v, &w)\n\t\tedges[v] = append(edges[v], w)\n\t\tedges[w] = append(edges[w], v)\n\t\tshown[v] = 1\n\t\tshown[w] = 1\n\t}\n\tif len(shown) <= 6 {\n\t\tFprintln(out, m)\n\t\treturn\n\t}\n\n\tminDeg := 7\n\tfor _, e := range edges {\n\t\tif len(e) > 0 && len(e) < minDeg {\n\t\t\tminDeg = len(e)\n\t\t}\n\t}\n\tans := 0\n\tfor v, e := range edges {\n\t\tif len(e) != minDeg {\n\t\t\tcontinue\n\t\t}\n\t\tfor w, e2 := range edges {\n\t\t\tif w == v || len(e2) == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tdelta := 0\n\t\t\tfor _, ee := range e2 {\n\t\t\t\tif ee == v {\n\t\t\t\t\tdelta = 1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tmp := map[int]int{}\n\t\t\tfor _, ee := range append(e, e2...) {\n\t\t\t\tif ee == v {\n\t\t\t\t\tee = w\n\t\t\t\t}\n\t\t\t\tmp[ee] = 1\n\t\t\t}\n\t\t\tdelta = len(e) + len(e2) - delta - len(mp)\n\t\t\tif newAns := m - delta; newAns > ans {\n\t\t\t\tans = newAns\n\t\t\t}\n\t\t}\n\t}\n\tFprintln(out, ans)\n}\n\nfunc main() {\n\tSol1230C(os.Stdin, os.Stdout)\n}\n", "lang": "Go", "bug_code_uid": "3dd6c367b65f0e8896cb318400cb574a", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "870ecddf6d7208697f0320743a4896d4", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5043240782885753, "equal_cnt": 17, "replace_cnt": 9, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 16, "bug_source_code": "// Author: sighduck\n// URL: https://codeforces.com/contest/1230/problem/C\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\ntype Edge struct {\n\tA int\n\tB int\n}\n\nfunc min(x int, y int) int {\n\tif x < y {\n\t\treturn x\n\t}\n\treturn y\n}\n\nfunc max(x int, y int) int {\n\tif x > y {\n\t\treturn x\n\t}\n\treturn y\n}\n\nfunc Solve(n int, m int, edges []Edge) int {\n\tif n < 7 {\n\t\treturn m\n\t}\n\tdegreeCount := make([]int, n)\n\tfor _, edge := range edges {\n\t\tdegreeCount[edge.A-1] += 1\n\t\tdegreeCount[edge.B-1] += 1\n\t}\n\tmaxDominoes := 0\n\tfor _, degree := range degreeCount {\n\t\tmaxDominoes = max(maxDominoes, m-degree+min(degree, 1))\n\t}\n\treturn min(maxDominoes, 16)\n}\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\twriter := bufio.NewWriter(os.Stdout)\n\tdefer writer.Flush()\n\n\tvar n, m int\n\tfmt.Fscanf(reader, \"%d %d\\n\", &n, &m)\n\tedges := make([]Edge, m)\n\tfor i := 0; i < m; i++ {\n\t\tfmt.Fscanf(reader, \"%d %d\\n\", &edges[i].A, &edges[i].B)\n\t}\n\n\tfmt.Fprintf(writer, \"%d\\n\", Solve(n, m, edges))\n}\n", "lang": "Go", "bug_code_uid": "8420aea2d999f0d68ad6831e730d0eff", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "fa50036ef4a20ad3a1a26797ec029332", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6693877551020408, "equal_cnt": 13, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 13, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nvar local = false\nvar scanner *bufio.Scanner\n\nfunc main() {\n\tsetup()\n\tn := readInt()\n\n\ttotal, a, b := 0, -1, -1\n\tfor i := 0; i < n; i++ {\n\t\tc := readInt()\n\t\tif i >= 2 {\n\t\t\tisLocMin := b < a && b < c\n\t\t\tisLocMax := b > a && b > c\n\t\t\tif isLocMin || isLocMax {\n\t\t\t\ttotal++\n\t\t\t}\n\t\t}\n\n\t\ta, b = b, c\n\t}\n\n\tfmt.Println(total)\n}\n\nfunc setup() {\n\tsource := os.Stdin\n\tif local == true {\n\t\tfile, _ := os.Open(\"input.txt\")\n\t\tsource = file\n\t}\n\tscanner = bufio.NewScanner(source)\n\tscanner.Split(bufio.ScanWords)\n}\n\nfunc readInt() int {\n\tscanner.Scan()\n\tans, _ := strconv.ParseInt(scanner.Text(), 10, 0)\n\treturn int(ans)\n}\n", "lang": "Go", "bug_code_uid": "49a4ff96220f1b8c8c1711fa066daa40", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "3557eb7187a73f49f6cf71c6cadcdb64", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.996319018404908, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\nimport \"os\"\nimport \"bufio\"\n\nvar n int\nvar s string\nvar res int\nvar m map[byte]int\n\nfunc min(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc main() {\n\tin := bufio.NewReader(os.Stdin)\n\tfmt.Fscan(in, &n)\n\tfmt.Fscan(in, &s)\n\tm = make(map[byte]int)\n\n\tfor i:= 0; i < len(s); i++ {\n\t\tm[s[i]]++\n\t}\n\n\tres = min(m['U'], m['D']) + min(m['L'], m['R'])\n\n\tfmt.Printf(\"%d\", res*2)\n}\n", "lang": "Go", "bug_code_uid": "db5f428c9dc5d514fe5e4fc3ba8a6325", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "e0187736ad0b2acd31bc35871aea5a40", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.822992700729927, "equal_cnt": 19, "replace_cnt": 18, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 19, "bug_source_code": "package main\n\nimport (\n\t\"os\"\n\t\"bufio\"\n\t\"strconv\"\n\t\"fmt\"\n\t\"math\"\n)\n\nvar scanner *bufio.Scanner\n\nfunc getI64() int64 {\n\tscanner.Scan()\n\tx, _ := strconv.ParseInt(scanner.Text(), 10, 64)\n\treturn x\n}\nfunc getI() int {\n\treturn int(getI64())\n}\nfunc getF() float64 {\n\tscanner.Scan()\n\tx, _ := strconv.ParseFloat(scanner.Text(), 64)\n\treturn x\n}\nfunc getS() string {\n\tscanner.Scan()\n\treturn scanner.Text()\n}\n\nfunc max(a,b int) int { if a > b { return a } else { return b } }\n\nfunc min(a,b int) int { if a < b { return a } else { return b } }\n\nfunc main() {\n\tscanner = bufio.NewScanner(os.Stdin)\n\tscanner.Split(bufio.ScanWords)\n\twriter := bufio.NewWriter(os.Stdout)\n\tdefer writer.Flush()\n\n\n\twriter.WriteString(fmt.Sprintf(\"%d\", Problem888B()))\n}\n\nfunc Problem888B() int {\n\tn := getI()\n\tx := 0\n\ty := 0\n\tfor i:= 0; i < n ; i++ {\n\t s := getS()\n\t switch(s){\n\t case \"U\":\n\t y+=1\n\t break\n\t case \"D\":\n\t y-=1\n\t break\n\t case \"L\":\n\t x-=1\n\t break\n\t case \"R\":\n\t x+=1\n\t break\n\t default:\n\t break\n\t }\n\t}\n\treturn n - (x-y)\n}", "lang": "Go", "bug_code_uid": "8b1afe61354bdda71d0b71429a44eea7", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "edeb3b984000e3a08f626a27e5ce7bd5", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9688412852969815, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"os\"\n\t\"bufio\"\n\t\"strconv\"\n\t\"fmt\"\n)\n\nvar scanner *bufio.Scanner\n\nfunc getI64() int64 {\n\tscanner.Scan()\n\tx, _ := strconv.ParseInt(scanner.Text(), 10, 64)\n\treturn x\n}\nfunc getI() int {\n\treturn int(getI64())\n}\nfunc getF() float64 {\n\tscanner.Scan()\n\tx, _ := strconv.ParseFloat(scanner.Text(), 64)\n\treturn x\n}\nfunc getS() string {\n\tscanner.Scan()\n\treturn scanner.Text()\n}\n\nfunc max(a,b int) int { if a > b { return a } else { return b } }\n\nfunc min(a,b int) int { if a < b { return a } else { return b } }\n\nfunc main() {\n\tscanner = bufio.NewScanner(os.Stdin)\n\tscanner.Split(bufio.ScanWords)\n\twriter := bufio.NewWriter(os.Stdout)\n\tdefer writer.Flush()\n\n\n\twriter.WriteString(fmt.Sprintf(\"%d\", Problem888B()))\n}\n\nfunc Problem888B() int {\n\tn := getI()\n\tx := 0\n\ty := 0\n\ts := getS()\n\tfor _, char := range s {\n\t\tswitch char {\n\t\tcase 'U':\n\t\t\ty+=1\n\t\t\tbreak\n\t\tcase 'D':\n\t\t\ty-=1\n\t\t\tbreak\n\t\tcase 'L':\n\t\t\tx-=1\n\t\t\tbreak\n\t\tcase 'R':\n\t\t\tx+=1\n\t\t\tbreak\n\t\tdefault:\n\t\t\tbreak\n\t\t}\n\t}\n\t\n\treturn n - (x+y)\n}", "lang": "Go", "bug_code_uid": "6b2fd7a622e1b1be36ca3f4dfbd75294", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "edeb3b984000e3a08f626a27e5ce7bd5", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6013071895424836, "equal_cnt": 21, "replace_cnt": 8, "delete_cnt": 12, "insert_cnt": 1, "fix_ops_cnt": 21, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main(){\n\tvar n int\n\tfmt.Scan(&n)\n\tvar s string\n\tfmt.Scan(&s)\n\tmax := 0\n\tfor i := 0; i < len(s)-1; i++ {\n\t\ttemp := 0\n\t\tmaxTemp := 0\n\t\tx := 0\n\t\ty := 0\n\t\tfor j := i; j < len(s); j++ {\n\t\t\ttemp++\n\t\t\tswitch s[j] {\n\t\t\tcase'L':\n\t\t\t\tx--\n\t\t\tcase 'R':\n\t\t\t\tx++\n\t\t\tcase 'U':\n\t\t\t\ty++\n\t\t\tcase 'D':\n\t\t\t\ty--\n\t\t\t}\n\t\t\tif x==0&&y==0 {\n\t\t\t\tmaxTemp = temp\n\t\t\t}\n\t\t}\n\t\tif maxTemp > max {\n\t\t\tmax = maxTemp\n\t\t}\n\t}\n\tfmt.Print(max)\n}\n", "lang": "Go", "bug_code_uid": "dba921354776025c6ab760926fd84765", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "b4138885631c33a9a9c183bc272139c8", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.4939759036144578, "equal_cnt": 11, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "// https://codeforces.com/problemset/problem/888/B\npackage main\n\nimport (\n\t\"fmt\"\n\t\"bufio\"\n\t\"os\"\n)\n\nfunc isAtOrigin(pos []int) bool {\n\tif pos[0] == 0 && pos[1] == 0 {\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc move(pos []int, move rune) {\n\tswitch move {\n\tcase 'U':\n\t\tpos[1]++\n\tcase 'D':\n\t\tpos[1]--\n\tcase 'L':\n\t\tpos[0]--\n\tcase 'R':\n\t\tpos[0]++\n\t}\n}\n\nfunc main() {\n\tscanner := bufio.NewScanner(os.Stdin)\n\tscanner.Scan()\n\tvar lastTimeAtOrigin int64 = 0\n\tpos := []int{0, 0}\n\tscanner.Scan()\n\tcmds := scanner.Text()\n\tfor i, cmd := range cmds {\n\t\tmove(pos, cmd)\n\t\tif isAtOrigin(pos) {\n\t\t\tlastTimeAtOrigin = int64(i+1)\n\t\t}\n\t}\n\tfmt.Printf(\"%d\", lastTimeAtOrigin)\n\n}", "lang": "Go", "bug_code_uid": "2d044de129c7e659df8fa1ba3582c7e9", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "29b683862a6d1feafad2aaf80e117113", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9985250737463127, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "// https://codeforces.com/problemset/problem/888/B\npackage main\n\nimport (\n\t\"fmt\"\n\t\"bufio\"\n\t\"os\"\n\t\"strconv\"\n\t\"math\"\n)\n\nfunc move(pos []int, move rune) {\n\tswitch move {\n\tcase 'U':\n\t\tpos[1]++\n\tcase 'D':\n\t\tpos[1]--\n\tcase 'L':\n\t\tpos[0]--\n\tcase 'R':\n\t\tpos[0]++\n\t}\n}\n\nfunc main() {\n\tscanner := bufio.NewScanner(os.Stdin)\n\tscanner.Scan()\n\tnumCommands, _ := strconv.ParseInt(scanner.Text(), 10, 32)\n\tpos := []int{0, 0}\n\tscanner.Scan()\n\tcmds := scanner.Text()\n\tfor i, cmd := range cmds {\n\t\tmove(pos, cmd)\n\t\t// fmt.Printf(\"%d - current position - %d, %d\\n\", i+1, pos[0], pos[1])\n\t}\n\tfmt.Printf(\"%d\", numCommands - int64(math.Abs(float64(pos[0]- 0))) - int64(math.Abs(float64(pos[1]-0))))\n}", "lang": "Go", "bug_code_uid": "d33509d920a34682edde6a8b75af3d7f", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "29b683862a6d1feafad2aaf80e117113", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5569155446756426, "equal_cnt": 12, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 12, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar (\n\tin *bufio.Reader\n\tout *bufio.Writer\n)\n\nfunc init() {\n\tin = bufio.NewReader(os.Stdin)\n\tout = bufio.NewWriter(os.Stdout)\n}\n\ntype prop struct {\n\thp, atk, def int\n}\n\nfunc live(hp, dmg int) int {\n\tif dmg <= 0 {\n\t\treturn 1000000000\n\t}\n\treturn (hp + dmg - 1) / dmg\n}\n\nfunc main() {\n\tdefer out.Flush()\n\tvar (\n\t\ty, m prop\n\t\th, a, d int\n\t)\n\tfmt.Fscan(in, &y.hp, &y.atk, &y.def)\n\tfmt.Fscan(in, &m.hp, &m.atk, &m.def)\n\tfmt.Fscan(in, &h, &a, &d)\n\tans := 205 * h + 205 * a + 205 * d\n\tfor bh := 0; bh <= 205; bh++ {\n\t\tfor ba := 0; ba <= 205; ba++ {\n\t\t\tfor bd := 0; bd <= 205; bd++ {\n\t\t\t\tpr := bh * h + ba * a + bd * d\n\t\t\t\tif pr >= ans {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif live(y.hp + bh, m.atk - (y.def + bd)) > live(m.hp, (y.atk + ba) - m.def) {\n\t\t\t\t\tans = pr\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfmt.Fprintln(out, ans)\n}\n", "lang": "Go", "bug_code_uid": "ef28a7304e13cafbe2cd9bd7bd0dc474", "src_uid": "bf8a133154745e64a547de6f31ddc884", "apr_id": "cbac05c9d6fbf56aa8cb254669221a89", "difficulty": 1800, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9600899381675099, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nvar s string\nfunc main(){\n fmt.Scanf(\"%s\", &s)\n at := false\n dot := false\n result := string(s[0])\n sz := len(s)\n for i:=1; i= len(s){\n return false\n }\n if s[i] != match[j]{\n return false\n }\n i++\n }\n return true\n }\n", "lang": "Go", "bug_code_uid": "7541d985e4ba82380c8e16c01bd7ba53", "src_uid": "a11c9679d8e2dca51be17d466202df6e", "apr_id": "0ce5b63fa75a97cbfd1281d0e15708fa", "difficulty": 1300, "tags": ["implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.4920894708128751, "equal_cnt": 14, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 14, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar (\n\tin = bufio.NewReader(os.Stdin)\n\tout = bufio.NewWriter(os.Stdout)\n)\n\nconst BITS = 15\n\nvar s, x int\n\nfunc main() {\n\tdefer out.Flush()\n\tfmt.Fscan(in, &s, &x)\n\n\t//for i := 0; i < BITS; i++ {\n\t//\tfmt.Fprint(out, get(i, s))\n\t//}\n\t//fmt.Fprintln(out)\n\t//for i := 0; i < BITS; i++ {\n\t//\tfmt.Fprint(out, get(i, x))\n\t//}\n\t//fmt.Fprintln(out)\n\n\tans := solve(0, 0)\n\tif s == x {\n\t\tans -= 2\n\t}\n\tfmt.Fprintln(out, ans)\n}\n\nfunc solve(i, carry int) int64 {\n\tif i == BITS {\n\t\tif carry == 0 {\n\t\t\treturn 1\n\t\t}\n\t\treturn 0\n\t}\n\tkey := Key{i, carry}\n\tif result, ok := cache[key]; ok {\n\t\treturn result\n\t}\n\tresult := int64(0)\n\tfor a := 0; a <= 1; a++ {\n\t\tb := a ^ get(i, x)\n\t\tsum := a + b + carry\n\t\tif sum&1 == get(i, s) {\n\t\t\t//fmt.Fprintln(out, i, a, b, carry, \"works\", sum>>1)\n\t\t\tresult += solve(i+1, sum>>1)\n\t\t}\n\t}\n\t//fmt.Fprintln(out, i, carry, \">\", result)\n\tcache[key] = result\n\treturn result\n}\n\nvar cache = map[Key]int64{}\n\ntype Key struct {\n\ti, carry int\n}\n\nfunc get(i, x int) int {\n\treturn (x >> uint(i)) & 1\n}\n", "lang": "Go", "bug_code_uid": "10f57483a979c8aca7af0595f1f48e71", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "3b266c546b074c7e0ac4d969900396b7", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.4840764331210191, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "package main\nimport \"fmt\"\n\nfunc main() {\n\tvar pp, dd, x, y, t, w, h int64\n\tw=1\n\tfmt.Scan(&pp, &dd)\n\tx=pp-dd\n\ty=pp\n\tfor {\n\t\tt=y\n\t\tw*=10\n\t\th=pp%w\n\t\tif h==w-1 {\n\t\t\th--\n\t\t}\n\t\ty=pp-(h+1)\n\t\tif y 0; i-- {\n\t\tif i%2 == 0 {\n\t\t\tif x == 2 {\n\t\t\t\tx = 1\n\t\t\t} else if x == 1 {\n\t\t\t\tx = 2\n\t\t\t}\n\t\t} else {\n\t\t\tif x == 0 {\n\t\t\t\tx = 1\n\t\t\t} else if x == 1 {\n\t\t\t\tx = 0\n\t\t\t}\n\t\t}\n\t}\n\n\tfmt.Print(x)\n}\n", "lang": "Go", "bug_code_uid": "5c035c94188227133acb50e156a97607", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "1fd4177d7a94687b222512912091732b", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.1411764705882353, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\n\t// n, _ := strconv.ParseInt(readInput(), 10, 32)\n\n\t// x, _ := strconv.ParseInt(readInput(), 10, 32)\n\n\tn := 2000000000\n\t//\tn = n % 6\n\tx := 1\n\n\tfmt.Println(n, x)\n\n\tfor n != 0 {\n\n\t\tif n%2 == 0 {\n\t\t\tif x == 1 {\n\t\t\t\tx = 2\n\t\t\t} else if x == 2 {\n\t\t\t\tx = 1\n\t\t\t}\n\t\t}\n\n\t\tif n%2 == 1 {\n\t\t\tif x == 1 {\n\t\t\t\tx = 0\n\t\t\t} else if x == 0 {\n\t\t\t\tx = 1\n\t\t\t}\n\t\t}\n\n\t\tn--\n\t}\n\tfmt.Println(x)\n\n}\n\nfunc readInput() (s string) {\n\tin := bufio.NewReader(os.Stdin)\n\tvar err error\n\tif s, err = in.ReadString(byte('\\n')); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\ts = s[:len(s)-1]\n\n\treturn s\n}\n", "lang": "Go", "bug_code_uid": "313fca833de0e45818c2678b860fc601", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "969a244ac5665abf85a02dbf026726ff", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5822510822510822, "equal_cnt": 11, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\n\tn, _ := strconv.ParseInt(readInput(), 10, 32)\n\n\tx, _ := strconv.ParseInt(readInput(), 10, 32)\n\n\t// n := 2000000000\n\tn = n % 6\n\t// x := 1\n\n\tfor n != 0 {\n\n\t\tif n%2 == 0 {\n\t\t\tif x == 1 {\n\t\t\t\tx = 2\n\t\t\t} else if x == 2 {\n\t\t\t\tx = 1\n\t\t\t}\n\t\t}\n\n\t\tif n%2 == 1 {\n\t\t\tif x == 1 {\n\t\t\t\tx = 0\n\t\t\t} else if x == 0 {\n\t\t\t\tx = 1\n\t\t\t}\n\t\t}\n\n\t\tn--\n\t}\n\n\tfmt.Println(x)\n\n}\n\nfunc readInput() (s string) {\n\tin := bufio.NewReader(os.Stdin)\n\tvar err error\n\tif s, err = in.ReadString(byte('\\n')); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\ts = s[:len(s)-1]\n\n\treturn s\n}\n", "lang": "Go", "bug_code_uid": "f3b8d4f3f6b137a6124db3ef234270f7", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "969a244ac5665abf85a02dbf026726ff", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8793969849246231, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar arr [3]bool\n\tvar testcount, a int\n\tfmt.Scanf(\"%d\\n%d\", &testcount, &a)\n\tfor j := 0; j < 3; j++ {\n\t\tarr[j] = true\n\t\tfor i := 1; i <= testcount; i++ {\n\t\t\tif i%2 == 0 {\n\t\t\t\tarr[1], arr[2] = arr[2], arr[1]\n\t\t\t} else {\n\t\t\t\tarr[0], arr[1] = arr[1], arr[0]\n\t\t\t}\n\t\t}\n\t\tif arr[a] {\n\t\t\tfmt.Println(j)\n\t\t\tbreak\n\t\t}\n\t}\n}", "lang": "Go", "bug_code_uid": "398e5889b6273e7334ac6c90d2a0856f", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "b245e7055429d4f793cc347ab6114093", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.968421052631579, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar arr [3]bool\n\tvar testcount, a int\n\tfmt.Scanf(\"%d\\n%d\", &testcount, &a)\n\tfor j := 0; j < 3; j++ {\n\t\tarr[j] = true\n\t\tfor i := 1; i <= testcount; i++ {\n\t\t\tif i%2 == 0 {\n\t\t\t\tarr[1], arr[2] = arr[2], arr[1]\n\t\t\t} else {\n\t\t\t\tarr[0], arr[1] = arr[1], arr[0]\n\t\t\t}\n\t\t}\n\t\tif arr[a] {\n\t\t\tfmt.Println(j)\n\t\t\tbreak\n\t\t} else {\n\t\t\tarr[0], arr[1], arr[2] = false, false, false\n\t\t}\n\t}\n}", "lang": "Go", "bug_code_uid": "7422b570067cbf87187e17a2ef4f7db3", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "b245e7055429d4f793cc347ab6114093", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9847081628257592, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tsc := NewScanner()\n\tN, x := sc.NextInt(), sc.NextInt()\n\tn := N\n\tif x == 1 {\n\t\tn = N % 6\n\t} else {\n\t\tif x == 2 {\n\t\t\tif N%2 == 1 {\n\t\t\t\tN--\n\t\t\t} else {\n\t\t\t\tn = N % 6\n\t\t\t}\n\t\t} else {\n\t\t\tif N%2 == 0 {\n\t\t\t\tN--\n\t\t\t} else {\n\t\t\t\tn = N % 6\n\t\t\t}\n\t\t}\n\t}\n\n\tfor i := n; i > 0; i-- {\n\t\tif i%2 == 1 {\n\t\t\tif x == 1 {\n\t\t\t\tx = 0\n\t\t\t} else if x == 0 {\n\t\t\t\tx = 1\n\t\t\t}\n\t\t} else {\n\t\t\tif x == 1 {\n\t\t\t\tx = 2\n\t\t\t} else if x == 2 {\n\t\t\t\tx = 1\n\t\t\t}\n\t\t}\n\t}\n\tfmt.Println(x)\n\n}\n\ntype Scanner struct {\n\tr *bufio.Reader\n\tbuf []byte\n\tp int\n}\n\nfunc NewScanner() *Scanner {\n\trdr := bufio.NewReaderSize(os.Stdin, 1000)\n\treturn &Scanner{r: rdr}\n}\nfunc (s *Scanner) Next() string {\n\ts.pre()\n\tstart := s.p\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tbreak\n\t\t}\n\t}\n\tresult := string(s.buf[start:s.p])\n\ts.p++\n\treturn result\n}\nfunc (s *Scanner) NextLine() string {\n\ts.pre()\n\tstart := s.p\n\ts.p = len(s.buf)\n\treturn string(s.buf[start:])\n}\nfunc (s *Scanner) NextInt() int {\n\tv, _ := strconv.Atoi(s.Next())\n\treturn v\n}\nfunc (s *Scanner) NextInt64() int64 {\n\tv, _ := strconv.ParseInt(s.Next(), 10, 64)\n\treturn v\n}\n\nfunc (s *Scanner) NextIntArray() []int {\n\ts.pre()\n\tstart := s.p\n\tresult := []int{}\n\tfor ; s.p < len(s.buf)+1; s.p++ {\n\t\tif s.p == len(s.buf) || s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)\n\t\t\tresult = append(result, int(v))\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\n\treturn result\n}\nfunc (s *Scanner) NextInt64Array() []int64 {\n\ts.pre()\n\tstart := s.p\n\tresult := []int64{}\n\tfor ; s.p < len(s.buf)+1; s.p++ {\n\t\tif s.p == len(s.buf) || s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)\n\t\t\tresult = append(result, v)\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\treturn result\n}\n\nfunc (s *Scanner) NextMap() map[int]bool {\n\ts.pre()\n\tstart := s.p\n\tmp := map[int]bool{}\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\t\t\tmp[v] = true\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\tmp[v] = true\n\n\treturn mp\n}\n\nfunc (s *Scanner) pre() {\n\tif s.p >= len(s.buf) {\n\t\ts.readLine()\n\t\ts.p = 0\n\t}\n}\nfunc (s *Scanner) readLine() {\n\ts.buf = make([]byte, 0)\n\tfor {\n\t\tl, p, e := s.r.ReadLine()\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\t\ts.buf = append(s.buf, l...)\n\t\tif !p {\n\t\t\tbreak\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "5c2d826859aa2bf868a471a00fc91972", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "a3ff83f136e2e7e0727125e573360f97", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8616874135546335, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var a, ta, b, tb int\n var h, m int\n fmt.Scanf(\"%d %d\\n\",&a, &ta)\n fmt.Scanf(\"%d %d\\n\", &b, &tb)\n fmt.Scanf(\"%d:%d\", &h, &m)\n\n start := 300\n end := 60 * 24 - 1\n\n meets := 0\n\n simon_start := h * 60 + m\n simon_end := simon_start + ta\n //fmt.Println(simon_start, simon_end)\n for start <= end {\n bus_start := start\n bus_end := start + tb\n\n if (bus_start < simon_end && bus_start >= simon_start) || (bus_end < simon_end && bus_end > simon_start) {\n meets++\n //fmt.Println(bus_start, bus_end)\n }\n //next bus from B\n start += b\n }\n\n fmt.Println(meets)\n}\n", "lang": "Go", "bug_code_uid": "b7771bdc2f4cef6e0489a81a413914b2", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "b51212157d91625eb8620759f6c31e15", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9801980198019802, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar n int\n\tfmt.Scan(&n)\n\n\tvar s string\n\tfmt.Scan(&s)\n\n\ttoF := 0\n\ttoS := 0\n\tfor i := 1; i < n; i++ {\n\t\tif s[i] != s[i-1] {\n\t\t\tif s[i] == 'F' {\n\t\t\t\ttoF++\n\t\t\t} else {\n\t\t\t\ttoS++\n\t\t\t}\n\t\t}\n\t}\n\n\tif toF > toS {\n\t\tprintln(\"YES\")\n\t} else {\n\t\tprintln(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "36ca1ab0bed2145b458412516b8ce0c3", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "05fe1173941fa293116688a9dfaae9f1", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8957528957528957, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n \nimport (\n\t\"fmt\"\n\t\"strings\"\n)\nvar a string\nvar b int\n\nfunc help() {\n\tfmt.Scan(&a)\n\tfmt.Scan(&b)\n if strings.Count(a, \"FS\") < strings.Count(a, \"SF\"){\n fmt.Print(\"YES\")\n } else{\n fmt.Print(\"NO\")\n }\n}\n\nfunc main() {\n\thelp()\n}", "lang": "Go", "bug_code_uid": "b7d6bc9410d4abd77a157668409bcfbd", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "766b153afd1541e84371d5a85681fb9b", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9672131147540983, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main \nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n \nfunc main(){\n\tvar len int\n\tvar way string\n\tfmt.Scan(&len)\n\tfmt.Scan(&way)\n\tS := Count(way,\"SF\")\n\tSF := Count(way,\"FS\")\n\tif S > SF{\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n \n \n}\n", "lang": "Go", "bug_code_uid": "6b1c8655cfd0b9f570cbfdbe35ff65cc", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "33872f10c59db11a83f7c0d85137cd84", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9405034324942791, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\n\nimport \"fmt\"\n\nfunc main() {\n\tvar x string\n\tvar lengthString int\n\tvar countSI, countSF int\n\n\tfmt.Scan(&lengthString)\n\tfmt.Scan(&x)\n\n\n\tfor i:=0; i < lengthString - 2; i++ {\n\t\tif string(x[i]) == \"S\" && string(x[i+1]) == \"F\" {\n\t\t\tcountSI ++\n\t\t}\n\n\t\tif string(x[i]) == \"F\" && string(x[i+1]) == \"S\" {\n\t\t\tcountSF ++\n\t\t}\n\t}\n\n\tif countSI > countSF {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\t", "lang": "Go", "bug_code_uid": "1f542444e1d980c40ab259041605a539", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "f6eb5422593b001f0af1b35c28066800", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9962962962962963, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n \nimport (\n \"fmt\"\n \"strings\"\n)\n func main() {\n var l int\n var str string\n fmt.Scan(&l, &str)\n fs := s.Count(str, \"FS\")\n sf := s.Count(str, \"SF\")\n if sf > fs {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "c4fcbdc5f6aebe39cebceb02bea1f0f9", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "4c0056ecc26e9341363795319070f3b7", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9947643979057592, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\nimport (\n \"fmt\"\n)\nfunc main(){\n var n,l int\n var s string\n fmt.Scan(&n,&s)\n for i:=1;i f2s {\n\t\treturn \"YES\"\n\t}\n\treturn \"NO\"\n}\n\nfunc main() {\n\tvar s string\n\tfmt.Scanln(&s)\n\tfmt.Scanln(&s)\n\tfmt.Println(sol(s))\n}\n", "lang": "Go", "bug_code_uid": "6e578fd6464a00863a625f0d3024e519", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "d6107e82d4c072ae6978fb087e04f443", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.46153846153846156, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main () {\n\n\tvar n int64\n\n\tfmt.Scanf(\"%d\",&n)\n\tn ++\n\n\tt := n\n\ti := 0\n\n\tfor {\n\n\t\tif n % 2 == 0{\n\t\t\tn >>= 1\n\t\t\ti++\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif n == 1 {\n\t\tfmt.Println(i)\n\t} else {\n\t\tfmt.Println(t)\n\t}\n\n\n}\n", "lang": "Go", "bug_code_uid": "75636c68c5dce08dc8a309fe74b71198", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "ff3bd41e12e7af0cf846a78ef14b3d10", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8693009118541033, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int64\n\tfmt.Scan(&n)\n\n\tn++\n\tif n%2 == 0 {\n\t\tfmt.Println(n / 2)\n\t} else {\n\t\tfmt.Println(n)\n\t}\n}\n", "lang": "Go", "bug_code_uid": "41dc44f4eaa52ff4287530f3aef60c28", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "1bcda0bf62e7dcdc2ab94f5097e13fc6", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9357798165137615, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc Process(n int64) (int64) {\n\tif (n+1)%2 == 0 {\n\t\treturn (n + 1) / 2\n\t} else {\n\t\treturn n + 1\n\t}\n}\n\nfunc main() {\n\n\tvar n int64\n\n\tfmt.Scanln(&n)\n\n\tfmt.Println(Process(n))\n}\n", "lang": "Go", "bug_code_uid": "dc181dd60e0afb4adb046fd6ed7d9c22", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "a30d1873c5a6710e2bff38d6418c0222", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8622366288492707, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tin := bufio.NewReader(os.Stdin)\n\tout := bufio.NewWriter(os.Stdout)\n\tdefer out.Flush()\n\n\tvar n int64\n\tfmt.Fscan(in, &n)\n\tn += 1\n\tif n & 1 == 1 {\n\t\tfmt.Fprint(out, n)\n\t} else {\n\t\tfmt.Fprint(out, n/2)\n\t}\n}\n", "lang": "Go", "bug_code_uid": "b5d28ded3c9ee359c387f845e850185b", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "bbe9440f72c070993417047d37e32cf4", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9125475285171103, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n uint64\n\tfmt.Scan(&n)\n\tn++\n\tif n%2 == 0 {\n\t\tn /= 2\n\t}\n\tfmt.Println(n)\n}\n", "lang": "Go", "bug_code_uid": "8d10812552940ae5ba4d18d6a703dd41", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "59b48e3af14207ba4b5f5fb1dec9598b", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7433628318584071, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n)\n\ntype obsh struct {\n\tNum int\n\tSelf int64\n\tSum int64\n}\n\nfunc main() {\n\tvar n int64\n\tfmt.Scanf(\"%d\\n\", &n)\n\tfor i:=0;i<=18;i++{\n\t\tif math.Pow(2, float64(i)) == float64(n+1){\n\t\t\tfmt.Println((n+1)/2)\n\t\t\tos.Exit(0)\n\t\t}\n\t}\n\tfmt.Println(n+1)\n}", "lang": "Go", "bug_code_uid": "e9cc4930643269c075bb04c86704c7c8", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "bcd354de8c5bd434a0418bcfc7210438", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.889589905362776, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\nimport (\n\t\"fmt\"\n)\n\nfunc main(){\n\tvar n int\n\tfmt.Scanln(&n)\n\tn += 1\n\n\tif n % 2 == 0{\n\t\tfmt.Print(n/2)\n\t}else{\n\t\tfmt.Print(n)\n\t}\n}", "lang": "Go", "bug_code_uid": "5dcf955815c53c269873f0d661960745", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "a4fe9e3b3fdc7742407b677eeb476c8d", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.3875432525951557, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"Hello, World!\")\n}", "lang": "Go", "bug_code_uid": "ec33003eecc559255ce7a1df9afcc843", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "5e154ebff55e60b0d97a5516816a9af3", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9781287970838396, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"os\"\nimport \"bufio\"\nimport \"strconv\"\nimport \"sort\"\n\nfunc main(){\n\tx := make([]int, 8)\n\ty := make([]int, 8)\n\tr := bufio.NewScanner(os.Stdin)\n\tr.Split(bufio.ScanWords)\n\tw := bufio.NewWriter(os.Stdout)\n\tfor i:=0; i<8; i++ {\n\t\tr.Scan()\n\t\tx[i], _ = strconv.Atoi(r.Text())\n\t\tr.Scan()\n\t\ty[i], _ = strconv.Atoi(r.Text())\n\t}\t\n\tfor j:=0; j<8; j++ {\n\t\tfor k:=j+1; k<8; k++ {\n\t\t\tif x[j] == x[k] && y[j] == y[k] {\n\t\t\t\tw.WriteString(\"ugly\\n\")\n\t\t\t\tw.Flush()\n\t\t\t\treturn\n\t\t\t}\t\n\t\t}\n\t}\n\tsort.Ints(x)\n\tsort.Ints(y)\n\tif x[1] == x[0] && x[2] == x[1] && x[4] == x[3] && x[7] == x[6] && x[5] == x[7] && x[3] > x[0] && x[6] > x[3] && y[3] > y[2] && y[5] > y[4] && y[4] == y[3] && y[0] == y[1] && y[1] == y[2] && y[6] == y[7] && y[5] == y[6] && y[3] != y[1] {\n\t\tw.WriteString(\"respectable\\n\")\n\t}\n\tw.Flush()\n}\t\n", "lang": "Go", "bug_code_uid": "03432c862dbc4f249eff6518999ef711", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "744fa3b1af1df3797c5f0297aa7dd73a", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9282407407407407, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "\npackage main\n\nimport (\n \"fmt\"\n)\n\nvar x [8]int\nvar y [8]int\n\nfunc input() {\n for i := 0; i < 8; i++ {\n x[i] = -1; y[i] = -1\n fmt.Scanf(\"%d %d\", &x[i], &y[i])\n if x[i] == -1 && y[i] == -1 {\n i --\n }\n }\n}\n\nfunc solve() {\n var x1, x2, x3 int = x[0], x[0], x[0]\n for i := 0; i < 8; i++ {\n if x[i] < x1 {\n x2 = x1\n x1 = x[i]\n } else if x[i] > x3 {\n x2 = x3\n x3 = x[i]\n }\n }\n var y1, y2, y3 int = y[0], y[0], y[0]\n for i := 0; i < 8; i++ {\n if y[i] < y1 {\n y2 = y1\n y1 = y[i]\n } else if y[i] > y3 {\n y2 = y3\n y3 = y[i]\n }\n }\n\n vis := [3][3]int{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}\n for i := 0; i < 8; i ++ {\n var a, b int = -1, -1\n if x[i] == x1 {\n a = 0\n } else if x[i] == x2 {\n a = 1\n } else if x[i] == x3 {\n a = 2\n }\n if y[i] == y1 {\n b = 0\n } else if y[i] == y2 {\n b = 1\n } else if y[i] == y3 {\n b = 2\n }\n if a != -1 && b != -1 {vis[a][b] = 1}\n }\n\n for i := 0; i < 3; i ++ {\n for j := 0; j < 3; j ++ {\n if i == 1 && j== 1 {\n continue\n } else if vis[i][j] == 0 {\n fmt.Println(\"ugly\")\n return\n }\n }\n }\n\n fmt.Println(\"respectable\")\n}\n\nfunc main() {\n input()\n solve()\n}\n", "lang": "Go", "bug_code_uid": "96cd42c7795a1bc04ff73237037476b4", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "86e73aafea05f5ba97723ad29b822349", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9935028248587571, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n \"bufio\"\n \"io\"\n \"os\"\n \"sort\"\n \"strconv\"\n)\n\ntype Scanner struct {\n r io.Reader\n split bufio.SplitFunc\n maxTokenSize int\n token, buf []byte\n start, end int\n}\n\nfunc NewScanner(r io.Reader) *Scanner {\n return &Scanner{\n r: r,\n split: bufio.ScanWords,\n maxTokenSize: 16777216,\n buf: make([]byte, 4096),\n }\n}\n\nfunc (s *Scanner) advance(n int) bool {\n if n < 0 || n > s.end-s.start {\n return false\n }\n s.start += n\n return true\n}\n\nfunc (s *Scanner) Text() string {\n return string(s.token)\n}\n\nfunc (s *Scanner) Scan() bool {\n for {\n if s.end > s.start {\n advance, token, err := s.split(s.buf[s.start:s.end], false)\n if err != nil || !s.advance(advance) {\n return false\n }\n s.token = token\n if token != nil {\n return true\n }\n }\n if s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) {\n copy(s.buf, s.buf[s.start:s.end])\n s.end -= s.start\n s.start = 0\n }\n if s.end == len(s.buf) {\n if len(s.buf) >= s.maxTokenSize {\n return false\n }\n newSize := len(s.buf) * 2\n if newSize > s.maxTokenSize {\n newSize = s.maxTokenSize\n }\n newBuf := make([]byte, newSize)\n copy(newBuf, s.buf[s.start:s.end])\n s.buf = newBuf\n s.end -= s.start\n s.start = 0\n continue\n }\n for loop := 0; ; {\n n, _ := s.r.Read(s.buf[s.end:len(s.buf)])\n s.end += n\n if n > 0 {\n break\n }\n loop++\n if loop > 100 {\n break\n }\n }\n }\n}\n\nfunc (s *Scanner) Split(split bufio.SplitFunc) {\n s.split = split\n}\n\nvar w *bufio.Writer = bufio.NewWriter(os.Stdout)\nvar sc *Scanner = NewScanner(os.Stdin)\n\nfunc next() string { sc.Scan(); return sc.Text() }\nfunc nc() byte { sc.Scan(); return sc.Text()[0] }\n\nfunc ni32() int {\n sc.Scan()\n n, _ := strconv.Atoi(sc.Text())\n return n\n}\n\nfunc ni64() int64 {\n sc.Scan()\n n, _ := strconv.ParseInt(sc.Text(), 10, 64)\n return n\n}\n\nfunc pri32(i ...int) {\n for _, ii := range i {\n w.WriteString(strconv.Itoa(ii))\n sp()\n }\n}\nfunc pri64(i ...int64) {\n for _, ii := range i {\n w.WriteString(strconv.FormatInt(ii, 10))\n sp()\n }\n}\nfunc sp() { w.WriteByte(' ') }\nfunc endl() { w.WriteByte('\\n') }\n\nfunc main() {\n x, y := make([]int, 8), make([]int, 8)\n for i := 0; i < 8; i++ {\n x[i], y[i] = ni32(), ni32()\n }\n // for i := 0; i < 8; i++ {\n // for j := i + 1; j < 8; j++ {\n // if x[j] < x[i] || (x[j] == x[i] && y[j] < y[i]) {\n // x[i], y[i], x[j], y[j] = x[j], y[j], x[i], y[i]\n // }\n // }\n // }\n xx, yy := make([]int, 8), make([]int, 8)\n copy(xx, x)\n copy(yy, y)\n sort.Ints(xx)\n sort.Ints(yy)\n xs, ys := []int{xx[0]}, []int{yy[0]}\n for i := 1; i < 8; i++ {\n if xx[i] != xx[i-1] {\n xs = append(xs, xx[i])\n }\n if yy[i] != yy[i-1] {\n ys = append(ys, yy[i])\n }\n }\n sort.Ints(xs)\n sort.Ints(ys)\n // fmt.Println(xs, ys)\n if len(xs) != 3 || len(ys) != 3 || xs[1] <= xs[0] || xs[2] <= xs[1] || ys[1] <= ys[0] || ys[2] <= ys[1] {\n w.WriteString(\"ugly\\n\")\n w.Flush()\n return\n }\n for i := 0; i < 3; i++ {\n for j := 0; j < 3; j++ {\n ug := true\n for k := 0; k < 8; k++ {\n if x[k] == xs[i] && y[k] == ys[j] {\n ug = false\n }\n }\n if (i != 1 && j != 1 && ug) || (i == 1 && j == 1 && !ug) {\n w.WriteString(\"ugly\\n\")\n w.Flush()\n return\n }\n }\n }\n w.WriteString(\"respectable\\n\")\n w.Flush()\n}\n", "lang": "Go", "bug_code_uid": "1eb4635547e5a84554b4158ba29277ea", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "f081478c938ed1e3b54a44df627155ce", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9843260188087775, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "// 70A\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar m, n int\n\te := 1\n\tfmt.Scan(&m)\n\tfor j = 1; j <= m-1; j++ {\n\t\te = (3 * e) % 1000003\n\t}\n\tfmt.Print(e)\n}\n", "lang": "Go", "bug_code_uid": "77d8135521f60624c0a540056b7b6a36", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "7a9683edc71e6635a6ea84d2e6c70ba3", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9223770258743247, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"strconv\"\n\t\"bufio\"\n\t\"os\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tsc := NewScanner()\n\tA := sc.NextIntArray()\n\n\tfmt.Println((A[0] + A[1] + A[2]) / 3)\n\n}\nfunc abs(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}\n\ntype Scanner struct {\n\tr *bufio.Reader\n\tbuf []byte\n\tp int\n}\n\nfunc NewScanner() *Scanner {\n\trdr := bufio.NewReaderSize(os.Stdin, 1000)\n\treturn &Scanner{r:rdr}\n}\nfunc (s *Scanner) Next() string {\n\ts.pre()\n\tstart := s.p\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tbreak\n\t\t}\n\t}\n\tresult := string(s.buf[start:s.p])\n\ts.p++\n\treturn result\n}\nfunc (s *Scanner) NextLine() string {\n\ts.pre()\n\tstart := s.p\n\ts.p = len(s.buf)\n\treturn string(s.buf[start:])\n}\nfunc (s *Scanner) NextInt() int {\n\tv, _ := strconv.Atoi(s.Next())\n\treturn v\n}\n\nfunc (s *Scanner) NextIntArray() []int {\n\ts.pre()\n\tstart := s.p\n\tresult := []int{}\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\t\t\tresult = append(result, v)\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\tresult = append(result, v)\n\n\treturn result\n}\n\nfunc (s *Scanner) NextMap() map[int]bool {\n\ts.pre()\n\tstart := s.p\n\tmp := map[int]bool{}\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\t\t\tmp[v] = true\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\tmp[v] = true\n\n\treturn mp\n}\n\nfunc (s *Scanner) pre() {\n\tif s.p >= len(s.buf) {\n\t\ts.readLine()\n\t\ts.p = 0\n\t}\n}\nfunc (s *Scanner) readLine() {\n\ts.buf = make([]byte, 0)\n\tfor {\n\t\tl, p, e := s.r.ReadLine()\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\t\ts.buf = append(s.buf, l...)\n\t\tif !p {\n\t\t\tbreak\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "d9da00a439b89aebb2c9e47714f47153", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "e7b7434b862974f8a439e25243cd6133", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6619519094766619, "equal_cnt": 23, "replace_cnt": 19, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 22, "bug_source_code": "package main\n\n// https://codeforces.com/problemset/problem/723/A\n// A. The New Year: Meeting Friends\n// time limit per test\n// 1 second\n// memory limit per test\n// 256 megabytes\n// input\n// standard input\n// output\n// standard output\n\n// There are three friend living on the straight line Ox in Lineland. The first friend lives at the point x1, the second friend lives at the point x2, and the third friend lives at the point x3. They plan to celebrate the New Year together, so they need to meet at one point. What is the minimum total distance they have to travel in order to meet at some point and celebrate the New Year?\n\n// It's guaranteed that the optimal answer is always integer.\n// Input\n\n// The first line of the input contains three distinct integers x1, x2 and x3 (1 ≤ x1, x2, x3 ≤ 100) — the coordinates of the houses of the first, the second and the third friends respectively.\n// Output\n\n// Print one integer — the minimum total distance the friends need to travel in order to meet together.\n\nimport (\n \"bufio\"\n \"fmt\"\n \"os\"\n)\n\nfunc main() {\n bufStdin := bufio.NewReader(os.Stdin)\n \n \n // the point at which the first would like to meet is is the midpoint\n // the midpoint of 2 points on a line is (p1+p2)/2\n // similarly, the midpoint of 3 points on a line is (p1+p2+p3)/3\n // in general, the midpoint of n points on a line is (p1+p2+...+pn)/n\n \n var x1, x2, x3 int\n _, _ = fmt.Fscan(bufStdin, &x1, &x2, &x3)\n \n midPoint := (x1+x2+x3)/3\n \n totalDist := intAbs(x1-midPoint) + intAbs(x2-midPoint) + intAbs(x3-midPoint)\n \n _, _ = fmt.Print(totalDist)\n}\n\nfunc intAbs(v int) int {\n if v < 0 {\n return -v\n }\n return v\n}", "lang": "Go", "bug_code_uid": "21e217580dc86e3df1a1884d7020c179", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "3ed309d57b8866f6e6356827cc66e00a", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5612153708668454, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc max(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc abs(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}\n\n// https://codeforces.com/problemset/problem/723/A\n// комментарии к решению\n// Оптимальная точка встречи - это среднее векторов (в нашем случае одномерных).\nfunc taskSolution(a, b, c int) int {\n\tmid := (a + b + c) / 3\n\tans := abs(mid-a) + abs(mid-b) + abs(mid-c)\n\treturn ans\n}\n\nfunc main() {\n\tvar x1, x2, x3 int\n\tif _, err := fmt.Scan(&x1, &x2, &x3); err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(taskSolution(x1, x2, x3))\n}\n", "lang": "Go", "bug_code_uid": "afd0af4a59f4e01f919de2ea184508e0", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "8b75b1f46842968cf8a9894de8d65bab", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8849230769230769, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"math\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n)\n\nfunc main() {\n\tb, _ := ioutil.ReadAll(os.Stdin)\n\tif len(b) == 0 {\n\t\ttest()\n\t} else {\n\t\tsolve(bytes.NewReader(b), os.Stdout)\n\t}\n}\n\nfunc solve(r io.Reader, w io.Writer) {\n\tvar n int64\n\tfmt.Fscanln(r, &n)\n\tfmt.Fprintln(w, int(math.Ceil(math.Log2(float64(n)))))\n}\n\nfunc test() {\n\ttests := []struct {\n\t\tin string\n\t\twant string\n\t}{\n\t\t{in: `2`, want: `1`},\n\t\t{in: `3`, want: `2`},\n\t\t{in: `4`, want: `2`},\n\t\t{in: `5`, want: `3`},\n\t\t{in: `6`, want: `3`},\n\t\t{in: `7`, want: `3`},\n\t\t{in: `8`, want: `3`},\n\t\t{in: `9`, want: `4`},\n\t\t{in: `10`, want: `4`},\n\t\t{in: `10000000`, want: `24`},\n\t}\n\tfor i, tt := range tests {\n\t\tfmt.Printf(\"=== TEST %d\\n\", i)\n\t\tbuf := new(bytes.Buffer)\n\t\tsolve(strings.NewReader(chomp(tt.in)), buf)\n\t\tif got, want := chomp(buf.String()), chomp(tt.want); got != want {\n\t\t\tfmt.Printf(\"%d: got %v, want %v\\n\", i, got, want)\n\t\t}\n\t}\n}\n\nfunc chomp(s string) string {\n\treturn strings.Trim(s, \"\\n\")\n}\n\nfunc assert(b bool) {\n\tif !b {\n\t\t_, file, line, ok := runtime.Caller(1)\n\t\tif ok {\n\t\t\tf, _ := os.Open(file)\n\t\t\tdefer f.Close()\n\t\t\ts := bufio.NewScanner(f)\n\t\t\tlnum := 0\n\t\t\tfor s.Scan() {\n\t\t\t\tlnum++\n\t\t\t\tif lnum == line {\n\t\t\t\t\twd, _ := os.Getwd()\n\t\t\t\t\tfname, _ := filepath.Rel(wd, file)\n\t\t\t\t\tfmt.Printf(\"assertion fails: %s:%d: %v\\n\", fname, line, s.Text())\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc pow(a, b int) int {\n\tr := 1\n\tfor i := 0; i < b; i++ {\n\t\tr *= a\n\t}\n\treturn r\n}\n", "lang": "Go", "bug_code_uid": "b9c79d684a255b36a5412e89a1a0bb36", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "e3b8e3e8249712385c614a18b4c89e95", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9683313032886723, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n \"bufio\"\n \"os\"\n \"fmt\"\n \"strings\"\n \"strconv\"\n \"sort\"\n )\n \n \nfunc main() {\n stin := bufio.NewScanner(os.Stdin)\n stin.Scan()\n ns,_ := strconv.ParseInt(stin.Text(), 10, 32)\n n := int(ns)\n stin.Scan()\n ss := strings.Fields(stin.Text())\n var a []int\n for i := 0; i < n; i++ {\n q,_ := strconv.ParseInt(ss[i], 10, 32)\n a = append(a, int(q))\n }\n sort.Sort(sort.Reverse(sort.IntSlice(a)))\n \n var totalLength int64 = int64(a[0])\n for i := 1; i < n; i++ {\n if a[i] == a[i-1] {\n for j := i; j < n && a[j] == a[i-1]; j++ {\n a[j] -= 1\n }\n }\n totalLength += int64(a[i])\n }\n fmt.Printf(\"%v\", totalLength)\n}", "lang": "Go", "bug_code_uid": "b31bdd1979ce8cc03cc524f1fb11e293", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "285aff0642ebff1899ad7feea1cea8f2", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9634146341463414, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tvar n int\n\tif _, err := fmt.Scanf(\"%d\\n\", &n); err != nil {\n\t\treturn\n\t}\n\n\ta := make([]int, n)\n\tscanner := bufio.NewScanner(os.Stdin)\n\tscanner.Split(bufio.ScanWords)\n\tfor i := 0; i < n && scanner.Scan(); i++ {\n\t\t_a, err := strconv.Atoi(scanner.Text())\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\ta[i] = _a\n\t}\n\n\tbubble_sort(a, n)\n\n\tlength := int64(a[0])\n\tfor i := 1; i < n; i++ {\n\t\tif a[i] <= 0 {\n\t\t\tbreak\n\t\t}\n\t\tif a[i] >= a[i-1] {\n\t\t\ta[i] = a[i-1] - 1\n\t\t}\n\t\tlength += int64(a[i])\n\t}\n\tfmt.Println(length)\n}\n\nfunc swap(a, b int, array []int) {\n\tarray[a], array[b] = array[b], array[a]\n}\n\nfunc bubble_sort(array []int, length int) {\n\tfor i := 0; i < length; i++ {\n\t\tfor j := 0; j < length; j++ {\n\t\t\tif array[i] > array[j] {\n\t\t\t\tswap(i, j, array)\n\t\t\t}\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "8af674a7e89d11cef79c09cc0f7a12c6", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "8f8de3dc82de533536e96b8664f049e7", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.8625393494228751, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"sort\"\n)\n\nvar (\n\tin = bufio.NewReader(os.Stdin)\n\tout = bufio.NewWriter(os.Stdout)\n)\n\nfunc main() {\n\tdefer out.Flush()\n\tvar n int\n\tfmt.Fscan(in, &n)\n\ta := make([]int, n)\n\tfor i := range a {\n\t\tfmt.Fscan(in, &a[i])\n\t}\n\tsort.Ints(a)\n\tans := int64(0)\n\tmax := a[n-1] + 1\n\tfor i := n - 1; i >= 0; i-- {\n\t\tif a[i] == max {\n\t\t\tmax = a[i] - 1\n\t\t} else {\n\t\t\tmax = a[i]\n\t\t}\n\t\tans += int64(max)\n\t}\n\tfmt.Fprintln(out, ans)\n}\n", "lang": "Go", "bug_code_uid": "c7732ac9440887179c4a7f047f86fb74", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "0150b99c788315c3ca3f77bffe0c53e1", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9954337899543378, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\n//import \"strings\"\n\n//import \"math\"\n//import \"strconv\"\n//import \"sort\"\n\nfunc main() {\n\n\tstr := \"hello\"\n\n\td := \"\"\n\n\tfmt.Scan(&d)\n\n\tcur := 0\n\n\tfor i := 0; i < len(d); i++ {\n\n\t\tif str[cur] == d[i] {\n\t\t\tcur++\n\t\t}\n\t\tif cur == 4 {\n\t\t\tfmt.Println(\"YES\")\n\t\t\tos.Exit(0)\n\t\t}\n\t}\n\tfmt.Println(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "358503f2c97d9c5260f05e00ec528e14", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "985133e0424843bc937f52a136d3edd5", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5389344262295082, "equal_cnt": 11, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// INPUT\n// ahhellllloou -> YES\n// hlelo -> NO\n// helhcludoo -> YES\n\nfunc main() {\n\tvar word, wholeWord string\n\n\tfmt.Scanf(\"%v\", &word)\n\n\tfor _, char := range word {\n\t\tif wholeWord == \"\" || !strings.Contains(wholeWord, string(char)) && (char == 'h' || char == 'e' || char == 'l' || char == 'o') {\n\t\t\twholeWord += string(char)\n\t\t}\n\t}\n\n\tif strings.Contains(wholeWord, \"helo\") {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "70aa9a26c7883a3bc73bc7e80f967502", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "eab210376ba751937de58d19fc0e79a0", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.3253493013972056, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport \"fmt\"\nimport \"strings\"\n\nfunc foo(s string) bool {\n\tvar i int\n\tif i = strings.Index(s, \"h\"); i == -1 {\n\t\treturn false\n\t}\n\tif i = strings.Index(s, \"e\"); i == -1 {\n\t\treturn false\n\t}\n\tif i = strings.Index(s, \"l\"); i == -1 {\n\t\treturn false\n\t}\n\tif i = strings.Index(s, \"l\"); i == -1 {\n\t\treturn false\n\t}\n\tif i = strings.Index(s, \"o\"); i == -1 {\n\t\treturn false\n\t}\n\treturn true\n}\n\nfunc main() {\n\tvar s string\n\tfmt.Scan(&s)\n\tif foo(s) {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "f0f0eb5615ed383d3687b569fc58e370", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "e4e86da0d48165d331b8f941d5e64505", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8307291666666666, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\ts, _ := reader.ReadString('\\n')\n\tgoal := \"hello\"\n\tstate := 0\n\tgood := false\n\tfor i := 0; i < len(s); i++ {\n\t\tif state == len(goal)-1 {\n\t\t\tgood = true\n\t\t\tbreak\n\t\t}\n\n\t\tif s[i] == goal[state] {\n\t\t\tstate++\n\t\t}\n\t}\n\n\tif good {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\n\t}\n}\n", "lang": "Go", "bug_code_uid": "4ff7eed27471191edac8d178abf98853", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "f2026cdbbb641630794e3e11c7e6ad1e", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9367816091954023, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n)\n\nfunc main() {\n\tvar scanner *bufio.Scanner\n\n\tscanner = bufio.NewScanner(os.Stdin)\n\n\tscanner.Scan()\n\tif err := scanner.Err(); err == nil {\n\t\tif regexp.MustCompile(\"\\\\w*[h ]+[e ]+[l ]+[l ]+[o ]+\\\\w*\").MatchString(scanner.Text()) {\n\t\t\tfmt.Println(\"YES\")\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "cfadd6a7d4e4b20e2e838c12644b5c8a", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "0368932bb00d55210c9ab0fd2c62b4c5", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7416520210896309, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"fmt\"\n)\n\ntype input struct {\n\ta string\n}\n\nfunc (c *input) Read(scanner *bufio.Scanner) {\n\tfor scanner.Scan() {\n\t\tc.a = scanner.Text()\n\t\treturn\n\t}\n\n}\n\n\n\nfunc main() {\n\tvar inp input\n\tsc := bufio.NewScanner(os.Stdin)\n\tinp.Read(sc)\n\n\tvar h, e, l, l2 bool\n\n\tfor _, b := range inp.a {\n\t\ts := string(b)\n\t\tif s == \"h\" {\n\t\t\th = true\n\t\t}\n\t\tif h && s == \"e\" {\n\t\t\te = true\n\t\t}\n\t\tif h && e && s == \"l\" {\n\t\t\tl = true\n\t\t}\n\t\tif h && e && l && s==\"l\" {\n\t\t\tl2 = true\n\t\t}\n\t\tif h && e && l && l2 && s == \"o\" {\n\t\t\tfmt.Println(\"YES\")\n\t\t\treturn \n\t\t}\n\t}\n\tfmt.Println(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "bfd27b9b79226101df17f7d60c0f2608", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "356198c2af30200e23e801b10a5f6ca5", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9938524590163934, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "/*\nChat room\ntime limit per test2 seconds\nmemory limit per test256 megabytes\ninputstandard input\noutputstandard output\nVasya has recently learned to type and log on to the Internet. He immediately entered a chat room and decided to say hello to everybody. Vasya typed the word s. It is considered that Vasya managed to say hello if several letters can be deleted from the typed word so that it resulted in the word \"hello\". For example, if Vasya types the word \"ahhellllloou\", it will be considered that he said hello, and if he types \"hlelo\", it will be considered that Vasya got misunderstood and he didn't manage to say hello. Determine whether Vasya managed to say hello by the given word s.\n\nInput\nThe first and only line contains the word s, which Vasya typed. This word consisits of small Latin letters, its length is no less that 1 and no more than 100 letters.\n\nOutput\nIf Vasya managed to say hello, print \"YES\", otherwise print \"NO\".\n\nSample test(s)\ninput\nahhellllloou\noutput\nYES\ninput\nhlelo\noutput\nNO\n*/\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar (\n\t\tS string\n\t\thello = []rune(\"hello\")\n\t)\n\tfmt.Scanf(\"%s\", &S)\n\ts := []rune(S)\n\tlens := len(s)\n\tlenHello := len(hello)\n\tif lens < lenHello {\n\t\tprintln(\"NO\")\n\t\treturn\n\t}\n\tvar i, j int\n\tfor ; i < lenHello; {\n\t\tfor ; j < lens; j++ {\n\t\t\tif s[j] == hello[i] {\n\t\t\t\ti++\n\t\t\t\tj++\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif j >= lens {\n\t\t\tbreak\n\t\t}\n\t}\n\tif i == lenHello {\n\t\tprintln(\"YES\")\n\t} else {\n\t\tprintln(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "6c741777c4f8a4e2e42723a483322ec3", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "c6aed9ed5e4a37a7677c4e9f89dfc2b7", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.854320987654321, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar word string\n\tfmt.Scan(&word)\n\n\tc := []byte{'h', 'e', 'l', 'o'}\n\tcont := []int{1, 1, 2, 1}\n\tflag := 0\n\thitNum := 0\n\n\tfor i := 0; i < len(word); i++ {\n\t\tif word[i] == c[flag] {\n\t\t\thitNum += 1\n\t\t} else {\n\t\t\tif hitNum < cont[flag] {\n\t\t\t\tflag = 0\n\t\t\t} else {\n\t\t\t\tflag += 1\n\t\t\t\ti--\n\t\t\t}\n\t\t\thitNum = 0\n\t\t}\n\n\t\tif flag >= len(c) {\n\t\t\tfmt.Print(\"YES\")\n\t\t\treturn\n\t\t}\n\t}\n\n\tfmt.Print(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "a7335b260266cba187a97e25cd3b844e", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "a14d82faf13a94fe9133c9c56168c551", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.979381443298969, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\nvar r *bufio.Reader = bufio.NewReader(os.Stdin)\nvar w *bufio.Writer = bufio.NewWriter(os.Stdout)\n\nfunc print( a ...interface{}) { fmt.Fprint(w, a...) }\nfunc scan( a ...interface{}) { fmt.Fscan(r, a...) }\n\nfunc main() {\n\tvar a string\n\tfmt.Scan(&a)\n\n\tvar h = \"hello\"\n\tvar index = 0\n\tfor i := 0; i < len(a) && index < 5; i++{\n\t\tif h[index] == a[i] {\n\t\t\tindex++\n\t\t}\n\t}\n\tif index >= 5 {\n\t\tprint(\"YES\")\n\t}else {\n\t\tprint(\"NO\")\n\t}\n}\n\n", "lang": "Go", "bug_code_uid": "d05c7d80e3d1dc8a4e7c4f08c43aea43", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "1a47488e1147722164734c0edd97299f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9520295202952029, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar line string\n\tfmt.Scan(&line)\n\n\tcount := 0\n\tfor _, c := range line {\n\t\tswitch c {\n\t\tcase 'h':\n\t\t\tcount++\n\t\tcase 'e':\n\t\t\tif count == 1 {\n\t\t\t\tcount++\n\t\t\t}\n\t\tcase 'l':\n\t\t\tif count == 2 || count == 3 {\n\t\t\t\tcount++\n\t\t\t}\n\t\tcase 'o':\n\t\t\tif count == 4 {\n\t\t\t\tcount++\n\t\t\t}\n\t\t}\n\t}\n\n\tif count == 5 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "c464f8208ace4fa11b9f1b42c8d14f47", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "ff7ab207c04ddcade0bc92bec71321ef", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5228290062667861, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\n// ahhellllloou\n\nfunc solve(s string) string {\n\ti := 0\n\tfor i < len(s) {\n\t\tif s[i] == 'h' {\n\t\t\ti++\n\t\t\tfor s[i] == 'h' {\n\t\t\t\ti++\n\t\t\t}\n\t\t\tif s[i] == 'e' {\n\t\t\t\ti++\n\t\t\t\tfor s[i] == 'e' {\n\t\t\t\t\ti++\n\t\t\t\t}\n\t\t\t\tif s[i] == 'l' {\n\t\t\t\t\ti++\n\t\t\t\t\tfor s[i] == 'l' {\n\t\t\t\t\t\ti++\n\t\t\t\t\t}\n\t\t\t\t\tif s[i] == 'o' {\n\t\t\t\t\t\ti++\n\t\t\t\t\t\tfor s[i] == 'o' {\n\t\t\t\t\t\t\treturn \"YES\"\n\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti++\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ti++\n\t\t\t}\n\t\t} else {\n\t\t\ti++\n\t\t}\n\t}\n\treturn \"NO\"\n}\n\nfunc main() {\n\tvar s string\n\tfmt.Scanln(&s)\n\tsol := solve(s)\n\tfmt.Println(sol)\n}\n", "lang": "Go", "bug_code_uid": "076c304e1e93ca78f7c4c3f859670804", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "763b4391ad2ec552eb24306fad6c2a8f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8872180451127819, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar s string\n\tfmt.Scan(&s)\n\thi := \"hello\"\n\tans := false\n\tj := 0\n\tfor i := 0; i < len(s); i++ {\n\t\tif s[i] == hi[j] {\n\t\t\tj += 1\n\t\t}\n\t\tif j == len(hi) {\n\t\t\tans = true\n\t\t\tbreak\n\t\t}\n\t}\n\tfmt.Println(ans)\n}\n", "lang": "Go", "bug_code_uid": "27ce5b84dd108fb633d606bbcfedba0c", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "be83def7d2d6f4b160ddf20cfe1ab79b", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9955849889624724, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tscanner := bufio.NewScanner(os.Stdin)\n\tscanner.Split(bufio.ScanRunes)\n\texpected := []rune{'h', 'e', 'l', 'l', 'o'}\n\tfor scanner.Scan() {\n\t\tb := scanner.Text()\n\t\tbr := rune(b[0])\n\t\tif br == expected[0] {\n\t\t\tif len(expected) == 1 {\n\t\t\t\texpected = expected[:]\n\t\t\t\tbreak\n\t\t\t}\n\t\t\texpected = expected[1:]\n\t\t}\n\t}\n\tif len(expected) == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println((\"NO\"))\n\t}\n}\n", "lang": "Go", "bug_code_uid": "f52d44ad1f3b7d0ef0fbded36c45c978", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "74d942dcf9e0bf4b8af9ecc8e290c2f5", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9984939759036144, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar s, s2 string\n\tvar tmp int\n\tvar flag bool\n\tfmt.Scanf(\"%s\", &s)\n\tfor i := range s {\n\t\tif tmp == 0 {\n\t\t\tif s[i] == 'h' {\n\t\t\t\ts2 = s2 + string(s[i])\n\t\t\t\ttmp++\n\t\t\t}\n\t\t} else if tmp == 1 {\n\t\t\tif s[i] == 'e' {\n\t\t\t\ts2 = s2 + string(s[i])\n\t\t\t\ttmp++\n\t\t\t}\n\t\t} else if tmp == 2 {\n\t\t\tif s[i] == 'l' {\n\t\t\t\ts2 = s2 + string(s[i])\n\t\t\t\ttmp++\n\t\t\t}\n\t\t} else if tmp == 3 {\n\t\t\tif s[i] == 'l' {\n\t\t\t\ts2 = s2 + string(s[i])\n\t\t\t\ttmp++\n\t\t\t}\n\t\t} else if tmp == 4 {\n\t\t\tif s[i] == 'l' {\n\t\t\t\ts2 = s2 + string(s[i])\n\t\t\t\ttmp++\n\t\t\t}\n\t\t}\n\t\tif tmp == 5 {\n\t\t\tflag = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif flag {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "754e2abbea2f5520babedbeaa912ad1e", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "0ff9d185aa237e5086fc798ceea1e2ce", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9992800575953924, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n)\n\n//========== Implement Algorithm =======================\nfunc solution(str string) bool {\n\tif len(str) < 6 {\n\t\treturn false\n\t}\n\th := false\n\te := false\n\tl := false\n\to := false\n\tlcount := 0\n\tfor x := 0; x < len(str); x++ {\n\t\tif h && e && l && o {\n\t\t\treturn true\n\t\t}\n\n\t\tif string(str[x]) == \"h\" {\n\t\t\th = true\n\t\t} else if string(str[x]) == \"e\" && h {\n\t\t\te = true\n\t\t} else if string(str[x]) == \"l\" && h && e {\n\t\t\tlcount++\n\t\t\tif lcount == 2 {\n\t\t\t\tl = true\n\t\t\t}\n\n\t\t} else if string(str[x]) == \"o\" && h && e && l {\n\t\t\to = true\n\t\t}\n\t}\n\n\treturn h && e && l && o\n}\n\nfunc main() {\n\n\tscanner := bufio.NewScanner(os.Stdin)\n\n\t//================== Variables used ====================\n\tvar str string\n\tvar ret bool\n\t//======================================================\n\n\t//============== Get return value from File ============\n\tif len(os.Args) >= 2 {\n\n\t\tfile, err := os.Open(os.Args[1])\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"failed opening file: %s\", err)\n\t\t}\n\t\tscanner = bufio.NewScanner(file)\n\t\tdefer file.Close()\n\n\t}\n\tscanner.Split(bufio.ScanWords)\n\t//======================= I/O ==========================\n\tscanner.Scan()\n\tstr = scanner.Text()\n\t//======================================================\n\tret = solution(str)\n\t//==================== OUTPUT ==========================\n\tif ret {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "93a9f96d4067353f5b625666334fe626", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "dc7149448f8a54e814aa90e62df62104", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9909649439826527, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n)\n\n//========== Implement Algorithm =======================\nfunc solution(str string) bool {\n\tif len(str) < 6 {\n\t\treturn false\n\t}\n\th := false\n\te := false\n\tl := false\n\to := false\n\tlcount := 0\n\tfor x := 0; x <= len(str); x++ {\n\t\tif h && e && l && o {\n\t\t\treturn true\n\t\t}\n\t\tif string(str[x]) == \"h\" {\n\t\t\th = true\n\t\t} else if string(str[x]) == \"e\" && h {\n\t\t\te = true\n\t\t} else if string(str[x]) == \"l\" && h && e {\n\t\t\tlcount++\n\t\t\tif lcount == 2 {\n\t\t\t\tl = true\n\t\t\t}\n\n\t\t} else if string(str[x]) == \"o\" && h && e && l {\n\t\t\to = true\n\t\t}\n\t}\n\n\treturn false\n}\n\nfunc main() {\n\n\tscanner := bufio.NewScanner(os.Stdin)\n\n\t//================== Variables used ====================\n\tvar str string\n\tvar ret bool\n\t//======================================================\n\n\t//============== Get return value from File ============\n\tif len(os.Args) >= 2 {\n\n\t\tfile, err := os.Open(os.Args[1])\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"failed opening file: %s\", err)\n\t\t}\n\t\tscanner = bufio.NewScanner(file)\n\t\tdefer file.Close()\n\n\t}\n\tscanner.Split(bufio.ScanWords)\n\t//======================= I/O ==========================\n\tscanner.Scan()\n\tstr = scanner.Text()\n\t//======================================================\n\tret = solution(str)\n\t//==================== OUTPUT ==========================\n\tif ret {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "5a7e04b2563c0d3db87e6e4b51d4216b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "dc7149448f8a54e814aa90e62df62104", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9728331177231565, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\"fmt\")\n\nfunc main(){\n\tvar line string\n\tb := \"hello\"\n\tscan(&line)\n\tp := 0\n\tfor i := 0; i < len(line); i++{\n\t\tif line[i] == b[p] && p < 4 {p++}\n\t}\n\tif p == 4 {\n\t\tsout(\"YES\")\n\t}else{\n\t\tsout(\"NO\")\n\t}\n}\n\nfunc scan(in ... interface{}){\n\tfor _,k := range in{\n\t\tfmt.Scan(k)\n\t}\n}\n\nfunc sout(obj ... interface{}){\n\tfor _, k := range obj{\n\t\tfmt.Print(k)\n\t}\n\t//fmt.Println()\n}\n", "lang": "Go", "bug_code_uid": "c3bb9d0b79693088affca52d38535d1d", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "80afcd3a671aefcbb1860323355aacc9", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9985401459854014, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var s string\n word := \"hello\"\n var count, l int\n l = 4\n fmt.Scanf(\"%s\", &s)\n\n for i:=0; i < len(s); i++ {\n if (s[i] == word[count]) {\n count++ \n } \n if(count > l) {\n break\n }\n }\n\n if(count >= l) {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}\n", "lang": "Go", "bug_code_uid": "b209b3871b1bd4b4459bb9290b9714a0", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "1936ae482c07c5b55d52e79889ffd3a2", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9320754716981132, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar s []byte\n\tfmt.Scan(&s)\n\ti, h, ello := 0, byte('h'), []byte{'e', 'l', 'l', 'o'}\n\tfor _, b := range s {\n\t\tif h == b {\n\t\t\tif i == 3 {\n\t\t\t\tfmt.Print(\"YES\")\n\t\t\t\treturn\n\t\t\t}\n\t\t\th = ello[i]\n\t\t\ti++\n\t\t}\n\t}\n\tfmt.Print(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "c269ce5c9db89aa190a9e594beefce04", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "fa6f0f266091e00d2dc23023bcadb0f7", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7675350701402806, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport \"fmt\"\nimport \"bytes\"\nimport \"io/ioutil\"\nimport \"os\"\n\nfunc task_solution(line []byte) string {\n\tsubstr := []byte{'h', 'e', 'l', 'l', 'o'}\n\tpos := 0\n\tfor _, c := range substr {\n\t\tfor pos < len(line) && line[pos] != c {\n\t\t\tpos += 1\n\t\t}\n\t\t// found char\n\t\tif pos < len(line) {\n\t\t\tpos += 1\n\t\t}\n\t}\n\tif pos <= len(line) {\n\t\treturn \"YES\"\n\t}\n\treturn \"NO\"\n}\n\nfunc main() {\n\tin_raw, err := ioutil.ReadAll(os.Stdin)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(task_solution(bytes.TrimSpace(in_raw)))\n}\n", "lang": "Go", "bug_code_uid": "aacd63706369c6d53f57ee5d0687ead1", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "828ec39d5497f479db3468b6c33ae9db", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9631348285640629, "equal_cnt": 12, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n)\n\n/* solution */\n\nfunc solve() {\n\n\tx, n := readInt64(), readInt64()\n\tprimes := getPrimes(x)\n\n\tans := int64(1)\n\n\tfor i := 0; i < len(primes); i++ {\n\t\tprim := primes[i]\n\t\tp := primes[i]\n\t\tcnt := int64(0)\n\t\tfor p <= n {\n\t\t\tcnt += n / p\n\t\t\tif p > n/prim {\n\t\t\t\tp = n + 1\n\t\t\t} else {\n\t\t\t\tp *= prim\n\t\t\t}\n\t\t}\n\t\tans = fastPower(ans, prim, cnt)\n\t}\n\n\tprintInt64(ans)\n\n}\n\nfunc fastPower(ans, p, cnt int64) int64 {\n\tfor cnt > 0 {\n\t\tif cnt%2 == 1 {\n\t\t\tans = (ans * p) % 1000000007\n\t\t\tcnt--\n\t\t} else {\n\t\t\tcnt /= 2\n\t\t\tp = (p * p) % 1000000007\n\t\t}\n\t}\n\treturn ans\n}\n\nfunc getPrimes(x int64) []int64 {\n\n\tret := make([]int64, 0)\n\tret = append(ret, 2)\n\tans := make([]int64, 0)\n\tif x%2 == 0 {\n\t\tans = append(ans, 2)\n\t}\n\tfor i := int64(3); i <= x; i += 2 {\n\t\tok := true\n\t\tfor j := 1; j < len(ret); j++ {\n\t\t\tif i%ret[j] == 0 {\n\t\t\t\tok = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tret = append(ret, i)\n\t\tif x%i == 0 {\n\t\t\tans = append(ans, i)\n\t\t}\n\t\tfor x%i == 0 {\n\t\t\tx /= i\n\t\t}\n\t\tif x == 1 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn ans\n\n}\n\n/* stubs */\n\nfunc main() {\n\n\tvar f *os.File\n\tif runtime.GOROOT() == \"C:\\\\Soft\\\\Go\" {\n\t\tf, _ = os.Open(\"input.txt\")\n\t\tdefer f.Close()\n\t} else {\n\t\tf = os.Stdin\n\t}\n\n\twriter = bufio.NewWriter(os.Stdout)\n\tdefer writer.Flush()\n\n\treader = bufio.NewScanner(f)\n\n\tconst maxCapacity = 1024 * 1024\n\tbuf := make([]byte, maxCapacity)\n\treader.Buffer(buf, maxCapacity)\n\n\treader.Split(bufio.ScanWords)\n\n\tsolve()\n\n}\n\nvar reader *bufio.Scanner\nvar writer *bufio.Writer\n\nfunc read() string {\n\treader.Scan()\n\treturn reader.Text()\n}\n\nfunc readInt() int {\n\treader.Scan()\n\tret, _ := strconv.Atoi(reader.Text())\n\treturn ret\n}\n\nfunc print(s string) {\n\twriter.WriteString(s)\n\twriter.WriteString(\"\\n\")\n}\n\nfunc printInt(i int) {\n\tprint(strconv.Itoa(i))\n}\n\nfunc printInt64(i int64) {\n\tprint(strconv.FormatInt(i, 10))\n}\n\nfunc readInt64() int64 {\n\treader.Scan()\n\tret, _ := strconv.ParseInt(reader.Text(), 10, 64)\n\treturn ret\n}\n", "lang": "Go", "bug_code_uid": "ab58463b1842235720b88ee3481c5609", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "09d5479924cfee58e21ab040007268ed", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.91571072319202, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"math\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n)\n\n/* solution */\n\nfunc solve() {\n\n\tx, n := readInt64(), readInt64()\n\tprimes := getPrimes(x)\n\n\tans := int64(1)\n\n\tfor i := 0; i < len(primes); i++ {\n\t\tprim := primes[i]\n\t\tp := primes[i]\n\t\tcnt := int64(0)\n\t\tfor p <= n {\n\t\t\tcnt += n / p\n\t\t\tif p > n/prim {\n\t\t\t\tp = n + 1\n\t\t\t} else {\n\t\t\t\tp *= prim\n\t\t\t}\n\t\t}\n\t\tans = fastPower(ans, prim, cnt)\n\t}\n\n\tprintInt64(ans)\n\n}\n\nfunc fastPower(ans, p, cnt int64) int64 {\n\tfor cnt > 0 {\n\t\tif cnt%2 == 1 {\n\t\t\tans = (ans * p) % 1000000007\n\t\t\tcnt--\n\t\t} else {\n\t\t\tcnt /= 2\n\t\t\tp = (p * p) % 1000000007\n\t\t}\n\t}\n\treturn ans\n}\n\nfunc getPrimes(x int64) []int64 {\n\n\tret := make([]int64, 0)\n\tret = append(ret, 2)\n\tans := make([]int64, 0)\n\tif x%2 == 0 {\n\t\tans = append(ans, 2)\n\t}\n\tlimit := int64(math.Sqrt(float64(x))) + 1\n\tfor i := int64(3); i <= limit; i += 2 {\n\t\tok := true\n\t\tfor j := 1; j < len(ret); j++ {\n\t\t\tif i%ret[j] == 0 {\n\t\t\t\tok = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tret = append(ret, i)\n\t\tif x%i == 0 {\n\t\t\tans = append(ans, i)\n\t\t}\n\t}\n\n\tok := true\n\n\tfor j := 0; j < len(ret); j++ {\n\t\tif x%ret[j] == 0 {\n\t\t\tok = false\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif ok {\n\t\tans = append(ans, x)\n\t}\n\n\treturn ans\n\n}\n\n/* stubs */\n\nfunc main() {\n\n\tvar f *os.File\n\tif runtime.GOROOT() == \"C:\\\\Soft\\\\Go\" {\n\t\tf, _ = os.Open(\"input.txt\")\n\t\tdefer f.Close()\n\t} else {\n\t\tf = os.Stdin\n\t}\n\n\twriter = bufio.NewWriter(os.Stdout)\n\tdefer writer.Flush()\n\n\treader = bufio.NewScanner(f)\n\n\tconst maxCapacity = 1024 * 1024\n\tbuf := make([]byte, maxCapacity)\n\treader.Buffer(buf, maxCapacity)\n\n\treader.Split(bufio.ScanWords)\n\n\tsolve()\n\n}\n\nvar reader *bufio.Scanner\nvar writer *bufio.Writer\n\nfunc read() string {\n\treader.Scan()\n\treturn reader.Text()\n}\n\nfunc readInt() int {\n\treader.Scan()\n\tret, _ := strconv.Atoi(reader.Text())\n\treturn ret\n}\n\nfunc print(s string) {\n\twriter.WriteString(s)\n\twriter.WriteString(\"\\n\")\n}\n\nfunc printInt(i int) {\n\tprint(strconv.Itoa(i))\n}\n\nfunc printInt64(i int64) {\n\tprint(strconv.FormatInt(i, 10))\n}\n\nfunc readInt64() int64 {\n\treader.Scan()\n\tret, _ := strconv.ParseInt(reader.Text(), 10, 64)\n\treturn ret\n}\n", "lang": "Go", "bug_code_uid": "c944193334210a13fa379122f8307130", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "09d5479924cfee58e21ab040007268ed", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9777637264200654, "equal_cnt": 23, "replace_cnt": 8, "delete_cnt": 4, "insert_cnt": 10, "fix_ops_cnt": 22, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n)\n\n/*********** I/O ***********/\n\nvar (\n\t// ReadString returns a WORD string.\n\tReadString func() string\n\tstdout *bufio.Writer\n)\n\nfunc init() {\n\tReadString = newReadString(os.Stdin)\n\tstdout = bufio.NewWriter(os.Stdout)\n}\n\nfunc newReadString(ior io.Reader) func() string {\n\tr := bufio.NewScanner(ior)\n\t// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder\n\tr.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces\n\t// Split sets the split function for the Scanner. The default split function is ScanLines.\n\t// Split panics if it is called after scanning has started.\n\tr.Split(bufio.ScanWords)\n\n\treturn func() string {\n\t\tif !r.Scan() {\n\t\t\tpanic(\"Scan failed\")\n\t\t}\n\t\treturn r.Text()\n\t}\n}\n\n// ReadInt returns an integer.\nfunc ReadInt() int {\n\treturn int(readInt64())\n}\nfunc ReadInt2() (int, int) {\n\treturn int(readInt64()), int(readInt64())\n}\nfunc ReadInt3() (int, int, int) {\n\treturn int(readInt64()), int(readInt64()), int(readInt64())\n}\nfunc ReadInt4() (int, int, int, int) {\n\treturn int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())\n}\n\n// ReadInt64 returns as integer as int64.\nfunc ReadInt64() int64 {\n\treturn readInt64()\n}\nfunc ReadInt64_2() (int64, int64) {\n\treturn readInt64(), readInt64()\n}\nfunc ReadInt64_3() (int64, int64, int64) {\n\treturn readInt64(), readInt64(), readInt64()\n}\nfunc ReadInt64_4() (int64, int64, int64, int64) {\n\treturn readInt64(), readInt64(), readInt64(), readInt64()\n}\n\nfunc readInt64() int64 {\n\ti, err := strconv.ParseInt(ReadString(), 0, 64)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn i\n}\n\n// ReadIntSlice returns an integer slice that has n integers.\nfunc ReadIntSlice(n int) []int {\n\tb := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadInt()\n\t}\n\treturn b\n}\n\n// ReadInt64Slice returns as int64 slice that has n integers.\nfunc ReadInt64Slice(n int) []int64 {\n\tb := make([]int64, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadInt64()\n\t}\n\treturn b\n}\n\n// ReadFloat64 returns an float64.\nfunc ReadFloat64() float64 {\n\treturn float64(readFloat64())\n}\n\nfunc readFloat64() float64 {\n\tf, err := strconv.ParseFloat(ReadString(), 64)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\treturn f\n}\n\n// ReadFloatSlice returns an float64 slice that has n float64.\nfunc ReadFloat64Slice(n int) []float64 {\n\tb := make([]float64, n)\n\tfor i := 0; i < n; i++ {\n\t\tb[i] = ReadFloat64()\n\t}\n\treturn b\n}\n\n// ReadRuneSlice returns a rune slice.\nfunc ReadRuneSlice() []rune {\n\treturn []rune(ReadString())\n}\n\n/*********** Debugging ***********/\n\n// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.\n// For debugging use.\nfunc ZeroPaddingRuneSlice(n, digitsNum int) []rune {\n\tsn := fmt.Sprintf(\"%b\", n)\n\n\tresidualLength := digitsNum - len(sn)\n\tif residualLength <= 0 {\n\t\treturn []rune(sn)\n\t}\n\n\tzeros := make([]rune, residualLength)\n\tfor i := 0; i < len(zeros); i++ {\n\t\tzeros[i] = '0'\n\t}\n\n\tres := []rune{}\n\tres = append(res, zeros...)\n\tres = append(res, []rune(sn)...)\n\n\treturn res\n}\n\n/*********** DP sub-functions ***********/\n\n// ChMin accepts a pointer of integer and a target value.\n// If target value is SMALLER than the first argument,\n//\tthen the first argument will be updated by the second argument.\nfunc ChMin(updatedValue *int, target int) bool {\n\tif *updatedValue > target {\n\t\t*updatedValue = target\n\t\treturn true\n\t}\n\treturn false\n}\n\n// ChMax accepts a pointer of integer and a target value.\n// If target value is LARGER than the first argument,\n//\tthen the first argument will be updated by the second argument.\nfunc ChMax(updatedValue *int, target int) bool {\n\tif *updatedValue < target {\n\t\t*updatedValue = target\n\t\treturn true\n\t}\n\treturn false\n}\n\n// NthBit returns nth bit value of an argument.\n// n starts from 0.\nfunc NthBit(num, nth int) int {\n\treturn num >> uint(nth) & 1\n}\n\n// OnBit returns the integer that has nth ON bit.\n// If an argument has nth ON bit, OnBit returns the argument.\nfunc OnBit(num, nth int) int {\n\treturn num | (1 << uint(nth))\n}\n\n// OffBit returns the integer that has nth OFF bit.\n// If an argument has nth OFF bit, OffBit returns the argument.\nfunc OffBit(num, nth int) int {\n\treturn num & ^(1 << uint(nth))\n}\n\n// PopCount returns the number of ON bit of an argument.\nfunc PopCount(num int) int {\n\tres := 0\n\n\tfor i := 0; i < 70; i++ {\n\t\tif ((num >> uint(i)) & 1) == 1 {\n\t\t\tres++\n\t\t}\n\t}\n\n\treturn res\n}\n\n/*********** Arithmetic ***********/\n\n// Max returns the max integer among input set.\n// This function needs at least 1 argument (no argument causes panic).\nfunc Max(integers ...int) int {\n\tm := integers[0]\n\tfor i, integer := range integers {\n\t\tif i == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif m < integer {\n\t\t\tm = integer\n\t\t}\n\t}\n\treturn m\n}\n\n// Min returns the min integer among input set.\n// This function needs at least 1 argument (no argument causes panic).\nfunc Min(integers ...int) int {\n\tm := integers[0]\n\tfor i, integer := range integers {\n\t\tif i == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tif m > integer {\n\t\t\tm = integer\n\t\t}\n\t}\n\treturn m\n}\n\n// DigitSum returns digit sum of a decimal number.\n// DigitSum only accept a positive integer.\nfunc DigitSum(n int) int {\n\tif n < 0 {\n\t\treturn -1\n\t}\n\n\tres := 0\n\n\tfor n > 0 {\n\t\tres += n % 10\n\t\tn /= 10\n\t}\n\n\treturn res\n}\n\n// DigitNumOfDecimal returns digits number of n.\n// n is non negative number.\nfunc DigitNumOfDecimal(n int) int {\n\tres := 0\n\n\tfor n > 0 {\n\t\tn /= 10\n\t\tres++\n\t}\n\n\treturn res\n}\n\n// Sum returns multiple integers sum.\nfunc Sum(integers ...int) int {\n\ts := 0\n\n\tfor _, i := range integers {\n\t\ts += i\n\t}\n\n\treturn s\n}\n\n// Kiriage returns Ceil(a/b)\n// a >= 0, b > 0\nfunc Kiriage(a, b int) int {\n\treturn (a + (b - 1)) / b\n}\n\n// AbsInt is integer version of math.Abs\nfunc AbsInt(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}\n\n// Gcd returns the Greatest Common Divisor of two natural numbers.\n// Gcd only accepts two natural numbers (a, b >= 1).\n// 0 or negative number causes panic.\n// Gcd uses the Euclidean Algorithm.\nfunc Gcd(a, b int) int {\n\tif a <= 0 || b <= 0 {\n\t\tpanic(errors.New(\"[argument error]: Gcd only accepts two NATURAL numbers\"))\n\t}\n\tif a < b {\n\t\ta, b = b, a\n\t}\n\n\t// Euclidean Algorithm\n\tfor b > 0 {\n\t\tdiv := a % b\n\t\ta, b = b, div\n\t}\n\n\treturn a\n}\n\n// Lcm returns the Least Common Multiple of two natural numbers.\n// Lcd only accepts two natural numbers (a, b >= 1).\n// 0 or negative number causes panic.\n// Lcd uses the Euclidean Algorithm indirectly.\nfunc Lcm(a, b int) int {\n\tif a <= 0 || b <= 0 {\n\t\tpanic(errors.New(\"[argument error]: Gcd only accepts two NATURAL numbers\"))\n\t}\n\n\t// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2\n\t// a' and b' are relatively prime numbers\n\t// gcd consists of prime numbers, that are included in a and b\n\tgcd := Gcd(a, b)\n\n\t// not (a * b / gcd), because of reducing a probability of overflow\n\treturn (a / gcd) * b\n}\n\n// Strtoi is a wrapper of `strconv.Atoi()`.\n// If `strconv.Atoi()` returns an error, Strtoi calls panic.\nfunc Strtoi(s string) int {\n\tif i, err := strconv.Atoi(s); err != nil {\n\t\tpanic(errors.New(\"[argument error]: Strtoi only accepts integer string\"))\n\t} else {\n\t\treturn i\n\t}\n}\n\n// PrintIntsLine returns integers string delimited by a space.\nfunc PrintIntsLine(A ...int) string {\n\tres := []rune{}\n\n\tfor i := 0; i < len(A); i++ {\n\t\tstr := strconv.Itoa(A[i])\n\t\tres = append(res, []rune(str)...)\n\n\t\tif i != len(A)-1 {\n\t\t\tres = append(res, ' ')\n\t\t}\n\t}\n\n\treturn string(res)\n}\n\n/********** I/O usage **********/\n\n//str := ReadString()\n//i := ReadInt()\n//X := ReadIntSlice(n)\n//S := ReadRuneSlice()\n//a := ReadFloat64()\n//A := ReadFloat64Slice(n)\n\n//str := ZeroPaddingRuneSlice(num, 32)\n//str := PrintIntsLine(X...)\n\n/*******************************************************************/\n\nconst MOD = 1000000000 + 7\nconst ALPHABET_NUM = 26\nconst INF_INT64 = math.MaxInt64\nconst INF_BIT60 = 1 << 60\n\nvar x, n int64\n\nfunc main() {\n\tx, n = ReadInt64_2()\n\n\tmemo := TrialDivision(int(x))\n\n\tans := int64(1)\n\tfor k := range memo {\n\t\tkk := int64(k)\n\t\t// num := int64(0)\n\t\td := int64(1)\n\t\tfor {\n\t\t\td *= kk\n\t\t\tif n < d {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tnum := int64(n / d)\n\n\t\t\ttmp := modpow(kk, num, MOD)\n\t\t\tans *= tmp\n\t\t\tans %= MOD\n\t\t}\n\n\t\t// tmp := modpow(int64(k), num, MOD)\n\t\t// ans *= tmp\n\t\t// ans %= int64(MOD)\n\t}\n\n\tfmt.Println(ans % MOD)\n}\n\n// // ModInv returns $a^{-1} mod m$ by Fermat's little theorem.\n// // O(1), but C is nearly equal to 30 (when m is 1000000000+7).\n// func ModInv(a, m int) int {\n// \treturn modpow(a, m-2, m)\n// }\n\nfunc modpow(a, e, m int64) int64 {\n\tif e == 0 {\n\t\treturn 1\n\t}\n\n\tif e%2 == 0 {\n\t\thalfE := e / 2\n\t\thalf := modpow(a, halfE, m)\n\t\treturn half * half % m\n\t}\n\n\treturn a * modpow(a, e-1, m) % m\n}\n\n// TrialDivision returns the result of prime factorization of integer N.\nfunc TrialDivision(n int) map[int]int {\n\tif n <= 1 {\n\t\tpanic(errors.New(\"[argument error]: TrialDivision only accepts a NATURAL number\"))\n\t}\n\n\tp := map[int]int{}\n\tfor i := 2; i*i <= n; i++ {\n\t\texp := 0\n\t\tfor n%i == 0 {\n\t\t\texp++\n\t\t\tn /= i\n\t\t}\n\n\t\tif exp == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tp[i] = exp\n\t}\n\tif n > 1 {\n\t\tp[n] = 1\n\t}\n\n\treturn p\n}\n\n// PowInt is integer version of math.Pow\n// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).\nfunc PowInt(a, e int64) int64 {\n\tif a < 0 || e < 0 {\n\t\tpanic(errors.New(\"[argument error]: PowInt does not accept negative integers\"))\n\t}\n\n\tif e == 0 {\n\t\treturn 1\n\t}\n\n\tif e%2 == 0 {\n\t\thalfE := e / 2\n\t\thalf := PowInt(a, halfE)\n\t\treturn half * half\n\t}\n\n\treturn a * PowInt(a, e-1)\n}\n\n// MODはとったか?\n// 遷移だけじゃなくて最後の最後でちゃんと取れよ?\n\n/*******************************************************************/\n", "lang": "Go", "bug_code_uid": "6ebd84625676265deb4d83d11891af26", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "7100e46d1f31897cae3f5bc8f20b5c29", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.45819397993311034, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar r, x, y, xp, yp, steps int\n\n\tfmt.Scan(&r, &x, &y, &xp, &yp)\n\n\tdistanceSquare := (xp-x)*(xp-x) + (yp-y)*(yp-y)\n\n\tif distanceSquare%((2*r)*(2*r)) == 0 {\n\t\tsteps = int(math.Sqrt(float64(distanceSquare))) / (2 * r)\n\t} else {\n\t\tsteps = (int(math.Sqrt(float64(distanceSquare))) + 2*r) / (2 * r)\n\t}\n\n\tfmt.Println(steps)\n}\n", "lang": "Go", "bug_code_uid": "56cc4f42ab8d6d98643b1150d4e28727", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "95b00492833bd8a93c439e3394917d94", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.3840749414519906, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc gao(n int64) int64 {\n\tswitch n {\n\tcase 2:\n\t\treturn 1\n\tcase 3:\n\tcase 4:\n\t\treturn 2\n\t}\n\treturn 1 + gao(n/2+n%2)\n}\n\nfunc main() {\n\tvar n int64\n\tfmt.Scan(&n)\n\tfmt.Println(gao(n))\n}\n", "lang": "Go", "bug_code_uid": "49bfa0efb8f9c1a7d669993a52453ccf", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "d605278274c722c35a86812387a69050", "difficulty": 1600, "tags": ["dp", "combinatorics", "dfs and similar", "math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9989035087719298, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"strconv\"\n)\n\nvar scanner *bufio.Scanner\nvar writer *bufio.Writer\n\nfunc init() {\n\tscanner = bufio.NewScanner(os.Stdin)\n\tscanner.Split(bufio.ScanWords)\n\twriter = bufio.NewWriter(os.Stdout)\n}\n\nfunc nextToken() string {\n\tscanner.Scan()\n\treturn scanner.Text()\n}\n\nfunc nextInt() int {\n\tv, _ := strconv.Atoi(nextToken())\n\treturn v\n}\n\nfunc nextInt64() int64 {\n\tv, _ := strconv.ParseInt(nextToken(), 10, 64)\n\treturn v\n}\n\nfunc nextFloat() float64 {\n\tv, _ := strconv.ParseFloat(nextToken(), 64)\n\treturn v\n}\n\nfunc printInt(x int) {\n\twriter.WriteString(strconv.Itoa(x))\n}\n\nvar n int32\nvar s string\nvar a [500][500]int\n\nfunc main() {\n\tn = nextInt()\n\ts = nextToken()\n\tx, y := 250, 250\n\ta[x][y] = 1\n\tans := 0\n\tfor _, c := range s {\n\t\tswitch c {\n\t\tcase 'U':\n\t\t\ty++\n\t\tcase 'D':\n\t\t\ty--\n\t\tcase 'L':\n\t\t\tx--\n\t\tcase 'R':\n\t\t\tx++\n\t\t}\n\t\tans += a[x][y]\n\t\ta[x][y]++\n\t}\n\tprintInt(ans)\n\twriter.Flush()\n}\n", "lang": "Go", "bug_code_uid": "ac871bcad5400ee952ed6a1753ea375b", "src_uid": "7bd5521531950e2de9a7b0904353184d", "apr_id": "a2837f2362c37133551ce8f8de99ef1e", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9973890339425587, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar weight,modulo int\n\tvar flag bool\n\tfmt.Scanf(\"%d\", &weight)\n\tif weight > 0 && weight < 101 {\n\t\tfor loop := 2; loop < 101 ; loop=loop+2 {\n\t\t\tmodulo = weight - loop \n\t\t\tif modulo < 0 { break }\n\t\t\tif modulo % 2 == 0 {\n\t\t\t\tflag = true\n\t\t\t}else{\n\t\t\t\tflag = false\n\t\t\t}\n\t\t}\n\t}\n\tif flag {\n\t\tfmt.Println(\"YES\")\n\t}else{\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "68086330230a329acb6a2947954d915c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c93fb4e8335abf94278174204cfd7575", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5478991596638656, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar weight int\n\tfmt.Scanf(\"%d\", &weight)\n\tif weight > 2 {\n\t\tif (weight % 2 == 0 ) {\n\t\t\tfmt.Println(\"YES\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "7b9759b19792a23a48f98970eab11268", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c93fb4e8335abf94278174204cfd7575", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.700952380952381, "equal_cnt": 13, "replace_cnt": 3, "delete_cnt": 8, "insert_cnt": 1, "fix_ops_cnt": 12, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\tws, _ := reader.ReadString('\\n')\n\tw, _ := strconv.Atoi(strings.Trim(ws, \"\\n\"))\n\tfmt.Printf(\"%d\\n\", w)\n\tif w <= 2 {\n\t\tfmt.Println(\"NO\")\n\t} else if w%2 != 0 {\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "cd11bf98e49f85ccdc7256cbf300474a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3a31f4b1f3fbc0d8c4e6076003e5f287", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9257425742574258, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tnumber := -1\n\t_, err := fmt.Scanln(&number)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tif (number % 2) == 0 {\n\t\tfmt.Print(\"YES\")\n\t} else {\n\t\tfmt.Print(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "d6b225ddd3ffd498e17a4cc2067a487b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2256e382c78ebb6f128ec6c870008e0a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9937106918238994, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var x int\n fmt.Scanf(\"%d\",&x)\n if(x/2 == 0 && x > 2){\n fmt.Print(\"YES\\n\")\n }else{\n fmt.Print(\"NO\\n\")\n }\n}\n", "lang": "Go", "bug_code_uid": "8be60da894a01ce4af7268941d2f0ae1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "edd2cec3d5bf5e97068a52db0153fa16", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9662921348314607, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar i int\n\t_, _ = fmt.Scanf(\"%d\", &i)\n\tif (i-2) > 0 && (i - 2) % 2 != 0{\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n\n}", "lang": "Go", "bug_code_uid": "9a0714bce2f2f5397076e112d0ec7131", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d701331905d772105bc2aad019ea3dde", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9904761904761905, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar a int\n\tfmt.Scanf(\"%d\", a)\n\tif a>2 && a%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "8944adb57542367c6ba22a85031b62b9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f33d6ba893a8132ea5bde4d094b72ffa", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9864253393665159, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\ttext, _ := reader.ReadString('\\n')\n\n\tw, err := strconv.Atoi(strings.Trim(text, \"\\r\\n\"))\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\tif w%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t\treturn\n\t}\n\tfmt.Println(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "ed147290a16457a0c7591a84e48480b7", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f012c1b792587f460942f19b265a76d6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.980276134122288, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar reader *bufio.Reader = bufio.NewReader(os.Stdin)\nvar writer *bufio.Writer = bufio.NewWriter(os.Stdout)\n\nfunc printf(f string, a ...interface{}) {\n\tfmt.Fprintf(writer, f, a...)\n}\n\nfunc scanf(f string, a ...interface{}) {\n\tfmt.Fscanf(reader, f, a...)\n}\n\nfunc main() {\n\t// The weight of watermelon\n\tvar w int\n\tscanf(\"%d\\n\", &w)\n\n\tvar b bool = false\n\tif w <= 2 {\n\t\tprintf(\"NO\\n\")\n\t} else if w%2 == 0 {\n\t\tprintf(\"YES\\n\")\n\t} else {\n\t\tprintf(\"NO\\n\")\n\t}\n\n\twriter.Flush()\n}\n", "lang": "Go", "bug_code_uid": "f8aad128cb63fea87b0bc0d9fda5abbc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "07ecf7d7b6c5e24a5c61cce5674d3acf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9877049180327869, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nvar reader *bufio.Reader = bufio.NewReader(os.Stdin)\nvar writer *bufio.Writer = bufio.NewWriter(os.Stdout)\n\nfunc printf(f string, a ...interface{}) {\n\tfmt.Fprintf(writer, f, a...)\n}\n\nfunc scanf(f string, a ...interface{}) {\n\tfmt.Fscanf(reader, f, a...)\n}\n\nfunc main() {\n\t// Watermelon weight\n\tvar w int\n\tscanf(\"%d\\n\", &w)\n\n\t// Display results\n\tif w > 2 && w%2 == 0 {\n\t\tprintf(\"YES\\n\")\n\t} else if w%2 == 0 {\n\t\tprintf(\"NO\\n\")\n\t}\n\n\twriter.Flush()\n}\n", "lang": "Go", "bug_code_uid": "d723eb948d5ab5f313601bb23b8f7208", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "07ecf7d7b6c5e24a5c61cce5674d3acf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.931899641577061, "equal_cnt": 9, "replace_cnt": 0, "delete_cnt": 7, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w,a int\n\tfmt.Scan(&w)\n\tif (w%2)==0{\n\t\t\tfmt.Print(\"YES\")\n\t\t\t}\n\t\telse{\n\t\t\tfmt.Print(\"NO\")\n\t\t\t}\n\t}", "lang": "Go", "bug_code_uid": "99901557487a210ee66dd4272eabaf0f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "98d3ad5dbb6907e3ac9a80881b03e228", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9927007299270073, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w int\n\tfmt.Scan(&w)\n\tif (w%2)==0 && w>1{\n\t\tfmt.Print(\"YES\")\n\t}else{\n\t\tfmt.Print(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "0bc5fff449dbedac9ab99033bba326ca", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "98d3ad5dbb6907e3ac9a80881b03e228", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9539473684210527, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\\n\")\n\tif n % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "d2c3a87483a30125625172819f7ee083", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "045b48dc9fdecd98062e860bce83b105", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7285714285714285, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 10, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\\n\")\n\tfmt.Printf(\"%s\\n\", n % 2 == 0 ? \"YES\" : \"NO\")\n}\n", "lang": "Go", "bug_code_uid": "3f44602519da6abc475b6905ddfa6de2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "045b48dc9fdecd98062e860bce83b105", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.862934362934363, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n //\"os\"\n //\"strconv\"\n //\"io/ioutil\"\n)\n\nfunc main() {\n\nvar WKgVar uint\nvar OstatokDelVar uint = 0;\nvar Zero uint = 0;\n// var Kolvo2KgVar int = 1;\n// var ObshKgVar int = 1;\n\n// Ввод числа Килограмм.\nfmt.Scan(&WKgVar)\n// Четность, нечетность.\nOstatokDelVar = WKgVar%4;\nif WKgVar <= 100{\nif OstatokDelVar == Zero{\n\t// fmt.Println(\"Остаток от деления равен ноль\")\n\tif WKgVar >= 4{\n\t\t//fmt.Println(\"WkgVar >= 4\")\n\t\tfmt.Println(\"YES\");\n\t\t}\n\t\n}\n} else {fmt.Println(\"NO\");\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "33c5eca2310597d7025f5e0fa4c8012a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "85cde6bd2e7f5f557c5b1593d2db4b93", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.5053995680345572, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "Copy\npackage main\n\nimport (\n \"bufio\"\n \"strconv\"\n \"fmt\"\n \"os\"\n)\n\nfunc main() {\n r := bufio.NewReader(os.Stdin)\n\ts, _ := r.ReadString('\\n')\n\tn, _ := strconv.Atoi(s)\n\tif n %2 == 0 {\n\t fmt.Println(\"YES\")\n\t return\n\t}\n\tfmt.Prinln(\"NO\")\n}", "lang": "Go", "bug_code_uid": "3621890005099276b387b81f73b65498", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "23d2cb15e0e7083459654a3deb8c0baf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8835978835978836, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tvar n int\n\tfmt.Fscanf(os.Stdin, \"%d\\n\", &n)\n\tif n%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t\treturn\n\t}\n\tfmt.Println(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "93099db12e3ae8c7937033d230a54a33", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "23d2cb15e0e7083459654a3deb8c0baf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8398058252427184, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var w uint\n \n fmt.Scanf(\"%d\", &w) \n\n if (w % 2 == 0) {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "cf0adbc5bc6788b0e1df5f870078cdc0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6908f9edab0d03ce304309fffab83573", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9736842105263158, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var w uint\n \n fmt.Scanf(\"%d\", &w) \n\n if (w == 2) {\n fmt.Println(\"NO\")\n if (w % 2 == 0) {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "b97fc6ac9ff2a87e3ab8bd0ce5982a27", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6908f9edab0d03ce304309fffab83573", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9195876288659793, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n for {\n var i int\n _, err := fmt.Scanf(\"%d\", &i)\n if err != nil {fmt.Println(err)}\n if i%2 == 0 {\n fmt.Println(\"Yes\")\n }else{\n fmt.Println(\"No\")\n }\n }\n}", "lang": "Go", "bug_code_uid": "cb2a9d7c6bdc395715b7db9fcb56efb9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d202dc64b40f0daacc3a59d70ac7d3c1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9980506822612085, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n// for {\n var i int\n _, err := fmt.Scanf(\"%d\", &i)\n if err != nil {fmt.Println(err)}\n if (i%2 == 0) && (i<100) && (i>2) {\n fmt.Println(\"Yes\")\n }else{\n fmt.Println(\"No\")\n }\n// }\n}", "lang": "Go", "bug_code_uid": "4826170b462fecf8192e2820cf739a4a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d202dc64b40f0daacc3a59d70ac7d3c1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8565217391304348, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar input int64\n\tfmt.Scanln(&input)\n input -= 2\n if input % 2 == 0 {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n}\n", "lang": "Go", "bug_code_uid": "196a2d8ca9eb879d77ffea8f35a2aa98", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ee0d5bc27cf9ac57ce51452334143e1f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9930394431554525, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n \nimport (\n \"fmt\"\n \"strconv\"\n)\n \nfunc main(){\n var text string\n fmt.Scanf(\"%v\\n\", &text)\n i, _ := strconv.Atoi(text)\n if (i%2==0 i>2) {\n fmt.Println(\"YES\")\n return\n }\n fmt.Println(\"NO\")\n}", "lang": "Go", "bug_code_uid": "ec99ea5c53a752ea75b7d14c03501d87", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "de5b8abdf86f2ca4657650b31d14d987", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9788235294117648, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n \nimport (\n \"fmt\"\n \"strconv\"\n)\n \nfunc main(){\n var text string\n fmt.Scanf(text)\n i, _ := strconv.Atoi(text)\n if (i%2==0 && i>2) {\n fmt.Println(\"YES\")\n return\n }\n fmt.Println(\"NO\")\n}", "lang": "Go", "bug_code_uid": "bf504272bfc224e24a97c9a28c65b338", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "de5b8abdf86f2ca4657650b31d14d987", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9707317073170731, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n \nimport (\n \"fmt\"\n \"strconv\"\n)\n \nfunc main(){\n var i int\n fmt.Scanf(\"%d\\n\", &i)\n //i, _ := strconv.Atoi(text)\n if (i%2==0 && i>2) {\n fmt.Println(\"YES\")\n return\n }\n fmt.Println(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "9118a4970dac9b1c2a955708a6fe09f5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "de5b8abdf86f2ca4657650b31d14d987", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9993558776167472, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"bufio\"\n\t\"strconv\"\n\t\"os\"\n)\n\nvar in = bufio.NewScanner(os.Stdin)\nvar out = bufio.NewWriter(os.Stdout)\n\ntype V struct {\n\tP, Pchar, Link int\n\tNext, Walk [26]int\n}\n\nfunc (node V) String() string {\n\treturn fmt.Sprintf(\"p = %v, pchar = %v, link = %v\", node.P, node.Pchar, node.Link)\n}\n\nfunc CreateNode(p, pchar int) *V {\n\tv := &V{P:p, Pchar:pchar, Link:-1}\n\tfor i := 0; i < len(v.Next); i++ {\n\t\tv.Next[i], v.Walk[i] = -1, -1\n\t}\n\treturn v\n}\n\nfunc AddString(a string) {\n\tvar v int = 0\n\tfor i := 0; i < len(a); i++ {\n\t\tvar c int = int(a[i] - 'A')\n\t\tif tree[v].Next[c] == -1 {\n\t\t\ttree[size] = CreateNode(v, c)\n\t\t\ttree[v].Next[c] = size\n\t\t\tsize++\n\t\t}\n\t\tv = tree[v].Next[c]\n\t}\n}\n\nfunc Walk(v, c int) int {\n\tif tree[v].Walk[c] != -1 {\n\t\treturn tree[v].Walk[c]\n\t}\n\tif tree[v].Next[c] != -1 {\n\t\ttree[v].Walk[c] = tree[v].Next[c]\n\t}else {\n\t\tif v == 0 {\n\t\t\ttree[v].Walk[c] = 0\n\t\t}else {\n\t\t\ttree[v].Walk[c] = Walk(Getlink(v), c)\n\t\t}\n\t}\n\treturn tree[v].Walk[c]\n}\n\nfunc Getlink(v int) int {\n\tif tree[v].Link != -1 {\n\t\treturn tree[v].Link\n\t}\n\tif v == 0 || tree[v].P == 0 {\n\t\ttree[v].Link = 0\n\t}else {\n\t\ttree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)\n\t}\n\treturn tree[v].Link\n}\n\nfunc Dp(i, j, k int) int {\n\tif k == v {\n\t\treturn -oo\n\t}\n\tif i == n {\n\t\treturn 0\n\t}\n\tif j == m {\n\t\treturn 0\n\t}\n\n\tif dp[i][j][k] != -1 {\n\t\treturn dp[i][j][k]\n\t}\n\n\tvar ret int = -oo\n\tif a[i] == b[j] {\n\t\tvar next int = Walk(k, int(a[i] - 'A'))\n\t\tif next != v {\n\t\t\tret = Max(ret, Dp(i + 1, j + 1, next) + 1)\t\n\t\t}\n\t}\n\n\tret = Max(ret, Dp(i + 1, j, k))\n\tret = Max(ret, Dp(i, j + 1, k))\n\n\tdp[i][j][k] = ret\n\treturn ret\n}\n\nfunc Print(i, j, k int) {\n\tif i == n {\n\t\treturn\n\t}\n\tif j == m {\n\t\treturn\n\t}\n\tif a[i] == b[j] {\n\t\tvar ret, which int = Dp(i + 1, j, k), 0\n\t\tif ret < Dp(i, j + 1, k) {\n\t\t\tret, which = Dp(i, j + 1, k), 1\n\t\t}\n\t\tvar next int = Walk(v, int(a[i] - 'A'))\n\t\tif next != v {\n\t\t\tif ret <= Dp(i + 1, j + 1, next) {\n\t\t\t\tret, which = Dp(i + 1, j + 1, next), 2\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tif which == 0 {\n\t\t\tPrint(i + 1, j, k)\n\t\t}else if which == 1 {\n\t\t\tPrint(i, j + 1, k)\n\t\t}else {\n\t\t\tfmt.Fprint(out, string(a[i]))\n\t\t\tPrint(i + 1, j + 1, next)\n\t\t}\n\n\t}else {\n\t\tvar ret int = Dp(i + 1, j , k)\n\t\tif ret < Dp(i, j + 1, k) {\n\t\t\tPrint(i, j + 1, k)\n\t\t}else {\n\t\t\tPrint(i + 1, j, k)\n\t\t}\n\t}\n}\n\nconst oo = 1<<30\n\nvar n, m, v int\nvar a, b, c string\nvar size int\nvar tree [100]*V\n\nvar dp [][][]int\n\nfunc main() {\n\n\tdefer out.Flush()\n\tin.Split(bufio.ScanWords)\n\n\ta, b, c = Next(), Next(), Next()\n\tn, m, v = len(a), len(b), len(c)\n\ttree[size] = CreateNode(-1, -1)\n\tsize++\n\tAddString(c)\n\n\tdp = make([][][]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tdp[i] = make([][]int, m)\n\t\tfor j := 0; j < m; j++ {\n\t\t\tdp[i][j] = make([]int, v)\n\t\t\tfor k := 0; k < v; k++ {\n\t\t\t\tdp[i][j][k] = -1\n\t\t\t}\n\t\t}\n\t}\n\n\tvar ret int = Dp(0, 0, 0)\n\t// fmt.Fprintln(out, ret)\n\tif ret <= 0 {\n\t\tfmt.Fprintln(out, 0)\n\t}else {\n\t\tPrint(0, 0, 0)\n\t\tfmt.Fprintln(out);\n\t}\n}\n\nfunc Max(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc Next() string{\n\tif !in.Scan() {\n\t\tpanic(\"Scan error\")\n\t}\n\treturn in.Text()\n}\n\nfunc NextInt() int{\n\tret, _ := strconv.Atoi(Next())\n\treturn ret\n}", "lang": "Go", "bug_code_uid": "7beb62aae745418361ae9318a53cd4fb", "src_uid": "391c2abbe862139733fcb997ba1629b8", "apr_id": "71817a3b5d433a4fb2d0e22b85f4158a", "difficulty": 2000, "tags": ["dp", "strings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9996779388083736, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"bufio\"\n\t\"strconv\"\n\t\"os\"\n)\n\nvar in = bufio.NewScanner(os.Stdin)\nvar out = bufio.NewWriter(os.Stdout)\n\ntype V struct {\n\tP, Pchar, Link int\n\tNext, Walk [26]int\n}\n\nfunc (node V) String() string {\n\treturn fmt.Sprintf(\"p = %v, pchar = %v, link = %v\", node.P, node.Pchar, node.Link)\n}\n\nfunc CreateNode(p, pchar int) *V {\n\tv := &V{P:p, Pchar:pchar, Link:-1}\n\tfor i := 0; i < len(v.Next); i++ {\n\t\tv.Next[i], v.Walk[i] = -1, -1\n\t}\n\treturn v\n}\n\nfunc AddString(a string) {\n\tvar v int = 0\n\tfor i := 0; i < len(a); i++ {\n\t\tvar c int = int(a[i] - 'A')\n\t\tif tree[v].Next[c] == -1 {\n\t\t\ttree[size] = CreateNode(v, c)\n\t\t\ttree[v].Next[c] = size\n\t\t\tsize++\n\t\t}\n\t\tv = tree[v].Next[c]\n\t}\n}\n\nfunc Walk(v, c int) int {\n\tif tree[v].Walk[c] != -1 {\n\t\treturn tree[v].Walk[c]\n\t}\n\tif tree[v].Next[c] != -1 {\n\t\ttree[v].Walk[c] = tree[v].Next[c]\n\t}else {\n\t\tif v == 0 {\n\t\t\ttree[v].Walk[c] = 0\n\t\t}else {\n\t\t\ttree[v].Walk[c] = Walk(Getlink(v), c)\n\t\t}\n\t}\n\treturn tree[v].Walk[c]\n}\n\nfunc Getlink(v int) int {\n\tif tree[v].Link != -1 {\n\t\treturn tree[v].Link\n\t}\n\tif v == 0 || tree[v].P == 0 {\n\t\ttree[v].Link = 0\n\t}else {\n\t\ttree[v].Link = Walk(Getlink(tree[v].P), tree[v].Pchar)\n\t}\n\treturn tree[v].Link\n}\n\nfunc Dp(i, j, k int) int {\n\tif k == v {\n\t\treturn -oo\n\t}\n\tif i == n {\n\t\treturn 0\n\t}\n\tif j == m {\n\t\treturn 0\n\t}\n\n\tif dp[i][j][k] != -1 {\n\t\treturn dp[i][j][k]\n\t}\n\n\tvar ret int = -oo\n\tif a[i] == b[j] {\n\t\tvar next int = Walk(k, int(a[i] - 'A'))\n\t\tif next != v {\n\t\t\tret = Max(ret, Dp(i + 1, j + 1, next) + 1)\t\n\t\t}\n\t}\n\n\tret = Max(ret, Dp(i + 1, j, k))\n\tret = Max(ret, Dp(i, j + 1, k))\n\n\tdp[i][j][k] = ret\n\treturn ret\n}\n\nfunc Print(i, j, k int) {\n\tif i == n {\n\t\treturn\n\t}\n\tif j == m {\n\t\treturn\n\t}\n\tif a[i] == b[j] {\n\t\tvar ret, which int = Dp(i + 1, j, k), 0\n\t\tif ret < Dp(i, j + 1, k) {\n\t\t\tret, which = Dp(i, j + 1, k), 1\n\t\t}\n\t\tvar next int = Walk(v, int(a[i] - 'A'))\n\t\tif next != v {\n\t\t\tif ret <= Dp(i + 1, j + 1, next) {\n\t\t\t\tret, which = Dp(i + 1, j + 1, next), 2\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tif which == 0 {\n\t\t\tPrint(i + 1, j, k)\n\t\t}else if which == 1 {\n\t\t\tPrint(i, j + 1, k)\n\t\t}else {\n\t\t\tfmt.Fprint(out, string(a[i]))\n\t\t\tPrint(i + 1, j + 1, next)\n\t\t}\n\n\t}else {\n\t\tvar ret int = Dp(i + 1, j , k)\n\t\tif ret < Dp(i, j + 1, k) {\n\t\t\tPrint(i, j + 1, k)\n\t\t}else {\n\t\t\tPrint(i + 1, j, k)\n\t\t}\n\t}\n}\n\nconst oo = 1<<30\n\nvar n, m, v int\nvar a, b, c string\nvar size int\nvar tree [110]*V\n\nvar dp [][][]int\n\nfunc main() {\n\n\tdefer out.Flush()\n\tin.Split(bufio.ScanWords)\n\n\ta, b, c = Next(), Next(), Next()\n\tn, m, v = len(a), len(b), len(c)\n\ttree[size] = CreateNode(-1, -1)\n\tsize++\n\tAddString(c)\n\n\tdp = make([][][]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tdp[i] = make([][]int, m)\n\t\tfor j := 0; j < m; j++ {\n\t\t\tdp[i][j] = make([]int, v)\n\t\t\tfor k := 0; k < v; k++ {\n\t\t\t\tdp[i][j][k] = -1\n\t\t\t}\n\t\t}\n\t}\n\n\tvar ret int = Dp(0, 0, 0)\n\t// fmt.Fprintln(out, ret)\n\tif ret <= 0 {\n\t\tfmt.Fprintln(out, 0)\n\t}else {\n\t\tPrint(0, 0, 0)\n\t\tfmt.Fprintln(out);\n\t}\n}\n\nfunc Max(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc Next() string{\n\tif !in.Scan() {\n\t\tpanic(\"Scan error\")\n\t}\n\treturn in.Text()\n}\n\nfunc NextInt() int{\n\tret, _ := strconv.Atoi(Next())\n\treturn ret\n}", "lang": "Go", "bug_code_uid": "6bff2aba7165f4333a648afb09045077", "src_uid": "391c2abbe862139733fcb997ba1629b8", "apr_id": "71817a3b5d433a4fb2d0e22b85f4158a", "difficulty": 2000, "tags": ["dp", "strings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.997828447339848, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "// A. Vasya the Hipster\n/*\nOne day Vasya the Hipster decided to count how many socks he had. It turned out\nthat he had a red socks and b blue socks.\n\nAccording to the latest fashion, hipsters should wear the socks of different\ncolors: a red one on the left foot, a blue one on the right foot.\n\nEvery day Vasya puts on new socks in the morning and throws them away before\ngoing to bed as he doesn't want to wash them.\n\nVasya wonders, what is the maximum number of days when he can dress\nfashionable and wear different socks, and after that, for how many days he\ncan then wear the same socks until he either runs out of socks or cannot make\na single pair from the socks he's got.\n\nCan you help him?\n\nInput\nThe single line of the input contains two positive integers a and b\n(1 ≤ a, b ≤ 100) — the number of red and blue socks that Vasya's got.\n\nOutput\nPrint two space-separated integers — the maximum number of days when Vasya can\nwear different socks and the number of days when he can wear the same socks\nuntil he either runs out of socks or cannot make a single pair from the socks\nhe's got.\n\nKeep in mind that at the end of the day Vasya throws away the socks that he's\nbeen wearing on that day.\n\nExamples\nInput\n3 1\n\nOutput\n1 1\n\nInput\n2 3\n\nOutput\n2 0\n\nInput\n7 3\n\nOutput\n3 2\n\nNote\nIn the first sample Vasya can first put on one pair of different socks,\nafter that he has two red socks left to wear on the second day.\n*/\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\tinput, _ := reader.ReadString('\\n')\n\tinputArr := strings.Split(strings.TrimSpace(input), \" \")\n\ta, _ := strconv.Atoi(inputArr[0])\n\tb, _ := strconv.Atoi(inputArr[1])\n\n\to1, o2 := 0, 0\n\tif a < b {\n\t\to1 = a % b\n\t\to2 = (b - o1) / 2\n\t} else {\n\t\to1 = b % a\n\t\to2 = (a - o1) / 2\n\t}\n\tfmt.Printf(\"%v %v\", o1, o2)\n}\n", "lang": "Go", "bug_code_uid": "52717319f8a720d19629e4192bfcffea", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "5bd46ebe29c4bf665f6f659e7a42cfda", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9974895397489539, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n \nimport \"fmt\"\n\n\n\n\nfunc diff(red int,blue int) (val1 int,val2 int) {\nfor{\n if (red!=0)&&(blue!=0) {\n\t val1++\n\t\n }else{\n\t // fmt.Printf(\"the value of red and blue before being passed to same :%d %d\\n\",red,blue)\n if red>1 {\n\t val2=same(red)\n\t break\n }else if blue>1{\n\t val2=same(blue)\n\t break\n }else{\n\t break\n }\n \n}\nred--;blue--;\n}\nreturn\n}\n\nfunc main() {\n\tvar red,blue int\n\tfmt.Scan(&red)\n\tfmt.Scan(&blue)\n\tval1,val2:=diff(red,blue)\n\tfmt.Print(val1,val2)\n\t}\n\n\nfunc same(col int)(val2 int){\n\n\tfor{\n\t\t\n\t\tif col>0 {\n\t\t\tval2++\n\t\t}else{\n\t\t\treturn\n\t\t}\n\t\tcol=col-2\n\t}\n\n}", "lang": "Go", "bug_code_uid": "1907dc1deaad0892ec448e59d52daf7d", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "283a87f1e3593ed242766aa0d493f679", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9918256130790191, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n \nimport (\n\t\"fmt\"\n\t\"sort\"\n)\n \nfunc main() {\n\tvar a, b int\n\tfmt.Scan(&a, &b)\n\tsp := []int{a, b}\n\tsort.Ints(mas)\n\tk := sp[0]\n\tk2 := (sp[1] - sp[0]) / 2\n\tfmt.Println(k, k2)\n}", "lang": "Go", "bug_code_uid": "8e3724cdcee918bdefd27c57cf303ee5", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "9b96d8b5d657334009e2d82184d46cb7", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.41132075471698115, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tin := bufio.NewReader(os.Stdin)\n\tvar a, b, c, d uint8\n\tc = 0\n\td = 0\n\tfmt.Fscanf(in, \"%d %d\\n\", &a, &b)\n\tfor i := b; i > 0 && a > 0; i-- {\n\t\ta--\n\t\tb--\n\t\tc++\n\t}\n\td = a / 2\n\tfmt.Println(c, d)\n}\n", "lang": "Go", "bug_code_uid": "6ac9d52847dc61457c9e0b608203e1dc", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "c7ae9e480f3c733313907db6cff35acd", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9583333333333334, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar a, b int\n\tfmt.Scan(&a, &b)\n\tif a < b {\n\t\tfmt.Print(a, b/2)\n\t} else if b < a {\n\t\tfmt.Print(b, a/2)\n\t} else if b == a {\n\t\tfmt.Print(a, 0)\n\t}\n}\n", "lang": "Go", "bug_code_uid": "8b2b5ec15d3f1e59f0d6f4ff26cf53df", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "c9ff0b44e7c8e7800616788ba434190c", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9011553273427471, "equal_cnt": 3, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\n// Retorna slice de slices com as duplas retiradas.\nfunc possiveisJogadas(row []int, num int, x int) [][]int {\n\tduplas := make([][2]int, 0)\n\n\tfor i := 0; i+1 <= num-1; i++ {\n\t\tif row[i] == x && row[i] == row[i+1] {\n\t\t\tduplas = append(duplas, [2]int{i, i + 1})\n\t\t}\n\t}\n\n\tpossibilidades := make([][]int, len(duplas))\n\n\tfor i, v := range duplas {\n\t\tcopia := make([]int, num)\n\t\tcopy(copia, row)\n\t\tx, y := v[0], v[1]\n\n\t\tpossibilidades[i] = append(copia[:x], copia[y+1:]...)\n\n\t}\n\n\treturn possibilidades\n}\n\n// Remove um range de um array. [x, y] != [x, y)\nfunc removerElementos(row *[]int, x, y int) {\n\t*row = append((*row)[:x], (*row)[y+1:]...)\n}\n\nfunc limparRow(row []int) []int {\n\ti := 1\n\tgrupo := 1\n\tgrupoAchado := false\n\tfor {\n\t\tif i >= len(row) {\n\t\t\tif grupo >= 3 {\n\t\t\t\tremoverElementos(&row, i-grupo, i-1)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\n\t\tif row[i] == row[i-1] {\n\t\t\tgrupo++\n\t\t\tif grupo >= 3 {\n\t\t\t\tgrupoAchado = true\n\t\t\t}\n\t\t} else {\n\t\t\tif grupoAchado {\n\t\t\t\tremoverElementos(&row, i-grupo, i-1)\n\t\t\t\ti = 0\n\t\t\t\tgrupoAchado = false\n\n\t\t\t}\n\t\t\tgrupo = 1\n\t\t}\n\n\t\ti++\n\t}\n\n\treturn row\n}\n\nfunc main() {\n\t// len(row), num de cores, cor escolhida pelo player.\n\tvar num, k, x int\n\tfmt.Scan(&num, &k, &x)\n\n\t// Criar slice que representa a row.\n\trow := make([]int, num)\n\tfor i := 0; i < num; i++ {\n\t\tfmt.Scan(&row[i])\n\t}\n\n\t// Copia e algoritmos.\n\tjogadas := possiveisJogadas(row, num, x)\n\tif len(jogadas) == 0 {\n\t\tfmt.Println(0)\n\t}\n\n\tmaior := 0\n\tfor _, jogada := range jogadas {\n\t\tcont := num - len(limparRow(jogada))\n\t\tif cont > maior {\n\t\t\tmaior = cont\n\t\t}\n\t}\n\tfmt.Println(maior)\n}\n", "lang": "Go", "bug_code_uid": "b164f60c3b281bf80b22e7284679092d", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "de9da7711dea5f5a2b30759afaa2e17d", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7053490480507706, "equal_cnt": 17, "replace_cnt": 16, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 17, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc max(a, b int) int {\n if a > b {\n return a\n } else {\n return b\n }\n}\n\nfunc abs(num int) int {\n return max(num, -num)\n}\n\nfunc main() {\n var r1, c1, r2, c2 int\n fmt.Scan(r1, c1, r2, c2)\n var rook, bishop, king int\n if r1 == r2 || c1 == c2 {\n rook = 1\n } else {\n rook = 2\n }\n if (r1+c1)%2 != (r2+c2)%2 {\n bishop = 0\n } else if r1+c1 == r2+c2 || r1-c1 == r2-c2 {\n bishop = 1\n } else {\n bishop = 2\n }\n king = max(abs(r1-r2), abs(c1-c2))\n fmt.Println(rook, bishop, king)\n}", "lang": "Go", "bug_code_uid": "bc0d5b764925c6b23ba2d4b34bbc59d5", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "71295439ddc953d56978cd9c68762d3a", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9874213836477987, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\", &w)\n\tif w%2 != 0 && w == 2 {\n\t\tfmt.Println(\"NO\")\n\t}else {\n\t\tfmt.Println(\"YES\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "c23bf0fd607ae844c258112f7e664804", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5877d2196cf45c0986b42a18ff551a7f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9741568112133158, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n \"io\"\n \"strings\"\n \"bytes\"\n \"os\"\n)\n\ntype contestIn struct {\n\treader io.Reader\n}\n\ntype contestOut struct {\n\twriter io.Writer\n}\n\ntype Contest struct {\n\tIn contestIn\n\tOut contestOut\n}\n\nfunc NewSubmitContest() Contest {\n\treturn Contest{contestIn{os.Stdin}, contestOut{os.Stdout}}\n}\n\nfunc NewTestContest(testIn string, testOut *bytes.Buffer) Contest {\n\treturn Contest{contestIn{strings.NewReader(testIn)}, contestOut{testOut}}\n}\n\nfunc (in contestIn) Var(a interface{}) {\n\tfmt.Fscan(in.reader, a)\n}\n\nfunc (in contestIn) Vars(a interface{}) {\n\tfmt.Fscanln(in.reader, a)\n}\n\nfunc (in contestIn) Ints(len int) []int {\n\tarr := make([]int, 0, len)\n\tfor ; len > 0; len-- {\n\t\tvar i int\n\t\tin.Var(&i)\n\t\tarr = append(arr, i)\n\t}\n\n\treturn arr\n}\n\nfunc (out contestOut) Str(s string) {\n\tfmt.Fprintf(out.writer, \"%s\", s)\n}\n\nfunc (out contestOut) Nl() {\n\tfmt.Fprint(out.writer, \"\\n\")\n}\n\n// http://com/problemset/problem/4/A\nfunc problem(c Contest) {\n\tvar w int\n\tc.In.Var(&w)\n\n\tif w % 2 == 0 {\n\t\tc.Out.Str(\"YES\")\n\t} else {\n\t\tc.Out.Str(\"NO\")\n\t}\n\n\tc.Out.Nl()\n}\n\nfunc main() {\n\tc := NewSubmitContest()\n\tproblem(c)\n}\n", "lang": "Go", "bug_code_uid": "0df5c37199ec1648012e987ce13f4d2b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "46bcf4ab1b83a9a7a4a04847097c7977", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9090909090909091, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tvar a int\n\t//fmt.Print(\"Введите вес арбуза: \")\n\tfmt.Fscan(os.Stdin, &a)\n\tm := a%2\n\tif m == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "8c63c8563e8e6fb3c9d4c16a200a5985", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "58630fc6be3f9ca8121433495e24ac6d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9106753812636166, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n \nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n \nfunc main() {\n\tin := bufio.NewReader(os.Stdin)\n\tvar w uint8\n\tfmt.Fscanf(in, \"%d\\n\", &w)\n\t\n\tif w % 2 == 0{\n\t\tfmt.Println(\"YES\")\n\t}else{\n\t\tfmt.Println(\"NO\")\n\t}\n} \n", "lang": "Go", "bug_code_uid": "c6855e3fc096600628165187db067c33", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9db243d4e83a6016add715cf6f920ed2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9700598802395209, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n \nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"math\"\n)\n \nfunc main() {\n\tin := bufio.NewReader(os.Stdin)\n\tvar w uint8\n\tfmt.Fscanf(in, \"%d\\n\", &w)\n\tif w == 2 {\n\t\tfmt.Println(\"NO\")\n\t}\n\tif w % 2 == 0{\n\t\tfmt.Println(\"YES\")\n\t}else{\n\t\tfmt.Println(\"NO\")\n\t}\n} \n", "lang": "Go", "bug_code_uid": "6b8d8a5ed24a38fdbd0ea62e039bc80f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9db243d4e83a6016add715cf6f920ed2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5823293172690763, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tw, _ := strconv.Atoi(os.Args[1])\n\n\tif w%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "411cb17c6325f7367bb5e12b9daf9ec3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d15cdc0c2c291499d0baef1a1a65a80d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8743882544861338, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\n\tscanner := bufio.NewScanner(os.Stdin)\n\tscanner.Scan()\n\tw, _ := strconv.Atoi(scanner.Text())\n\n\tif w <= 100 {\n\t\tif w >= 1 {\n\t\t\tif w%2 == 0 {\n\t\t\t\tfmt.Println(\"YES\")\n\t\t\t} else {\n\t\t\t\tfmt.Println(\"NO\")\n\t\t\t}\n\t\t}\n\n\t}\n}\n", "lang": "Go", "bug_code_uid": "2e5721a63f1ccfb68fa3155aa7fcb378", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d15cdc0c2c291499d0baef1a1a65a80d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.7741935483870968, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar a int\n\tfmt.Scan(&a)\n\n\tif a%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "d0b0909a061bffa548f9391d82509b57", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "bfa483fc64c2fec3797b16f11747f506", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.6875, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "func main() {\n\n var w = 80\n\n for i := 0; i < w; i++ {\n other := w-i\n if other % 2 == 0 && w % 2 == 0 {\n fmt.Print(\"true\")\n return true\n }\n }\n return false\n\n}", "lang": "Go", "bug_code_uid": "cc6e48bd59ffbc77f7f502494dbfc327", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5ad47e0259db1ec22a81fa3cc830d19a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.996268656716418, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\n\n\nfunc main() {\n\n var w int\n fmt.Scan(&w)\n \n for i := 0; i < w; i++ {\n other := w-i\n if other % 2 == 0 && w % 2 == 0 {\n fmt.Print(\"YES\")\n return\n }\n }\n fmt.Print(\"NO\")\n\n}\n", "lang": "Go", "bug_code_uid": "42f92bc073f708e04c0de8070424f31a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5ad47e0259db1ec22a81fa3cc830d19a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9975669099756691, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar i int\n\t_, err := fmt.Scanf(\"%d\", &i)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif i-2 > 2 && (i-2)%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "4b6c2fbd1df804b3b25b9b81f5814366", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "50cbc57e9e07523ccd4a718997f91b95", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9690721649484536, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var melon int\n fmt.Scanln(&melon)\n if melon % 2 == 1 || melon == 0 {\n fmt.Println(\"NO\")\n } else {\n fmt.Println(\"YES\")\n }\n}", "lang": "Go", "bug_code_uid": "0d4cb38cd68b32766371d0bfaeed5ead", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ddc180ac8aba1837712c61e650a331fc", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9665809768637532, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var melon int\n fmt.Scanln(&melon)\n if melon % 2 == 1 || melon == 0: {\n fmt.Println(\"NO\")\n } else {\n fmt.Println(\"YES\")\n }\n}", "lang": "Go", "bug_code_uid": "e9f4733b434b603785cc2cf2912b8e45", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ddc180ac8aba1837712c61e650a331fc", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8430493273542601, "equal_cnt": 16, "replace_cnt": 4, "delete_cnt": 4, "insert_cnt": 8, "fix_ops_cnt": 16, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var w int\n fmt.scanf(\"%d\", &w)\n if w % 2 == 0 {\n fmt.println(\"YES\")\n } else {\n fmt.println(\"NO\")\n }\n \n return 0\n}\n ", "lang": "Go", "bug_code_uid": "c54d22a932ceb208b9fadb138e9e79cf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1e3915da68208f29de7067b64762440b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9853249475890985, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc main() {\n var w int\n fmt.Scanf(\"%d\", &w)\n if w%2 == 0 {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n return\n}\n", "lang": "Go", "bug_code_uid": "b8150d2a1b536eb280c0347d629ff2ed", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1e3915da68208f29de7067b64762440b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n \"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main(){\n var n int\n fmt.Scan(&n)\n if n % 2 == 0 && n > 2{\n fmt.Println(\"YES\")\n }else{\n fmt.Println(\"NO\")\n }\n}", "lang": "Go", "bug_code_uid": "7b83a4b576ad08926a97ef8efafba7a0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d626c9c204ebb9367b7fad979fd3c83d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9716133668702839, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\n// THIS WAS JUST TO TEST IF CODEFORCES UNDERSTAND GOLANG\n\n/*\nOne hot summer day Pete and his friend Billy decided to buy a watermelon.\nhey chose the biggest and the ripest one, in their opinion.\nAfter that the watermelon was weighed, and the scales showed w kilos.\nThey rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.\n\nPete and Billy are great fans of even numbers,\nthat's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos,\nat the same time it is not obligatory that the parts are equal.\nThe boys are extremely tired and want to start their meal as soon as possible\nthat's why you should help them and find out, if they can divide the watermelon in the way they want.\nFor sure, each of them should get a part of positive weight.\n\n\nInput\nThe first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.\nOutput\nPrint YES, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and NO in the opposite case.\n*/\n\nfunc main() {\n\tvar number int\n\n\t_, err := fmt.Scanf(\"%d\", &number)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tcanDevide(number)\n\n}\n\nfunc canDevide(number int) {\n\tif number%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "db82ab0ca74fed5ee98cffbd46da4883", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2866fc6b13b876bfc7205dea11be108e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.4879807692307692, "equal_cnt": 17, "replace_cnt": 8, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tr := bufio.NewReader(os.Stdin)\n\tin, err := r.ReadString('\\n')\n\n\tif err != nil {\n\t\tlog.Fatalf(\"could not read from input: %v\", err)\n\t}\n\n\tw, err := strconv.Atoi(in)\n\tif err != nil {\n\t\tlog.Fatalf(\"could not convert input: %v\", err)\n\t}\n\tif w % 2 != 0 {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\n\tfmt.Println(\"YES\")\n}\n", "lang": "Go", "bug_code_uid": "aecfc050db0822c5faf0c5cd923b4f4f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "93ae0e7566b8368f8d779b6ce39fd36a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9494712103407755, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\ttext, err := reader.ReadString('\\n')\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\ttext = strings.ReplaceAll(text, \"\\r\", \"\")\n\tw, err := strconv.Atoi(text)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\tif w < 3 || w % 2 != 0 {\n\t\tfmt.Print(\"NO\")\n\t\treturn\n\t}\n\tfmt.Print(\"YES\")\n}\n", "lang": "Go", "bug_code_uid": "ecb9750255d6e87cb15ded2a2fb06a5a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "93ae0e7566b8368f8d779b6ce39fd36a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7793103448275862, "equal_cnt": 12, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "package main\nimport \"fmt\"\nfunc main()\n{\n var n int\n fmt.Scan(&n)\n if n%2==0{\n fmt.Print(\"Yes\")\n }\n else{\n Print(\"No\")\n }\n}", "lang": "Go", "bug_code_uid": "96c6ab7c3d7843188695fe39eef025a5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "df04034edcf3e94a0508357b40203fa4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9735849056603774, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\nimport \"fmt\"\nfunc main() {\n\tvar n int\n\tfmt.Scan(&n)\n\tif n%2==0 {\n\t\tfmt.Print(\"Yes\")\n\t} else {\n\t\tfmt.Print(\"No\")\n\t}\n}", "lang": "Go", "bug_code_uid": "8f737a695029207a47e7613ceff94831", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "df04034edcf3e94a0508357b40203fa4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.7933194154488518, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n )\n\nfunc main() {\n var kilos int = 0\n fmt.Scan(kilos)\n if kilos < 2 {\n fmt.Println(\"NO\")\n } \n else if kilos%2 == 0 {\n fmt.Println(\"YES\")\n }\n else {\n fmt.Println(\"NO\")\n }\n \n}", "lang": "Go", "bug_code_uid": "dad5945f4a2856b158714e3fdc4168bf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e48df66666962b99e5981dff7f643314", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9976689976689976, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n )\n\nfunc main() {\n var kilos int = 0\n fmt.Scan(kilos)\n if kilos > 2 && kilos%2 == 0 {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n \n}", "lang": "Go", "bug_code_uid": "87474fa746473b71d7a708ee91eedb40", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e48df66666962b99e5981dff7f643314", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9463722397476341, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar weight int\n\tfmt.Scanln(&weight)\n\tif weight%4 == 0 {\n\t\tfmt.Print(\"YES\")\n\t} else {\n\t\tfmt.Print(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "2965e692833007548ca2552c9f95b138", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "895dd0c69bf92d7cbf5a0b6bd29ad399", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.975975975975976, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar a int\n\tfmt.Scanln(&a)\n\t\tif a%2 == 0 {\n\t\t\tb:=a/2\n\t\t\tif b%2==0 {\n\t\t\t\tfmt.Println(\"YES\")\n\t\t\t} else if a==2{\n\t\t\t\tfmt.Println(\"NO\")\n\t\t\t\tc:=b-1\n\t\t\t\td:=b+1\n\t\t\t\tif c%2==0&&d%2==0 {\n\t\t\t\t\tfmt.Println(\"YES\")\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Println(\"NO\")\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n}\n", "lang": "Go", "bug_code_uid": "1c37d0ddd126df1f575f780493ba1200", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f4d7c6f1d9ee2b0037e011b619e45b7b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.943217665615142, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\tstr, _ := reader.ReadString('\\r')\n\tstr = str[:len(str)-1]\n\tn, _ := strconv.Atoi(str)\n\tfor i := 2; i <= n/2; i++ {\n\t\tif (n/i)%2 == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t\treturn\n\t\t}\n\t}\n\n\tfmt.Println(\"NO\")\n}\n", "lang": "Go", "bug_code_uid": "62275275ba3e30204aff81648653a2bb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "62aa3eedd84e2191b1c4117730ba2a80", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9965870307167235, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int8\n\tfmt.Scanln(&n)\n\tif n%2 == 0 {\n\t\tfmt.Println(\"Mahmoud\")\n\t} else {\n\t\tfmt.Println(\"Ehab\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "8e271da5c6bf66e9a4621f639fbfb939", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "99e46396bbda647998bf9a872cf8f31e", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.60546875, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 6, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main () {\n\tvar n int\n\tvar move = \"Mahmoud\"\n\t_, _ = fmt.Scan(&n)\n\tfor true {\n\t\tif move == \"Mahmoud\" {\n\t\t\tif n >= 2 {\n\t\t\t\tn -= 2\n\t\t\t\tmove = \"Ehab\"\n\t\t\t} else {\n\t\t\t\tfmt.Println(\"Ehab\")\n\t\t\t\tbreak\n\t\t\t}\n\t\t} else {\n\t\t\tif n >= 1 {\n\t\t\t\tn -= 1\n\t\t\t\tmove = \"Mahmoud\"\n\t\t\t} else {\n\t\t\t\tfmt.Println(\"Mahmoud\")\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n}", "lang": "Go", "bug_code_uid": "5274b0dbe65c45cabf28b9ae198a3bae", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "08d249cbfd2d6d7a2dfa889323ce5202", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9993913572732805, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "// Codeforces helper functions\n// 20 Jan 18\n// samadhi\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n)\n\nconst debug = true\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\n\tn := gsli(reader)[0]\n\n\tif n%2 == 0 {\n\t\tfmt.Println(\"Mahmoud\")\n\t} else {\n\t\tfmt.Println(\"Ehab\")\n\t}\n\n}\n\n}\n\n// Input helpers\n\n// If you don't pass in a reference to the reader, and just instantiate a new\n// one every time, it will work locally, with IO typed at human-speed, but not\n// on Codeforces.\n\n// Get Space-separated Line as Strings\n//\n// Example input:\n// 1 test 382.0\n// Example output:\n// [\"1\", \"test\", \"382.0\"]\n\nfunc gsls(reader *bufio.Reader) (arr []string) {\n\t// Get a full line\n\tinput, _ := reader.ReadString('\\n')\n\n\t//Strip newline and return chars, if any\n\tinput = strings.TrimSuffix(input, \"\\n\")\n\tinput = strings.TrimSuffix(input, \"\\r\")\n\n\t// Split at the spaces into an array\n\tarr = strings.Split(input, \" \")\n\n\treturn\n}\n\n// Get Space-separated Line as Integers\n// Any non-valid integers will be 0\n//\n// Example input:\n// test 1 12.3 -117\n// Example output:\n// [0, 1, 0, -117]\n\nfunc gsli(reader *bufio.Reader) (arr []int) {\n\tstringArr := gsls(reader)\n\n\tfor _, e := range stringArr {\n\t\tcur, _ := strconv.Atoi(e)\n\t\tarr = append(arr, cur)\n\t}\n\n\treturn\n}\n\n// Get Space-separated Line as 64-bit Floats\n// Any non-valid floats will be 0\n//\n// Example input:\n// test 128.328 12 -11.0\n// Example output:\n// [0, 128.328, 12, -11]\n\nfunc gslf(reader *bufio.Reader) (arr []float64) {\n\tstringArr := gsls(reader)\n\n\tfor _, e := range stringArr {\n\t\tcur, _ := strconv.ParseFloat(e, 64)\n\t\tarr = append(arr, cur)\n\t}\n\n\treturn\n}\n\n// String helpers\n\n// Is Lowercase\n// Given some string[i], return whether it is lower case or not.\n\nfunc isl(b byte) bool {\n\tvar r rune\n\tr = rune(b)\n\treturn unicode.IsLower(r)\n}\n\n// Math helpers\n\n// Positve Modulo\n// Returns x mod y, but always positive\n\nfunc posMod(x, y int) int {\n\treturn (x%y + y) % y\n}\n\n// Max Int\n// Returns the max of two ints\n\nfunc maxInt(x, y int) int {\n\tif x > y {\n\t\treturn x\n\t}\n\treturn y\n}\n\n// Distance formule\n// Calculates the distance to the origin\n\nfunc dist(x, y float64) float64 {\n\treturn math.Sqrt(math.Pow(x, 2) + math.Pow(y, 2))\n}\n\n// Output helpers\n\nfunc yes() {\n\tfmt.Println(\"Yes\")\n}\n\nfunc no() {\n\tfmt.Println(\"No\")\n}\n\n// Debug helpers\n\n// From https://groups.google.com/forum/#!topic/golang-nuts/Qlxs3V77nss\n\nfunc dbg(s string, a ...interface{}) {\n\tif debug {\n\t\tfmt.Printf(s, a...)\n\t}\n}\n", "lang": "Go", "bug_code_uid": "83d0d39f4e6726d0c205ef31283fabe2", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "b296e66cde90fe2ab703b0a9f10f2c25", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9321266968325792, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nreader := bufio.NewReader(os.Stdin)\nwriter := bufio.NewWriter(os.Stdout)\n\nfunc printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }\nfunc scanf(f string, a ...interface{}) { fmt.Fscanf(writer, f, a...) }\n\nfunc main() {\n\t// FLUSH STDOUT\n\tdefer writer.Flush()\n\n\tvar a int\n\tscanf(\"%d\\n\", &a)\n\n\tif a%2 == 1 {\n\t\tprintf(\"Ehab\\n\")\n\t} else {\n\t\tprintf(\"Mahmoud\\n\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "a4586dec356487a988fb3b77e4b2d257", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "c3a344f48c3a54afdf6b8dd032d97e9e", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.19710144927536233, "equal_cnt": 16, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 16, "bug_source_code": "package main\nimport (\n\t\"fmt\"\n)\nfunc main() {\n\tvar k,i,j,t int\n\tvar s string\n\tfmt.Scan(&s,&k)\n\n\tn:=0\n\tvar swap rune\n\trune := make([]rune, len(s))\n for _, r := range s {\n rune[n] = r\n n++\n }\n rune = rune[0:n]\n\tfor i=0;i+1s[t] {\n\t\t\t\tt=j\n\t\t\t}\n\t\t}\n\t\tk-=t-i\n\t\tfor ;t!=i; {\n\t\t\tswap = rune[t]\n\t\t\trune[t]=rune[t-1]\n\t\t\trune[t-1]=swap\n\t\t\tt--\n\t\t}\n\t}\n\tfmt.Println(string(rune))\n}\n\n\n\n\n\n\n\n", "lang": "Go", "bug_code_uid": "68996f6a44116f0398d579b3b6f477df", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "86c30f50111fe7a402987036594a44c4", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.2992957746478873, "equal_cnt": 11, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\nfunc main(){\n\tvar x,y,z int\n\tfmt.Scan(&x,&y,&z)\n\tmax:=math.Max(float64(x),math.Max(float64(y),float64(z)))\n\tmin:=math.Min(float64(x),math.Min(float64(y),float64(z)))\n\tdest:=(max+min)/2\n\tans:=math.Abs(dest-float64(x))+math.Abs(dest-float64(y))+math.Abs(dest-float64(z))\n\tfmt.Println(ans)\n\n}\n", "lang": "Go", "bug_code_uid": "0f1f9ecfe2e5317265b514ff9dbe7075", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "64c34c426a56f854d245dc3925aac9c2", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.46186895810955964, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tin := bufio.NewReader(os.Stdin)\n\tvar a [3]int\n\tfmt.Fscan(in, &a[0], &a[1], &a[2])\n\tmin, max := minmax(a)\n\tmid := (max + min) / 2\n\tdis := 0\n\tfor _, v := range a {\n\t\tdis += abs(v - mid)\n\t}\n\tfmt.Println(dis)\n}\n\nfunc minmax(a [3]int) (int, int) {\n\tmin := a[0]\n\tmax := a[0]\n\tfor i := 1; i < len(a); i++ {\n\t\tif a[i] < min {\n\t\t\tmin = a[i]\n\t\t}\n\t\tif a[i] > max {\n\t\t\tmax = a[i]\n\t\t}\n\t}\n\treturn min, max\n}\nfunc abs(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}\n", "lang": "Go", "bug_code_uid": "ac92ceb9ca278caebc15edc2fa18bf93", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "8f61e3f8edef657520affe3aebb98492", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7279029462738301, "equal_cnt": 7, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main(){\n\tvar x1,x2,x3 int\n\tfmt.Scanf(\"%d %d %d\\n\",&x1,&x2,&x3)\n\tx0 := (x1+x2+x3)/3\n\tout := math.Abs(float64(x0-x1))+math.Abs(float64(x0-x2))+math.Abs(float64(x0-x3))\n\tfmt.Println(int(out))\n}", "lang": "Go", "bug_code_uid": "73119bc63c6f14bba83773c431e6b969", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "2a6f97debce9c45d73572e36ea5a1af4", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.888, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \t(\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar a, b, c float64\n\tfmt.Scan(&a, &b, &c)\n\n\tmin := math.Abs(a - b) + math.Abs(b - c)\n\t\n\tmin = math.Min(min, math.Abs(b - c) + math.Abs(a - c))\n\n\tfmt.Println(min)\n\n}\n", "lang": "Go", "bug_code_uid": "1d474f2c51714036f506de685adfdc3d", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "84ade37fb880fc287ba4ebbb225810a9", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.6614420062695925, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n \"math\"\n)\n\nfunc main() {\n var x1, x2, x3 float64\n fmt.Scan(&x1, &x2, &x3)\n left := math.Min(math.Min(x1, x2), x3)\n right := math.Max(math.Max(x1, x2), x3)\n mid := (right - left) / 2\n mid += left\n answer := math.Max(x1, mid) - math.Min(x1, mid)\n answer += math.Max(x2, mid) - math.Min(x2, mid)\n answer += math.Max(x3, mid) - math.Min(x3, mid)\n fmt.Println(int(answer))\n}\n", "lang": "Go", "bug_code_uid": "db6b3d00395fd43fe829f6d649037b5e", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "40a5d42e3fecd255f074c97829b6c034", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6274509803921569, "equal_cnt": 4, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc abs(n int) int {\n\tif n < 0 {\n\t\treturn -n\n\t}\n\treturn n\n}\n\nfunc main() {\n\tvar n = 3\n\tnums := make([]int, n)\n\tvar sum int\n\tfor i := 0; i < n; i++ {\n\t\tfmt.Scan(&nums[i])\n\t\tsum += nums[i]\n\t}\n\tavg := sum / n\n\tvar distance int\n\n\tfor i := 0; i < n; i++ {\n\t\tdistance += abs(nums[i] - avg)\n\t}\n\tfmt.Print(distance)\n}\n", "lang": "Go", "bug_code_uid": "9887d23d54c7891af6cf3797be1b13a5", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "157c4f434685d8c301989946c04ee8e3", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5443548387096774, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var x, y, a, b int\n fmt.Scanf(\"%d %d %d %d\", &x, &y, &a, &b)\n fmt.Print(b/(x*y) - (a-1)/(x*y))\n}", "lang": "Go", "bug_code_uid": "206f50749b3395145dd0df6211d5f3c9", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "883bc5dce6e7e35805f2cc9540e67412", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9281045751633987, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t. \"fmt\"\n\t\"io\"\n\t\"math/bits\"\n\t\"os\"\n)\n\n// github.com/EndlessCheng/codeforces-go\nfunc CF627A(in io.Reader, out io.Writer) {\n\tvar s, x, ans int64\n\tFscan(in, &s, &x)\n\tif d := s - x; d >= 0 && d&1 == 0 && d/2|x == d/2+x {\n\t\tif d == 0 {\n\t\t\tx--\n\t\t}\n\t\tans = int64(1) << bits.OnesCount64(uint64(x))\n\t}\n\tFprint(out, ans)\n}\n\nfunc main() { CF627A(os.Stdin, os.Stdout) }\n", "lang": "Go", "bug_code_uid": "fd2810bffb9587480ed7fe59c847e83f", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "7d3edd2872478d76bc326392344a0359", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9637209302325581, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n \"os\"\n \"bufio\"\n \"strconv\"\n \"fmt\"\n)\n\nvar scanner *bufio.Scanner\n\nfunc getI64() int64 {\n scanner.Scan()\n x, _ := strconv.ParseInt(scanner.Text(), 10, 64)\n return x\n}\nfunc getI() int {\n return int(getI64())\n}\nfunc getF() float64 {\n scanner.Scan()\n x, _ := strconv.ParseFloat(scanner.Text(), 64)\n return x\n}\nfunc getS() string {\n scanner.Scan()\n return scanner.Text()\n}\n\nfunc main() {\n scanner = bufio.NewScanner(os.Stdin)\n scanner.Split(bufio.ScanWords)\n writer := bufio.NewWriter(os.Stdout)\n defer writer.Flush()\n\n _, a := getI(), getI64()\n digits := make([]int, 10)\n for a != 0 {\n d := a%10\n if d == 4 {\n digits[3]++\n digits[2] += 2\n } else if d == 6 {\n digits[5]++\n digits[3]++\n digits[2]++\n } else if d == 8 {\n digits[7]++\n digits[2] += 3\n } else if d >= 2 {\n digits[d]++\n }\n a /= 10\n }\n for d := 9; d >= 2; d-- {\n for i := 0; i < digits[d]; i++ {\n writer.WriteString(fmt.Sprintf(\"%d\", d))\n }\n }\n writer.WriteString(\"\\n\")\n}\n", "lang": "Go", "bug_code_uid": "3b104143588321a9804f75ce75c0d16d", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "0b356a119841fc1aaa2edd9c95a966f6", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8506876227897839, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n)\n\nfunc main() {\n\tm := map[int][]int{\n\t\t0: {},\n\t\t1: {},\n\t\t2: {2},\n\t\t3: {3},\n\t\t4: {3, 2, 2},\n\t\t5: {5},\n\t\t6: {5, 3},\n\t\t7: {7},\n\t\t8: {7, 2, 2, 2},\n\t\t9: {7, 3, 3, 2},\n\t}\n\n\ts := []int{}\n\tlen := 0\n\tfmt.Scan(&len)\n\tvar input int64\n\tfmt.Scan(&input)\n\n\tfor len > 0 {\n\t\tk := input % 10\n\t\tinput /= 10\n\t\ts = append(s, m[int(k)]...)\n\t\tlen--\n\t}\n\tsort.Sort(sort.Reverse(sort.IntSlice(s)))\n\tfor _, v := range s {\n\t\tfmt.Print(v)\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "a64601943281f22122418eb2bb186b6a", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "85d6f95309c6f7b6cc76ee2e5cc24f36", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9369158878504673, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n \"bufio\"\n \"os\"\n \"strconv\"\n)\n\nfunc main() {\n //io\n scanner := bufio.NewReader(os.Stdin)\n writer := bufio.NewWriter(os.Stdout)\n //---\n var n int\n var used [20]int\n var s string\n fmt.Fscan(scanner, &n)\n fmt.Fscan(scanner, &s)\n \n for i := 0; i < n; i++ {\n a := s[i] - '0'\n if a % 2 == 1 || a == 2 {\n used[a]++\n } else if a == 4 {\n used[2] += 2\n used[3]++\n } else if a == 6 {\n used[5]++\n used[3]++\n } else if a == 8 {\n used[2] += 3\n used[7]++\n }\n }\n for i := 9; i > 1; i-- {\n for used[i] > 0 {\n writer.WriteString(strconv.Itoa(i))\n used[i]--\n }\n }\n writer.Flush()\n}", "lang": "Go", "bug_code_uid": "34eb142d306135525c3bee1b2eefe305", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "9dcf2f5a2d73cba0882ce756a2682449", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.99836867862969, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc main() {\n\tsc := bufio.NewScanner(os.Stdin)\n\tsc.Split(bufio.ScanWords)\n\n\tsc.Scan()\n\tsc.Scan()\n\n\tm := map[byte]string{\n\t\t'2': \"2\",\n\t\t'3': \"3\",\n\t\t'4': \"322\",\n\t\t'5': \"5\",\n\t\t'6': \"53\",\n\t\t'7': \"7\",\n\t\t'8': \"73222\",\n\t\t'9': \"73332\",\n\t}\n\n\tans := \"\"\n\tfor _, x := range sc.Bytes() {\n\t\tans += m[x]\n\t}\n\tsorted := \"\"\n\tsorted += strings.Repeat(\"7\", strings.Count(ans, \"7\"))\n\tsorted += strings.Repeat(\"5\", strings.Count(ans, \"5\"))\n\tsorted += strings.Repeat(\"3\", strings.Count(ans, \"3\"))\n\tsorted += strings.Repeat(\"2\", strings.Count(ans, \"2\"))\n\n\tfmt.Println(sorted)\n}\n", "lang": "Go", "bug_code_uid": "96e357c2ee75fc47df3f77df7e2ba081", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "9c7e89112b52834c7a197f357c2e9f34", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9735099337748344, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar a int\n\tfmt.Scan(a)\n\tif a%2 == 1 || a == 2 {\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "175592a544599f201292cee09a6d51e9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "305cb109baf494f74990e26434dc86d8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.997624703087886, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar weight int\n\tfmt.Scanf(\"%d\\n\", weight)\n\n\tif weight == 2 {\n\t\tfmt.Printf(\"NO\\n\")\n\t} else if weight%2 == 0 {\n\t\tfmt.Printf(\"YES\\n\")\n\t} else {\n\t\tfmt.Printf(\"NO\\n\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "2e6f5ceefa6b1c06c41aed22a54035cf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "aa3b682d6dbf486c88a598ce8e8fc52c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9586056644880174, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\n\tvar x int\n\tfmt.Scanf(\"%d\", &x)\n\tif x % 2 == 1 {\n\t\tif x > 2 && (x - 2) % 2 == 0 {\n\t\t\tfmt.Println(\"YES\")\n\t\t} else {\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "89b3a025d5946e721923e7d8b59ee130", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b8e1589ce5a45c156062992edd3f7ed1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.973293768545994, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\nimport \"fmt\"\n\nfunc main(){\n\t// your code goes here\n\tvar w int\n\tfmt.Scan(&w)\n\tresult := \"NO\"\n\tif w % 2 == 0 {\n\t\tresult = \"YES\"\n\t}\n\tfmt.Println(result)\n}", "lang": "Go", "bug_code_uid": "40a8b44719cd37c8e4c49bd7442d5100", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "aec21f1c696721d540468288fd3b7ec2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9724770642201835, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\nimport \"fmt\"\n\nfunc main(){\n\t// your code goes here\n\tn := 0\n\tfmt.Scan(&n)\n\tif n % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t\t}\n}", "lang": "Go", "bug_code_uid": "7735d7f5e5f7d781cc18dcc7c286a9ef", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "aec21f1c696721d540468288fd3b7ec2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9096774193548387, "equal_cnt": 12, "replace_cnt": 3, "delete_cnt": 4, "insert_cnt": 5, "fix_ops_cnt": 12, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\n\tvar w int\n\tfmt.Scan(&w)\n\tif w >= 4 && w <= 100 && w % 2 == 0{\n\t\tprintln(\"YES\")\n\t}else{\n\t\tprintln(\"NO\")\n\t}\n}\n\n", "lang": "Go", "bug_code_uid": "3dafbb8093690ef4978862962578fe7d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4c50a6763d959f531e16294fcfaee4e6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.4870259481037924, "equal_cnt": 19, "replace_cnt": 8, "delete_cnt": 8, "insert_cnt": 2, "fix_ops_cnt": 18, "bug_source_code": "package main\nimport (\n\t\t\"bufio\"\n\t\t\"fmt\"\n\t\t\"os\"\n\t\t\"strconv\"\n\t\t)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\tinput_string, _ := reader.ReadString('\\n')\n\tinput, _ := strconv.Atoi(input_string[:len(input_string)-1])\n\tanswer := 0\n\tif input%2==0 {\n\t\tanswer = 1\n\t}\n\tif answer == 0 {\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "ea111bc3c97d76f9684b1ff387678f19", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a07abb18fd9373377a233043110de205", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5721040189125296, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var n int\n fmt.Scanf(\"%d\\n\", &n)\n if n >= 2 && n <= 100 {\n if n % 2 == 0 {\n fmt.Printf(\"YES\\n\")\n } else { \n fmt.Printf(\"NO\\n\") }\n }\n}", "lang": "Go", "bug_code_uid": "c846e0df4b34680168a4ed378b3961ad", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "70495ef8707d82e057af9a7904900594", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.91725768321513, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var n int\n fmt.Scanf(\"%d\\n\", &n)\n if n % 2 != 0 {\n fmt.Printf(\"NO\\n\")\n } if n <= 2 {\n fmt.Printf(\"NO\")\n } else { \n fmt.Printf(\"YES\\n\")\n }\n}", "lang": "Go", "bug_code_uid": "63b20b3976c6e737df1c1475969ff3fb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "70495ef8707d82e057af9a7904900594", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6449704142011834, "equal_cnt": 25, "replace_cnt": 8, "delete_cnt": 17, "insert_cnt": 0, "fix_ops_cnt": 25, "bug_source_code": "//1.11 | CodeForces.Com\npackage main\nimport \"fmt\"\nfunc main()\n{\n var weight int8\n fmt.Scan(&weight)\n \n if(weight & 1 == 1 || weight == 2) {\n fmt.Print(\"NO\")\n } else {\n fmt.Print(\"YES\")\n }\n}", "lang": "Go", "bug_code_uid": "4a19461be9a470a2e11b097abb8d87ef", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "32072c053cf62cd051a9ca442576fd67", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9979381443298969, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int\n\tvar cont int\n\tfmt.Scanf(\"%d\", &n)\n\tfor i := 1; i < n; i++ {\n\t\tif i%2 == 0 {\n\t\t\tif n%i == 0 {\n\t\t\t\tcont++\n\t\t\t}\n\t\t}\n\t}\n\tif cont >= 2 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "dbbca5724bc2c4d90a73b5d3614e69d0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "561a0cc7d195f9a897ed8be206742e1a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9971830985915493, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar number int\n\t_, err := fmt.Scanf(\"%d\", &number)\n\tif err != nil {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\n\tif number <= 1 || number >= 100 {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\tif number == 2 {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\tif number%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t\treturn\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\n}\n", "lang": "Go", "bug_code_uid": "c56dd9598fe63ae96cc810445a28db9b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7b99f4a21f3dd9950975debd8fc5d3f1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9657534246575342, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int\n\tfmt.Scanln(&n)\n\n\tif n%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "546ebd269b803988bf6a6b01f7fb6b17", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "05bd5673f889319d3925d032afddf4fc", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.5722222222222222, "equal_cnt": 13, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "import (\n \"fmt\"\n)\n\n\nfunc main() {\n \n var w int\n fmt.Scanf(\"%d\\n\",&w)\n \n if w % 2 == 0 {\n fmt.Println(\"YES\")\n } else {\n fmt.Println(\"NO\")\n }\n \n \n \n}", "lang": "Go", "bug_code_uid": "2f340edc26d36355cc18852eb9718941", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2e756f24df0308532aba0adba37c67f8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9216300940438872, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\\n\",&w)\n\n\tif w % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "102a2162044b702e17a0121efbe1e031", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2e756f24df0308532aba0adba37c67f8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.970873786407767, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w int64\n\tfmt.Scan(&w)\n\n\tif w&1 == 1 || (w>>1)&1 == 1 {\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"YES\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "b8db010fb076e41e097a2c4cb03d4413", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5bd74ff8d413debe27c00a61b8575be6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.3867403314917127, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nfunc main() {\n\tvar w float64\n\t_, _ = fmt.Scanf(\"%f\", &w)\n\n\tfmt.Println(Run(w))\n}\n\nfunc Run(w float64) string {\n\tif strings.Contains(fmt.Sprint(w/2), \".\") {\n\t\treturn \"NO\"\n\t}\n\n\treturn \"YES\"\n}\n", "lang": "Go", "bug_code_uid": "61de0f05b8a6d70e011105aa92944551", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "02dd6441846ab17dfd1e36a25049e001", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6884272997032641, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "package main \n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nfunc main() {\n\tvar w int\n\tif(w % 2 == 0){\n\t\tfmt.println(\"YES\")\n\t}else{\n\t\tfmt.println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "ec8fa31add6f371f3359546fd0b60d37", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b8937deeafb3a8130c0e8a12eb5feec1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9032258064516129, "equal_cnt": 1, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main \n\nimport (\n\t\"fmt\"\n)\n\nfunc main() { \n\tvar w int\n\tfmt.Scanf(\"%d\",&w)\n\tif(w > 2){\n\t\tif(w % 2 == 0){\n\t\t\tfmt.Println(\"YES\")\n\t\t}else{\n\t\t\tfmt.Println(\"NO\")\n\t\t}\n\t}\n\t\n}", "lang": "Go", "bug_code_uid": "fe6167460a4cba7842c2a43ad9494f54", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b8937deeafb3a8130c0e8a12eb5feec1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9897959183673469, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc check(n int) int {\n\treturn n%2\n}\n\nfunc main() {\n\tvar n\n\tfmt.Scanf(\"%d\",&n)\n\n\tif check(n) == 0 && n != 2 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "df5ce24210f949a8ba8dd121c2dde212", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ad1ae49c6bec7314004d7f07e56d8637", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9740932642487047, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc check(n int) int {\n\treturn n%2\n}\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\",&n)\n\n\tif check(n) == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "9b1594b8c3506e8194d6fe87e8f9b4cf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ad1ae49c6bec7314004d7f07e56d8637", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.859375, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\\n\", &w)\n\t// even\n\tif w%2 == 0 {\n\t\tif (w/2)%2 == 0 {\n\t\t\tfmt.Printf(\"YES\")\n\t\t} else {\n\t\t\tfmt.Printf(\"NO\")\n\t\t}\n\t} else {\n\t\tfmt.Printf(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "4d325e8aa42ed79824e36cee8560a9be", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0f4df57abb2c18c1578409392a8e9e12", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9943977591036415, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"os\"\n\t\"strconv\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tsc := NewScanner()\n\tN, A := sc.NextInt(), sc.NextInt()\n\n\tS := sc.NextLine()\n\n\tmp := map[byte]int{}\n\n\tfor i := 0; i < N; i++ {\n\t\tmp[S[i]]++\n\t}\n\n\tfor _, v := range mp {\n\t\tif v= len(s.buf) {\n\t\ts.readLine()\n\t\ts.p = 0\n\t}\n}\nfunc (s *Scanner) readLine() {\n\ts.buf = make([]byte, 0)\n\tfor {\n\t\tl, p, e := s.r.ReadLine()\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\t\ts.buf = append(s.buf, l...)\n\t\tif !p {\n\t\t\tbreak\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "58ae0b1c628d5cd1a87dd7bb83653070", "src_uid": "ceb3807aaffef60bcdbcc9a17a1391be", "apr_id": "ed78c30c31406df5dbefdced83fe31cd", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9988851727982163, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nvar ans int64\nvar tmp int64\n\nfunc main() {\n\tfmt.Scan(&ans)\n\tfor i := int64(1); i <= int64(math.Sqrt(float64(ans))); i++ {\n\t\tres := (ans - int64(math.Pow(float64(i), 2)) - i - 1) / 2 * i\n\t\tif res < 0 {\n\t\t\tcontinue\n\t\t}\n\t\ttmp = int64(math.Pow(float64(i), 2)) + 2*i*res + i + 1\n\t\tif tmp == ans {\n\t\t\tfmt.Println(i, res)\n\t\t\treturn\n\t\t}\n\t}\n\tfmt.Println(\"NO\")\n}\n\n//250877914575\n//1 125438957286\n\n//260158260522\n//NO\n", "lang": "Go", "bug_code_uid": "a10c347924d368ec8951b8a97d9376bb", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "382f100ecf0e2227466795b442abb131", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8034188034188035, "equal_cnt": 17, "replace_cnt": 5, "delete_cnt": 7, "insert_cnt": 5, "fix_ops_cnt": 17, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n)\n\nvar ans int64\nvar tmp int64\n\nfunc main() {\n\tfmt.Scan(&ans)\n\tfor i:=int64(1); i <= int64(math.Sqrt(float64(ans))); i++ {\n\t\tfor j:=ans/2; j > 0; j=j-i {\n\t\t\ttmp = int64(math.Pow(float64(i),2)) + 2 * i * j + i + 1\n\t\t\tif tmp == ans {\n\t\t\t\tfmt.Println(i , j)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\tfmt.Println(\"NO\")\n}\n\n//250877914575\n//1 125438957286", "lang": "Go", "bug_code_uid": "13fcd5739b18edd8c191a6a05957b6a0", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "382f100ecf0e2227466795b442abb131", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.8217054263565892, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tkilos := 0\n\tfmt.Scanf(\"%d\", &kilos)\n\n\tif kilos%2 != 0 {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\n\tif (kilos/2)%2 != 0 {\n\t\tfmt.Println(\"NO\")\n\t\treturn\n\t}\n\tfmt.Println(\"YES\")\n}\n", "lang": "Go", "bug_code_uid": "0e2b0470aabeda04694604f76b7fcc3e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8533e175a126ad3fc9c1a8b3823af0c3", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.967391304347826, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\", &w)\n\tif w <= 2 {\n\t\tfmt.Println('NO')\n\t}\n\tif w % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "9ac5dec1295f4b6f8583d7a3600f2ae5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "280c42d6707a1eed7ccc1189efde0a15", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8795180722891566, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w int\n\tfmt.Scanf(\"%d\", &w)\n\tif w % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "6f49aca485f535aeefdbf89abdd8656a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "280c42d6707a1eed7ccc1189efde0a15", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.5217391304347826, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nfunc main() {\n\ta := flag.Args()\n\ti, _ := strconv.Atoi(a[0])\n\tfl := float64(i)\n\n\tif math.Mod(fl, 2) == 0{\n\t\tprintln(\"YES\")\n\t} else {\n\t\tprintln(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "5f46bb6c6443e998f9270689262698ab", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "028ab1b553556ae7f1297db46dec5999", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6825053995680346, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tx := os.Args[1:]\n\ti, _ := strconv.Atoi(x[0])\n\tfl := float64(i)\n\n\tif math.Mod(fl, 2) == 0 {\n\t\tfmt.Print(\"YES\")\n\t} else {\n\t\tfmt.Print(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "4cdaae6387b846c84f59df52c6004085", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "028ab1b553556ae7f1297db46dec5999", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.977319587628866, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tvar n string\n\t_, _ = fmt.Scanln(&n)\n\ti, _ := strconv.ParseInt(n, 10, 64)\n\tfl := float64(i)\n\n\tif math.Mod(fl, 2) == 0 {\n\t\tfmt.Print(\"YES\")\n\t} else {\n\t\tfmt.Print(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "59a6c4c2bb3505e6e6608fef63c9c4b8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "028ab1b553556ae7f1297db46dec5999", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc task_solution(n int) string {\n\tpossible_ans := []string{\"YES\", \"NO\"}\n\n\treturn possible_ans[n%2]\n}\n\nfunc main() {\n\tvar n int\n\t_, err := fmt.Scan(&n)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(task_solution(n))\n}\n", "lang": "Go", "bug_code_uid": "7616a2a032330cf053e2f385f2005047", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a3fb4fbc477cbbd4f133b601c62bcc39", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.896551724137931, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar w int\n\tfmt.Scan(&w)\n\n\tif w % 2 == 0 && (w != 2) && 1<=w && w<=100 {\n\t\tfmt.Println(\"YES\")\n\t}\n\tif w % 2 == 1 && 1<=w && w<=100 {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "a883aff9674a0dbf5d6f6269a395785e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dd457f25c6ef8801f889ae715fb4e32e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.8169838945827232, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar weight = 0\n\t_, err := fmt.Scanf(\"%d\", &weight)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif isEven(weight) && weight > 3 {\n\t\tif weight % 4 == 0 {\n\t\t\tprintln(\"YES\")\n\t\t\treturn\n\t\t}\n\n\t\tif (weight - 2) % 4 == 0 {\n\t\t\tprintln(\"YES\")\n\t\t\treturn\n\t\t}\n\t}\n\n\tprintln(\"NO\")\n\treturn\n}\n\nfunc isEven(n int) bool {\n\treturn n % 2 == 0\n}\n", "lang": "Go", "bug_code_uid": "24452152bb92995429659332818caeaa", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "214085b2eaab693bc3e5423ac2bb35ac", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9800443458980045, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar weight = 0\n\t_, err := fmt.Scanf(\"%d\", &weight)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif weight % 2 == 0 && weight != 2 {\n\t\tfmt.Print(\"YES\")\n\t}\n\n\tfmt.Print(\"NO\")\n\treturn\n}\n\n", "lang": "Go", "bug_code_uid": "573af76ea7bfd5b9ee3b1f7a5f7c0dc2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "214085b2eaab693bc3e5423ac2bb35ac", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.581081081081081, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tvar n string\n\tfmt.Scanln(&n)\n\n\t//reader := bufio.NewReader(os.Stdin)\n\t//for true {\n\t//\ttext, _ := reader.ReadString('\\n')\n\t//\tvalue, _ := strconv.Atoi(strings.Trim(text, \"\\n\"))\n\tvalue, _ := strconv.Atoi(n)\n\t\timpl(value)\n\t//}\n}\n\nfunc impl(n int) {\n\tif n % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "ceee8f6b583740e0ea2bf5c6e512b6df", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "66ea77a5e85960de813bcec0678f0931", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.4197080291970803, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\tfor true {\n\t\ttext, _ := reader.ReadString('\\n')\n\t\tvalue, _ := strconv.Atoi(strings.Trim(text, \"\\n\"))\n\t\timpl(value)\n\t}\n}\n\nfunc impl(n int) {\n\tif n % 2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "6787ec489c00b42de8cc82a60f27023f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "66ea77a5e85960de813bcec0678f0931", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8414634146341463, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar w int\n\tfmt.Scan(&w)\n\tif w%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "1940876ec756a6f589aa45f124f85015", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "cef74d4b2439deb1cec5e8147af15160", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9271523178807947, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "package main\nimport \"fmt\"\nfunc main() {\n\tvar w int\n\tfmt.Scan(&w)\n\tif w%2 == 0 && w > 2 {\n\t\tfmt.Println(\"YES\")\n\t} \n\telse {\n\t\tfmt.Println(\"NO\")\n\t}\n}", "lang": "Go", "bug_code_uid": "9ed700b370ed0031cf967ffe4920f330", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "23ec1946014ed6f6f1f3c92117dc7309", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9161290322580645, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar int n\n\tfmt.Scanf(\"%d\", &n)\n\tif n%2 == 0 {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "aff685027151fd5e041de2b78b67ba81", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a5e8bfc16c96b659814642b6ae97b7b4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9843260188087775, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\", &n)\n\tif n == 2 || n%2 == 1 {\n\t\tfmt.Println(\"NO\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "3771ed8f43d55a91d27c9820b974e935", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a5e8bfc16c96b659814642b6ae97b7b4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.1562774363476734, "equal_cnt": 9, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc check(nums []int) bool {\n\ti := 1\n\n\tfor ; i < len(nums); i++ {\n\t\tif nums[i] <= nums[i-1] {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// fmt.Println(\"Stop increasing \", i)\n\n\tfor ; i < len(nums); i++ {\n\t\tif nums[i] > nums[i-1] {\n\t\t\treturn false\n\t\t}\n\n\t\tif nums[i] < nums[i-1] {\n\t\t\tbreak\n\t\t}\n\t}\n\n\t// fmt.Println(\"Stop constant \", i)\n\n\tif i == 1 && len(nums) != 1 {\n\t\treturn false\n\t}\n\n\tfor ; i < len(nums); i++ {\n\t\tif nums[i] >= nums[i-1] {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t// fmt.Println(\"Stop decreasing \", i)\n\treturn i == len(nums)\n}\n\nfunc main() {\n\tvar t int\n\tfmt.Scanf(\"%d\\n\", &t)\n\n\tnums := make([]int, t)\n\n\tfor i := 0; i < t; i++ {\n\t\tfmt.Scanf(\"%d\", &nums[i])\n\t}\n\n\tfmt.Println(nums)\n\tif check(nums) {\n\t\tfmt.Println(\"YES\")\n\t} else {\n\t\tfmt.Println(\"NO\")\n\t}\n}\n", "lang": "Go", "bug_code_uid": "03dc67d0c8533346ab8bb0f3651c95a7", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "d47914401b8f70bc8d1127496cd94666", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9987029831387808, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\nimport (\n \t\"fmt\"\n)\nfunc main() {\n \tvar n,a int\n \tfmt.Scan(&n)\n \tc,e,em:=0,0,-1\n \tfor i:=0;i0 {\n \t\t\t\tem--\n \t\t\t}\n \t\t} else {\n \t\t\te++\n \t\t\tif e>em {\n \t\t\t\tem=e\n \t\t\t}\n \t\t}\n \t}\n \tfmt.Println(c+em)\n}\n\n\n\n\n\n\n\n\n\n\n\n", "lang": "Go", "bug_code_uid": "75085ed02fd2b1628f1d69bf57237762", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "889b5ee04719cce635b642053c4b6b45", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.8285012285012285, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main(){\n var n, cur, ans int\n fmt.Scan(&n)\n input, prefix := make([]int, n), make([]int, n)\n for i:=0; i0 {\n cur = prefix[i-1]\n }else {\n cur=0\n }\n if j>0 {\n cur += prefix[n-1]-prefix[j-1]\n }else {\n cur += prefix[n-1]\n }\n if i>0 {\n cur += (j-i+1)-(prefix[j]-prefix[i-1])\n }else {\n cur += (j-i+1)-prefix[j]\n }\n if cur > ans {\n ans = cur\n }\n }\n }\n fmt.Println(ans)\n}", "lang": "Go", "bug_code_uid": "40ffd82b73145ef6b73ec1aeb69704c0", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "6b3379cf61a5e806f333fea3e078fb47", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.8429661941112323, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "// http://codeforces.com/problemset/problem/327/A\npackage main\n\nimport (\n\t\"fmt\"\n\t\"bufio\"\n\t\"os\"\n)\n\n// (c) Dmitriy Blokhin (sv.dblokhin@gmail.com)\n\nconst (\n\tMOD = 1e9 + 7\n)\n\ntype (\n\n)\n\nfunc max(a, b int ) int {\n\tif a > b {\n\t\treturn a\n\t}\n\n\treturn b\n}\n\nfunc main () {\n\tvar (\n\t\tn int\n\t)\n\n\t//f, _ := os.Open(\"input.txt\")\n\t//input := bufio.NewReader(f)\n\tinput := bufio.NewReader(os.Stdin)\n\n\tfmt.Fscanln(input, &n)\n\ta := make([]int, n)\n\tf := make([][3]int, n) /// unchanged, prev is changed, current is change (flip)\n\tma := 0\n\n\tfor i := 0; i < n; i++ {\n\t\tfmt.Fscan(input, &a[i])\n\n\t\tif i == 0 {\n\t\t\tf[i][0] = a[i]\n\t\t\tf[i][1] = 1 - a[i]\n\t\t\tf[i][2] = a[i]\n\t\t\tcontinue\n\t\t}\n\n\t\tf[i][0] = f[i - 1][0] + a[i]\n\t\tf[i][1] = max(f[i - 1][0], f[i - 1][1]) + (1 - a[i])\n\t\tf[i][2] = max(f[i - 1][2], max(f[i - 1][1], f[i - 1][0])) + a[i]\n\t}\n\n\tma = max(ma, f[n - 1][0])\n\tma = max(ma, f[n - 1][1])\n\tma = max(ma, f[n - 1][2])\n\n\tfmt.Println(ma)\n}", "lang": "Go", "bug_code_uid": "2b715a77ed6313d61bec50a0812795b0", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "a8899ef84611ab307ab64d9f71a32502", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9986244841815681, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\\n\", &n)\n\ta := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tfmt.Scanf(\"%d\", &a[i])\n\t}\n\t// initialize dp array\n\td := make([][]int, n)\n\tfor i := 0; i < n; i++ {\n\t\td[i] = make([]int, i+1)\n\t}\n\n\tmax := 1\n\tfor i := 0; i < n; i++ {\n\t\tfor j := 0; j <= i; j++ {\n\t\t\td[i][j] = OnesAfterFlip(a, j, i)\n\t\t\tif max < d[i][j] {\n\t\t\t\tmax = d[i][j]\n\t\t\t}\n\t\t}\n\t}\n\tfmt.Println(max)\n}\n\nfunc OnesAfterFlip(a []int, i, j int) (ans int) {\n\tarr := make([]int, len(a))\n\tcopy(arr, a)\n\n\tfor idx := i; idx <= j; idx++ {\n\t\tarr[idx] = 1 - arr[idx]\n\t}\n\t// fmt.Printf(\"%v\\n\", arr)\n\tfor idx := 0; idx < len(arr); idx++ {\n\t\tans += arr[idx]\n\t}\n\t// fmt.Printf(\"%d:%d %d\\n\\n\", i, j, ans)\n\treturn\n}\n", "lang": "Go", "bug_code_uid": "0c894e3dfef8985c06be471756d18f1f", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "362a47be68701ffebefc59a7ff940961", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9958071278825996, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc max(a,b int) int { if a > b { return a } else { return b } }\n\nfunc main() {\n var n int\n var a [105]int\n fmt.Scan(&n)\n cnt := 0\n for i := 0; i < n; i++ {\n fmt.Scan(&a[i])\n if a[i] == 1 { cnt++ }\n }\n ans := cnt\n for i := 0; i < n; i++ {\n tmp := cnt\n for j := i; j < n; j++ {\n if a[j] == 1 { tmp-- } else { tmp++ }\n ans = max(ans,tmp)\n }\n }\n fmt.Println(ans)\n}\n", "lang": "Go", "bug_code_uid": "1a9753fbef0e4997a492e71ad35af980", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "c793051ad5732514bf94ab46978a1ebb", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.913232104121475, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc Max(x, y int) int {\n result := x\n if y > x {\n result = y\n }\n\n return result\n}\n\nfunc main() {\n var n int\n fmt.Scanln(&n)\n\n a := make([]int, n)\n diff := make([][]int, n)\n count := make([]int, n)\n\n var last int = 0\n for i := 0; i < n; i++ {\n var next int\n fmt.Scanf(\"%d\", &next)\n a[i] = next\n diff[i] = make([]int, n)\n\n last += next\n count[i] = last\n\n\n /* var val int = 1\n if next == 1 {\n val = -1\n }\n diff[i + 1] = diff[i] + val\n count[i + 1] = count[i] + next*/\n }\n\n diff[0][0] = (1 - a[0])\n var max int = diff[0][0]\n for i := 1; i < n; i++ {\n for j := 0; j < i; j++ {\n diff[j][i] = (i - j) - (count[i] - count[j])\n max = Max(max, diff[j][i] + count[j] + count[n - 1] - count[i])\n }\n }\n\n fmt.Println(max)\n}", "lang": "Go", "bug_code_uid": "b1e16f2e732ac84ffcdf55915ba9aa0d", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "5d4fe1ccaf6544b3ecd4c542728dfae0", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.024279210925644917, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "http://puu.sh/q1b0g/98e80a146f.png", "lang": "Go", "bug_code_uid": "8cf7a71c2c7fd10cdc39a484a985b39a", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "5d4fe1ccaf6544b3ecd4c542728dfae0", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9974489795918368, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n int\n\tfmt.Scanf(\"%d\\n\", &n)\n\ta := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tfmt.Scan(&a[i])\n\t}\n\n\t//fmt.Print(bf(n, a))\n\tfmt.Print(obs(n, a))\n}\n\n// O(n)\nfunc bf(n int, a []int) int {\n\tmax := 0\n\tfor i := 0; i < n; i++ {\n\t\tfor j := i; j < n; j++ {\n\t\t\tt := make([]int, n)\n\t\t\tfor k := 0; k < n; k++ {\n\t\t\t\tif k >= i && k <= j {\n\t\t\t\t\tt[k] = 1 - a[k]\n\t\t\t\t} else {\n\t\t\t\t\tt[k] = a[k]\n\t\t\t\t}\n\t\t\t}\n\t\t\ts := 0\n\t\t\tfor k := 0; k < n; k++ {\n\t\t\t\tif t[k] == 1 {\n\t\t\t\t\ts++\n\t\t\t\t}\n\t\t\t}\n\t\t\tif s > max {\n\t\t\t\tmax = s\n\t\t\t}\n\t\t}\n\t}\n\treturn max\n}\n\n// O(n^2)\nfunc obs(n int, a []int) int {\n\tt := make([]int, n)\n\tfor i := 0; i < n; i++ {\n\t\tif a[i] == 0 {\n\t\t\tt[i] = 1\n\t\t} else {\n\t\t\tt[i] = -1\n\t\t}\n\t}\n\tS := 0\n\tfor i := 0; i < n; i++ {\n\t\tif a[i] == 1 {\n\t\t\tS++\n\t\t}\n\t}\n\tvar f0, l0 int\n\tfor f0 = 0; f0 < n && a[f0] == 1; f0++ {\n\t}\n\tfor l0 = n - 1; l0 >= 0 && a[l0] == 1; l0-- {\n\t}\n\tm := 0\n\tfor i := f0; i <= l0; i++ {\n\t\ts := 0\n\t\tfor j := i; j <= l0; j++ {\n\t\t\ts += t[j]\n\t\t\tif s > m {\n\t\t\t\tm = s\n\t\t\t}\n\t\t}\n\t}\n\tif m == 0 {\n\t\treturn 0\n\t}\n\treturn S + m\n}\n\n// O(n) ?\nfunc dp(n int, a []int) int {\n\treturn 0\n}\n\nfunc max(a, b int) int {\n\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n", "lang": "Go", "bug_code_uid": "31db202e5d2c68f37ff8a8923a94ecb5", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "c3ee932593f386d3e134e5b5fb22637e", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.6418199419167473, "equal_cnt": 13, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 12, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc intMax(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\t\n\treturn b\n}\n\nfunc main() {\n\tvar numbers int\n\t\n\tfmt.Scanln(&numbers)\n\n\tbuf := make([]int, numbers)\n\tmemoized := make([]int, numbers)\n\n\tfor i := 0; i < numbers; i++ {\n\t\tfmt.Scan(&buf[i])\n\t}\n\n\t// 1. 코스트 함수\n\t// With interval i..j\n\t// a[i..j].count(0) > a[i..j].count(1)\n\t// 2. 옵티마이저 함수\n\t// With interval i..j\n\t// max(cost(i, j), cost(i, j+ 1))\n\t// 3. 약간의 memoization\n\tvar globalMax int = 1 - buf[0] // initializing base state\n\n\tfor i := 0; i < numbers; i++ {\n\t\t// 여기에서 초기화를\n\t\tmemoized[i] = 1 - buf[i]\n\t\tvar localMax int\n\n\t\tfor j := i+1; j < numbers; j++ {\n\t\t\tlocalMax = intMax(memoized[j-1], j - i + 1 - buf[j-1])\n\t\t\tmemoized[j] = localMax\n\n\t\t\tif localMax > globalMax {\n\t\t\t\tglobalMax = localMax\n\n\t\t\t\t_ = fmt.Errorf(\"Update globalMax to %d at %d..%d\", globalMax, i, j)\n\t\t\t}\n\t\t}\n\t}\n\n\tfmt.Println(globalMax)\n}", "lang": "Go", "bug_code_uid": "ec0ef675c4e9c4eed71c11b87dd157dd", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "a5eb890a490e77615bd574021e7cd6a1", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.30386740331491713, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nvar a [100]int\n\nfunc main() {\n\tvar n int\n\tfmt.Scan(&n)\n\n\tfor i := 0; i < n; i++ {\n\t\tfmt.Scan(&a[i])\n\t}\n\n\tmax := 0\n\tfor i := 0; i < n-1; i++ {\n\t\tfor j := i + 1; j < n; j++ {\n\t\t\tsum := 0\n\t\t\tfor k := i; k <= j; k++ {\n\t\t\t\tif a[k] == 0 {\n\t\t\t\t\tsum += 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor k := 0; k < i; k++ {\n\t\t\t\tif a[k] == 1 {\n\t\t\t\t\tsum += 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor k := j; k < n; k++ {\n\t\t\t\tif a[k] == 1 {\n\t\t\t\t\tsum += 1\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif sum > max {\n\t\t\t\tmax = sum\n\t\t\t}\n\t\t}\n\t}\n\n\tfmt.Println(max)\n}\n", "lang": "Go", "bug_code_uid": "4048563ac52edfe16c23d2e62f0d9cee", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "cefc8a6ff8bbea1342d3e5bc8cfbd4f2", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8981371383273881, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n \"bufio\"\n \"os\"\n \"strconv\"\n)\n\nvar sc *bufio.Scanner = bufio.NewScanner(os.Stdin)\nvar w *bufio.Writer = bufio.NewWriter(os.Stdout)\n\nfunc ni() int {\n sc.Scan()\n ans, _ := strconv.Atoi(sc.Text())\n return ans\n}\n\nfunc nll() int64 {\n sc.Scan()\n ans, _ := strconv.ParseInt(sc.Text(), 10, 64)\n return ans\n}\n\nfunc next() string {\n sc.Scan()\n return sc.Text()\n}\n\nfunc Max(i, j int) int {\n if i >= j {\n return i\n }\n return j\n}\n\nfunc Min(i, j int) int {\n if i < j {\n return i\n }\n return j\n}\n\nfunc pri(n int) { w.WriteString(strconv.Itoa(n)) }\nfunc prll(n int64) { w.WriteString(strconv.FormatInt(n, 10)) }\nfunc sp() { w.WriteByte(' ') }\nfunc endl() { w.WriteByte('\\n') }\n\nfunc main() {\n sc.Split(bufio.ScanWords)\n n := ni()\n a := make([]int, n)\n for i := 0; i < n; i++ {\n a[i] = ni()\n }\n ans := 0\n for l := 0; l < n; l++ {\n for r := l; r < n; r++ {\n cnt, cnt0 := 0, 0\n for i := 0; i < l; i++ {\n if a[i] == 1 {\n cnt0++\n }\n }\n for i := r + 1; i < n; i++ {\n if a[i] == 1 {\n cnt0++\n }\n }\n for i := l; i <= r; i++ {\n if a[i] == 1 {\n cnt--\n } else {\n cnt++\n }\n }\n ans = Max(ans, cnt+cnt0)\n }\n }\n pri(ans)\n w.Flush()\n}\n", "lang": "Go", "bug_code_uid": "38baf20ccd2e0ec7846881b879cd8eba", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "0dc60003a0a8c807937b5b3ca8932a50", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9637654090399701, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"strings\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc Readln(r *bufio.Reader) (string, error) {\n\tvar (\n\t\tisPrefix bool = true\n\t\terr error = nil\n\t\tline, ln []byte\n\t)\n\tfor isPrefix && err == nil {\n\t\tline, isPrefix, err = r.ReadLine()\n\t\tln = append(ln, line...)\n\t}\n\treturn string(ln), err\n}\n\nfunc readIntArray(line string) []int {\n\t\n\tnumStrings := strings.Split(strings.TrimSpace(string(line)), \" \")\n\t\n\tnumbers := make([]int, 0)\n\t\n\tfor _, v := range numStrings {\n\t\tvar converted int\n\t\t\n\t\tfmt.Sscanf(v, \"%d\", &converted)\n\t\tnumbers = append(numbers, converted)\n\t}\n\t\n\treturn numbers\n}\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\t\n\tReadln(reader)\n\tline, _ := Readln(reader)\n\tnumbers := readIntArray(line)\n\t\n\tseq := make([]int, 0)\n\tfor _, val := range numbers {\n\t\tseqVal := 1\n\t\t\n\t\tif val == 1 {\n\t\t\tseqVal = -1\n\t\t}\n\t\tseq = append(seq, seqVal)\n\t}\n\t\n\tmaxSum, sum := 0, 0\n\tleftIdx, rightIdx := 0 , 0\n\tminusPos := -1\n\tfor idx, seqVal := range seq {\n\t\tsum += seqVal\n\t\t\n\t\tif sum > maxSum {\n\t\t\tmaxSum = sum\n\t\t\tleftIdx = minusPos + 1\n\t\t\trightIdx = idx\n\t\t}\n\t\t\n\t\tif sum < 0 {\n\t\t\tminusPos = idx\n\t\t\tsum = 0\n\t\t}\n\t}\n\t\n\trestSum := 0\n\tfor i:= 0; i < leftIdx; i++ {\n\t\trestSum += numbers[i]\n\t}\n\t\n\tfor i:= rightIdx + 1; i < len(numbers); i++ {\n\t\trestSum += numbers[i]\n\t}\n\t\n\tfmt.Println(maxSum + restSum)\n}\n", "lang": "Go", "bug_code_uid": "5c41990956db1e209a233ff6c7d33a8f", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "a0344f2cc21ca3c2f5db77bc009c3f1c", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.3342830009496676, "equal_cnt": 9, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc max(a, b int) int {\n\tif a > b {\n\t\treturn a\n\t}\n\treturn b\n}\n\nfunc main() {\n\tn := 0\n\tfmt.Scan(&n)\n\tas := make([]int, n)\n\tfor i := range as {\n\t\tfmt.Scan(&as[i])\n\t}\n\ti := 0\n\tlenas := len(as)\n\tseqglobal := 0\n\tseqlocal := 0\n\tfor i < lenas {\n\t\t// consume left 1s bound\n\t\tfor i < lenas && as[i] == 1 {\n\t\t\ti++\n\t\t\tseqlocal++\n\t\t}\n\t\t// consume middle 0s\n\t\tfor i < lenas && as[i] == 0 {\n\t\t\ti++\n\t\t\tseqlocal++\n\t\t}\n\t\tisave := i\n\t\t// consume right 1s bound\n\t\tfor i < lenas && as[i] == 1 {\n\t\t\ti++\n\t\t\tseqlocal++\n\t\t}\n\t\tseqglobal = max(seqglobal, seqlocal)\n\t\tseqlocal = i - isave\n\t}\n\tfmt.Println(seqglobal)\n}\n", "lang": "Go", "bug_code_uid": "a01c2e4a8c2cf56ecb77eaa362ef5bb8", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "85f676ebefac1e35da57d2387439b2eb", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7775919732441472, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc Count(left, right int, a []int) (cnt int) {\n for i, val := range a {\n if left <= i && i <= right {\n cnt += 1 - val\n } else {\n cnt += val\n }\n }\n return\n}\n\nfunc main() {\n var n int\n fmt.Scanln(\"%d\", &n)\n var a = make([]int, n)\n for i := range a {\n fmt.Scanf(\"%d\", &a[i])\n }\n best := 0\n for i := 0; i < n; i++ {\n for j := i; j < n; j++ {\n cnt := Count(i,j,a)\n if best < cnt {\n best = cnt\n }\n }\n }\n fmt.Println(best)\n}\n", "lang": "Go", "bug_code_uid": "3565226925a55cceb0ec6b9d84d52720", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "d4a80187aeb92b68c4f32923a9b31724", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9621882542236525, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc I(i ...interface{}) error {\n\t_, err := fmt.Fscan(r, i...)\n\treturn err\n}\n\nfunc O(o ...interface{}) {\n\tfmt.Fprint(w, o...)\n}\n\nvar (\n\tr *bufio.Reader\n\tw *bufio.Writer\n)\n\nfunc init() {\n\tif f, err := os.Open(\"in.goC\"); err == nil {\n\t\tr = bufio.NewReader(f)\n\t} else {\n\t\tr = bufio.NewReader(os.Stdin)\n\t}\n\tw = bufio.NewWriter(os.Stdout)\n}\n\nfunc main() {\n\tdefer w.Flush()\n\tvar n, m, a, b int\n\tfor I(&n, &m, &a, &b) == nil {\n\t\tsolve(n, m, a, b)\n\t}\n}\n\nfunc solve(n, m, a, b int) {\n\tmin := (n/m)*b + (n%m)*a\n\tif min > n*a {\n\t\tmin = n * a\n\t}\n\tO(min, \"\\n\")\n}\n", "lang": "Go", "bug_code_uid": "c857b3a450dc87ae3cfff2be52eb727e", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "6f33e27de1584114159b58911a1b636c", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9581589958158996, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n \"fmt\"\n)\n\nfunc min(x, y int) int {\n if x < y {\n return x\n }\n return y\n}\n\nfunc main(){\n var n, m, a, b int\n fmt.Scan(&n, &m, &a, &b)\n fmt.Println(min(n*a, ((n/m)*b + (n%m)*a)))\n}\n", "lang": "Go", "bug_code_uid": "c836fe0ec09f75ac776f2ff727cadfdc", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "997ecb0c6c57682bff7d9aa41c543131", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9817158931082982, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\nimport \"fmt\"\n\nfunc main() {\n\tvar (\n\t\tn, m, a, b int\n\t\tper float32\n\t)\n\tfmt.Scanln(&n, &m, &a, &b)\n\tper = float32(b/m)\n\tif per >= float32(b) {\n\t\tfmt.Println(n*a)\n\t}else {\n\t\tif n%m == 0 {\n\t\t\tfmt.Println(n/m*b)\n\t\t}else{\n\t\t\tremain := n%m\n\t\t\tif remain*a >= b {\n\t\t\t\tfmt.Println((n/m+1)*b)\n\t\t\t}else {\n\t\t\t\tfmt.Println((n%m)*a + (n/m)*b)\n\t\t\t}\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "9a525dfcf8b181dff6e5f313621d880b", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "20e9e76bee03e0c3367ed85aac1be8b0", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9506302521008403, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nvar scanner = bufio.NewScanner(os.Stdin)\nvar writer = bufio.NewWriter(os.Stdout)\n\n//Wrong\nfunc main() {\n\tdefer writer.Flush()\n\tscanner.Split(bufio.ScanWords)\n\n\tn, m, a, b := nextInt(), nextInt(), nextInt(), nextInt()\n\n\tcost1 := a * n\n\tcost2 := (n / m) * b + (n % m) * a\n\n\tif cost1 >= cost2 {\n\t\tprintln(cost2)\n\t} else {\n\t\tprintln(cost1)\n\t}\n\n}\n\nfunc next() string {\n\tif !scanner.Scan() {\n\t\tpanic(\"Scan error\")\n\t}\n\treturn scanner.Text()\n}\n\nfunc nextInt() int {\n\tn, err := strconv.Atoi(next())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn n\n}\n\nfunc nextFloat() float64 {\n\tn, err := strconv.ParseFloat(next(), 64)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn n\n}\n\nfunc println(a ...interface{}) {\n\tfmt.Fprintln(writer, a...)\n}\n\nfunc print(a ...interface{}) {\n\tfmt.Fprint(writer, a...)\n}\n\nfunc printf(format string, a ...interface{}) {\n\tfmt.Fprintf(writer, format, a...)\n}", "lang": "Go", "bug_code_uid": "f2c88c17391b8f9ef9728942d10c7a1c", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "ee625aaaa403948562a014f908cdc2c3", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9244060475161987, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n, m, a, b int\n\tfmt.Scanf(\"%d %d %d %d\", &n, &m, &a, &b)\n\tsum := n / m * b\n\tif (n % m) * a > b {\n\t\tsum += b\n\t}else {\n\t\tsum += (n % m) * a\n\t}\n\tfmt.Printf(\"%d\", sum)\n\n}\n", "lang": "Go", "bug_code_uid": "b4c9db4e9d8aefaa726e614e7cfeeda3", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "cc414215d5e90a982f0fc4ddf6558438", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.6466666666666666, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var n, m, a, b int\n fmt.Scanf(\"%d %d %d %d\", &n, &m, &a, &b)\n var x = n * a\n var y = (n / m) * b + (n % m) * a\n if x < y {\n fmt.Printf(\"%d\\n\", x)\n } else {\n fmt.Printf(\"%d\\n\", y)\n }\n}\n", "lang": "Go", "bug_code_uid": "9d70309c3518e7e9b9d739ad9a5f4003", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "303a55c9737f4ae88123e9db11bfb40a", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9058577405857741, "equal_cnt": 9, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\n)\n//a - цена\n//n - поездки\n//m - аб - колво\n//b - аб цена\nfunc main() {\n\t//input\n\tn, m, a, b := 10, 3, 5, 1\n\tfmt.Scanf(\"%d %d %d %d\", &n, &m, &a, &b)\n\t//output\n\tfmt.Print(solution(n, m, a ,b))\n}\nfunc solution(n, m, a, b int) int {\n\tavgA := float64(b) / float64(m)\n\n\tif (float64(a) <= avgA) {\n\t\treturn n * a\n\t}\n\tr := (n / m) * b\n\tif ost := n % m; ost > 0 {\n\t\tif (r + a) > (r + b) { r+= b} else {r += (a * ost)}\n\t}\n\treturn r\n}", "lang": "Go", "bug_code_uid": "5aff48bc2f872e1e8620cccbc3ba022d", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "4aad2d2e43f349f3424d3c14a7a3a989", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9993311036789297, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\n)\n\n//n - поездки\n//m - аб - колво\n//a - цена\n//b - аб цена\nfunc main() {\n\t//input\n\tn, m, a, b := 101, 110, 1, 100\n\tfmt.Scanf(\"%d %d %d %d\", &n, &m, &a, &b)\n\t//output\n\tfmt.Print(solution(n, m, a ,b))\n}\nfunc solution(n, m, a, b int) int {\n\n\tavg := float64(b) / float64(m)\n\tr := (n / m) * b\n\n\tswitch {\n\tcase m > n && b < n * a:\n\t\treturn b\n\tcase float64(a) <= avg:\n\t\treturn n * a\n\tcase n % m > 0 && a > b:\n\t\treturn r + b\n\tcase n % m > 0 && a < b:\n\t\treturn r + (a * (n % m))\n\tdefault:\n\t\treturn r\n\t}\n\n}\n\n/**\navgA := float64(b) / float64(m)\n\tif m > n && b < n * a { return b }\n\tif (float64(a) <= avgA) { return n * a }\n\tr := (n / m) * b\n\tif mod := n % m; mod > 0 {\n\t\tif a > b { r+= b} else {r += (a * mod)}\n\t}\n\treturn r\n */", "lang": "Go", "bug_code_uid": "f8ea12b71bf1133341009b5173385f7d", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "4aad2d2e43f349f3424d3c14a7a3a989", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.830379746835443, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar n, m, a, b int\n\tfmt.Scan(&n, &m, &a, &b)\n\n\tif b/m > a {\n\t\tfmt.Print(a * n)\n\t} else {\n\t\tfmt.Print(b*(n/m) + a*(n%m))\n\t}\n}\n", "lang": "Go", "bug_code_uid": "19c283ab40d8105639dc46ecc094474d", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "e844c580ade7accb64a6994c0be57007", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "Go"} {"similarity_score": 0.9982046678635548, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc main() {\n\tscanner := bufio.NewScanner(os.Stdin)\n\tscanner.Scan()\n\tall := scanner.Text()\n\tvar chList []int\n\tfor _, ch := range strings.Split(all, \" \") {\n\t\tch, err := strconv.Atoi(ch)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tchList = append(chList, ch)\n\t}\n\tn, m, a, b := chList[0], chList[1], chList[2], chList[3]\n\tmoney := 0\n\tif (b / m) < a {\n\t\tif (n%m)*a < b {\n\t\t\tmoney = (n%m)*a + n/m*b\n\t\t} else {\n\t\t\tmoney = n/m*b + 1\n\t\t}\n\t} else {\n\t\tmoney = n * a\n\t}\n\tfmt.Println(money)\n}\n", "lang": "Go", "bug_code_uid": "bf13d72ea8bba4b09d2c7a94c6bfa84d", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "100f791bd6c414d8ccdef5f1a8e8fc51", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9705882352941176, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n var a, b uint64\n fmt.Scan(&a, &b);\n\n cnt := 0\n ref := uint64(0)\n for bits := 1; ref <= b; bits++ {\n ref = ref*2 + 1\n for i := 1; i < bits; i++ {\n ref2 := ref - 1<= a && ref2 <= b {\n cnt++ \n }\n }\n }\n fmt.Println(cnt)\n}\n", "lang": "Go", "bug_code_uid": "c7280ab3f4fe783f58642d59a1e6275d", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "35cdc3e3034d73f561be97a3d2e0e728", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "Go"} {"similarity_score": 0.9140461215932913, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tvar a, b int64\n\tif _, err := fmt.Scanf(\"%d %d\\n\", &a, &b); err != nil {\n\t\treturn\n\t}\n\n\tas, ac, ai := to_binary_string(a)\n\tbs, bc, bi := to_binary_string(b)\n\n\tvar c [3]int\n\n\tif len(as) < len(bs) {\n\t\tif ac == 0 {\n\t\t\tc[0] = 0\n\t\t} else {\n\t\t\tc[0] = len(as) - ai\n\t\t}\n\t\tfor i := len(as) + 1; i <= len(bs)-1; i++ {\n\t\t\tc[1] += i - 1\n\t\t}\n\t\tif bc == 0 {\n\t\t\tc[2] = len(bs) - 1\n\t\t} else {\n\t\t\tc[2] = bi - 1\n\t\t\tif bc == 1 {\n\t\t\t\tc[2] += 1\n\t\t\t}\n\t\t}\n\t} else if len(as) == len(bs) {\n\t\tif ai == bi-1 {\n\t\t\tc[1] = 1\n\t\t} else if ai > bi-1 {\n\t\t\tif ac == 1 || bc == 1 {\n\t\t\t\tc[1] = 1\n\t\t\t}\n\t\t} else {\n\t\t\tc[1] = bi - ai\n\t\t}\n\t}\n\n\tfmt.Println(c[0] + c[1] + c[2])\n}\n\nfunc to_binary_string(n int64) (string, int, int) {\n\tout := \"\"\n\tzero_count := 0\n\tfirst_zero_index := -1\n\tfor i := 0; n > 0; i++ {\n\t\tif n%2 == 0 {\n\t\t\tzero_count++\n\t\t\tfirst_zero_index = i\n\t\t}\n\t\tout = strconv.FormatInt(n%2, 10) + out\n\t\tn /= 2\n\t}\n\treturn out, zero_count, len(out) - first_zero_index - 1\n}\n", "lang": "Go", "bug_code_uid": "c8dba0a9dcec53bee140a86d55187b65", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "66490b54fdf5d690ead34e3d34ef5939", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.5257903494176372, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": "// Try Codeforces\n// author: Leonardone @ NEETSDKASU\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar m, b int64\n\tfmt.Scan(&m, &b)\n\tx := m * b / 2\n\ty := (-x + m*b) / m\n\ts1 := (y + 1) * x * (x + 1) / 2\n\ts2 := (x + 1) * y * (y + 1) / 2\n\tfmt.Println(s1 + s2)\n}\n", "lang": "Go", "bug_code_uid": "568762a362bd155508af77060dc047e1", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "b5027b1809f1e5cdf8ec4956b2386c7c", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9735426973542697, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n)\n\nfunc calc(x, n int64) int64 {\n\tsum := int64(0)\n\n\tfor i := x; i >= 0; i-- {\n\t\tsum += n*(n-1)/2 + n*i\n\t}\n\treturn sum\n}\n\nfunc main() {\n\tsc := NewScanner()\n\tM, B := sc.NextInt64(), sc.NextInt64()\n\n\tmx := int64(0)\n\tfor x := M*B/2 - 1; x <= M*B/2+1; x++ {\n\t\tif x < 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\ty := -((x - B*M) / M)\n\n\t\tif y < 0 {\n\t\t\tcontinue\n\t\t}\n\t\tn := y + 1\n\t\tq := calc(x, n)\n\t\tif mx < q {\n\t\t\tmx = q\n\t\t}\n\t}\n\tfmt.Println(mx)\n\n}\n\ntype Scanner struct {\n\tr *bufio.Reader\n\tbuf []byte\n\tp int\n}\n\nfunc NewScanner() *Scanner {\n\trdr := bufio.NewReaderSize(os.Stdin, 1000)\n\treturn &Scanner{r: rdr}\n}\nfunc (s *Scanner) Next() string {\n\ts.pre()\n\tstart := s.p\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tbreak\n\t\t}\n\t}\n\tresult := string(s.buf[start:s.p])\n\ts.p++\n\treturn result\n}\nfunc (s *Scanner) NextLine() string {\n\ts.pre()\n\tstart := s.p\n\ts.p = len(s.buf)\n\treturn string(s.buf[start:])\n}\nfunc (s *Scanner) NextInt() int {\n\tv, _ := strconv.Atoi(s.Next())\n\treturn v\n}\nfunc (s *Scanner) NextInt64() int64 {\n\tv, _ := strconv.ParseInt(s.Next(), 10, 64)\n\treturn v\n}\n\nfunc (s *Scanner) NextIntArray() []int {\n\ts.pre()\n\tstart := s.p\n\tresult := []int{}\n\tfor ; s.p < len(s.buf)+1; s.p++ {\n\t\tif s.p == len(s.buf) || s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)\n\t\t\tresult = append(result, int(v))\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\n\treturn result\n}\nfunc (s *Scanner) NextInt64Array() []int64 {\n\ts.pre()\n\tstart := s.p\n\tresult := []int64{}\n\tfor ; s.p < len(s.buf)+1; s.p++ {\n\t\tif s.p == len(s.buf) || s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)\n\t\t\tresult = append(result, v)\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\treturn result\n}\n\nfunc (s *Scanner) NextMap() map[int]bool {\n\ts.pre()\n\tstart := s.p\n\tmp := map[int]bool{}\n\tfor ; s.p < len(s.buf); s.p++ {\n\t\tif s.buf[s.p] == ' ' {\n\t\t\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\t\t\tmp[v] = true\n\t\t\tstart = s.p + 1\n\t\t}\n\t}\n\tv, _ := strconv.Atoi(string(s.buf[start:s.p]))\n\tmp[v] = true\n\n\treturn mp\n}\n\nfunc (s *Scanner) pre() {\n\tif s.p >= len(s.buf) {\n\t\ts.readLine()\n\t\ts.p = 0\n\t}\n}\nfunc (s *Scanner) readLine() {\n\ts.buf = make([]byte, 0)\n\tfor {\n\t\tl, p, e := s.r.ReadLine()\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\t\ts.buf = append(s.buf, l...)\n\t\tif !p {\n\t\t\tbreak\n\t\t}\n\t}\n}\n", "lang": "Go", "bug_code_uid": "cf8f2b60f3ee3688734da8b5d6301cee", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "e0ea7035e3b4e4a805f779da3bc2c641", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.7005649717514124, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc sum(k, num int64) int64 {\n\treturn num * ((k-1)+(k - num))/2 + 1\n}\n\nfunc run(n, k int64) {\n\tvar i, j, mid int64\n\ti, j = 1, k-1\n\tmid = (i + j) >> 1\n\tif sum(k, j) < n {\n\t\tfmt.Println(-1)\n\t\treturn\n\t}\n\tfor i < j {\n\t\tif sum(n, mid) > n {\n\t\t\tj = mid - 1\n\t\t} else {\n\t\t\ti = mid + 1\n\t\t}\n\t\tmid = (i + j) >> 1\n\t}\n\tfmt.Println(mid)\n}\n\nfunc main() {\n\tvar n, k int64\n\tfor _, err := fmt.Scanf(\"%d %d\", &n, &k); err == nil; _, err = fmt.Scanf(\"%d %d\", &n, &k) {\n\t\trun(n, k)\n\t}\n}\n", "lang": "Go", "bug_code_uid": "2d53b2984565e38b0347d0f5012b72b8", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "a1b5f63b1f79c9d20f6ea6c177882205", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.998019801980198, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc sum(k, num int64) int64 {\n\treturn num * ((k-1)+(k - num))/2 + 1\n}\n\nfunc run(n, k int64) {\n\tvar i, j, mid int64\n\ti, j = 1, k-1\n\tmid = (i + j) >> 1\n\tif sum(k, j) < n {\n\t\tfmt.Println(-1)\n\t\treturn\n\t}\n\tfor i < j {\n\t\ts := sum(k, mid)\n\t\tif s >= n {\n\t\t\tj = mid\n\t\t} else {\n\t\t\ti = mid + 1\n\t\t}\n\t\tmid = (i + j) >> 1\n\t}\n\tfmt.Println(mid)\n}\n\nfunc main() {\n\tvar n, k int64\n\tfor _, err := fmt.Scanf(\"%d %d\", &n, &k); err == nil; _, err = fmt.Scanf(\"%d %d\", &n, &k) {\n\t\trun(n, k)\n\t}\n}", "lang": "Go", "bug_code_uid": "6174c5ee37122a285440d86889dcfa0e", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "a1b5f63b1f79c9d20f6ea6c177882205", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9509433962264151, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tvar a,b,c,d,e,f int\n\tfmt.Scan(&a,&b,&c)\n\td=(a+b-c)/2\n\te=(b+c-a)/2\n\tf=(a+c-b)/2\n\tif ((a+b+c)%2!=0) || ((a+b) b {\n\t\ta = b\n\t}\n\tif a > c {\n\t\ta = c\n\t}\n\tprintf(\"%d\\n\", 7*a)\n}\n", "lang": "Go", "bug_code_uid": "01294a65c2f99b752f1f694440fd5d66", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "75d0ba0597d8b4ecafa6139ce9f2b788", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.97165991902834, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport “fmt” \n\nfunc min(a, b int) int {\n if a < b {\n return a\n }\n return b\n}\n\nfunc main() {\n var a, b, c int\n fmt.Scan(&a, &b, &c)\n b /= 2\n c /= 4\n r := min(a, b)\n r = min(r, c)\n fmt.Print(r*7)\n}", "lang": "Go", "bug_code_uid": "84c57a1ebaba3a2f36c67855b51e3234", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "b6dad192ccd62ed5f64c01d95fd32edd", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.8074534161490683, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tr := bufio.NewReader(os.Stdin)\n\tw := bufio.NewWriter(os.Stdout)\n\tdefer w.Flush()\n\n\tvar n int\n\tfmt.Fscan(r, &n)\n\tfmt.Fprintln(w, 2*n + 1)\n}\n", "lang": "Go", "bug_code_uid": "2d57879529a87a59bb6e5f561aa90330", "src_uid": "d0a8604b78ba19ab769fd1ec90a72e4e", "apr_id": "9586ee4733e9a4b8a6bb875e009539cf", "difficulty": 1500, "tags": ["geometry", "math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"} {"similarity_score": 0.9986201458702937, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"sort\"\n\t\"strconv\"\n)\n\nconst cf = false\n\nfunc solve() {\n\tvar n int\n\tfmt.Fscan(in, &n)\n\tif n == 1 {\n\t\tfmt.Fprintln(out, 3)\n\t} else {\n\t\tfmt.Fprintln(out, 4+int(math.Floor((4.*float64(n)-3.)/3.)))\n\t}\n}\n\nfunc main() {\n\tdefer out.Flush()\n\tt := 1\n\t//fmt.Fscan(in, &t)\n\tfor ; t > 0; t-- {\n\t\tsolve()\n\t}\n}\n\nfunc ConvertInt(val string, base, toBase int) (string, error) {\n\ti, err := strconv.ParseInt(val, base, 64)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn strconv.FormatInt(i, toBase), nil\n}\n\ntype set[T Ordered] struct {\n\titms map[T]struct{}\n}\n\nfunc (s *set[T]) init() {\n\tif s.itms == nil {\n\t\ts.itms = make(map[T]struct{})\n\t}\n}\n\nfunc (s *set[T]) add(item T) *set[T] {\n\ts.init()\n\ts.itms[item] = exists\n\treturn s\n}\n\nfunc (s *set[T]) remove(item T) *set[T] {\n\ts.init()\n\tdelete(s.itms, item)\n\treturn s\n}\n\nfunc (s *set[T]) has(item T) bool {\n\ts.init()\n\t_, c := s.itms[item]\n\treturn c\n}\n\nfunc (s *set[T]) sortedItems() []T {\n\ts.init()\n\titems := make([]T, 0, s.size())\n\tfor item := range s.itms {\n\t\titems = append(items, item)\n\t}\n\tsort.Slice(items, func(i, j int) bool {\n\t\treturn items[i] < items[j]\n\t})\n\treturn items\n}\n\nfunc (s *set[T]) items() []T {\n\ts.init()\n\titems := make([]T, 0, s.size())\n\tfor item := range s.itms {\n\t\titems = append(items, item)\n\t}\n\treturn items\n}\n\nfunc (s *set[T]) size() int {\n\ts.init()\n\treturn len(s.itms)\n}\n\nvar exists = struct{}{}\n\nconst MaxUint = ^uint(0)\nconst MinUint = 0\nconst MaxInt = int(MaxUint >> 1)\nconst MinInt = -MaxInt - 1\n\nfunc reverseStr(s string) string {\n\tr := []rune(s)\n\tfor i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {\n\t\tr[i], r[j] = r[j], r[i]\n\t}\n\treturn string(r)\n}\n\ntype Float interface {\n\t~float32 | ~float64\n}\n\ntype Integer interface {\n\tSigned | Unsigned\n}\n\ntype Signed interface {\n\t~int | ~int8 | ~int16 | ~int32 | ~int64\n}\n\ntype Unsigned interface {\n\t~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr\n}\n\ntype Ordered interface {\n\tInteger | Float | ~string\n}\n\nfunc abs[T Signed](x T) T {\n\tif x < 0 {\n\t\treturn -x\n\t}\n\treturn x\n}\n\nfunc min[T Ordered](x, y T) T {\n\tif x < y {\n\t\treturn x\n\t}\n\treturn y\n}\n\nfunc max[T Ordered](x, y T) T {\n\tif x > y {\n\t\treturn x\n\t}\n\treturn y\n}\n\nvar (\n\tin = getReader()\n\tout = getWriter()\n)\n\nfunc getReader() *bufio.Reader {\n\tif cf {\n\t\treturn bufio.NewReader(os.Stdin)\n\t} else {\n\t\tin, _ := os.Open(\"input.txt\")\n\t\treturn bufio.NewReader(in)\n\t}\n}\n\nfunc getWriter() *bufio.Writer {\n\tif cf {\n\t\treturn bufio.NewWriter(os.Stdout)\n\t} else {\n\t\tout, _ := os.Create(\"output.txt\")\n\t\treturn bufio.NewWriter(out)\n\t}\n}\n", "lang": "Go", "bug_code_uid": "0d61843f172afd0975bfaa2804775962", "src_uid": "d0a8604b78ba19ab769fd1ec90a72e4e", "apr_id": "39063b69ab43bdeb124ccd0bc99b0c05", "difficulty": 1500, "tags": ["geometry", "math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "Go"}