{"similarity_score": 0.7165520888418826, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\n//using System.Console;\n\nnamespace PrettyIntegers\n{\n class Program\n {\n public static void Main(string[] args)\n {\n int n,m;\n n = Console.Read();\n m = Console.Read();\n List N = new List();\n List M = new List();\n\n for(int i = 0; i N = new List();\n List M = new List();\n\n parts = Console.ReadLine().Split(' ');\n for(int i = 0; i res = new List();\n for(int i = 0; i < s1.Length; i++)\n {\n StringBuilder tempo = new StringBuilder();\n tempo.Append(s1[i]);\n for (int j = 0; j < s2.Length; j++)\n {\n tempo.Append(s2[j]);\n res.Add(int.Parse(tempo.ToString()));\n tempo.Remove(1, 1);\n }\n }\n Console.WriteLine(res.Min());\n Console.ReadLine();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "8903acdf88597203f15647549e9bc15d", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "6bb01f9ded19050c32b74c378878ed52", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9318600368324125, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\nnamespace ConsoleApp9\n{\n class Program\n {\n static void Main(string[] args)\n {\n var nbr = int.Parse(Console.ReadLine());\n\n Console.WriteLine((nbr % 2 == 0 && ((nbr /2) % 2 == 0) ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "3f9a2685163f1ceffcccbfae12f5261f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b6a6236f66205cef4a8283f65445499a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9046087888531619, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\npublic class Program\n{\n public static void Main()\n {\n byte W;\n\n if (byte.Parse(Console.ReadLine()) == 2)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n if (byte.Parse(Console.ReadLine()) % 2 == 0) \n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "9249577c2c9a14505565fd1a6a034b28", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "35321d59b292dc9b9d808bd18c951a9f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.40248447204968946, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": " private static string CheckEven(int x)\n {\n if (x%2==0)\n {\n return \"YES\";\n }\n else\n return \"NO\";\n }", "lang": ".NET Core C#", "bug_code_uid": "4af17364ef67ed7a27609d237973078f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5ecab9e63ffae0289499e6258d99bc7b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5022692889561271, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace Watermelon\n{\n internal class Program\n {\n private static void Main(string[] args)\n {\n Console.WriteLine(args[0]);\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "a86b2b277263c3f2336b00504fd75a86", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9f04c7b6c6d41f900d5573dd291e2a3d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.14181818181818182, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "private static void Main(string[] args)\n{\n Console.WriteLine(args[0]);\n}", "lang": ".NET Core C#", "bug_code_uid": "eb8a33074433a3a252ee59aa583859ad", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9f04c7b6c6d41f900d5573dd291e2a3d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.560625814863103, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "using System;\n\nnamespace Watermelon\n{\n internal class Program\n {\n private static void Main()\n {\n string line;\n while ((line = Console.ReadLine()) != string.Empty)\n {\n Console.WriteLine(line);\n }\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "587cd38c084862d887357a4ec99dda4d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9f04c7b6c6d41f900d5573dd291e2a3d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7514450867052023, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 8, "bug_source_code": "\nnamespace Watermelon {\n class Program {\n static void Main(string[] args) {\n string w = Console.ReadLine();\n int weight = Convert.ToInt32(w);\n if (weight % 2 == 0) {\n Console.WriteLine(\"YES\");\n } else {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "c9f0f7475639817f6340b846c81e9e30", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "95f09c25eba3893910a6494a3d945b8d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5240847784200385, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 7, "bug_source_code": "int w = Convert.ToInt32(Console.ReadLine());\n\n if (w/2 % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }", "lang": ".NET Core C#", "bug_code_uid": "22db48f91435a24f9250c2de45f5cfed", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c2efe4d069f21545fac265c709aee250", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.0422873618452667, "equal_cnt": 20, "replace_cnt": 17, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 20, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.30611.23\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp5\", \"ConsoleApp5\\ConsoleApp5.csproj\", \"{621884C1-8947-4892-8ADD-3D869542F695}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{621884C1-8947-4892-8ADD-3D869542F695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{621884C1-8947-4892-8ADD-3D869542F695}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{621884C1-8947-4892-8ADD-3D869542F695}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{621884C1-8947-4892-8ADD-3D869542F695}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {E3D8F1A6-2043-401B-A41C-BD2B4213C5AA}\n\tEndGlobalSection\nEndGlobal\n", "lang": ".NET Core C#", "bug_code_uid": "6f1852de379dee0bb3f51b608216af2a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "faf383e4d43078ad24cb7a006e6f3931", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9083665338645418, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace WaterMillon\n{\n class Program\n {\n static void Main(string[] args)\n {\n Int16 kilos = 0;\n\n kilos = Convert.ToInt16(args[0]);\n if (kilos > 2 && kilos % 2 == 0)\n Console.Out.WriteLine(\"YES\");\n else\n Console.Out.WriteLine(\"NO\");\n\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "ae071d6317fa04170abf4e21421be7fe", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "6bdc724b1e561146b216e91eb0947406", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9914563106796116, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace CF\n{\n\tinternal class Program\n\t{\n\t\tprivate static void Main(string[] args)\n\t\t{\n\t\t\tvar sr = new InputReader(Console.In);\n\t\t\t//var sr = new InputReader(new StreamReader(\"input.txt\"));\n\t\t\tvar task = new Task();\n\t\t\tusing (var sw = Console.Out)\n\t\t\t{\n\t\t\t\t//using (var sw = new StreamWriter(\"output.txt\")) {\n\t\t\t\ttask.Solve(sr, sw);\n\t\t\t\t//Console.ReadKey();\n\t\t\t}\n\t\t}\n\t}\n\n\tinternal class Task\n\t{\n\t\tpublic void Solve(InputReader sr, TextWriter sw)\n\t\t{\n\t\t\tvar input = sr.ReadArrayOfInt32();\n\t\t\tvar x1 = input[0];\n\t\t\tvar y1 = input[1];\n\t\t\tvar x2 = input[2];\n\t\t\tvar y2 = input[3];\n\t\t\tinput = sr.ReadArrayOfInt32();\n\t\t\tvar x = input[0];\n\t\t\tvar y = input[1];\n\t\t\tvar dx = Math.Abs(x2 - x1);\n\t\t\tvar dy = Math.Abs(y2 - y1);\n\t\t\tvar rx = dx / x;\n\t\t\tif (dx % x != 0)\n\t\t\t{\n\t\t\t\tsw.WriteLine(\"NO\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ry = dy / y;\n\t\t\tif (dy % y != 0)\n\t\t\t{\n\t\t\t\tsw.WriteLine(\"NO\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (rx == 0 || ry == 0)\n\t\t\t{\n\t\t\t\tsw.WriteLine(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (Math.Abs(rx - ry) % 2 == 0) {\n\t\t\t\tsw.WriteLine(\"YES\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsw.WriteLine(\"NO\");\n\t\t}\n\t}\n}\n\ninternal class InputReader : IDisposable\n{\n\tprivate bool isDispose;\n\tprivate readonly TextReader sr;\n\n\tpublic InputReader(TextReader stream)\n\t{\n\t\tsr = stream;\n\t}\n\n\tpublic void Dispose()\n\t{\n\t\tDispose(true);\n\t\tGC.SuppressFinalize(this);\n\t}\n\n\tpublic string NextString()\n\t{\n\t\tvar result = sr.ReadLine();\n\t\treturn result;\n\t}\n\n\tpublic int NextInt32()\n\t{\n\t\treturn Int32.Parse(NextString());\n\t}\n\n\tpublic long NextInt64()\n\t{\n\t\treturn Int64.Parse(NextString());\n\t}\n\n\tpublic string[] NextSplitStrings()\n\t{\n\t\treturn NextString()\n\t\t\t\t\t\t\t\t\t\t.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\t}\n\n\tpublic T[] ReadArray(Func func)\n\t{\n\t\treturn NextSplitStrings()\n\t\t\t\t\t\t\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t\t\t\t\t\t\t.ToArray();\n\t}\n\n\tpublic int[] ReadArrayOfInt32()\n\t{\n\t\treturn ReadArray(Int32.Parse);\n\t}\n\n\tpublic long[] ReadArrayOfInt64()\n\t{\n\t\treturn ReadArray(Int64.Parse);\n\t}\n\n\tpublic T[] ReadArrayFromString(Func func, string str)\n\t{\n\t\treturn\n\t\t\t\t\t\t\t\t\t\tstr.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.ToArray();\n\t}\n\n\tprotected void Dispose(bool dispose)\n\t{\n\t\tif (!isDispose)\n\t\t{\n\t\t\tif (dispose)\n\t\t\t\tsr.Close();\n\t\t\tisDispose = true;\n\t\t}\n\t}\n\n\t~InputReader()\n\t{\n\t\tDispose(false);\n\t}\n}", "lang": "MS C#", "bug_code_uid": "5e73ba35a49f673dd6c3a95ec58d6eae", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "8ff7a70819a17924413416d4b84c39be", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8759804960780156, "equal_cnt": 19, "replace_cnt": 14, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 19, "bug_source_code": "using System;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1.CodeForces\n{\n class _4032\n {\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024 * 10), Encoding.ASCII, false, 1024 * 10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), Encoding.ASCII, 1024 * 10);\n\n class Node : IComparable\n {\n public long X { get; set; }\n public long Y { get; set; }\n public int CompareTo(object obj)\n {\n if (this.Y > ((Node)obj).Y)\n {\n return 1;\n }\n if (this.Y == ((Node)obj).Y)\n {\n return 0;\n }\n return -1;\n }\n }\n\n static void Main(String[] args)\n {\n var data = Console.ReadLine().TrimEnd().Split(' ').Select(double.Parse).ToList();\n var x1 = data[0];\n var y1 = data[1];\n var x2 = data[2];\n var y2 = data[3];\n data = Console.ReadLine().TrimEnd().Split(' ').Select(double.Parse).ToList();\n var x = data[0];\n var y = data[1];\n\n double k1 = (x2 - x1) / x;\n double k2 = (y2 - y1) / y;\n\n if(k1 % 1 ==0 && k2 % 1== 0 && k1%2==k2%2)\n {\n Console.WriteLine(\"YES\");\n } else\n {\n Console.WriteLine(\"NO\");\n\n }\n }\n\n }\n}", "lang": "MS C#", "bug_code_uid": "978fe94179e4b58e04f8bfca55b9b653", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "915ae1f3bafb714ecc609cc0eb99488f", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9258928571428572, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace HayCragrer\n{\n class Problem4\n {\n static void Main(string[] args)\n {\n int[] coords = new int[4];\n string[] text = Console.ReadLine().Split();\n string[] text1 = Console.ReadLine().Split();\n int[] steps = new int[2];\n for (int i = 0; i < 4; i++)\n {\n coords[i] = int.Parse(text[i]);\n }\n for (int i = 0; i < 2; i++)\n {\n steps[i] = int.Parse(text1[i]);\n }\n int x = coords[2] - coords[0];\n int y = coords[3] - coords[1];\n if ((x % steps[0] == 0) && (y % steps[1] == 0))\n {\n if ((x / steps[0] -y / steps[1]) % 2==0)\n {\n Console.WriteLine(\"YES\");\n }\n \n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "bd605d108102eb2d691d26633c1f3fbb", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "d09c6710df3465fc67d6b60da8346172", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9807088380439659, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 6, "fix_ops_cnt": 9, "bug_source_code": "using System;\nclass Program\n {\n static void Main(string[] args)\n {\n int[] frts, sec;\n { \n string[] input = Console.In.ReadToEnd().Split(new char[] { ' ', '\\n', '\\r', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n int n = int.Parse(input[0]);\n frts = new int[n++];\n for (int i = 2, j = 0; i <= n; ++i, j++)\n frts[j] = int.Parse(input[i]);\n sec = new int[input.Length - n++];\n for (int j = 0; n < input.Length; ++n, ++j)\n sec[j] = int.Parse(input[n]);\n }\n Array.Sort(frts);\n int nm = int.MinValue;\n for(int i = 0; i= 0) Console.WriteLine(frts[nm]);\n else\n {\n nm = sec.Min();\n if (nm > frts[0]) Console.WriteLine(\"{0}{1}\", frts[0], nm);\n else Console.WriteLine(\"{0}{1}\", nm, frts[0]);\n }\n }\n }", "lang": "MS C#", "bug_code_uid": "22ad2d4251979e2ea46a8adcdcb0e5fa", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "2b9f796967821de30f24791d3f11b36c", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9607066707279927, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A\n{\n class Program\n {\n static void Main()\n {\n string[] a1 = Console.ReadLine().Split(' ');\n int c1 = Convert.ToInt32(a1[0]);\n int c2 = Convert.ToInt32(a1[1]);\n\n a1 = Console.ReadLine().Split(' ');\n string[] a2 = Console.ReadLine().Split(' ');\n\n int minn = 10;\n int min1 = 10;\n int min2 = 10;\n\n for (int i = 0; i < c1; i++)\n {\n if (Convert.ToInt32(a1[i]) < min1)\n {\n min1 = Convert.ToInt32(a1[i]);\n }\n for (int j = 0; j < c2; j++)\n {\n if (Convert.ToInt32(a2[i]) < min2)\n {\n min2 = Convert.ToInt32(a2[i]);\n }\n if (a1[i] == a2[j])\n {\n if (Convert.ToInt32(a1[i]) < minn)\n {\n minn = Convert.ToInt32(a1[i]);\n }\n }\n }\n }\n\n if (minn != 10)\n {\n Console.WriteLine(\"{0}\",minn);\n }\n else\n {\n if (min1 < min2)\n {\n Console.WriteLine(\"{0}{1}\", min1, min2);\n }\n else\n {\n Console.WriteLine(\"{0}{1}\", min2, min1);\n }\n }\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "1d29ed36bae4466e4353adcb3f72b808", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "f6707b22045a6f31a9e0bef8d23385fd", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9215431296055483, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Flipping_Game\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int[] numbers = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n int maxCount = 0;\n for (int i = 0; i < numbers.Length; i--)\n {\n for (int j = 0; j < numbers.Length; j++)\n {\n int count = 0;\n for (int k = 0; k < numbers.Length; k++)\n {\n if (k <= j && k >= i)\n {\n count += 1 - numbers[k];\n }\n else\n {\n count += numbers[k];\n }\n }\n maxCount = Math.Max(count, maxCount);\n }\n }\n Console.WriteLine(maxCount);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "faccb201b3ef7ebbd2c6fb80d9c2291c", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "e23e53e872311c2c49c6c5a9c3e65506", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9767441860465116, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Flipping_Game\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int[] numbers = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n int maxCount = 0;\n for(int i = 0; i < numbers.Length;i++)\n {\n for (int j = 0; j < numbers.Length; j++)\n {\n int count = 0;\n for (int k = 0; k < numbers.Length; k++)\n {\n if (k >= i && k <= j)\n {\n if (numbers[k] == 0)\n count++;\n }\n else\n {\n if (numbers[k] == 1)\n count++;\n }\n }\n maxCount = Math.Max(count, maxCount);\n }\n Console.WriteLine(maxCount);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "aa83d4a01c37d84ae2be0dbdaf94f08f", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "e23e53e872311c2c49c6c5a9c3e65506", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8845861807137434, "equal_cnt": 11, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 10, "bug_source_code": "using System;\n\nnamespace ConsoleApp4\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int[] a = new int[n];\n int s;\n int t = 0;\n int jami = 0;\n for (int i = 0; i < n; i++)\n {\n a[i] = int.Parse(Console.ReadLine());\n jami += a[i];\n\n }\n s = jami;\n for (int i = 0; i < n; i++)\n {\n jami = s;\n if (a[i] == 0) \n {\n jami += 1;\n }\n if (a[i] == 1)\n {\n jami -= 1;\n }\n for (int j = i + 1; j < n; j++)\n {\n if (a[j] == 0)\n {\n jami += 1;\n }\n if (a[j] == 1)\n {\n jami -= 1;\n }\n if (jami > t)\n {\n t = jami;\n }\n\n }\n }\n\n Console.WriteLine(t);\n\n\n\n\n\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "ad4d2ce3251932c5d22891c4acd25184", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "daeb201f21527d64b1119ce44ee4c23d", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.925195385187942, "equal_cnt": 8, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\nnamespace ConsoleApp4\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n Console.WriteLine(n);\n int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int s;\n int t = 0;\n \n int jami = 0;\n for (int i = 0; i < n; i++)\n {\n \n jami += a[i];\n\n }\n s = jami;\n for (int i = 0; i < n; i++)\n {\n jami = s;\n if (a[i] == 0) \n {\n jami += 1;\n }\n if (a[i] == 1)\n {\n jami -= 1;\n }\n for (int j = i + 1; j < n; j++)\n {\n if (a[j] == 0)\n {\n jami += 1;\n }\n if (a[j] == 1)\n {\n jami -= 1;\n }\n if (jami > t)\n {\n t = jami;\n }\n\n }\n }\n\n Console.WriteLine(t);\n\n\n\n\n\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f3923125914074d5d09e1267c09166ec", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "daeb201f21527d64b1119ce44ee4c23d", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7826955254493442, "equal_cnt": 57, "replace_cnt": 33, "delete_cnt": 11, "insert_cnt": 12, "fix_ops_cnt": 56, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static System.Math;\nusing System.Text;\nusing System.Threading;\nusing System.Globalization;\nusing System.Runtime.CompilerServices;\nusing Library;\n\nnamespace Program\n{\n public static class ProblemD\n {\n static bool SAIKI = false;\n static public int numberOfRandomCases = 0;\n static public void MakeTestCase(List _input, List _output, ref Func _outputChecker)\n {\n }\n static public void Solve()\n {\n var n = NN;\n var m = NN;\n var q = NN;\n var pList = NNList(n);\n var ab = Repeat(0, m).Select(_ => new { a = NN - 1, b = NN - 1 }).ToArray();\n var query = Repeat(0, q).Select(_ => new { t = NN, param = NN }).ToArray();\n var deleteTgt = new bool[m];\n var uf = new LIB_UnionFind(pList.Select((e, idx) =>\n {\n var ret = new LIB_PriorityQueue();\n ret.Push(e, idx);\n return ret;\n }), (x, y) =>\n {\n if (x.Count > y.Count)\n {\n for (var i = 0; i < y.Count; i++)\n {\n x.Push(y.heap[i], y.dat[i]);\n }\n return x;\n }\n else\n {\n for (var i = 0; i < x.Count; i++)\n {\n y.Push(x.heap[i], x.dat[i]);\n }\n return y;\n }\n });\n foreach (var item in query)\n {\n if (item.t == 2) deleteTgt[item.param - 1] = true;\n }\n for (var i = 0; i < m; i++)\n {\n if (!deleteTgt[i])\n {\n uf.Unite(ab[i].a, ab[i].b);\n }\n }\n var ans = new List();\n for (var qqq = q - 1; qqq >= 0; qqq--)\n {\n if (query[qqq].t == 1)\n {\n var v = query[qqq].param - 1;\n ans.Add(uf.Calc(v));\n }\n else\n {\n var i = query[qqq].param - 1;\n uf.Unite(ab[i].a, ab[i].b);\n }\n }\n ans.Reverse();\n var deleted = new bool[n];\n foreach (var item in ans)\n {\n var ok = false;\n while (item.Count > 0)\n {\n var value = item.Pop();\n if (!deleted[value.Value])\n {\n deleted[value.Value] = true;\n Console.WriteLine(value.Key);\n ok = true;\n break;\n }\n }\n if (!ok) Console.WriteLine(0);\n }\n }\n class Printer : StreamWriter\n {\n public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }\n public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { base.AutoFlush = false; }\n public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { base.AutoFlush = false; }\n }\n static LIB_FastIO fastio = new LIB_FastIODebug();\n static public void Main(string[] args) { if (args.Length == 0) { fastio = new LIB_FastIO(); Console.SetOut(new Printer(Console.OpenStandardOutput())); } if (SAIKI) { var t = new Thread(Solve, 134217728); t.Start(); t.Join(); } else Solve(); Console.Out.Flush(); }\n static long NN => fastio.Long();\n static double ND => fastio.Double();\n static string NS => fastio.Scan();\n static long[] NNList(long N) => Repeat(0, N).Select(_ => NN).ToArray();\n static double[] NDList(long N) => Repeat(0, N).Select(_ => ND).ToArray();\n static string[] NSList(long N) => Repeat(0, N).Select(_ => NS).ToArray();\n static long Count(this IEnumerable x, Func pred) => Enumerable.Count(x, pred);\n static IEnumerable Repeat(T v, long n) => Enumerable.Repeat(v, (int)n);\n static IEnumerable Range(long s, long c) => Enumerable.Range((int)s, (int)c);\n static IOrderedEnumerable OrderByRand(this IEnumerable x) => Enumerable.OrderBy(x, _ => xorshift);\n static IOrderedEnumerable OrderBy(this IEnumerable x) => Enumerable.OrderBy(x.OrderByRand(), e => e);\n static IOrderedEnumerable OrderBy(this IEnumerable x, Func selector) => Enumerable.OrderBy(x.OrderByRand(), selector);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x) => Enumerable.OrderByDescending(x.OrderByRand(), e => e);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x, Func selector) => Enumerable.OrderByDescending(x.OrderByRand(), selector);\n static IOrderedEnumerable OrderBy(this IEnumerable x) => x.OrderByRand().OrderBy(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderBy(this IEnumerable x, Func selector) => x.OrderByRand().OrderBy(selector, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x) => x.OrderByRand().OrderByDescending(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x, Func selector) => x.OrderByRand().OrderByDescending(selector, StringComparer.OrdinalIgnoreCase);\n static string Join(this IEnumerable x, string separator = \"\") => string.Join(separator, x);\n static uint xorshift { get { _xsi.MoveNext(); return _xsi.Current; } }\n static IEnumerator _xsi = _xsc();\n static IEnumerator _xsc() { uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff); while (true) { var t = x ^ (x << 11); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); yield return w; } }\n static bool Chmax(this ref T lhs, T rhs) where T : struct, IComparable { if (lhs.CompareTo(rhs) < 0) { lhs = rhs; return true; } return false; }\n static bool Chmin(this ref T lhs, T rhs) where T : struct, IComparable { if (lhs.CompareTo(rhs) > 0) { lhs = rhs; return true; } return false; }\n }\n}\nnamespace Library {\n class LIB_FastIO\n {\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_FastIO() { str = Console.OpenStandardInput(); }\n readonly Stream str;\n readonly byte[] buf = new byte[2048];\n int len, ptr;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n byte read()\n {\n if (ptr >= len)\n {\n ptr = 0;\n if ((len = str.Read(buf, 0, 2048)) <= 0)\n {\n return 0;\n }\n }\n return buf[ptr++];\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n char Char()\n {\n byte b = 0;\n do b = read();\n while (b < 33 || 126 < b);\n return (char)b;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public string Scan()\n {\n var sb = new StringBuilder();\n for (var b = Char(); b >= 33 && b <= 126; b = (char)read())\n sb.Append(b);\n return sb.ToString();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public long Long()\n {\n long ret = 0; byte b = 0; var ng = false;\n do b = read();\n while (b != '-' && (b < '0' || '9' < b));\n if (b == '-') { ng = true; b = read(); }\n for (; true; b = read())\n {\n if (b < '0' || '9' < b)\n return ng ? -ret : ret;\n else ret = (ret << 3) + (ret << 1) + b - '0';\n }\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public double Double() { return double.Parse(Scan(), CultureInfo.InvariantCulture); }\n }\n class LIB_FastIODebug : LIB_FastIO\n {\n Queue param = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n string NextString() { if (param.Count == 0) foreach (var item in Console.ReadLine().Split(' ')) param.Enqueue(item); return param.Dequeue(); }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_FastIODebug() { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override string Scan() => NextString();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override long Long() => long.Parse(NextString());\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override double Double() => double.Parse(NextString());\n }\n class LIB_UnionFind\n {\n int[] d;\n T[] v;\n Func f;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(IEnumerable s, Func func)\n {\n v = s.ToArray();\n d = Enumerable.Repeat(-1, v.Length).ToArray();\n f = func;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool Unite(long x, long y)\n {\n x = Root(x);\n y = Root(y);\n if (x != y)\n {\n d[x] = d[x] + d[y];\n v[x] = f(v[x], v[y]);\n d[y] = (int)x;\n }\n return x != y;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool IsSame(long x, long y) => Root(x) == Root(y);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Root(long x) => d[x] < 0 ? x : d[x] = (int)Root(d[x]);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Count(long x) => -d[Root(x)];\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Calc(long x) => v[Root(x)];\n }\n class LIB_UnionFind : LIB_UnionFind\n {\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(long n) : base(Enumerable.Repeat(0, (int)n), (x, y) => x + y) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n new private void Calc(long x) { }\n }\n class LIB_PriorityQueue\n {\n public long[] heap;\n public int[] dat;\n public long Count\n {\n get;\n private set;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue()\n {\n heap = new long[163];\n dat = new int[163];\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(long key, int val)\n {\n if (Count == heap.Length) Expand();\n var i = Count++;\n heap[i] = key;\n dat[i] = val;\n while (i > 0)\n {\n var ni = (i - 1) / 2;\n if (key <= heap[ni]) break;\n heap[i] = heap[ni];\n dat[i] = dat[ni];\n i = ni;\n }\n heap[i] = key;\n dat[i] = val;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public KeyValuePair Pop()\n {\n var ret = new KeyValuePair(heap[0], dat[0]);\n var key = heap[--Count];\n var val = dat[Count];\n if (Count == 0) return ret;\n var i = 0; while ((i << 1) + 1 < Count)\n {\n var i1 = (i << 1) + 1;\n var i2 = (i << 1) + 2;\n if (i2 < Count && heap[i1] < heap[i2]) i1 = i2;\n if (key >= heap[i1]) break;\n heap[i] = heap[i1];\n dat[i] = dat[i1];\n i = i1;\n }\n heap[i] = key;\n dat[i] = val;\n return ret;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n void Expand()\n {\n var tmp = new long[Count << 1];\n for (var i = 0; i < heap.Length; ++i) tmp[i] = heap[i];\n heap = tmp;\n var tmp2 = new int[Count << 1];\n for (var i = 0; i < dat.Length; ++i) tmp2[i] = dat[i];\n dat = tmp2;\n }\n }\n class LIB_PriorityQueue\n {\n T[] heap;\n Comparison comp;\n public T Peek => heap[0];\n public long Count\n {\n get;\n private set;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, Comparison cmp, bool asc = true)\n {\n heap = new T[cap];\n comp = asc ? cmp : (x, y) => cmp(y, x);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(Comparison cmp, bool asc = true)\n {\n heap = new T[16384];\n comp = asc ? cmp : (x, y) => cmp(y, x);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, bool asc = true) : this(cap, Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(bool asc = true) : this(Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(T val)\n {\n if (Count == heap.Length) Expand();\n var i = Count++;\n heap[i] = val;\n while (i > 0)\n {\n var ni = (i - 1) / 2;\n if (comp(val, heap[ni]) >= 0) break;\n heap[i] = heap[ni];\n i = ni;\n }\n heap[i] = val;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Pop()\n {\n var ret = heap[0];\n var val = heap[--Count];\n if (Count == 0) return ret;\n var i = 0; while ((i << 1) + 1 < Count)\n {\n var i1 = (i << 1) + 1;\n var i2 = (i << 1) + 2;\n if (i2 < Count && comp(heap[i1], heap[i2]) > 0) i1 = i2;\n if (comp(val, heap[i1]) <= 0) break;\n heap[i] = heap[i1]; i = i1;\n }\n heap[i] = val;\n return ret;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n void Expand()\n {\n var tmp = new T[Count << 1];\n for (var i = 0; i < heap.Length; ++i) tmp[i] = heap[i];\n heap = tmp;\n }\n }\n class LIB_PriorityQueue\n {\n LIB_PriorityQueue> q;\n public KeyValuePair Peek => q.Peek;\n public long Count => q.Count;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, Comparison cmp, bool asc = true)\n {\n q = new LIB_PriorityQueue>(cap, (x, y) => cmp(x.Key, y.Key), asc);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(Comparison cmp, bool asc = true)\n {\n q = new LIB_PriorityQueue>((x, y) => cmp(x.Key, y.Key), asc);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, bool asc = true) : this(cap, Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(bool asc = true) : this(Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(TK k, TV v) => q.Push(new KeyValuePair(k, v));\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public KeyValuePair Pop() => q.Pop();\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "5c2a7de81784b2f7f8043ed612d82621", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "ebd2416c37321a805b07004e37be9a4e", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9531585732703051, "equal_cnt": 24, "replace_cnt": 8, "delete_cnt": 5, "insert_cnt": 10, "fix_ops_cnt": 23, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static System.Math;\nusing System.Text;\nusing System.Threading;\nusing System.Globalization;\nusing System.Runtime.CompilerServices;\nusing Library;\n\nnamespace Program\n{\n public static class ProblemD\n {\n static bool SAIKI = false;\n static public int numberOfRandomCases = 0;\n static public void MakeTestCase(List _input, List _output, ref Func _outputChecker)\n {\n }\n static public void Solve()\n {\n var n = (int)NN;\n var m = (int)NN;\n var q = (int)NN;\n var pList = NNList(n);\n var ab = Repeat(0, m).Select(_ => new { a = (int)NN - 1, b = (int)NN - 1 }).ToArray();\n var query = Repeat(0, q).Select(_ => new { t = (int)NN, param = (int)NN }).ToArray();\n var graph = Repeat(0, n).Select(_ => new List()).ToArray();\n var uf = new LIB_UnionFind(n);\n var deleted = new bool[m];\n foreach (var item in query)\n {\n if (item.t == 2) deleted[item.param - 1] = true;\n }\n var procTgtEdgeIndex = new bool[m];\n for (var i = 0; i < m; i++)\n {\n if (!deleted[i])\n {\n if (uf.Unite(ab[i].a, ab[i].b))\n {\n graph[ab[i].a].Add(ab[i].b);\n graph[ab[i].b].Add(ab[i].a);\n }\n }\n }\n foreach (var item in query.Reverse())\n {\n if (item.t == 2)\n {\n var i = item.param - 1;\n if (uf.Unite(ab[i].a, ab[i].b))\n {\n procTgtEdgeIndex[i] = true;\n graph[ab[i].a].Add(ab[i].b);\n graph[ab[i].b].Add(ab[i].a);\n }\n }\n }\n var param = new int[n];\n var qList = new List();\n var used = new bool[n];\n {\n var done = new bool[n];\n for (var i = 0; i < n; i++)\n {\n if (!done[i])\n {\n var c = qList.Count();\n var tmpq = new LIB_PriorityQueue();\n qList.Add(tmpq);\n var que = new Queue();\n que.Enqueue(i);\n done[i] = true;\n param[i] = c;\n while (que.Count > 0)\n {\n var v = que.Dequeue();\n foreach (var item in graph[v])\n {\n if (done[item]) continue;\n done[item] = true;\n param[item] = c;\n que.Enqueue(item);\n }\n }\n }\n qList[param[i]].Push((int)pList[i], i);\n }\n }\n foreach (var item in query)\n {\n if (item.t == 1)\n {\n var v = item.param - 1;\n var p = param[v];\n var que = qList[p];\n var value = 0L;\n while (que.Count > 0)\n {\n if (used[que.Peek.Item2] || p != param[que.Peek.Item2]) que.Pop();\n else\n {\n used[que.Peek.Item2] = true;\n value = que.Pop().Key;\n break;\n }\n }\n Console.WriteLine(value);\n }\n else\n {\n var leftV = ab[item.param - 1].a;\n var rightV = ab[item.param - 1].b;\n if (!procTgtEdgeIndex[item.param - 1]) continue;\n var leftQ = new Queue<(int, int)>();\n var rightQ = new Queue<(int, int)>();\n var color = param[leftV];\n var procV = leftV;\n var lidx = 0;\n var ridx = 0;\n var lv = leftV;\n var rv = rightV;\n var lp = rightV;\n var rp = leftV;\n var exit = false;\n while (true)\n {\n var leftOK = false;\n while (true)\n {\n while (graph[lv].Count > lidx)\n {\n var v = graph[lv][lidx++];\n if (v == lp) continue;\n leftQ.Enqueue((v, lv));\n leftOK = true;\n break;\n }\n if (leftOK) break;\n if (leftQ.Count == 0)\n {\n exit = true;\n break;\n }\n var pop = leftQ.Dequeue();\n lv = pop.Item1;\n lp = pop.Item2;\n lidx = 0;\n }\n if (exit) break;\n var rightOK = false;\n while (true)\n {\n while (graph[rv].Count > ridx)\n {\n var v = graph[rv][ridx++];\n if (v == rp) continue;\n rightQ.Enqueue((v, rv));\n rightOK = true;\n break;\n }\n if (rightOK) break;\n if (rightQ.Count == 0)\n {\n procV = rightV;\n exit = true;\n break;\n }\n var pop = rightQ.Dequeue();\n rv = pop.Item1;\n rp = pop.Item2;\n ridx = 0;\n }\n if (exit) break;\n }\n var procColorFrom = param[procV];\n var procColorTo = qList.Count;\n var tmpq = new LIB_PriorityQueue();\n qList.Add(tmpq);\n var procQ = new Queue();\n procQ.Enqueue(procV);\n var done = new bool[n];\n done[leftV] = true;\n done[rightV] = true;\n tmpq.Push((int)pList[procV], procV);\n param[procV] = procColorTo;\n while (procQ.Count > 0)\n {\n foreach (var item2 in graph[procQ.Dequeue()])\n {\n if (done[item2]) continue;\n if (param[item2] != procColorFrom) continue;\n if (!used[item2]) tmpq.Push((int)pList[item2], item2);\n param[item2] = procColorTo;\n done[item2] = true;\n procQ.Enqueue(item2);\n }\n }\n }\n }\n }\n class Printer : StreamWriter\n {\n public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }\n public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { base.AutoFlush = false; }\n public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { base.AutoFlush = false; }\n }\n static LIB_FastIO fastio = new LIB_FastIODebug();\n static public void Main(string[] args) { if (args.Length == 0) { fastio = new LIB_FastIO(); Console.SetOut(new Printer(Console.OpenStandardOutput())); } if (SAIKI) { var t = new Thread(Solve, 134217728); t.Start(); t.Join(); } else Solve(); Console.Out.Flush(); }\n static long NN => fastio.Long();\n static double ND => fastio.Double();\n static string NS => fastio.Scan();\n static long[] NNList(long N) => Repeat(0, N).Select(_ => NN).ToArray();\n static double[] NDList(long N) => Repeat(0, N).Select(_ => ND).ToArray();\n static string[] NSList(long N) => Repeat(0, N).Select(_ => NS).ToArray();\n static long Count(this IEnumerable x, Func pred) => Enumerable.Count(x, pred);\n static IEnumerable Repeat(T v, long n) => Enumerable.Repeat(v, (int)n);\n static IEnumerable Range(long s, long c) => Enumerable.Range((int)s, (int)c);\n static IOrderedEnumerable OrderByRand(this IEnumerable x) => Enumerable.OrderBy(x, _ => xorshift);\n static IOrderedEnumerable OrderBy(this IEnumerable x) => Enumerable.OrderBy(x.OrderByRand(), e => e);\n static IOrderedEnumerable OrderBy(this IEnumerable x, Func selector) => Enumerable.OrderBy(x.OrderByRand(), selector);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x) => Enumerable.OrderByDescending(x.OrderByRand(), e => e);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x, Func selector) => Enumerable.OrderByDescending(x.OrderByRand(), selector);\n static IOrderedEnumerable OrderBy(this IEnumerable x) => x.OrderByRand().OrderBy(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderBy(this IEnumerable x, Func selector) => x.OrderByRand().OrderBy(selector, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x) => x.OrderByRand().OrderByDescending(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x, Func selector) => x.OrderByRand().OrderByDescending(selector, StringComparer.OrdinalIgnoreCase);\n static string Join(this IEnumerable x, string separator = \"\") => string.Join(separator, x);\n static uint xorshift { get { _xsi.MoveNext(); return _xsi.Current; } }\n static IEnumerator _xsi = _xsc();\n static IEnumerator _xsc() { uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff); while (true) { var t = x ^ (x << 11); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); yield return w; } }\n static bool Chmax(this ref T lhs, T rhs) where T : struct, IComparable { if (lhs.CompareTo(rhs) < 0) { lhs = rhs; return true; } return false; }\n static bool Chmin(this ref T lhs, T rhs) where T : struct, IComparable { if (lhs.CompareTo(rhs) > 0) { lhs = rhs; return true; } return false; }\n }\n}\nnamespace Library {\n class LIB_FastIO\n {\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_FastIO() { str = Console.OpenStandardInput(); }\n readonly Stream str;\n readonly byte[] buf = new byte[2048];\n int len, ptr;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n byte read()\n {\n if (ptr >= len)\n {\n ptr = 0;\n if ((len = str.Read(buf, 0, 2048)) <= 0)\n {\n return 0;\n }\n }\n return buf[ptr++];\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n char Char()\n {\n byte b = 0;\n do b = read();\n while (b < 33 || 126 < b);\n return (char)b;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public string Scan()\n {\n var sb = new StringBuilder();\n for (var b = Char(); b >= 33 && b <= 126; b = (char)read())\n sb.Append(b);\n return sb.ToString();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public long Long()\n {\n long ret = 0; byte b = 0; var ng = false;\n do b = read();\n while (b != '-' && (b < '0' || '9' < b));\n if (b == '-') { ng = true; b = read(); }\n for (; true; b = read())\n {\n if (b < '0' || '9' < b)\n return ng ? -ret : ret;\n else ret = (ret << 3) + (ret << 1) + b - '0';\n }\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public double Double() { return double.Parse(Scan(), CultureInfo.InvariantCulture); }\n }\n class LIB_FastIODebug : LIB_FastIO\n {\n Queue param = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n string NextString() { if (param.Count == 0) foreach (var item in Console.ReadLine().Split(' ')) param.Enqueue(item); return param.Dequeue(); }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_FastIODebug() { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override string Scan() => NextString();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override long Long() => long.Parse(NextString());\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override double Double() => double.Parse(NextString());\n }\n class LIB_UnionFind\n {\n int[] d;\n T[] v;\n Func f;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(IEnumerable s, Func func)\n {\n v = s.ToArray();\n d = Enumerable.Repeat(-1, v.Length).ToArray();\n f = func;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool Unite(long x, long y)\n {\n x = Root(x);\n y = Root(y);\n if (x != y)\n {\n d[x] = d[x] + d[y];\n v[x] = f(v[x], v[y]);\n d[y] = (int)x;\n }\n return x != y;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool IsSame(long x, long y) => Root(x) == Root(y);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Root(long x) => d[x] < 0 ? x : d[x] = (int)Root(d[x]);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Count(long x) => -d[Root(x)];\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Calc(long x) => v[Root(x)];\n }\n class LIB_UnionFind : LIB_UnionFind\n {\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(long n) : base(Enumerable.Repeat(0, (int)n), (x, y) => x + y) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n new private void Calc(long x) { }\n }\n class LIB_PriorityQueue\n {\n long[] heap;\n int[] dat;\n public (long, int) Peek => (heap[0], dat[0]);\n public long Count\n {\n get;\n private set;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue()\n {\n heap = new long[128];\n dat = new int[128];\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(long key, int val)\n {\n if (Count == heap.Length) Expand();\n var i = Count++;\n heap[i] = key;\n dat[i] = val;\n while (i > 0)\n {\n var ni = (i - 1) / 2;\n if (key <= heap[ni]) break;\n heap[i] = heap[ni];\n dat[i] = dat[ni];\n i = ni;\n }\n heap[i] = key;\n dat[i] = val;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public KeyValuePair Pop()\n {\n var ret = new KeyValuePair(heap[0], dat[0]);\n var key = heap[--Count];\n var val = dat[Count];\n if (Count == 0) return ret;\n var i = 0; while ((i << 1) + 1 < Count)\n {\n var i1 = (i << 1) + 1;\n var i2 = (i << 1) + 2;\n if (i2 < Count && heap[i1] < heap[i2]) i1 = i2;\n if (key >= heap[i1]) break;\n heap[i] = heap[i1];\n dat[i] = dat[i1];\n i = i1;\n }\n heap[i] = key;\n dat[i] = val;\n return ret;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n void Expand()\n {\n var tmp = new long[Count << 1];\n for (var i = 0; i < heap.Length; ++i) tmp[i] = heap[i];\n heap = tmp;\n var tmp2 = new int[Count << 1];\n for (var i = 0; i < dat.Length; ++i) tmp2[i] = dat[i];\n dat = tmp2;\n }\n }\n class LIB_PriorityQueue\n {\n T[] heap;\n Comparison comp;\n public T Peek => heap[0];\n public long Count\n {\n get;\n private set;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, Comparison cmp, bool asc = true)\n {\n heap = new T[cap];\n comp = asc ? cmp : (x, y) => cmp(y, x);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(Comparison cmp, bool asc = true)\n {\n heap = new T[128];\n comp = asc ? cmp : (x, y) => cmp(y, x);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, bool asc = true) : this(cap, Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(bool asc = true) : this(Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(T val)\n {\n if (Count == heap.Length) Expand();\n var i = Count++;\n heap[i] = val;\n while (i > 0)\n {\n var ni = (i - 1) / 2;\n if (comp(val, heap[ni]) >= 0) break;\n heap[i] = heap[ni];\n i = ni;\n }\n heap[i] = val;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Pop()\n {\n var ret = heap[0];\n var val = heap[--Count];\n if (Count == 0) return ret;\n var i = 0; while ((i << 1) + 1 < Count)\n {\n var i1 = (i << 1) + 1;\n var i2 = (i << 1) + 2;\n if (i2 < Count && comp(heap[i1], heap[i2]) > 0) i1 = i2;\n if (comp(val, heap[i1]) <= 0) break;\n heap[i] = heap[i1]; i = i1;\n }\n heap[i] = val;\n return ret;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n void Expand()\n {\n var tmp = new T[Count << 1];\n for (var i = 0; i < heap.Length; ++i) tmp[i] = heap[i];\n heap = tmp;\n }\n }\n class LIB_PriorityQueue\n {\n LIB_PriorityQueue> q;\n public KeyValuePair Peek => q.Peek;\n public long Count => q.Count;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, Comparison cmp, bool asc = true)\n {\n q = new LIB_PriorityQueue>(cap, (x, y) => cmp(x.Key, y.Key), asc);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(Comparison cmp, bool asc = true)\n {\n q = new LIB_PriorityQueue>((x, y) => cmp(x.Key, y.Key), asc);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, bool asc = true) : this(cap, Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(bool asc = true) : this(Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(TK k, TV v) => q.Push(new KeyValuePair(k, v));\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public KeyValuePair Pop() => q.Pop();\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "ff8b968fc0fb2147636942079f8ad023", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "ebd2416c37321a805b07004e37be9a4e", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8771040456737867, "equal_cnt": 47, "replace_cnt": 25, "delete_cnt": 9, "insert_cnt": 12, "fix_ops_cnt": 46, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static System.Math;\nusing System.Text;\nusing System.Threading;\nusing System.Globalization;\nusing System.Runtime.CompilerServices;\nusing Library;\n\nnamespace Program\n{\n public static class ProblemD\n {\n static bool SAIKI = false;\n static public int numberOfRandomCases = 0;\n static public void MakeTestCase(List _input, List _output, ref Func _outputChecker)\n {\n }\n static public void Solve()\n {\n var n = (int)NN;\n var m = (int)NN;\n var q = (int)NN;\n var pList = NNList(n);\n var ab = Repeat(0, m).Select(_ => new { a = (int)NN - 1, b = (int)NN - 1 }).ToArray();\n var query = Repeat(0, q).Select(_ => new { t = (int)NN, param = (int)NN }).ToArray();\n var graph = Repeat(0, n).Select(_ => new HashSet()).ToArray();\n var uf = new LIB_UnionFind(n);\n var deleted = new bool[m];\n foreach (var item in query)\n {\n if (item.t == 2) deleted[item.param - 1] = true;\n }\n for (var i = 0; i < m; i++)\n {\n if (!deleted[i])\n {\n if (uf.Unite(ab[i].a, ab[i].b))\n {\n graph[ab[i].a].Add(ab[i].b);\n graph[ab[i].b].Add(ab[i].a);\n }\n }\n }\n foreach (var item in query.Reverse())\n {\n if (item.t == 2)\n {\n var i = item.param - 1;\n if (uf.Unite(ab[i].a, ab[i].b))\n {\n graph[ab[i].a].Add(ab[i].b);\n graph[ab[i].b].Add(ab[i].a);\n }\n }\n }\n var param = new int[n];\n var qList = new List>();\n var used = new bool[n];\n {\n var done = new bool[n];\n for (var i = 0; i < n; i++)\n {\n if (!done[i])\n {\n var c = qList.Count();\n var tmpq = new LIB_PriorityQueue(false);\n qList.Add(tmpq);\n var que = new Queue();\n que.Enqueue(i);\n done[i] = true;\n param[i] = c;\n while (que.Count > 0)\n {\n var v = que.Dequeue();\n foreach (var item in graph[v])\n {\n if (done[item]) continue;\n done[item] = true;\n param[item] = c;\n que.Enqueue(item);\n }\n }\n }\n qList[param[i]].Push((int)pList[i], i);\n }\n }\n foreach (var item in query)\n {\n if (item.t == 1)\n {\n var v = item.param - 1;\n var p = param[v];\n var que = qList[p];\n var value = 0L;\n while (que.Count > 0)\n {\n if (used[que.Peek.Value] || p != param[que.Peek.Value]) que.Pop();\n else\n {\n used[que.Peek.Value] = true;\n value = que.Pop().Key;\n break;\n }\n }\n Console.WriteLine(value);\n }\n else\n {\n var leftV = ab[item.param - 1].a;\n var rightV = ab[item.param - 1].b;\n if (!graph[leftV].Contains(rightV)) continue;\n var leftQ = new Queue();\n var rightQ = new Queue();\n leftQ.Enqueue(leftV);\n rightQ.Enqueue(rightV);\n var color = param[leftV];\n var procV = leftV;\n var done = new bool[n];\n done[leftV] = true;\n done[rightV] = true;\n while (true)\n {\n if (leftQ.Count == 0) break;\n if (rightQ.Count == 0)\n {\n procV = rightV;\n break;\n }\n foreach (var item2 in graph[leftQ.Dequeue()])\n {\n if (done[item2]) continue;\n if (param[item2] != color) continue;\n done[item2] = true;\n leftQ.Enqueue(item2);\n }\n foreach (var item2 in graph[rightQ.Dequeue()])\n {\n if (done[item2]) continue;\n if (param[item2] != color) continue;\n done[item2] = true;\n rightQ.Enqueue(item2);\n }\n }\n var procColorFrom = param[procV];\n var procColorTo = qList.Count;\n var tmpq = new LIB_PriorityQueue(false);\n qList.Add(tmpq);\n var procQ = new Queue();\n procQ.Enqueue(procV);\n done = new bool[n];\n done[leftV] = true;\n done[rightV] = true;\n tmpq.Push((int)pList[procV], procV);\n param[procV] = procColorTo;\n while (procQ.Count > 0)\n {\n foreach (var item2 in graph[procQ.Dequeue()])\n {\n if (done[item2]) continue;\n if (param[item2] != procColorFrom) continue;\n if (!used[item2]) tmpq.Push((int)pList[item2], item2);\n param[item2] = procColorTo;\n done[item2] = true;\n procQ.Enqueue(item2);\n }\n }\n }\n }\n }\n class Printer : StreamWriter\n {\n public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }\n public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { base.AutoFlush = false; }\n public Printer(Stream stream, Encoding encoding) : base(stream, encoding) { base.AutoFlush = false; }\n }\n static LIB_FastIO fastio = new LIB_FastIODebug();\n static public void Main(string[] args) { if (args.Length == 0) { fastio = new LIB_FastIO(); Console.SetOut(new Printer(Console.OpenStandardOutput())); } if (SAIKI) { var t = new Thread(Solve, 134217728); t.Start(); t.Join(); } else Solve(); Console.Out.Flush(); }\n static long NN => fastio.Long();\n static double ND => fastio.Double();\n static string NS => fastio.Scan();\n static long[] NNList(long N) => Repeat(0, N).Select(_ => NN).ToArray();\n static double[] NDList(long N) => Repeat(0, N).Select(_ => ND).ToArray();\n static string[] NSList(long N) => Repeat(0, N).Select(_ => NS).ToArray();\n static long Count(this IEnumerable x, Func pred) => Enumerable.Count(x, pred);\n static IEnumerable Repeat(T v, long n) => Enumerable.Repeat(v, (int)n);\n static IEnumerable Range(long s, long c) => Enumerable.Range((int)s, (int)c);\n static IOrderedEnumerable OrderByRand(this IEnumerable x) => Enumerable.OrderBy(x, _ => xorshift);\n static IOrderedEnumerable OrderBy(this IEnumerable x) => Enumerable.OrderBy(x.OrderByRand(), e => e);\n static IOrderedEnumerable OrderBy(this IEnumerable x, Func selector) => Enumerable.OrderBy(x.OrderByRand(), selector);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x) => Enumerable.OrderByDescending(x.OrderByRand(), e => e);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x, Func selector) => Enumerable.OrderByDescending(x.OrderByRand(), selector);\n static IOrderedEnumerable OrderBy(this IEnumerable x) => x.OrderByRand().OrderBy(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderBy(this IEnumerable x, Func selector) => x.OrderByRand().OrderBy(selector, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x) => x.OrderByRand().OrderByDescending(e => e, StringComparer.OrdinalIgnoreCase);\n static IOrderedEnumerable OrderByDescending(this IEnumerable x, Func selector) => x.OrderByRand().OrderByDescending(selector, StringComparer.OrdinalIgnoreCase);\n static string Join(this IEnumerable x, string separator = \"\") => string.Join(separator, x);\n static uint xorshift { get { _xsi.MoveNext(); return _xsi.Current; } }\n static IEnumerator _xsi = _xsc();\n static IEnumerator _xsc() { uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff); while (true) { var t = x ^ (x << 11); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); yield return w; } }\n static bool Chmax(this ref T lhs, T rhs) where T : struct, IComparable { if (lhs.CompareTo(rhs) < 0) { lhs = rhs; return true; } return false; }\n static bool Chmin(this ref T lhs, T rhs) where T : struct, IComparable { if (lhs.CompareTo(rhs) > 0) { lhs = rhs; return true; } return false; }\n }\n}\nnamespace Library {\n class LIB_FastIO\n {\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_FastIO() { str = Console.OpenStandardInput(); }\n readonly Stream str;\n readonly byte[] buf = new byte[2048];\n int len, ptr;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n byte read()\n {\n if (ptr >= len)\n {\n ptr = 0;\n if ((len = str.Read(buf, 0, 2048)) <= 0)\n {\n return 0;\n }\n }\n return buf[ptr++];\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n char Char()\n {\n byte b = 0;\n do b = read();\n while (b < 33 || 126 < b);\n return (char)b;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public string Scan()\n {\n var sb = new StringBuilder();\n for (var b = Char(); b >= 33 && b <= 126; b = (char)read())\n sb.Append(b);\n return sb.ToString();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public long Long()\n {\n long ret = 0; byte b = 0; var ng = false;\n do b = read();\n while (b != '-' && (b < '0' || '9' < b));\n if (b == '-') { ng = true; b = read(); }\n for (; true; b = read())\n {\n if (b < '0' || '9' < b)\n return ng ? -ret : ret;\n else ret = (ret << 3) + (ret << 1) + b - '0';\n }\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n virtual public double Double() { return double.Parse(Scan(), CultureInfo.InvariantCulture); }\n }\n class LIB_FastIODebug : LIB_FastIO\n {\n Queue param = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n string NextString() { if (param.Count == 0) foreach (var item in Console.ReadLine().Split(' ')) param.Enqueue(item); return param.Dequeue(); }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_FastIODebug() { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override string Scan() => NextString();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override long Long() => long.Parse(NextString());\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public override double Double() => double.Parse(NextString());\n }\n class LIB_UnionFind\n {\n int[] d;\n T[] v;\n Func f;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(IEnumerable s, Func func)\n {\n v = s.ToArray();\n d = Enumerable.Repeat(-1, v.Length).ToArray();\n f = func;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool Unite(long x, long y)\n {\n x = Root(x);\n y = Root(y);\n if (x != y)\n {\n d[x] = d[x] + d[y];\n v[x] = f(v[x], v[y]);\n d[y] = (int)x;\n }\n return x != y;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public bool IsSame(long x, long y) => Root(x) == Root(y);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Root(long x) => d[x] < 0 ? x : d[x] = (int)Root(d[x]);\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public long Count(long x) => -d[Root(x)];\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Calc(long x) => v[Root(x)];\n }\n class LIB_UnionFind : LIB_UnionFind\n {\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_UnionFind(long n) : base(Enumerable.Repeat(0, (int)n), (x, y) => x + y) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n new private void Calc(long x) { }\n }\n class LIB_PriorityQueue\n {\n long[] heap;\n int[] dat;\n public long Count\n {\n get;\n private set;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue()\n {\n heap = new long[16384];\n dat = new int[16384];\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(long key, int val)\n {\n if (Count == heap.Length) Expand();\n var i = Count++;\n heap[i] = key;\n dat[i] = val;\n while (i > 0)\n {\n var ni = (i - 1) / 2;\n if (key >= heap[ni]) break;\n heap[i] = heap[ni];\n dat[i] = dat[ni];\n i = ni;\n }\n heap[i] = key;\n dat[i] = val;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public KeyValuePair Pop()\n {\n var ret = new KeyValuePair(heap[0], dat[0]);\n var key = heap[--Count];\n var val = dat[Count];\n if (Count == 0) return ret;\n var i = 0; while ((i << 1) + 1 < Count)\n {\n var i1 = (i << 1) + 1;\n var i2 = (i << 1) + 2;\n if (i2 < Count && heap[i1] > heap[i2]) i1 = i2;\n if (key <= heap[i1]) break;\n heap[i] = heap[i1];\n dat[i] = dat[i1];\n i = i1;\n }\n heap[i] = key;\n dat[i] = val;\n return ret;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n void Expand()\n {\n var tmp = new long[Count << 1];\n for (var i = 0; i < heap.Length; ++i) tmp[i] = heap[i];\n heap = tmp;\n var tmp2 = new int[Count << 1];\n for (var i = 0; i < dat.Length; ++i) tmp2[i] = dat[i];\n dat = tmp2;\n }\n }\n class LIB_PriorityQueue\n {\n T[] heap;\n Comparison comp;\n public T Peek => heap[0];\n public long Count\n {\n get;\n private set;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, Comparison cmp, bool asc = true)\n {\n heap = new T[cap];\n comp = asc ? cmp : (x, y) => cmp(y, x);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(Comparison cmp, bool asc = true)\n {\n heap = new T[16384];\n comp = asc ? cmp : (x, y) => cmp(y, x);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, bool asc = true) : this(cap, Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(bool asc = true) : this(Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(T val)\n {\n if (Count == heap.Length) Expand();\n var i = Count++;\n heap[i] = val;\n while (i > 0)\n {\n var ni = (i - 1) / 2;\n if (comp(val, heap[ni]) >= 0) break;\n heap[i] = heap[ni];\n i = ni;\n }\n heap[i] = val;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Pop()\n {\n var ret = heap[0];\n var val = heap[--Count];\n if (Count == 0) return ret;\n var i = 0; while ((i << 1) + 1 < Count)\n {\n var i1 = (i << 1) + 1;\n var i2 = (i << 1) + 2;\n if (i2 < Count && comp(heap[i1], heap[i2]) > 0) i1 = i2;\n if (comp(val, heap[i1]) <= 0) break;\n heap[i] = heap[i1]; i = i1;\n }\n heap[i] = val;\n return ret;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n void Expand()\n {\n var tmp = new T[Count << 1];\n for (var i = 0; i < heap.Length; ++i) tmp[i] = heap[i];\n heap = tmp;\n }\n }\n class LIB_PriorityQueue\n {\n LIB_PriorityQueue> q;\n public KeyValuePair Peek => q.Peek;\n public long Count => q.Count;\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, Comparison cmp, bool asc = true)\n {\n q = new LIB_PriorityQueue>(cap, (x, y) => cmp(x.Key, y.Key), asc);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(Comparison cmp, bool asc = true)\n {\n q = new LIB_PriorityQueue>((x, y) => cmp(x.Key, y.Key), asc);\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(long cap, bool asc = true) : this(cap, Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public LIB_PriorityQueue(bool asc = true) : this(Comparer.Default.Compare, asc) { }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public void Push(TK k, TV v) => q.Push(new KeyValuePair(k, v));\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public KeyValuePair Pop() => q.Pop();\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "a8945ca3c3930265fcaf9205e15eefe7", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "ebd2416c37321a805b07004e37be9a4e", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8853532377398022, "equal_cnt": 15, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n static List> g;\n\n class Dsu\n {\n public readonly List parent;\n\n public Dsu(int n)\n {\n parent = Enumerable.Range(0, n).ToList();\n g = Init>(n).ToList();\n }\n\n public int FindSet(int v)\n {\n if (v == parent[v])\n return v;\n return parent[v] = FindSet(parent[v]);\n }\n\n public void UnionSets(int a, int b)\n {\n a = FindSet(a);\n b = FindSet(b);\n if (a != b)\n {\n parent[a] = parent[b] = parent.Count;\n g.Add(new List());\n g[parent.Count].Add(a);\n g[parent.Count].Add(b);\n parent.Add(parent.Count);\n }\n }\n }\n\n int[] c;\n int[] tree;\n\n int Cmp(int l, int r)\n {\n return c2[l] > c2[r] ? l : r;\n }\n\n void Build(int x, int xl, int xr)\n {\n if (xl == xr)\n {\n tree[x] = xl;\n return; \n }\n int xm = (xl + xr) / 2;\n Build(x * 2, xl, xm);\n Build(x * 2 + 1, xm + 1, xr);\n tree[x] = Cmp(tree[2 * x], tree[2 * x + 1]);\n }\n\n void Set(int x, int xl, int xr, int idx)\n {\n if (xl == xr)\n {\n c2[xl] = 0;\n return;\n }\n\n int xm = (xl + xr) / 2;\n if (idx <= xm)\n Set(x * 2, xl, xm, idx);\n else\n Set(x * 2 + 1, xm + 1, xr, idx);\n tree[x] = Cmp(tree[2 * x], tree[2 * x + 1]);\n }\n\n int Query(int x, int xl, int xr, int l, int r)\n {\n if (l == xl && r == xr)\n return tree[x];\n int xm = (xl + xr) / 2;\n if (r <= xm)\n return Query(x * 2, xl, xm, l, r);\n if (l > xm)\n return Query(x * 2 + 1, xm + 1, xr, l, r);\n return Cmp(Query(x * 2, xl, xm, l, xm), Query(x * 2 + 1, xm + 1, xr, xm + 1, r));\n }\n\n int n;\n bool[] vis;\n int[] tin, tout, c2;\n int timer;\n void Dfs(int x)\n {\n if (x < n)\n c2[timer] = c[x];\n vis[x] = true;\n tin[x] = timer++;\n foreach (int e in g[x])\n Dfs(e);\n tout[x] = timer;\n }\n\n public void Solve()\n {\n n = ReadInt();\n int m = ReadInt();\n int q = ReadInt();\n c = ReadIntArray();\n var a = ReadIntMatrix(m);\n var b = ReadIntMatrix(q);\n\n var f = new bool[m];\n for (int i = 0; i < q; i++)\n {\n b[i][1]--;\n if (b[i][0] == 2)\n f[b[i][1]] = true;\n }\n\n var dsu = new Dsu(n);\n for (int i = 0; i < m; i++)\n {\n a[i][0]--;\n a[i][1]--;\n if (!f[i])\n dsu.UnionSets(a[i][0], a[i][1]);\n }\n\n for (int i = q - 1; i >= 0; i--)\n {\n if (b[i][0] == 1)\n {\n b[i][1] = dsu.FindSet(b[i][1]);\n }\n else\n {\n dsu.UnionSets(a[b[i][1]][0], a[b[i][1]][1]);\n }\n }\n\n int n2 = dsu.parent.Count;\n tin = new int[n2];\n tout = new int[n2];\n vis = new bool[n2];\n c2 = new int[n2];\n for (int i = n2 - 1; i >= 0; i--)\n if (!vis[i])\n Dfs(i);\n\n tree = new int[4 * n2];\n Build(1, 0, n2 - 1);\n for (int i = 0; i < q; i++)\n if (b[i][0] == 1)\n {\n int x = Query(1, 0, n2 - 1, tin[b[i][1]], tout[b[i][1]] - 1);\n Write(c2[x]);\n Set(1, 0, n2 - 1, x);\n }\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n try\n {\n new Solver().Solve();\n //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n //thread.Start();\n //thread.Join();\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }\n return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array) writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "Mono C#", "bug_code_uid": "72582c618f1914920b50a1745ec4c643", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "91bad52ff2858156588d413ddfc9cecd", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9326905015340304, "equal_cnt": 36, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 27, "fix_ops_cnt": 35, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n static List> g;\n\n class Dsu\n {\n public readonly List parent;\n\n public Dsu(int n)\n {\n parent = Enumerable.Range(0, n).ToList();\n g = Init>(n).ToList();\n }\n\n public int FindSet(int v)\n {\n if (v == parent[v])\n return v;\n return parent[v] = FindSet(parent[v]);\n }\n\n public void UnionSets(int a, int b)\n {\n a = FindSet(a);\n b = FindSet(b);\n if (a != b)\n {\n parent[a] = parent[b] = parent.Count;\n g.Add(new List());\n g[parent.Count].Add(a);\n g[parent.Count].Add(b);\n parent.Add(parent.Count);\n }\n }\n }\n\n int[] c;\n int[] tree;\n\n int Cmp(int l, int r)\n {\n return c2[l] > c2[r] ? l : r;\n }\n\n void Build(int x, int xl, int xr)\n {\n if (xl == xr)\n {\n tree[x] = xl;\n return; \n }\n int xm = (xl + xr) / 2;\n Build(x * 2, xl, xm);\n Build(x * 2 + 1, xm + 1, xr);\n tree[x] = Cmp(tree[2 * x], tree[2 * x + 1]);\n }\n\n void Set(int x, int xl, int xr, int idx)\n {\n if (xl == xr)\n {\n c2[xl] = 0;\n return;\n }\n\n int xm = (xl + xr) / 2;\n if (idx <= xm)\n Set(x * 2, xl, xm, idx);\n else\n Set(x * 2 + 1, xm + 1, xr, idx);\n tree[x] = Cmp(tree[2 * x], tree[2 * x + 1]);\n }\n\n int Query(int x, int xl, int xr, int l, int r)\n {\n if (l == xl && r == xr)\n return tree[x];\n int xm = (xl + xr) / 2;\n if (r <= xm)\n return Query(x * 2, xl, xm, l, r);\n if (l > xm)\n return Query(x * 2 + 1, xm + 1, xr, l, r);\n return Cmp(Query(x * 2, xl, xm, l, xm), Query(x * 2 + 1, xm + 1, xr, xm + 1, r));\n }\n\n int n;\n bool[] vis;\n int[] tin, tout, c2;\n int timer;\n void Dfs(int x)\n {\n if (x < n)\n c2[timer] = c[x];\n vis[x] = true;\n tin[x] = timer++;\n foreach (int e in g[x])\n Dfs(e);\n tout[x] = timer;\n }\n\n public void Solve()\n {\n n = ReadInt();\n int m = ReadInt();\n int q = ReadInt();\n c = ReadIntArray();\n var a = ReadIntMatrix(m);\n var b = ReadIntMatrix(q);\n\n n = 200000;\n m = 199999;\n q = 500000;\n c = new int[n];\n var rnd = new Random(13);\n for (int i = 0; i < n; i++)\n c[i] = rnd.Next(n) + 1;\n a = new int[m][];\n for (int i = 0; i < m; i++)\n a[i] = new[] { i + 1, i + 2 };\n b = new int[q][];\n int cnt = 1;\n for (int i = 0; i < q; i++)\n {\n b[i] = new int[2];\n b[i][0] = rnd.Next(2) + 1;\n if (cnt > m)\n b[i][0] = 1;\n if (b[i][0] == 1)\n {\n b[i][1] = rnd.Next(n) + 1;\n }\n else\n {\n b[i][1] = cnt++;\n }\n }\n\n var f = new bool[m];\n for (int i = 0; i < q; i++)\n {\n b[i][1]--;\n if (b[i][0] == 2)\n f[b[i][1]] = true;\n }\n\n var dsu = new Dsu(n);\n for (int i = 0; i < m; i++)\n {\n a[i][0]--;\n a[i][1]--;\n if (!f[i])\n dsu.UnionSets(a[i][0], a[i][1]);\n }\n\n for (int i = q - 1; i >= 0; i--)\n {\n if (b[i][0] == 1)\n {\n b[i][1] = dsu.FindSet(b[i][1]);\n }\n else\n {\n dsu.UnionSets(a[b[i][1]][0], a[b[i][1]][1]);\n }\n }\n\n int n2 = dsu.parent.Count;\n tin = new int[n2];\n tout = new int[n2];\n vis = new bool[n2];\n c2 = new int[n2];\n for (int i = n2 - 1; i >= 0; i--)\n if (!vis[i])\n Dfs(i);\n\n tree = new int[4 * n2];\n Build(1, 0, n2 - 1);\n for (int i = 0; i < q; i++)\n if (b[i][0] == 1)\n {\n int x = Query(1, 0, n2 - 1, tin[b[i][1]], tout[b[i][1]] - 1);\n Write(c2[x]);\n Set(1, 0, n2 - 1, x);\n }\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n try\n {\n //new Solver().Solve();\n var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n thread.Start();\n thread.Join();\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }\n return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array) writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "Mono C#", "bug_code_uid": "66a5b892c57fc963629defa4862104c8", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "91bad52ff2858156588d413ddfc9cecd", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.938408736349454, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n static List> g;\n\n class Dsu\n {\n public readonly List parent;\n\n public Dsu(int n)\n {\n parent = Enumerable.Range(0, n).ToList();\n g = Init>(n).ToList();\n }\n\n public int FindSet(int v)\n {\n if (v == parent[v])\n return v;\n return parent[v] = FindSet(parent[v]);\n }\n\n public void UnionSets(int a, int b)\n {\n a = FindSet(a);\n b = FindSet(b);\n if (a != b)\n {\n parent[a] = parent[b] = parent.Count;\n g.Add(new List());\n g[parent.Count].Add(a);\n g[parent.Count].Add(b);\n parent.Add(parent.Count);\n }\n }\n }\n\n int[] c;\n int[] tree;\n\n int Cmp(int l, int r)\n {\n return c2[l] > c2[r] ? l : r;\n }\n\n void Build(int x, int xl, int xr)\n {\n if (xl == xr)\n {\n tree[x] = xl;\n return; \n }\n int xm = (xl + xr) / 2;\n Build(x * 2, xl, xm);\n Build(x * 2 + 1, xm + 1, xr);\n tree[x] = Cmp(tree[2 * x], tree[2 * x + 1]);\n }\n\n void Set(int x, int xl, int xr, int idx)\n {\n if (xl == xr)\n {\n c2[xl] = 0;\n return;\n }\n\n int xm = (xl + xr) / 2;\n if (idx <= xm)\n Set(x * 2, xl, xm, idx);\n else\n Set(x * 2 + 1, xm + 1, xr, idx);\n tree[x] = Cmp(tree[2 * x], tree[2 * x + 1]);\n }\n\n int Query(int x, int xl, int xr, int l, int r)\n {\n if (l == xl && r == xr)\n return tree[x];\n int xm = (xl + xr) / 2;\n if (r <= xm)\n return Query(x * 2, xl, xm, l, r);\n if (l > xm)\n return Query(x * 2 + 1, xm + 1, xr, l, r);\n return Cmp(Query(x * 2, xl, xm, l, xm), Query(x * 2 + 1, xm + 1, xr, xm + 1, r));\n }\n\n int n;\n bool[] vis;\n int[] tin, tout, c2;\n int timer;\n void Dfs(int x)\n {\n if (x < n)\n c2[timer] = c[x];\n vis[x] = true;\n tin[x] = timer++;\n foreach (int e in g[x])\n Dfs(e);\n tout[x] = timer;\n }\n\n public void Solve()\n {\n n = ReadInt();\n int m = ReadInt();\n int q = ReadInt();\n c = ReadIntArray();\n var a = ReadIntMatrix(m);\n var b = ReadIntMatrix(q);\n\n //n = 200000;\n //m = 199999;\n //q = 500000;\n //c = new int[n];\n //var rnd = new Random(13);\n //for (int i = 0; i < n; i++)\n // c[i] = rnd.Next(n) + 1;\n //a = new int[m][];\n //for (int i = 0; i < m; i++)\n // a[i] = new[] { i + 1, i + 2 };\n //b = new int[q][];\n //int cnt = 1;\n //for (int i = 0; i < q; i++)\n //{\n // b[i] = new int[2];\n // b[i][0] = rnd.Next(2) + 1;\n // if (cnt > m)\n // b[i][0] = 1;\n // if (b[i][0] == 1)\n // {\n // b[i][1] = rnd.Next(n) + 1;\n // }\n // else\n // {\n // b[i][1] = cnt++;\n // }\n //}\n\n var f = new bool[m];\n for (int i = 0; i < q; i++)\n {\n b[i][1]--;\n if (b[i][0] == 2)\n f[b[i][1]] = true;\n }\n\n var dsu = new Dsu(n);\n for (int i = 0; i < m; i++)\n {\n a[i][0]--;\n a[i][1]--;\n if (!f[i])\n dsu.UnionSets(a[i][0], a[i][1]);\n }\n\n for (int i = q - 1; i >= 0; i--)\n {\n if (b[i][0] == 1)\n {\n b[i][1] = dsu.FindSet(b[i][1]);\n }\n else\n {\n dsu.UnionSets(a[b[i][1]][0], a[b[i][1]][1]);\n }\n }\n\n int n2 = dsu.parent.Count;\n tin = new int[n2];\n tout = new int[n2];\n vis = new bool[n2];\n c2 = new int[n2];\n for (int i = n2 - 1; i >= 0; i--)\n if (!vis[i])\n Dfs(i);\n\n tree = new int[4 * n2];\n Build(1, 0, n2 - 1);\n for (int i = 0; i < q; i++)\n if (b[i][0] == 1)\n {\n int x = Query(1, 0, n2 - 1, tin[b[i][1]], tout[b[i][1]] - 1);\n Write(c2[x]);\n Set(1, 0, n2 - 1, x);\n }\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n try\n {\n //new Solver().Solve();\n var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n thread.Start();\n thread.Join();\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }\n return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array) writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "Mono C#", "bug_code_uid": "82d7e1d80271b9c526f8eff7901b3711", "src_uid": "ad014bde729222db14f38caa521e4167", "apr_id": "91bad52ff2858156588d413ddfc9cecd", "difficulty": 2600, "tags": ["dsu", "data structures", "implementation", "graphs", "trees"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6049676760802994, "equal_cnt": 18, "replace_cnt": 10, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Techno\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] nm = Console.ReadLine().Split();\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n int min1 = int.MaxValue;\n int min2 = int.MaxValue;\n string[] s1 = Console.ReadLine().Split();\n string[] s2 = Console.ReadLine().Split();\n for (int i = 0; i < s1.Length; i++)\n {\n if (Convert.ToInt32(s1[i]) < min1)\n {\n min1 = Convert.ToInt32(s1[i]);\n }\n if (Convert.ToInt32(s2[i]) < min2)\n {\n min2 = Convert.ToInt32(s2[i]);\n }\n }\n if (min1 != min2)\n {\n Console.WriteLine(Math.Min(min1, min2) + \"\" + Math.Max(min1, min2));\n }\n else\n {\n Console.WriteLine(min1);\n }\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "d7691ca415c09471185784b28d7b7af9", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "25c544b49fcf1be049e8248fd3fb8bfd", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9409162717219589, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\nnamespace HW\n{\n class Program\n {\n static void Main()\n {\n string[] s = Console.ReadLine().Split();\n int[] a = new int[int.Parse(s[0])];\n int[] b = new int[int.Parse(s[1])];\n\n string[] st = Console.ReadLine().Split();\n\n for (int i = 0; i= 0 )\n {\n if (min>a[i])\n {\n min = a[i];\n bo = true;\n }\n }\n else\n {\n if (min1 > a[i])\n {\n min1 = a[i];\n }\n }\n }\n\n if (bo == true)\n {\n Console.WriteLine(min);\n }\n else\n {\n Console.WriteLine(min1 * 10 + b[0]);\n }\n\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "15cace15703a2e53fc48f12c2ec845c5", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "7e3474df177e3ab15282d3e09fdb2695", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.780373831775701, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing System.Threading;\n\nnamespace Achill\n{\n class Program\n {\n static void Main(string[] args)\n {\n long n = Int32.Parse(Console.ReadLine());\n Console.WriteLine(n % 2 == 0 ? n + 1 : (n + 1) / 2);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "abe82572528fec871c4e64e8a37d9564", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "182688ec716c8aff471b978e7cfaecd1", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9987531172069826, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\n\nnamespace contest1\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.SetIn(new StreamReader(\"input.txt\"));\n solve_482A();\n }\n\n public static void solve_482A()\n {\n long n = Convert.ToInt64(Console.ReadLine());\n \n long pieces = 0;\n if (n > 0)\n {\n long pizza = n + 1;\n if (pizza % 2 == 0)\n {\n pieces = pizza / 2;\n }\n else\n {\n pieces = pizza;\n }\n }\n Console.WriteLine(pieces);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "d1fb4ddb3e0ad2e71a20778b4dbda277", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "9c2884dc4e2dbbf00e1d06edd67052eb", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9840674789128397, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nnamespace PizzaPizzaPizza\n{\n class PizzaPizzaPizza \n {\n static void Main() \n {\n long n = Console.ReadLine();\n \n n++;// Considering her share\n \n if (n == 1) {\n Console.WriteLine(0);\n }\n else if (n % 2 == 0)\n {// Even\n Console.WriteLine(n / 2);\n }\n else\n {// Odd and not 1\n Console.WriteLine(n);\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "06113b94c2304567250b50b2c7bc2e3f", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "5b41c13d9fc30e4a0809afff62d26de0", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8709219858156029, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\nnamespace zad_1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n n++;\n if (n % 2 == 1)\n Console.WriteLine(n);\n else\n Console.WriteLine(n / 2);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "59b3c27fde0febe29d8ec6a2ca1107f3", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "58b9347686c95cfd8e55c2293baae5ca", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6545012165450121, "equal_cnt": 16, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace pizza\n{\n class Program\n {\n static void Main(string[] args)\n {\n \n int n = int.Parse(Console.ReadLine());\n int k = 0;\n\n n = n + 1;\n \n if (0 <= n && n <= Math.Pow(10,18))\n {\n if ((n % 2) == 0 )\n {\n k = n / 2;\n }\n else\n {\n k = n;\n }\n }\n Console.WriteLine(k);\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "28f86d3c656100bf956dbce891b39400", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "6d202f0d5e9bfa940fc8fe95c07318a9", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7596153846153846, "equal_cnt": 15, "replace_cnt": 4, "delete_cnt": 5, "insert_cnt": 6, "fix_ops_cnt": 15, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string str = Console.ReadLine();\n if(str[str.Length-1]%2==1)\n {\n Console.WriteLine((int.Parse(str) + 1) / 2);\n }\n else\n {\n Console.WriteLine((int.Parse(str) + 1));\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "0a46495062f2af3b49eeb89361099f50", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "9dbad18969d9b144c2c85488fbd2df83", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9090909090909091, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ProblemSolving.CodeForces\n{\n class Pizza_979_problem_A\n {\n public static void Main(string[] args)\n {\n long x = int.Parse(Console.ReadLine());\n if((x+1) % 2 == 0)\n {\n Console.WriteLine((x+1)/2);\n }\n else\n {\n Console.WriteLine(x + 1);\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "e9a41778f7dc198ee5f53ffd63cadf0a", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "4c885ec31474a19d7cecd1955d68fc47", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.950517836593786, "equal_cnt": 11, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Linq;\n\nnamespace codeforces_cutpizza\n{\n class Program\n {\n static void Main(string[] args)\n {\n var n = NextInt();\n if((n + 1) % 2 == 0) {\n Console.WriteLine((n + 1) / 2);\n } else\n {\n Console.WriteLine(n+1);\n }\n }\n #region\n static int s_index = 0;\n static List s_tokens;\n\n private static string Next()\n {\n while (s_tokens == null || s_index == s_tokens.Count)\n {\n s_tokens = Console.ReadLine().Split(new char[] { ' ', '\\t', '\\n', '\\r' }, StringSplitOptions.RemoveEmptyEntries).ToList();\n s_index = 0;\n }\n return s_tokens[s_index++];\n }\n\n private static bool HasNext()\n {\n while (s_tokens == null || s_index == s_tokens.Count)\n {\n s_tokens = null;\n s_index = 0;\n var nextLine = Console.ReadLine();\n if (nextLine != null)\n {\n s_tokens = nextLine.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();\n }\n else\n {\n return false;\n }\n\n }\n return s_tokens.Count > 0;\n }\n\n private static int NextInt()\n {\n return Int32.Parse(Next());\n }\n\n private static long NextLong()\n {\n return Int64.Parse(Next());\n }\n #endregion\n \n }\n\n}\n", "lang": "Mono C#", "bug_code_uid": "9db7a8defa0b1926723e8f8ae24ed03b", "src_uid": "236177ff30dafe68295b5d33dc501828", "apr_id": "0728ea20e04a191709527397fa12d3e6", "difficulty": 1000, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.3675, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 11, "bug_source_code": "namespace Melon\n{\n class Program\n {\n static void Main(string[] args)\n {\n int input = 8;\n string comprueba = \"YES\";\n string comprueba2 = \"NO\";\n\n if(input % 2 == 0)\n {\n Console.WriteLine(comprueba);\n }\n else\n {\n Console.WriteLine(comprueba2);\n }\n\n }\n }", "lang": ".NET Core C#", "bug_code_uid": "74dddb148b9a1881a7a0af69aa054b07", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c99a902bbb7df10b5c3ed6d8e735bac9", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.1891891891891892, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "class DivideWatermelon{\n\t\tstatic string Divide(float kg){\n\t\t\tif(kg%2 == 0){\n\t\t\t\treturn \"Yes\";\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn \"No\";\n\t\t}\n\t\tpublic static void Main(String[] args){\n\t\t\tint n=9;\n\t\t\tint m=8;\n\t\t\t\n\t\t\tstring print=DivideWatermelon.Divide(n);\n\t\t\tstring print1=DivideWatermelon.Divide(m);\n\t\t\tConsole.WriteLine(print);\n\t\t\tConsole.WriteLine(print1);\n\t\t\t\n\t\t\tConsole.ReadLine();\n\t\t}\n\t}", "lang": ".NET Core C#", "bug_code_uid": "a9d2f364021352408ec5aec0f8bdf886", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "eee46662257d6f96938511b3a1130f5a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.18446601941747573, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\nusing namespace Watermelon;\n\npublic string Foo(int n)\n{\n if (n % 2 == 0)\n {\n return \"yes\"\n }\n \n else\n {\n return \"no\"\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "17f97bf4f8cc28faa1d6eb83558712b7", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4334e6acc096deab0a768366ccce6e9d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9759129759129759, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\nnamespace CF_Watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n var w = Convert.ToInt32(Console.ReadLine());\n\n for (int i = 2; i < w; i += 2)\n {\n var j = w - i;\n if (j > 0 && j % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n }\n\n Console.WriteLine(\"NO\");\n }\n\n //for (int j = 2; i + j <= w; j += 2)\n //{\n // if (w == i + j)\n // {\n // Console.WriteLine(\"YES\");\n // }\n //}\n }", "lang": ".NET Core C#", "bug_code_uid": "bdaa5fb4b8bcb4b9a5fa694b21730684", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "760ca09760a705126c1360e114a7cfb4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.22598870056497175, "equal_cnt": 14, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 15, "bug_source_code": "using System;\n\nint x= Convert.ToInt32(Console.ReadLine());\nif(x%2==0)\n \n{\nreturn \"Yes\"\n}\nelse\n{\nreturn \"No\"\n}", "lang": ".NET Core C#", "bug_code_uid": "ea71884db6779c2944d045f0b513668f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2283f2b73555f79cb9574364bf386e58", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8081936685288641, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.IO;\n\nclass Watermelon\n{\n static string Main(string[] args)\n {\n int number = Int16.Parse(Console.ReadLine());\n if (number % 2 == 1 || number == 2)\n return \"NO\";\n return \"YES\";\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "08d57dd179ff6447602b733e55a8eddf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0291f8ce682026e4f5a8aa244b2b2136", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9826989619377162, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "class TestClass\n{\n static void Main(string[] args)\n {\n int num = Convert.ToInt32(Console.ReadLine());\n if (num < 4)\n {\n Console.WriteLine(\"NO\");\n }\n else \n {\n if ((num - 2) % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "1ba35cbfe99cd0bc6fd70f68bccda511", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b5e56338f163e0ab6fb8223aa6f7034a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.032, "equal_cnt": 12, "replace_cnt": 12, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 12, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.30523.141\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"problem4a\", \"problem4a.csproj\", \"{C4F94F8D-4503-4238-82E8-2FB4AB5CB73B}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{C4F94F8D-4503-4238-82E8-2FB4AB5CB73B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{C4F94F8D-4503-4238-82E8-2FB4AB5CB73B}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{C4F94F8D-4503-4238-82E8-2FB4AB5CB73B}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{C4F94F8D-4503-4238-82E8-2FB4AB5CB73B}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {73CBAF83-E471-446B-B123-FF2F67D6DAB5}\n\tEndGlobalSection\nEndGlobal\n", "lang": ".NET Core C#", "bug_code_uid": "3c0bc83e020a07d8a4d20cb60b6925c8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c671fbee7e8cd9d5d7a78b6dcf14e8b2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8249258160237388, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp2\n{\n class Program\n {\n static void Main(string[] args)\n {\n List arr = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToList();\n\n arr.Sort();\n\n Console.WriteLine($\"{arr[2] - (arr[0] + arr[1]) + 1 }\");\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d0eadd50851184c97703b64b6cab05a8", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "30e9a651379938fd47ed0dbbb30613f6", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9934036939313984, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System.Linq;\nusing System.Collections.Generic;\nusing System;\n\nnamespace MyApp\n{\n class Program\n {\n static void Main(string[] args)\n {\n int a = 0, b = 0, c = 0;\n var inp = Console.ReadLine().Split();\n a = Convert.ToInt32(inp[0]);\n b = Convert.ToInt32(inp[1]);\n c = Convert.ToInt32(inp[2]);\n if(a > c) {\n int temp = c;\n c = a;\n a = c;\n }\n if(b > c) {\n int temp = c;\n c = b;\n b = c;\n }\n int ans = 0;\n if(c - (a + b - 1) > ans) {\n ans = c - (a + b - 1);\n }\n Console.WriteLine(ans);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d251033326dd954f4129261596da58a4", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "3715056f1264a055a25a1303bf2f5dd3", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.030917874396135265, "equal_cnt": 13, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 13, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26730.16\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp1\", \"ConsoleApp1\\ConsoleApp1.csproj\", \"{ABB1C275-B0DD-4207-98C6-3E1AF08D4A7C}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{ABB1C275-B0DD-4207-98C6-3E1AF08D4A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{ABB1C275-B0DD-4207-98C6-3E1AF08D4A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{ABB1C275-B0DD-4207-98C6-3E1AF08D4A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{ABB1C275-B0DD-4207-98C6-3E1AF08D4A7C}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {1753EC7D-E288-4292-84B8-C1654AC04FA8}\n\tEndGlobalSection\nEndGlobal\n", "lang": "Mono C#", "bug_code_uid": "3f82aa6d8c4cf2eb8eb1ae43f47b4370", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "c341ad66ad1beae9f09edf75f07f6e7b", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9542533081285445, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\npublic static class TriangleSolution\n{\n\tpublic static string Numbers = Console.ReadLine();\n\tpublic static int Length = Numbers.Length;\n\tpublic static int CurrentSide = 1;\n\tpublic static string[] separateNumbers = new string[3];\n\tpublic static int[] integerNumbers = new int[3];\n\tpublic static int numberOfMinutes = 1;\n\tpublic static int shortestSide1;\n\tpublic static int shortestSide2;\n\tpublic static int longestSide;\n\tpublic static void getSideLengths()\n\t{\n\t\tchar letter = '0';\n\t\tfor(int i = 0; i < Length; i++)\n\t\t{\n\t\t\tletter = Numbers[i];\n\t\t\tif(letter == ' ')\n\t\t\t{\n\t\t\t\tCurrentSide = CurrentSide + 1;\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\tseparateNumbers[CurrentSide - 1] = separateNumbers[CurrentSide - 1] + letter + \"\";\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tpublic static void convertArrayToInteger(string[] chosenArray, int[] targetArray)\n\t{\n\t\tfor(int i = 0; i < chosenArray.Length; i++)\n\t\t{\n\t\t\ttargetArray[i] = int.Parse(chosenArray[i]);\n\t\t}\n\t}\n\tpublic static void declareSides(int sideShorter, int sideShorter2, int sideLonger)\n\t{\n\t\tshortestSide1 = sideShorter;\n\t\tshortestSide2 = sideShorter2;\n\t\tlongestSide = sideLonger;\n\t}\n\tpublic static void orderSides(int[] integerSideLengths)\n\t{\n\t\t\tif(integerSideLengths[0] > integerSideLengths[1])\n\t\t\t{\n\t\t\t\tif(integerSideLengths[0] > integerSideLengths[2])\n\t\t\t\t{\n\t\t\t\t\tif(integerSideLengths[1] > integerSideLengths[2])\n\t\t\t\t\t\tdeclareSides(integerSideLengths[2],integerSideLengths[1],integerSideLengths[0]);\n\t\t\t\t\telse declareSides(integerSideLengths[1],integerSideLengths[2],integerSideLengths[0]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdeclareSides(integerSideLengths[1],integerSideLengths[0],integerSideLengths[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (integerSideLengths[0] > integerSideLengths[2])\n\t\t\t\tdeclareSides(integerSideLengths[0],integerSideLengths[2],integerSideLengths[1]);\n\t\t\telse\n\t\t\t{\n\t\t\t\tdeclareSides(integerSideLengths[0],integerSideLengths[1],integerSideLengths[2]);\n\t\t\t}\n\t}\n\tpublic static void Main()\n\t{\n\t\tgetSideLengths();\n\t\tconvertArrayToInteger(separateNumbers, integerNumbers);\n\t\t//Console.WriteLine(separateNumbers[2]);\n\t\torderSides(integerNumbers);\n\t\t//Console.WriteLine(integerNumbers[2]);\n\t\t//Console.WriteLine(longestSide + \"\" + shortestSide1 + \"\" + shortestSide2);\n\t\tnumberOfMinutes = (longestSide - shortestSide1) - shortestSide2;\n\t\tif(numberOfMinutes < 0)\n\t\t{\n\t\t\tnumberOfMinutes = 0;\n\t\t}\n\t\telse numberOfMinutes++;\n\t\t/*Console.WriteLine(Numbers);\n\t\tConsole.WriteLine(separateNumbers[1]);\n\t\tConsole.WriteLine(integerNumbers[1]);\n\t\tConsole.WriteLine(longestSide + \" \" + shortestSide1);*/\n\t\tConsole.WriteLine(numberOfMinutes);\n\t}\n\t\n}", "lang": "Mono C#", "bug_code_uid": "c292b4099e0dc4194e9befd7e55a7946", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "1b98b5acee122ae5f73475a3a4341811", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9991742361684558, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Text;\nusing System.Collections.Generic;\nusing System.Collections;\nclass Problem\n{\n static void Main()\n {\n //--------------------------------input--------------------------------//\n\n var v = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );\n Array.Sort( v );\n int a = v[0];\n int b = v[1];\n int c = v[2];\n\n //--------------------------------solve--------------------------------//\n\n if(c > a + b)\n Console.WriteLine( c + 1 - a - b );\n else\n Console.WriteLine( 0 );\n\n }\n}", "lang": "Mono C#", "bug_code_uid": "3e4a26ed105a31366a64702613195c72", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "69de416f4c2fc1729ea1ee94e4f87976", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7138810198300283, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "int[] arr = Console.ReadLine().Split(new []{' '}, StringSplitOptions.RemoveEmptyEntries)\n.Select(str => Convert.ToInt32(str)).ToArray();\nint max= arr.Max();//MAX\n\nint SumMins = 0;\n\nint imax = Array.IndexOf(arr, arr.Max());\nfor (int i = 0; i < arr.Length; i++)\nif (i != imax)\nSumMins += arr[i];\n\nif (max + 1 < SumMins)\nConsole.WriteLine(0);\nelse\nConsole.WriteLine(max+1-SumMins);", "lang": "Mono C#", "bug_code_uid": "2223e5db805f3ca537cdd694a49be62c", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "d0f822853b8d29a0e9b8d8ba5fca07ed", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.958139534883721, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main(string[] args)\n {\n int[] colors = new int[26];\n\n string[] l1 = args[0].Split(' ');\n int baloons = l1[0].ToInt();\n int friends = l1[1].ToInt();\n\n foreach (char c in args[1])\n colors[c-97]++;\n\n foreach (int i in colors)\n {\n if (i > friends)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n }\n\n Console.WriteLine(\"YES\");\n }\n}\n\npublic static class StringExtension\n{\n public static int ToInt(this string str)\n {\n return Convert.ToInt32(str);\n }\n\n public static void Print(this object str)\n {\n Console.WriteLine(str.ToString());\n }\n}", "lang": "MS C#", "bug_code_uid": "9e45e79aec27450ac7bedfc49fd53dba", "src_uid": "ceb3807aaffef60bcdbcc9a17a1391be", "apr_id": "392ebfb267e44c4cf601e286d52a1a33", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7660069848661234, "equal_cnt": 15, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 5, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Code\n{\n class Program\n {\n static void Main(string[] args)\n {\n string a = Console.ReadLine();\n int n = int.Parse(a.Split(' ')[0]);\n int k = int.Parse(a.Split(' ')[1]);\n string s = Console.ReadLine();\n for ( int i = 0; i maxamount)\n maxamount = a[input2[i] - 97];\n }\n if (maxamount > k)\n Console.WriteLine(\"NO\");\n else\n Console.WriteLine(\"YES\");\n }\n }\n}\n\n", "lang": "MS C#", "bug_code_uid": "a58575950068c8336741572a34209729", "src_uid": "ceb3807aaffef60bcdbcc9a17a1391be", "apr_id": "131414e1060070d02f7691ca3ec86f75", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9078014184397163, "equal_cnt": 41, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 32, "fix_ops_cnt": 40, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing CompLib.Util;\nusing System.Threading;\n\npublic class Program\n{\n private long X, Y, L, R;\n\n public void Solve()\n {\n var sc = new Scanner();\n X = sc.NextLong();\n Y = sc.NextLong();\n L = sc.NextLong();\n R = sc.NextLong();\n\n /*\n * n = xa + yb\n * n年は不幸\n *\n * [l,r]内の不幸じゃない最大の区間\n */\n\n // 可能\n // 2 3\n // 5 6\n // 5 6 10 11 12 15 16 17 18 20 \n // 10 11 12 13 14 15 \n\n var hs = new HashSet();\n long xa = 1;\n for (int a = 0;; a++)\n {\n long yb = 1;\n for (int b = 0;; b++)\n {\n hs.Add(xa + yb);\n // xa + yb * y <= R\n if ((double) yb * Y > R - xa) break;\n yb *= Y;\n }\n\n if ((double) xa * X > R) break;\n xa *= X;\n }\n\n hs.Add(L - 1);\n hs.Add(R + 1);\n var ar = hs.ToArray();\n Array.Sort(ar);\n\n long ans = 0;\n for (int i = 1; i < ar.Length; i++)\n {\n if (ar[i] <= R + 1)\n {\n ans = Math.Max(ans, ar[i] - ar[i - 1] - 1);\n }\n }\n\n Console.WriteLine(ans);\n }\n\n public static void Main(string[] args) => new Program().Solve();\n // public static void Main(string[] args) => new Thread(new Program().Solve, 1 << 27).Start();\n}\n\nnamespace CompLib.Util\n{\n using System;\n using System.Linq;\n\n class Scanner\n {\n private string[] _line;\n private int _index;\n private const char Separator = ' ';\n\n public Scanner()\n {\n _line = new string[0];\n _index = 0;\n }\n\n public string Next()\n {\n if (_index >= _line.Length)\n {\n string s;\n do\n {\n s = Console.ReadLine();\n } while (s.Length == 0);\n\n _line = s.Split(Separator);\n _index = 0;\n }\n\n return _line[_index++];\n }\n\n public string ReadLine()\n {\n _index = _line.Length;\n return Console.ReadLine();\n }\n\n public int NextInt() => int.Parse(Next());\n public long NextLong() => long.Parse(Next());\n public double NextDouble() => double.Parse(Next());\n public decimal NextDecimal() => decimal.Parse(Next());\n public char NextChar() => Next()[0];\n public char[] NextCharArray() => Next().ToCharArray();\n\n public string[] Array()\n {\n string s = Console.ReadLine();\n _line = s.Length == 0 ? new string[0] : s.Split(Separator);\n _index = _line.Length;\n return _line;\n }\n\n public int[] IntArray() => Array().Select(int.Parse).ToArray();\n public long[] LongArray() => Array().Select(long.Parse).ToArray();\n public double[] DoubleArray() => Array().Select(double.Parse).ToArray();\n public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "3d2cd1288e130624db8b3bfe142244dd", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "333fd8cc965b5efaf4dfd95406a6e2d3", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.868774853247491, "equal_cnt": 22, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 9, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Linq;\nusing System.IO;\nusing System.Collections.Generic;\n// Powered by caide (code generator, tester, and library code inliner)\n\nclass Solution {\n public void solve(TextReader input, TextWriter output) {\n var inp = input.ReadLine().Split(' ').Select(i => ulong.Parse(i)).ToArray();\n ulong x = inp[0];\n ulong y = inp[1];\n ulong l = inp[2];\n ulong r = inp[3];\n\n int maxa = 0;\n while(Math.Pow(x, maxa) <= r)\n maxa++;\n\n int maxb = 0;\n while (Math.Pow(y, maxb) <= r)\n maxb++;\n\n var shits = new SortedSet();\n var xi = new ulong[maxa + 1];\n xi[0] = 1;\n for (int i = 1; i <= maxa; i++)\n {\n xi[i] = xi[i - 1] * x;\n }\n var yj = new ulong[maxb + 1];\n yj[0] = 1;\n for (int j = 1; j <= maxb; j++)\n {\n yj[j] = yj[j - 1] * y;\n }\n\n for (int i = 0; i <= maxa; i++)\n {\n for (int j = 0; j <= maxb; j++)\n {\n ulong n = xi[i] + yj[j];\n if(l <= n && n <= r)\n shits.Add(n);\n }\n }\n\n ulong res = 0;\n if (shits.Count == 0)\n res = r - l + 1;\n else\n {\n var shitArray = shits.ToArray();\n ulong shitLength;\n for (int i = 0; i < shitArray.Count() - 1; i++)\n {\n shitLength = shitArray[i + 1] - shitArray[i] - 1;\n if (shitLength > res)\n res = shitLength;\n }\n\n shitLength = shitArray[0] - l;\n if (shitLength > res)\n res = shitLength;\n\n shitLength = r - shitArray[shitArray.Count() - 1];\n if (shitLength > res)\n res = shitLength;\n }\n\n output.WriteLine(res);\n }\n}\n\nclass CaideConstants {\n public const string InputFile = null;\n public const string OutputFile = null;\n}\npublic class Program {\n public static void Main(string[] args) {\n Solution solution = new Solution();\n using (System.IO.TextReader input =\n CaideConstants.InputFile == null ? System.Console.In :\n new System.IO.StreamReader(CaideConstants.InputFile))\n using (System.IO.TextWriter output =\n CaideConstants.OutputFile == null ? System.Console.Out:\n new System.IO.StreamWriter(CaideConstants.OutputFile))\n\n solution.solve(input, output);\n }\n}\n\n", "lang": "Mono C#", "bug_code_uid": "201f5f9ada8a4247b9e96379f8a7fc29", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "1417ad72573d04848ad033581cbea5bc", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9611307420494699, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace NSproul //A\n{\n static class Program\n {\n static void Main()\n {\n double x = Int32.Parse(Console.ReadLine());\n int a = 0;\n\t\t\tint b = 0;\n for (int i = Int32.Parse(Math.Floor(Math.Sqrt(x))); i > 0; i--)\n {\n if(x%i == 0) {\n\t\t\t\t\ta = i;\n\t\t\t\t\tb = Int32.Parse(x)/i;\n\t\t\t\t}\n }\n Console.WriteLine(a + \" \" + b);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "84f9ee56c8d500c972b73da7c17c26c1", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "83cdc89fb21c377a55ff6d657b28818a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9892577336241014, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\nnamespace CP_CS\n{\n\n class Task\n {\n\n static void Solve()\n {\n int n = ReadInt();\n for (int i = (int)Math.Ceiling(Math.Sqrt(n)); i >= 1; i--)\n {\n if (n % i == 0)\n {\n Write($\"{i} {n/i}\");\n return;\n ;\n } \n }\n }\n\n static string[] Split(string str, int chunkSize)\n {\n return Enumerable.Range(0, str.Length / chunkSize)\n .Select(i => str.Substring(i * chunkSize, chunkSize)).ToArray();\n }\n\n #region -- Main -- \n\n private static TextReader reader;\n private static TextWriter writer;\n\n static void Main()\n {\n#if DEBUG\n //reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"pluses.in\");\n //writer = new StreamWriter(\"pluses.out\");\n#endif\n try\n {\n //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n //thread.Start();\n //thread.Join();\n Solve();\n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n #region -- Read / Write --\n\n private static Queue currentLineTokens = new Queue();\n\n private static string[] ReadAndSplitLine()\n {\n return reader.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n private static string[] ReadAndSplitLine(char divisor)\n {\n return reader.ReadLine().Split(new[] { divisor }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0) currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n\n public static int ReadInt()\n {\n return int.Parse(ReadToken());\n }\n\n public static long ReadLong()\n {\n return long.Parse(ReadToken());\n }\n\n //public static BigInteger ReadBigInteger()\n //{\n // return BigInteger.Parse(ReadToken());\n //}\n\n public static double ReadDouble()\n {\n return double.Parse(ReadToken(), CultureInfo.InvariantCulture);\n }\n\n public static int[] ReadIntArray()\n {\n return ReadAndSplitLine().Select(int.Parse).ToArray();\n }\n\n public static bool[] ReadBoolArray()\n {\n return ReadAndSplitLine().ToString().ToCharArray().Select(chr => chr == '1').ToArray();\n }\n\n public static long[] ReadLongArray()\n {\n return ReadAndSplitLine().Select(long.Parse).ToArray();\n }\n\n public static double[] ReadDoubleArray()\n {\n return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();\n }\n\n public static int[][] ReadIntMatrix(int numberOfRows)\n {\n int[][] matrix = new int[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray();\n return matrix;\n }\n\n public static bool[][] ReadBoolMatrix(int numberOfRows)\n {\n bool[][] matrix = new bool[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++)\n matrix[i] = ReadBoolArray();\n return matrix;\n }\n\n public static bool[][] TransposeBoolMatrix(bool[][] array, int numberOfRows)\n {\n bool[][] matrix = array;\n bool[][] ret = new bool[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++)\n {\n ret[i] = new bool[numberOfRows];\n for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i];\n }\n return ret;\n }\n\n\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows);\n int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++)\n {\n ret[i] = new int[numberOfRows];\n for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i];\n }\n return ret;\n }\n\n public static string[] ReadLines(int quantity)\n {\n string[] lines = new string[quantity];\n for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim();\n return lines;\n }\n\n public static void WriteArray(IEnumerable array)\n {\n writer.WriteLine(string.Join(\" \", array));\n }\n\n public static void Write(params object[] array)\n {\n WriteArray(array);\n }\n public static void WriteLines(IEnumerable array)\n {\n foreach (var a in array) writer.WriteLine(a);\n }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new()\n {\n var ret = new T[size];\n for (int i = 0; i < size; i++) ret[i] = new T();\n return ret;\n }\n #endregion\n }\n}\n", "lang": "MS C#", "bug_code_uid": "2817f43de74bac847cc744ba432c25be", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "3a357ef97366620a945cbb567c3398cc", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9700157811678064, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Pixels\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = Int32.Parse(System.Console.ReadLine());\n int min = Int32.MaxValue;\n\n int start = n / 2;\n int a = start, b = start;\n\n for(int i = n; i > 0; i--)\n {\n int j = i;\n while (i * j <= n)\n {\n if (i * j == n)\n {\n if (min > b - a)\n {\n a = i;\n b = j;\n min = b - a;\n }\n }\n j++;\n }\n }\n\n Console.WriteLine(String.Format(\"{0} {1}\", a, b));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "7ac6021b57b32a506a928943b42fc19d", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "5b9a1af224a203227716e51edf933447", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9881756756756757, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Linq;\n\nclass Program\n{\n static void Main(string[] args)\n {\n var tokens = Console.ReadLine().Split(' ');\n Console.WriteLine(Solve(int.Parse(tokens[0]), int.Parse(tokens[1])));\n }\n\n static string Solve(int a, int k)\n {\n var stra = a.ToString().Select(c => c - '0').ToList();\n var b = \"\";\n\n while (stra.Count > 0)\n {\n var e = stra.Take(k + 1).Max();\n var ind = stra.IndexOf(e);\n b += e;\n k -= ind;\n stra.RemoveAt(ind);\n }\n return b;\n }\n}", "lang": "MS C#", "bug_code_uid": "8a8812dee0f4d97c212fabf42b28dd59", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "ff6e420ddae9b3b734b3850694d6ee66", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9432418612578831, "equal_cnt": 19, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 10, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Pasha_Maximizes\n{\n class Program\n {\n static void Main(string[] args)\n {\n IO io = new IO();\n string[] arr_Inputs = io.ReadStrArr();\n int[] arr_A = Array.ConvertAll(arr_Inputs[0].ToCharArray(), s => int.Parse(s.ToString()));\n int i_K = int.Parse(arr_Inputs[1]);\n int i_Count =0;\n for (int i = 0; i_Count < i_K&&i currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine()\n {\n return Console.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n public int ReadNextInt()\n {\n return int.Parse(ReadToken());\n }\n public long ReadNextLong()\n {\n return long.Parse(ReadToken());\n }\n\n public int ReadInt()\n {\n return Convert.ToInt32(Console.ReadLine());\n }\n public long ReadLong()\n {\n return Convert.ToInt64(Console.ReadLine());\n }\n public string ReadStr()\n {\n return Console.ReadLine();\n }\n public string[] ReadStrArr()\n {\n return Console.ReadLine().Split(' ');\n }\n public int[] ReadIntArr()\n {\n return Array.ConvertAll(Console.ReadLine().Split(' '), s => int.Parse(s));\n }\n public long[] ReadLongArr()\n {\n return Array.ConvertAll(Console.ReadLine().Split(' '), s => long.Parse(s));\n }\n public void PutStr(string str)\n {\n Console.WriteLine(str);\n }\n public void PutStr(int str)\n {\n Console.WriteLine(str);\n }\n public void PutStr(long str)\n {\n Console.WriteLine(str);\n }\n\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ca17b7e9a63ce67d5947b44817a5b1ec", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "ad46e7d87f62819d3a0212575ce9753c", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.21159805223550243, "equal_cnt": 38, "replace_cnt": 25, "delete_cnt": 10, "insert_cnt": 3, "fix_ops_cnt": 38, "bug_source_code": "using System;\nusing System.IO;\n\nnamespace A\n{\n class Program\n {\n private static void Main(string[] args)\n {\n using (var inputStream = Console.OpenStandardInput())\n using (var streamReader = new StreamReader(inputStream))\n {\n var firstLine = streamReader.ReadLine();\n var separator = new char[] {' '};\n var n = int.Parse(firstLine.Split(separator)[0]);\n var m = int.Parse(firstLine.Split(separator)[1]);\n\n var groups = new int[n];\n var strings = streamReader.ReadLine().Split(separator);\n if (strings.Length != n)\n {\n throw new ArgumentException(\"Wrong group count\");\n }\n\n for (int i = 0; i < strings.Length; i++)\n {\n groups[i] = int.Parse(strings[i]);\n\n if (groups[i] > m)\n {\n throw new ArgumentException(\"Invalid group size\");\n }\n }\n\n int busIndex = 0;\n int currentFreeSeats = m;\n int groupIndex = 0;\n while (groupIndex < groups.Length)\n {\n var passengers = groups[groupIndex];\n \n if (currentFreeSeats == 0)\n {\n currentFreeSeats = m;\n busIndex++;\n }\n\n if (passengers <= currentFreeSeats)\n {\n currentFreeSeats -= passengers;\n groupIndex++;\n }\n else\n {\n busIndex++;\n currentFreeSeats = m;\n }\n }\n\n using (var outputStream = Console.OpenStandardOutput())\n using (var streamWriter = new StreamWriter(outputStream))\n {\n streamWriter.Write(busIndex + 1);\n }\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "379d2bebdb0521eff21c422b433e3bb4", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "e90e459348f8a8a3e1d6d444e67e1d6f", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8246823956442831, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\npublic class Test\n{\n public static void Main()\n {\n // your code goes here\n string[] str = Console.ReadLine().Trim().Split();\n int k = int.Parse(str[1]);\n char[] chr = str[0].ToCharArray();\n \n {\n bool change = false;\n \n for(int i = 0 ; i < chr.Length ; i++){\n if(k == 0)\n break;\n int current = (int)chr[i] - (int)'0';\n int max = -1;\n int idx = -1;\n for(int j = 0 ; j < k && j + i + 1 < chr.Length; j++){\n int m = (int)chr[i + j + 1] - (int)'0';\n if(m > current){\n max = Math.Max(max,m);\n if(max == m)\n idx = j +i + 1;\n }\n }\n if(max != -1){\n int swap = idx - i;\n --Console.WriteLine(idx);\n if(swap <= k)\n \n k = k - swap;\n while(idx > i){\n char tmp = chr[idx - 1];\n //Console.WriteLine(tmp);\n chr[idx - 1] = chr[idx];\n chr[idx] = tmp;\n idx--;\n }\n }\n }\n \n }\n Console.WriteLine(new string(chr));\n }\n}", "lang": "MS C#", "bug_code_uid": "4f55aecadd941ff140147131f7eac95b", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "3ad381f2f7b93d0b5abb7328ddfbc63d", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9859972677595629, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\n\nnamespace codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n var sa = Console.ReadLine().Split(' ').ToArray();\n var s = sa[0].ToCharArray();\n int k = int.Parse(sa[1]);\n int i = 0;\n while (k > 0 || i==s.Length-1)\n {\n int max = s[i], swap = i;\n for (int j = 1; j <= k; j++)\n {\n if (max < s[i + j])\n {\n max = s[i + j];\n swap = i + j;\n }\n }\n if (max != s[i])\n {\n Swap(ref s, i, swap);\n k -= swap - i;\n }\n i++;\n }\n foreach (var a in s)\n Console.Write(a);\n //Console.ReadKey();\n }\n static void Swap(ref char[] s, int i, int j)\n {\n for (int x = j; x > i; x--)\n {\n char temp = s[x];\n s[x] = s[x - 1];\n s[x - 1] = temp;\n }\n }\n static bool isPrime(int n)\n {\n for (int i = 2; i <= Math.Sqrt(n); i++)\n {\n if (n % i == 0)\n return false;\n }\n return true;\n }\n static int ReadInt()\n {\n return int.Parse(Console.ReadLine());\n }\n static int[] ReadIntArray()\n {\n return Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n }\n static long ReadLong()\n {\n return long.Parse(Console.ReadLine());\n }\n static long[] ReadLongArray()\n {\n return Console.ReadLine().Split(' ').Select(long.Parse).ToArray();\n }\n static int[][] ReadIntMatrix(int rows)\n {\n int[][] result = new int[rows][];\n for (int i = 0; i < rows; i++)\n {\n result[i] = ReadIntArray();\n }\n return result;\n }\n static int GCD(int a, int b)\n {\n if (Max(a, b) % Min(a, b) == 0)\n return Min(a, b);\n return GCD(Min(a, b), Max(a, b) % Min(a, b));\n }\n static int Min(int a, int b)\n {\n return a <= b ? a : b;\n }\n static int Max(int a, int b)\n {\n return a >= b ? a : b;\n }\n static double Distance(Point a, Point b)\n {\n return Math.Sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));\n }\n }\n struct Point\n {\n public double x, y;\n public Point(int x, int y)\n {\n this.x = x;\n this.y = y;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "c6c31a6b7e4c05febf127c4ba3e3ac6a", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "ec2a717d1940bffcf297647422909e27", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.436399492886322, "equal_cnt": 34, "replace_cnt": 25, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 34, "bug_source_code": "using System;\nusing System.Linq;\nusing Helpers;\n\nnamespace Solution\n{\n internal class Program\n {\n private static void Main(string[] args)\n {\n //A435();\n\n var input = new InputPair(Console.ReadLine());\n var b435 = new B435(input);\n Console.WriteLine(b435.Process());\n\n Console.ReadLine();\n Console.ReadLine();\n }\n\n private static void A435()\n {\n var firstRow = new InputPair(Console.ReadLine());\n var secdRow = new InputList(Console.ReadLine());\n\n int n = firstRow.Pair.Item1;\n int m = firstRow.Pair.Item2;\n\n int busNumber = 0;\n\n for (int i = 0; i < n; i++)\n {\n int total = secdRow.Items.ElementAt(i);\n\n int j = i;\n while (total < m)\n {\n j++;\n total += secdRow.Items.ElementAt(j);\n if (total <= m)\n {\n i++;\n }\n }\n busNumber += 1;\n }\n\n\n Console.WriteLine(busNumber);\n\n Console.ReadLine();\n Console.ReadLine();\n }\n }\n}\n\n\nnamespace Solution\n{\n public class B435\n {\n private readonly InputPair _firstRow;\n\n public B435(InputPair firstRow)\n {\n _firstRow = firstRow;\n }\n\n public string Process()\n {\n char[] itemArray = _firstRow.Pair.Item1.ToCharArray();\n int totalSwap = int.Parse(_firstRow.Pair.Item2);\n\n for (int i = 1; i < itemArray.Length; i++)\n {\n char currentItem = itemArray[i];\n for (int j = totalSwap; j > 0 && totalSwap > 0; j--)\n {\n int swapToIndex = i - j;\n if (swapToIndex < 0) continue;\n\n char swapToItem = itemArray[swapToIndex];\n if (currentItem > swapToItem)\n {\n itemArray = Shift(itemArray, i, swapToIndex);\n\n totalSwap -= j;\n break;\n }\n }\n\n if (totalSwap == 0) break;\n }\n\n return new string(itemArray);\n }\n\n public char[] Shift(char[] array, int fromIndex, int toIndex)\n {\n char shifItem = array[fromIndex];\n for (int i = fromIndex; i > toIndex; i--)\n array[i] = array[i - 1];\n\n array[toIndex] = shifItem;\n\n return array;\n }\n }\n}\nnamespace Helpers\n{\n public class InputPair\n {\n private readonly string _line;\n public Tuple Pair;\n\n public InputPair(string line)\n {\n _line = line;\n //Items = new Tuple(null,null);\n Process();\n }\n\n private void Process()\n {\n if (string.IsNullOrWhiteSpace(_line)) return;\n\n string[] items = _line.Split();\n Pair = new Tuple(ConvertType(items[0]), ConvertType(items[1]));\n }\n\n private T ConvertType(string input)\n {\n return (T) Convert.ChangeType(input, typeof (T));\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "ae5b24742527b1e2b2d1b2d9a0bf7aeb", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "7515e6fe43cc191744df938a8dfcdfed", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.30292397660818715, "equal_cnt": 14, "replace_cnt": 9, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Linq;\nclass Program\n{\n public static void Swap(ref T a, ref T b)\n {\n T temp = a;\n a = b;\n b = temp;\n }\n static void Main()\n {\n var a = Console.ReadLine().Split().Select(ulong.Parse).ToArray();\n var k = (int)a[1];\n var s = a[0].ToString().ToCharArray();\n int i;\n for (i = 0; k > 0 && i < s.Length; i++)\n {\n var id = Array.IndexOf(s, s.Max(), i, k);\n if (id > -1)\n {\n k -= id;\n Swap(ref s[i], ref s[id]);\n }\n else\n {\n break;\n }\n }\n var tmp = s.Skip(i).FirstOrDefault(c => c != '0');\n if (tmp != default(char))\n {\n var id = Array.IndexOf(s, tmp, i);\n while (k > 0)\n {\n if (s[id] > s[id - 1])\n {\n Swap(ref s[id], ref s[id - 1]);\n k--;\n id--;\n }\n else\n {\n break;\n }\n }\n }\n foreach (var item in s)\n {\n Console.Write(item);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "458938aecfce5d9ba72a5d5eb1d845b9", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "07b90d4ecce46b11ae1b1d00fa89884c", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9743272502319826, "equal_cnt": 12, "replace_cnt": 11, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace lab11_1\n{\n class Program\n {\n static string a = null;\n static int[] aa = new int[20];\n\n static void Main(string[] args)\n {\n int i, k;\n \n FillChar(aa, 0);\n int f=1;\n\n int[] input = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(p => int.Parse(p)).ToArray();\n a = input[0].ToString();\n k = input[1];\n\n int len = a.Length;\n for (i = 1; i <= len; i++) aa[i] = a[i - 1] - '0';\n\n while(k > 0)\n {\n int max = -1;\n int flag = 0;\n for(i = f; i <= f + k && i <= len; i++)\n {\n if(max < aa[i]) \n { \n max = aa[i]; \n flag = i;\n }\n }\n for(i = flag; i > f; i--)\n {\n int c = aa[i];\n aa[i] = aa[i-1];\n aa[i-1] = c;\n }\n k = k - flag + f;\n f++;\n if(f > len) break;\n }\n for(i = 1; i <= len; i++) \n Console.Write(aa[i]);\n Console.WriteLine();\n }\n public static void FillChar(T[] array, T value)\n {\n for (int i = 0; i < array.Length; i++)\n array[i] = value;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "9531c3caa54c8267dc717401e7293f35", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "d07805ca84e797f9f90d8418a6364847", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9981818181818182, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace TestFSharpTranslation\n{\n public class Program\n {\n public static int Main(string args)\n {\n int num = int.Parse(Console.ReadLine());\n object value;\n switch (num)\n {\n default:\n value = ((num % 2 != 1) ? \"YES\" : \"NO\");\n break;\n case 2:\n value = \"NO\";\n break;\n }\n Console.WriteLine((string)value);\n return 0;\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "fcab99c924f6a1e364e553d515f5725d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "40040b5665fba922468f3081ba4b254f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9944029850746269, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w = Convert.ToInt32(Console.read());\n if (w <= 2)\n {\n Console.Write(\"NO\");\n }\n else if (w % 2 == 0)\n {\n Console.Write(\"YES\");\n }\n else\n {\n Console.Write(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "016b68ae1644817c4e905a94a17da965", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "82ec446f47db57c24781afe45919baea", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9983079526226735, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp3\n{\n class Program\n {\n static void Main(string[] args)\n {\n bool anw;\n int w = Convert.ToInt16(Console.ReadLine());\n if (w < 4)\n {\n Console.WriteLine(\"NO\");\n }\n else if (w%2 == 0)\n {\n Console.WriteLine(\"YES\")\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "4c4e9131f0187651bc569a3ba2c9dd8f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "82ec446f47db57c24781afe45919baea", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.4570446735395189, "equal_cnt": 9, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Skrotowanie\n{\n class Program\n {\n static void Main(string[] args)\n {\n var liczby = Console.ReadLine();\n var numbers = liczby.Split(' ');\n\n var m = double.Parse(numbers[0]);\n var n = double.Parse(numbers[1]);\n var a = double.Parse(numbers[2]);\n\n var liczba1 = Math.Ceiling(m / a);\n var liczba2 = Math.Ceiling(n / a);\n\n var wynik = liczba1 * liczba2;\n\n Console.WriteLine(Convert.ToInt64(wynik));\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d066b849c6876c9f1d8774e5c5eebf73", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9d571986df056b92535cbc004263f71d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7121464226289518, "equal_cnt": 18, "replace_cnt": 5, "delete_cnt": 5, "insert_cnt": 8, "fix_ops_cnt": 18, "bug_source_code": "using System;\nclass watermelone\n{\n void main()\n {\n sbyte w;\n w = Convert.ToSByte(Console.ReadLine());\n if (w % 2 == 0)\n Console.Write(\"Yes\\n\");\n else\n Console.Write(\"No\\n\");\n Console.ReadKey();\n }\n}", "lang": "Mono C#", "bug_code_uid": "44224917717f34a5df8078d53f551e54", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "227a6e822a93ac7689e867cf7c9303ef", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8422425032594524, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\nnamespace CodeForces\n{\n class A4\n {\n static void Main()\n {\n Console.WriteLine(((float)weigh/2));\n if(((float)weigh/2)%2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "73ea4ad2aacaff5b23d04ab79fa7ae2a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "36d7254831d6cc8555357910aa18c0cf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9867172675521821, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nclass program\n{\n Public static void Main()\n {\n int x = Convert.ToInt32(Console.ReadLine());\n if(x==2) Console.WriteLine(\"NO\");\n else if(x%2==0) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "377b8cfd2cc5898a56739781a1261674", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4c68f430fa6b500b28bf2bca3b2d8e8b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.7976973684210527, "equal_cnt": 9, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 6, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForcesTrain\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w;\n\n w = Convert.ToInt32(Console.ReadLine());\n w = w % 2;\n\n if (w != 0 || w = 2)\n {\n Console.WriteLine(\"NO\");\n }\n else \n {\n Console.WriteLine(\"YES\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "513e30165de0aa0e83e34ab7f13cbdb1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c9ddaee3ff26a4e84fa1ff87dd23ed00", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7740963855421686, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 11, "bug_source_code": "class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(\"enter the weight of the watermelon : \");\n int n = int.Parse( Console.ReadLine());\n string res = (n % 4 == 0) ? \" YES \" : \" NO \";\n Console.WriteLine(res);\n Console.ReadLine();\n\n }\n }", "lang": "Mono C#", "bug_code_uid": "c433afebdac5d05c14e893d741c3760b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fcde0a2faeb6e0b53252897e7f04286d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.6084608460846085, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp114\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine()), otv= 0, i = 1;\n string name = \"\";\n while (n > 0)\n {\n if (i % 2 == 0)\n {\n n -= 2;\n name = \"Mahmoud\";\n }\n else\n {\n n--;\n name = \"Ehab\";\n }\n i++;\n }\n Console.WriteLine(name);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b94d6713033aa249e70c19a4224eca27", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "2145eea870e8a1dd6542d1b06799a9af", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8185146443514645, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\n\nnamespace AlgoTasks\n{\n class Program\n {\n static void Main(string[] args)\n {\n //---------------------------------------------------------------------\n long n = long.Parse(Console.ReadLine());\n bool turn = false /*Махмуд*/;\n while(true)\n {\n if (!turn)\n {\n if (n - 2 >= 0) n -= 2;\n else\n {\n Console.WriteLine(\"Ehab\");\n return;\n }\n turn = true;\n }\n else\n {\n if (n - 1 >= 0) n--;\n else\n {\n Console.WriteLine(\"Mahmoud\");\n return;\n }\n turn = false;\n }\n }\n //---------------------------------------------------------------------\n /*int n = int.Parse(Console.ReadLine());\n int[] x = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();\n\n //5\n //3 10 8 6 11\n //4\n //1\n //10\n //3\n //11\n\n //0\n //4\n //1\n //5\n\n x = new SortedSet(x).ToArray();\n int maxPrice = x[n - 1];\n n = x.Length;\n int[] dp = new int[maxPrice + 1];\n int c = 1;\n for (int i = 0; i < n; i++)\n dp[x[i]] = c++;\n\n for (int i = 1; i <= maxPrice; i++)\n dp[i] = Math.Max(dp[i], dp[i - 1]);\n\n int q = int.Parse(Console.ReadLine());\n for (int i = 0; i < q; i++)\n {\n long m = long.Parse(Console.ReadLine());\n if (m >= maxPrice)\n Console.WriteLine(dp[maxPrice]);\n else\n Console.WriteLine(dp[m]);\n }*/\n //---------------------------------------------------------------------\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a9ffe6092e376683996bee7ef59f7938", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "7bc69e27d5ea7709975ea1c91a47072a", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9993527508090615, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Numerics;\n\nnamespace ConsoleApp1\n{\n\n class Program\n {\n static void Main(string[] args)\n {\n //int numberOfFig = Convert.ToInt32(Console.ReadLine());\n //var figures = new string[numberOfFig];\n //for (int i = 0; i < numberOfFig; i++)\n //{\n // figures[i] = Console.ReadLine();\n //}\n //var nums = Console.ReadLine().Split(' ');\n var num = Convert.ToInt32(Console.ReadLine());\n //Console.WriteLine(Check(Array.ConvertAll(nums, int.Parse)));\n Console.WriteLine(Check(num));\n }\n\n static string Check(int num)\n {\n\n\n if (num % 2 == 0)\n {\n return \"Maxmoud\";\n }\n\n return \"Ehab\";\n //bool maxmud = true;\n //while (true)\n //{\n // if (maxmud && num >= 2)\n // {\n // num %= 2;\n // maxmud = !maxmud;\n // }\n // else\n // {\n // return \"Ehab\";\n // }\n \n\n // if (!maxmud && num >= 1)\n // {\n // num -= 1;\n // maxmud = !maxmud;\n // }\n // else\n // {\n // return \"Mahmoud\";\n // }\n\n //}\n }\n }\n}\n\n \n\n ", "lang": "Mono C#", "bug_code_uid": "778768048aaf9cb8291f983763ce990f", "src_uid": "5e74750f44142624e6da41d4b35beb9a", "apr_id": "4865fbb184090b972427e82e80f981eb", "difficulty": 800, "tags": ["math", "games"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9959210311633219, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Runtime.CompilerServices;\nusing System.Text;\nusing System.Diagnostics;\nusing System.Numerics;\nusing static System.Console;\nusing static System.Convert;\nusing static System.Math;\nusing static Template;\nusing Pi = Pair;\n\nclass Solver\n{\n public void Solve(Scanner sc)\n {\n int a, ta, b, tb;\n sc.Make(out a, out ta, out b, out tb);\n var T = sc.Str.Split(':').Select(int.Parse).ToArray();\n int s = 60 * T[0] + T[1], t = 60 * T[0] + T[1] + ta;\n int st = 300, en = 24 * 60;\n var res = 0;\n for (int i = st; i < en; i += b)\n {\n if ((s <= i && i < t) || (s < i + tb && i + tb <= t)) res++;\n }\n WriteLine(res);\n }\n}\n\n#region Template\npublic static class Template\n{\n static void Main(string[] args)\n {\n Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });\n new Solver().Solve(new Scanner());\n Console.Out.Flush();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmin(ref T a, T b) where T : IComparable { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmax(ref T a, T b) where T : IComparable { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(ref T a, ref T b) { var t = b; b = a; a = t; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(this IList A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }\n public static T[] Create(int n, Func f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }\n public static T[] Create(int n, Func f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }\n public static IEnumerable Shuffle(this IEnumerable A) => A.OrderBy(v => Guid.NewGuid());\n public static int CompareTo(this T[] A, T[] B, Comparison cmp = null) { cmp = cmp ?? Comparer.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }\n public static int MaxElement(this IList A, Comparison cmp = null) { cmp = cmp ?? Comparer.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }\n public static T PopBack(this List A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }\n public static void Fail(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }\n}\npublic class Scanner\n{\n public string Str => Console.ReadLine().Trim();\n public int Int => int.Parse(Str);\n public long Long => long.Parse(Str);\n public double Double => double.Parse(Str);\n public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();\n public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();\n public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());\n public int[] ArrInt1D(int n) => Create(n, () => Int);\n public long[] ArrLong1D(int n) => Create(n, () => Long);\n public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);\n public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);\n private Queue q = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Next() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }\n public void Make(out T1 v1) => v1 = Next();\n public void Make(out T1 v1, out T2 v2) { v1 = Next(); v2 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next(); }\n //public (T1, T2) Make() { Make(out T1 v1, out T2 v2); return (v1, v2); }\n //public (T1, T2, T3) Make() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }\n //public (T1, T2, T3, T4) Make() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }\n}\npublic class Pair : IComparable>\n{\n public T1 v1;\n public T2 v2;\n public Pair() { }\n public Pair(T1 v1, T2 v2)\n { this.v1 = v1; this.v2 = v2; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = Comparer.Default.Compare(v1, p.v1);\n if (c == 0)\n c = Comparer.Default.Compare(v2, p.v2);\n return c;\n }\n public override string ToString() => $\"{v1.ToString()} {v2.ToString()}\";\n public void Deconstruct(out T1 a, out T2 b) { a = v1; b = v2; }\n}\n\npublic class Pair : Pair, IComparable>\n{\n public T3 v3;\n public Pair() : base() { }\n public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)\n { this.v3 = v3; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = base.CompareTo(p);\n if (c == 0)\n c = Comparer.Default.Compare(v3, p.v3);\n return c;\n }\n public override string ToString() => $\"{base.ToString()} {v3.ToString()}\";\n public void Deconstruct(out T1 a, out T2 b, out T3 c) { Deconstruct(out a, out b); c = v3; }\n}\n#endregion\n", "lang": "Mono C#", "bug_code_uid": "e79bc803bee6f167a703137f12490f10", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "c4eb15ef37bd3156b3203dfa5a6ffae5", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.946605141727093, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace _391A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n char current = input[0];\n int count = 1;\n int res = 0;\n for (int i =1; i< input.Length; i++)\n {\n if(input[i] == current)\n {\n count++;\n }\n else\n {\n if(count % 2 == 0)\n {\n res++;\n }\n count = 1;\n }\n current = input[i];\n }\n Console.WriteLine(res);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "35958ab3f04f94b2060b378b60c992d6", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "apr_id": "10ffad70f6546e4ec25eb2bc7bf7e47f", "difficulty": null, "tags": ["implementation", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9910661107802263, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace ConsoleApplication1\n{\n public static class Problem391A\n {\n private static int Solve(string s)\n {\n var a = s[0];\n var b = 0;\n var d = 0;\n foreach (var c in s)\n {\n if (a == c)\n {\n b++;\n } \n else\n {\n if (b % 2 == 0) d++;\n b = 1;\n }\n a = c;\n }\n\n return d;\n }\n \n \n private static void Run()\n {\n var a = Console.ReadLine();\n Console.WriteLine(Solve(a));\n }\n \n public static void Main(string[] args)\n {\n Problem391A.Run(); \n }\n \n }\n}", "lang": "Mono C#", "bug_code_uid": "94f2082619dd584f5495e77ef642a1c8", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "apr_id": "774550b3fd7bffeb079ca4be58308da0", "difficulty": null, "tags": ["implementation", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8756756756756757, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\n\nnamespace Watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n Int64 input = Convert.ToInt64(Console.ReadLine());\n Int64 evenOdd = Convert.ToInt64(Math.Ceiling(input / 2));\n if((evenOdd % 2) == 0){\n Console.WriteLine(\"YES\");\n }else{\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "11c879e4d9c1b4dcd9051e8155aa2a9c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7c05ebad4fe93e0be65a76d7d639e91a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5277044854881267, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "int input = Convert.ToInt32(Console.ReadLine());\nConsole.WriteLine(((input % 2 == 0) ? \"YES\" : \"NO\"));", "lang": "MS C#", "bug_code_uid": "af53ff0b117babf3ded66d95045e3142", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "cd2ed6dd3511a7b204d8b3b675438f00", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5062240663900415, "equal_cnt": 13, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication13\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(\"enter w\");\n int w = int.Parse(Console.ReadLine());\n if(w%2==0)\n Console.WriteLine(\"yes\");\n else if(w==2)\n Console.WriteLine(\"no\");\n else Console.WriteLine(\"no\");\n console.read();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "4576c3f029d8cb80d0791a97f62d4b06", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dad71085c4a4453030c7ae1b6f20f248", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.348922753547031, "equal_cnt": 22, "replace_cnt": 15, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace WindowsFormsApplication1\n{\n public partial class Form1 : Form\n {\n public Form1()\n {\n InitializeComponent();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n \n var a= Convert.ToInt32(textBox1.Text);\n var n = a % 2;\n if (n==0)\n {\n MessageBox.Show(\"Yes\");\n }\n else\n {\n MessageBox.Show(\"NO\");\n\n }\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "93c816c068a3c6d6600106492638decc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "95b70cae4cd6aefede21dd69e29ac6b1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7939221272554606, "equal_cnt": 12, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte weight = short.Parse(Console.ReadLine());\n if (weight % 2 == 0)\n {\n Console.WriteLine(\"yes\");\n }\n else\n {\n Console.WriteLine(\"no\");\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "51052ba61d004bee00b38b2c907c8e24", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dc5c27df7a957017ed082b08133248ac", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.058394160583941604, "equal_cnt": 18, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 18, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApplication6\", \"ConsoleApplication6\\ConsoleApplication6.csproj\", \"{BF7F7577-72CC-48A4-92C5-021896A0A334}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BF7F7577-72CC-48A4-92C5-021896A0A334}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BF7F7577-72CC-48A4-92C5-021896A0A334}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BF7F7577-72CC-48A4-92C5-021896A0A334}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BF7F7577-72CC-48A4-92C5-021896A0A334}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "1df3c4d5a4b562a726945e9867e951b9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0a038f1bcc9bf882f754f835554d0fe7", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6992782678428228, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication6\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(\"enter the melon weight\");\n string weight = Console.ReadLine();\n int w = Convert.ToInt16 (weight);\n while ( 1 <= w && w <= 100) {\n w = w % 2;\n if ( w == 0 ) {\n Console.WriteLine (\"YES\"); \n\n }\n else {\n Console.WriteLine (\"NO\");\n }\n Console.ReadKey();\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "f591b15560f776002dbc84e66cada84a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0a038f1bcc9bf882f754f835554d0fe7", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7597087378640777, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": " class Program\n {\n static void Main()\n {\n float x = Convert.ToInt32(Console.ReadLine());\n \n if (x%4==0)\n {\n Console.WriteLine(\"Yes\");\n }\n else\n {\n Console.WriteLine(\"No\");\n }\n Console.ReadKey();\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "1b7b01fafcc67cb8f5b16d251c61c005", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b057f9c8e74db44d45da5f433b67ebfc", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9968494013862634, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.IO;\n\nnamespace Learning\n{\n class Program\n {\n static bool s_multiTest = false;\n static void Main(string[] args)\n {\n var o = Console.Out;\n var nTest = 1;\n if (s_multiTest)\n {\n nTest = NextInt();\n }\n\n for (int testId = 1; testId <= nTest; testId++)\n {\n Solve(testId, o);\n }\n Console.ReadLine();\n }\n static int MOD = (int)1e6 + 3;\n private static void Solve(int testId, TextWriter o)\n {\n var n = NextInt();\n long ans = recur(n);\n o.WriteLine(ans % MOD);\n }\n\n private static long recur(int n)\n {\n if (n == 1)\n return 1;\n long ans = 0;\n ans += ((recur(n - 1) % MOD) * 3) % MOD;\n return ans;\n }\n\n static int s_index = 0;\n static string[] s_tokens;\n private static string Next()\n {\n while (s_tokens == null || s_index == s_tokens.Length)\n {\n s_tokens = Console.ReadLine().Split(' ').ToArray();\n s_index = 0;\n }\n return s_tokens[s_index++];\n }\n\n private static int NextInt()\n {\n return Int32.Parse(Next());\n }\n\n private static long NextLong()\n {\n return Int64.Parse(Next());\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "11bdf4b00af56b7ce51c69a4e2e97b4e", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "77c40d6ef9379ca13406884a51e712d6", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.988294434470377, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing CompLib.Util;\nusing System.Threading;\nusing CompLib.Mathematics;\n\npublic class Program\n{\n private int N, X, Pos;\n\n public void Solve()\n {\n var sc = new Scanner();\n N = sc.NextInt();\n X = sc.NextInt();\n Pos = sc.NextInt();\n\n List g = new List();\n List l = new List();\n int left = 0;\n int right = N;\n while (left < right)\n {\n int middle = (left + right) / 2;\n if (middle <= Pos)\n {\n l.Add(middle);\n left = middle + 1;\n }\n else\n {\n g.Add(middle);\n right = middle;\n }\n }\n\n // x未満 len(l)-1個\n // x超過 len(g)個\n\n // のこりてきとう\n\n var c = new BinomialCoefficient(5000);\n ModInt ans = c.fact[X - 1] * c.ifact[(X - 1) - (l.Count - 1)];\n ans *= c.fact[N - X] * c.ifact[(N - X) - g.Count];\n ans *= c.fact[N - (l.Count + g.Count)];\n Console.WriteLine(ans);\n }\n\n public static void Main(string[] args) => new Program().Solve();\n // public static void Main(string[] args) => new Thread(new Program().Solve, 1 << 27).Start();\n}\n\n// https://bitbucket.org/camypaper/complib\nnamespace CompLib.Mathematics\n{\n #region ModInt\n\n /// \n /// [0,) までの値を取るような数\n /// \n public struct ModInt\n {\n /// \n /// 剰余を取る値.\n /// \n public const long Mod = (int) 1e9 + 7;\n // public const long Mod = 998244353;\n\n /// \n /// 実際の数値.\n /// \n public long num;\n\n /// \n /// 値が であるようなインスタンスを構築します.\n /// \n /// インスタンスが持つ値\n /// パフォーマンスの問題上,コンストラクタ内では剰余を取りません.そのため, ∈ [0,) を満たすような を渡してください.このコンストラクタは O(1) で実行されます.\n public ModInt(long n)\n {\n num = n;\n }\n\n /// \n /// このインスタンスの数値を文字列に変換します.\n /// \n /// [0,) の範囲内の整数を 10 進表記したもの.\n public override string ToString()\n {\n return num.ToString();\n }\n\n public static ModInt operator +(ModInt l, ModInt r)\n {\n l.num += r.num;\n if (l.num >= Mod) l.num -= Mod;\n return l;\n }\n\n public static ModInt operator -(ModInt l, ModInt r)\n {\n l.num -= r.num;\n if (l.num < 0) l.num += Mod;\n return l;\n }\n\n public static ModInt operator *(ModInt l, ModInt r)\n {\n return new ModInt(l.num * r.num % Mod);\n }\n\n public static implicit operator ModInt(long n)\n {\n n %= Mod;\n if (n < 0) n += Mod;\n return new ModInt(n);\n }\n\n /// \n /// 与えられた 2 つの数値からべき剰余を計算します.\n /// \n /// べき乗の底\n /// べき指数\n /// 繰り返し二乗法により O(N log N) で実行されます.\n public static ModInt Pow(ModInt v, long k)\n {\n return Pow(v.num, k);\n }\n\n /// \n /// 与えられた 2 つの数値からべき剰余を計算します.\n /// \n /// べき乗の底\n /// べき指数\n /// 繰り返し二乗法により O(N log N) で実行されます.\n public static ModInt Pow(long v, long k)\n {\n long ret = 1;\n for (k %= Mod - 1; k > 0; k >>= 1, v = v * v % Mod)\n if ((k & 1) == 1)\n ret = ret * v % Mod;\n return new ModInt(ret);\n }\n\n /// \n /// 与えられた数の逆元を計算します.\n /// \n /// 逆元を取る対象となる数\n /// 逆元となるような値\n /// 法が素数であることを仮定して,フェルマーの小定理に従って逆元を O(log N) で計算します.\n public static ModInt Inverse(ModInt v)\n {\n return Pow(v, Mod - 2);\n }\n }\n\n #endregion\n\n #region Binomial Coefficient\n\n public class BinomialCoefficient\n {\n public ModInt[] fact, ifact;\n\n public BinomialCoefficient(int n)\n {\n fact = new ModInt[n + 1];\n ifact = new ModInt[n + 1];\n fact[0] = 1;\n for (int i = 1; i <= n; i++)\n fact[i] = fact[i - 1] * i;\n ifact[n] = ModInt.Inverse(fact[n]);\n for (int i = n - 1; i >= 0; i--)\n ifact[i] = ifact[i + 1] * (i + 1);\n ifact[0] = ifact[1];\n }\n\n public ModInt this[int n, int r]\n {\n get\n {\n if (n < 0 || n >= fact.Length || r < 0 || r > n) return 0;\n return fact[n] * ifact[n - r] * ifact[r];\n }\n }\n\n public ModInt RepeatedCombination(int n, int k)\n {\n if (k == 0) return 1;\n return this[n + k - 1, k];\n }\n }\n\n #endregion\n}\n\n\nnamespace CompLib.Util\n{\n using System;\n using System.Linq;\n\n class Scanner\n {\n private string[] _line;\n private int _index;\n private const char Separator = ' ';\n\n public Scanner()\n {\n _line = new string[0];\n _index = 0;\n }\n\n public string Next()\n {\n if (_index >= _line.Length)\n {\n string s;\n do\n {\n s = Console.ReadLine();\n } while (s.Length == 0);\n\n _line = s.Split(Separator);\n _index = 0;\n }\n\n return _line[_index++];\n }\n\n public string ReadLine()\n {\n _index = _line.Length;\n return Console.ReadLine();\n }\n\n public int NextInt() => int.Parse(Next());\n public long NextLong() => long.Parse(Next());\n public double NextDouble() => double.Parse(Next());\n public decimal NextDecimal() => decimal.Parse(Next());\n public char NextChar() => Next()[0];\n public char[] NextCharArray() => Next().ToCharArray();\n\n public string[] Array()\n {\n string s = Console.ReadLine();\n _line = s.Length == 0 ? new string[0] : s.Split(Separator);\n _index = _line.Length;\n return _line;\n }\n\n public int[] IntArray() => Array().Select(int.Parse).ToArray();\n public long[] LongArray() => Array().Select(long.Parse).ToArray();\n public double[] DoubleArray() => Array().Select(double.Parse).ToArray();\n public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "8e7f2c6d95d8bf5a67f46edca33c4760", "src_uid": "24e2f10463f440affccc2755f4462d8a", "apr_id": "b6a19fa11ea04dfcfafe609115529df4", "difficulty": 1500, "tags": ["combinatorics", "binary search"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6489533011272142, "equal_cnt": 11, "replace_cnt": 3, "delete_cnt": 6, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "using System;\n\nnamespace Arbuz\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int a;\n Console.WriteLine(\"Арбус: \");\n a = int.Parse (Console.ReadLine());\n\n if (a % 2 == 0)\n {\n Console.WriteLine(\"YES\"); \n }\n else \n\n { \n Console.WriteLine(\"NO\");\n }\n Console.ReadKey();\n\n int b;\n Console.WriteLine(\"Любая половина: \");\n b = int.Parse (Console.ReadLine());\n\n if (( b % 4 == 0) )\n {\n Console.WriteLine(\"YES\");\n }\n else\n\n {\n Console.WriteLine(\"NO\");\n }\n Console.ReadKey();\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "1873ae8dd6c29960fb65bc9944b8658b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e1eb35759c2d55ec47e243c2b7f4ccd8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.970917225950783, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\nnamespace Arbuz\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int a;\n a = 7;\n a = int.Parse (Console.ReadLine());\n \n if (( a-4 % 2 == 0), a > 1) \n {\n Console.WriteLine(\"YES\"); \n }\n \n else \n {\n Console.WriteLine(\"NO\");\n }\n \n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "ebba648039b3272de9e4f902a5e0162d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e1eb35759c2d55ec47e243c2b7f4ccd8", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9844789356984479, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nclass Watermelon{\n static public void Main(){\n string tmp = Console.ReadLine();\n int n=int.parse(tmp);\n if(n%2==0)Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "ab9c4158e9e033fadfb6812838726875", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c7b01743bcdab48cf82db6894627a905", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.41509433962264153, "equal_cnt": 13, "replace_cnt": 7, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 13, "bug_source_code": "using System;\nclass Watermelon{\n static public void Main(){\n //string tmp = Console.ReadLine();\n int n=Console.ReadLine();//int.Parse(tmp);\n if(n%2==0&&n>2)Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "cda100707a2dd6c99bddef3b9f1d293b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c7b01743bcdab48cf82db6894627a905", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9853249475890985, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nclass Watermelon{\n static public void Main(){\n string tmp;\n Console.ReadLine(tmp);\n int n=int.Parse(tmp);\n if(n%2==0&&n>2)Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "5c2df24b963e7f81bd709d74c927337b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c7b01743bcdab48cf82db6894627a905", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.22523461939520334, "equal_cnt": 15, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 12, "fix_ops_cnt": 16, "bug_source_code": "Public string IsEvenNumber(int weight)\n{\n if(weight % ==0)\n {\n return \"YES\";\n }\n \n else\n {\n return \"NO\";\n }\n}", "lang": "Mono C#", "bug_code_uid": "62abc3170fd610d05e7101ea84e417d8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ed54b951f44eaa97d6e8aeb836e6a848", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9605263157894737, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "using System;\nclass Program{\n static void Main(string[] args){\n var mass = int.Parse(Console.ReadLine());\n if (mass < 4 || (mass-2)%2 !=0)) Console.Write(\"NO\");\n else Console.Write(\"YES\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "deef6cd2149f197020400ffd9d4e5f43", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "7493a26176adafd4d354b8e836a5cdb5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6904942965779468, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.IO;\nusing System.Linq;\nusing System.Collections.Generic;\n\nnamespace CSharp_Shell\n{\n\n public static class Program \n {\n public static void Main() \n {\n int i = int.Parse(Console.ReadLine());\n if(i=!0)\n {\n if(i % 2==0)\n {\n \tConsole.WriteLine(\"yes\");\n }\n else\n {\n \tConsole.WriteLine(\"no\");\n }\n }\n else\n {\n \tConsole.WriteLine(\"yes\");\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "00b800106e2ce83b01ebc5bc541d342f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "80bf6247535675080e0e2ed492d628ba", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9717624148003895, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 7, "bug_source_code": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n \n\n static void Main(String[] args)\n {\n int w;\n \n\n w = Convert.ToInt32(Console.ReadLine());\n\n if (w % 2 == 0 && w>2)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n\n\n\n\n\n\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "25756038f1a2beb5879645a429abbd73", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8dccae8bc1bafc97ae3255d93c1fd441", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9985974754558204, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Text;\n\nclass Program\n{\n static void Main(string[] args)\n {\n\n int weight = Convert.ToInt32(Console.ReadLine());\n\n if ( (weight % 2 == 0) && weight != 2)\n {0\n Console.Write(\"YES\");\n }\n else\n {\n Console.Write(\"NO\");\n }\n\n //Console.ReadKey();\n }\n}", "lang": "Mono C#", "bug_code_uid": "14ee13299d2291f2284ebb5735ae72e5", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "21579fdb9c4e4d82cb8882cd114ca660", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.737151248164464, "equal_cnt": 17, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 9, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.IO;\n\nclass Program\n{\n static void Main()\n {\n StreamReader sr = new StreamReader(\"input.txt\");\n StreamWriter sw = new StreamWriter(\"output.txt\");\n\n int a = Convert.ToInt32(sr.ReadLine());\n\n Algoritm instance = new Algoritm(a);\n\n sw.WriteLine(instance.Field);\n\n sw.Close();\n sw.Close();\n }\n}\n\nclass Algoritm\n{\n public string Field { get; set; }\n\n int c = 0;\n public Algoritm(int a)\n {\n if ((a % 2) == 0)\n {\n c = a / 2;\n if ((a % 2) == 0)\n Field = \"YES\";\n else\n Field = \"NO\";\n }\n else\n Field = \"NO\";\n }\n}", "lang": "Mono C#", "bug_code_uid": "75e8f1c5276a026d03354423107702ad", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "68da196b219d73f84f245163196aecd9", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6205250596658711, "equal_cnt": 11, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 8, "fix_ops_cnt": 12, "bug_source_code": "class Program\n {\n\n static void Main(string[] args)\n {\n int input = int.Parse(Console.ReadLine());\n if(input%2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else{\n Console.WriteLine(\"NO\");\n }\n\n\n }\n }", "lang": "Mono C#", "bug_code_uid": "8af22044b9c6183a4e3cb2304ce26b02", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b5e5de6bd5589b19d09481a16985f3be", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8180839612486545, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing System;\nusing System.IO;\nusing System.Net;\nusing System.Linq;\nusing System.Collections.Generic;\n\nnamespace ConsoleApp3\n{\n class Program\n {\n static void Main(string[] args)\n {\n string test = Console.ReadLine();\n if (Convert.ToInt32(test)%2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "24ff36d77387da60936887eebb7dc13c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "38a0142271fec574eef9a7d3ae447964", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9963570127504554, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int w=Convert.ToInt32(Console.ReadLine());\n if (w%2==1)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n if ((w/2)%2==0)\n {\n Console.WriteLine(\"YES\"); \n }\n else if ((((w-2)/2)%2==0)$$((w-2)!=0))\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "be2fd8d120633e5494384f3310580311", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0ca24743a9105ff1232582357566c77b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6690140845070423, "equal_cnt": 10, "replace_cnt": 2, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Data.SqlTypes;\nusing System.Net.Http;\n\nnamespace codeForces\n{\n class Program\n {\n static void Main()\n {\n for (int i=0; i < 1 ; i++)\n {\n Watermelon();\n }\n }\n\n public static void Watermelon()\n {\n int w = Convert.ToInt32(Console.ReadLine());\n int x = w % 2;\n\n if (w == 2)\n {\n Console.Write(\"NO\");\n goto next;\n }\n if (x == 0)\n {\n Console.Write(\"YES\");\n }\n if (x != 0)\n {\n Console.Write(\"NO\");\n }\n next:\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "4f6cde5efa72d5b662393fe4ddb6305b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b965eb09f4f382eff8f787de352fa9d4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.990990990990991, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tvar a = Convert.ToInt32(Console.ReadLine());\n\t\t\tif(a%2==)\n\t\t\t\tConsole.WriteLine(\"YES\");\n\t\t\telse Console.WriteLine(\"NO\");\n\t\t}\n\t}\n}\n", "lang": ".NET Core C#", "bug_code_uid": "9cc6c7b4779ee4731dcdb1173486b727", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "45d3280d6e8fd29362e97a16483286f6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.14626391096979333, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 11, "bug_source_code": "int k = int.Parse(Console.Readline());\nwhile(true){\n\tif(k%2==0){\n\t\tk/=2\n\t}\n\telse\n\t\tbreak;\n}", "lang": ".NET Core C#", "bug_code_uid": "39af883a2eba0385bf11b01953763e51", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "82ce55b425f5029d8be4b77078531913", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.028629856850715747, "equal_cnt": 14, "replace_cnt": 14, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 14, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.30413.136\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"cf\", \"cf\\cf.csproj\", \"{5D3406DD-5F03-4E9B-B861-254E453ED509}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{5D3406DD-5F03-4E9B-B861-254E453ED509}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{5D3406DD-5F03-4E9B-B861-254E453ED509}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{5D3406DD-5F03-4E9B-B861-254E453ED509}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{5D3406DD-5F03-4E9B-B861-254E453ED509}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {BFA2A156-5B5E-403B-BEBD-FA4972E0C310}\n\tEndGlobalSection\nEndGlobal\n", "lang": ".NET Core C#", "bug_code_uid": "85249bcc43f7f3d91bcda57ba219cea4", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "84ef0a78a71672a1971fa3c5db27b15d", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4911242603550296, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace Watermelon800\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(w);\n }\n\n public static bool IsDividable(double w)\n {\n return ((w % 2) == 0) && (w / 2) % 2 == 0;\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "871d4f6c5ecbb319964add04103616e1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c78f825e5a96954b46be5f62fd2640ec", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5333333333333333, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "using System;\n\nnamespace Watermelon800\n{\n class Program\n {\n static void Main(string[] args)\n {\n IsDividable(Convert.ToInt32(args[0]));\n }\n\n public static bool IsDividable(int w)\n {\n return ((w % 2) == 0) && (w / 2) % 2 == 0;\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "43d34f88b433d93f0634cfee15508c45", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c78f825e5a96954b46be5f62fd2640ec", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7553072625698324, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": " static void Main(string[] args)\n {\n int w = int.Parse(Console.ReadLine());\n \n if (w % 2 == 0)\n {\n Console.WriteLine(\"yes\");\n }\n else\n {\n Console.WriteLine(\"no\");\n }\n\n \n }", "lang": ".NET Core C#", "bug_code_uid": "5180bfa5eb50f16310491e5febfe98a4", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "df547688d7f1189d0010cfd20e00b676", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.979765708200213, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nclass Program{\n\tstatic void Main(){\n\t\tstring input = Console.ReadLine();\n\t\tint[] box = new int[10];\n\t\tint mul = 10;\n\t\tint ans = 1;\n\t\t\n\t\tfor(int i = 0; i < input.Length; i++){\n\t\t\tif(i == 0)\n\t\t\t\tmul--;\n\t\t\tif(input[i] == '?'){\n\t\t\t\tans *= 10;\n\t\t\t}\n\t\t\tif(input[i] >= 'A' && input[i] <= 'J'){\n\t\t\t\tif(box[input[i] - 'A'] == 0){\n\t\t\t\t\tans *= mul;\n\t\t\t\t\tbox[input[i] - 'A']++;\n\t\t\t\t\tmul--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i == 0)\n\t\t\t\tmul++;\n\t\t}\n\t\t\n\t\tConsole.WriteLine(ans);\n\t}\n}", "lang": "MS C#", "bug_code_uid": "31f03337cb63b9159929df973cd60c89", "src_uid": "d3c10d1b1a17ad018359e2dab80d2b82", "apr_id": "ad02d7b96b05cc5955439fda9eea714b", "difficulty": 1100, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.09634551495016612, "equal_cnt": 24, "replace_cnt": 20, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 24, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace CodeForce\n{\n class Program\n {\n static void Main(string[] args)\n {\n string helpString = args[0];\n //string helpString = \"1?AA\";\n\n string letters = \"ABCDFGJ\";\n \n List counts = new List();\n\n int max = 10;\n\n var first = helpString[0];\n\n if (letters.Contains(first))\n {\n if (helpString.Count(x => x == first) == 1)\n {\n max -= 1;\n counts.Add(max);\n letters = letters.Replace(first, 'Y');\n }\n else\n {\n max -= 1;\n counts.Add(max);\n letters = letters.Replace(first, 'Y');\n }\n \n }\n\n if (first == '?')\n {\n counts.Add(10);\n }\n\n for (int index = 1; index < helpString.Length; index++)\n {\n var symbol = helpString[index];\n if (symbol == '?')\n {\n counts.Add(10);\n }\n }\n\n\n foreach (var symbol in letters)\n {\n if (letters.Contains(symbol) && helpString.Count(x => x == symbol) >= 1)\n {\n counts.Add(max);\n helpString = helpString.Replace(symbol, 'Z');\n max -= 1;\n }\n }\n\n\n int output = counts.Aggregate(1, (current, count) => current*count);\n\n Console.WriteLine(output);\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "98a32df5f33c65e4bd2f7575f9fe371d", "src_uid": "d3c10d1b1a17ad018359e2dab80d2b82", "apr_id": "1c9b3cf785521c59f8df13d907eb3d11", "difficulty": 1100, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9875836491171491, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "#define Online\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\n\nnamespace CF\n{\n delegate double F(double x);\n delegate decimal Fdec(decimal x);\n\n class Program\n {\n\n static void Main(string[] args)\n {\n\n#if FileIO\n StreamReader sr = new StreamReader(\"input.txt\");\n StreamWriter sw = new StreamWriter(\"output.txt\");\n Console.SetIn(sr);\n Console.SetOut(sw);\n#endif\n\n A();\n\n#if Online\n Console.ReadLine();\n#endif\n\n#if FileIO\n sr.Close();\n sw.Close();\n#endif\n }\n\n static void A()\n {\n string input = ReadLine();\n int tens = 0;\n bool[] letters = new bool[10];\n int cnt = 10;\n int other = 1;\n for (int i = 0; i < input.Length; i++)\n {\n if (input[i].Equals('?'))\n {\n if (i == 0)\n {\n other *= 9;\n continue;\n }\n tens++;\n }\n else\n {\n if (!char.IsDigit(input[i]))\n {\n if (!letters[input[i] - 'A'])\n {\n if (i == 0)\n {\n other *= 9;\n cnt--;\n continue;\n }\n other *= cnt;\n cnt--;\n letters[input[i] - 'A'] = true;\n }\n }\n }\n }\n StringBuilder ans = new StringBuilder();\n ans.Append(other.ToString());\n for (int i = 0; i < tens; i++)\n ans.Append(\"0\");\n Console.WriteLine(ans);\n }\n\n static void B()\n {\n\n }\n\n static void C()\n {\n\n }\n\n static void D()\n {\n\n }\n\n static void E()\n {\n\n }\n\n static void TestGen()\n {\n\n }\n\n static string[] ReadArray(char sep)\n {\n return Console.ReadLine().Split(sep);\n }\n\n static int ReadInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static string ReadLine()\n {\n return Console.ReadLine();\n }\n }\n\n public static class MyMath\n {\n public static long BinPow(long a, long n, long mod)\n {\n long res = 1;\n while (n > 0)\n {\n if ((n & 1) == 1)\n {\n res = (res * a) % mod;\n }\n a = (a * a) % mod;\n n >>= 1;\n }\n return res;\n }\n\n public static long GCD(long a, long b)\n {\n while (b != 0) b = a % (a = b);\n return a;\n }\n\n public static int GCD(int a, int b)\n {\n while (b != 0) b = a % (a = b);\n return a;\n }\n\n public static long LCM(long a, long b)\n {\n return (a * b) / GCD(a, b);\n }\n\n public static int LCM(int a, int b)\n {\n return (a * b) / GCD(a, b);\n }\n }\n\n class Edge\n {\n public int a;\n public int b;\n public int w;\n\n public Edge(int a, int b, int w)\n {\n this.a = a;\n this.b = b;\n this.w = w;\n }\n }\n\n class Graph\n {\n public List[] g;\n public int[] color; //0-white, 1-gray, 2-black\n public int[] o; //open\n public int[] c; //close\n public int[] p;\n public int[] d;\n public List e;\n public Stack ans = new Stack();\n public Graph(int n)\n {\n g = new List[n + 1];\n for (int i = 0; i <= n; i++)\n g[i] = new List();\n color = new int[n + 1];\n o = new int[n + 1];\n c = new int[n + 1];\n p = new int[n + 1];\n d = new int[n + 1];\n }\n\n const int white = 0;\n const int gray = 1;\n const int black = 2;\n\n public bool DFS(int u, ref int time)\n {\n color[u] = gray;\n time++;\n o[u] = time;\n for (int i = 0; i < g[u].Count; i++)\n {\n int v = g[u][i];\n if (color[v] == gray)\n {\n return true;\n }\n if (color[v] == white)\n {\n p[v] = u;\n if (DFS(v, ref time)) return true;\n }\n }\n color[u] = black;\n ans.Push(u);\n c[u] = time;\n time++;\n return false;\n }\n }\n\n static class GraphUtils\n {\n const int white = 0;\n const int gray = 1;\n const int black = 2;\n\n public static void BFS(int s, Graph g)\n {\n Queue q = new Queue();\n q.Enqueue(s);\n while (q.Count != 0)\n {\n int u = q.Dequeue();\n for (int i = 0; i < g.g[u].Count; i++)\n {\n int v = g.g[u][i];\n if (g.color[v] == white)\n {\n g.color[v] = gray;\n g.d[v] = g.d[u] + 1;\n g.p[v] = u;\n q.Enqueue(v);\n }\n }\n g.color[u] = black;\n }\n }\n\n public static bool DFS(int u, ref int time, Graph g, Stack st)\n {\n g.color[u] = gray;\n time++;\n g.o[u] = time;\n for (int i = 0; i < g.g[u].Count; i++)\n {\n int v = g.g[u][i];\n if (g.color[v] == gray)\n {\n return true;\n }\n if (g.color[v] == white)\n {\n g.p[v] = u;\n if (DFS(v, ref time, g, st)) return true;\n }\n }\n g.color[u] = black;\n st.Push(u);\n g.c[u] = time;\n time++;\n return false;\n }\n\n public static void FordBellman(int u, Graph g)\n {\n int n = g.g.Length;\n for (int i = 0; i <= n; i++)\n {\n g.d[i] = int.MaxValue;\n g.p[i] = 0;\n }\n\n g.d[u] = 0;\n\n for (int i = 0; i < n - 1; i++)\n {\n for (int j = 0; j < g.e.Count; j++)\n {\n if (g.d[g.e[j].a] != int.MaxValue)\n {\n if (g.d[g.e[j].a] + g.e[j].w < g.d[g.e[j].b])\n {\n g.d[g.e[j].b] = g.d[g.e[j].a] + g.e[j].w;\n g.p[g.e[j].b] = g.e[j].a;\n }\n }\n }\n }\n }\n }\n\n static class ArrayUtils\n {\n public static int BinarySearch(int[] a, int val)\n {\n int left = 0;\n int right = a.Length - 1;\n int mid;\n\n while (left < right)\n {\n mid = left + ((right - left) >> 1);\n if (val <= a[mid])\n {\n right = mid;\n }\n else\n {\n left = mid + 1;\n }\n }\n\n if (a[left] == val)\n return left;\n else\n return -1;\n }\n\n public static double Bisection(F f, double left, double right, double eps)\n {\n double mid;\n while (right - left > eps)\n {\n mid = left + ((right - left) / 2d);\n if (Math.Sign(f(mid)) != Math.Sign(f(left)))\n right = mid;\n else\n left = mid;\n }\n return (left + right) / 2d;\n }\n\n\n public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)\n {\n decimal m1, m2;\n while (r - l > eps)\n {\n m1 = l + (r - l) / 3m;\n m2 = r - (r - l) / 3m;\n if (f(m1) < f(m2))\n if (isMax)\n l = m1;\n else\n r = m2;\n else\n if (isMax)\n r = m2;\n else\n l = m1;\n }\n return r;\n }\n\n public static double TernarySearch(F f, double eps, double l, double r, bool isMax)\n {\n double m1, m2;\n while (r - l > eps)\n {\n m1 = l + (r - l) / 3d;\n m2 = r - (r - l) / 3d;\n if (f(m1) < f(m2))\n if (isMax)\n l = m1;\n else\n r = m2;\n else\n if (isMax)\n r = m2;\n else\n l = m1;\n }\n return r;\n }\n\n public static void Merge(T[] A, int p, int q, int r, T[] L, T[] R, Comparison comp)\n {\n for (int i = p; i <= q; i++)\n L[i] = A[i];\n for (int i = q + 1; i <= r; i++)\n R[i] = A[i];\n\n for (int k = p, i = p, j = q + 1; k <= r; k++)\n {\n if (i > q)\n {\n for (; k <= r; k++, j++)\n A[k] = R[j];\n return;\n }\n if (j > r)\n {\n for (; k <= r; k++, i++)\n A[k] = L[i];\n return;\n }\n if (comp(L[i], R[j]) <= 0)\n {\n A[k] = L[i];\n i++;\n }\n else\n {\n A[k] = R[j];\n j++;\n }\n }\n }\n\n public static void Merge_Sort(T[] A, int p, int r, T[] L, T[] R, Comparison comp)\n {\n if (p >= r) return;\n int q = p + ((r - p) >> 1);\n Merge_Sort(A, p, q, L, R, comp);\n Merge_Sort(A, q + 1, r, L, R, comp);\n Merge(A, p, q, r, L, R, comp);\n }\n\n public static void Merge(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable\n {\n for (int i = p; i <= q; i++)\n L[i] = A[i];\n for (int i = q + 1; i <= r; i++)\n R[i] = A[i];\n\n for (int k = p, i = p, j = q + 1; k <= r; k++)\n {\n if (i > q)\n {\n for (; k <= r; k++, j++)\n A[k] = R[j];\n return;\n }\n if (j > r)\n {\n for (; k <= r; k++, i++)\n A[k] = L[i];\n return;\n }\n if (L[i].CompareTo(R[j]) <= 0)\n {\n A[k] = L[i];\n i++;\n }\n else\n {\n A[k] = R[j];\n j++;\n }\n }\n }\n\n public static void Merge_Sort(T[] A, int p, int r, T[] L, T[] R) where T : IComparable\n {\n if (p >= r) return;\n int q = p + ((r - p) >> 1);\n Merge_Sort(A, p, q, L, R);\n Merge_Sort(A, q + 1, r, L, R);\n Merge(A, p, q, r, L, R);\n }\n\n static void Shake(T[] a)\n {\n Random rnd = new Random(Environment.TickCount);\n T temp;\n int b, c;\n for (int i = 0; i < a.Length; i++)\n {\n b = rnd.Next(0, a.Length);\n c = rnd.Next(0, a.Length);\n temp = a[b];\n a[b] = a[c];\n a[c] = temp;\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "b796b0377af6f431b98bf360c299118d", "src_uid": "d3c10d1b1a17ad018359e2dab80d2b82", "apr_id": "a0c6685e30794add03035755fada84d0", "difficulty": 1100, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9275590551181102, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n string st = Console.ReadLine();\n bool[] f = new bool[10];\n int ff = 10;\n long k=1;\n for (int i = 0; i < 10; i++)\n {\n f[i] = true;\n }\n for (int i = 0; i < st.Length; i++)\n {\n if (st[i] == '?')\n {\n k = k * 10;\n }\n if (st[i] >= 'A' && st[i] <= 'J')\n {\n if (ff > 0 && f[(int)st[i] - 65] == true)\n {\n if (i == 0)\n {\n k = k * 9;\n }\n else\n {\n k = k * ff;\n }\n ff--;\n }\n f[(int)st[i] - 65] = false;\n }\n }\n Console.WriteLine(k.ToString());\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c438d158463681add909e2d455e88e85", "src_uid": "d3c10d1b1a17ad018359e2dab80d2b82", "apr_id": "1407442ceb88496e74789bc97bf3cefe", "difficulty": 1100, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6915158738758262, "equal_cnt": 37, "replace_cnt": 18, "delete_cnt": 6, "insert_cnt": 12, "fix_ops_cnt": 36, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n\n static void PrintAnswer(int s, List text)\n {\n bool Finished = false; bool errorFound = false;\n int c = 0;\n while (!Finished)\n {\n errorFound = false;\n int biggerIndex = 0;\n\n // biggerIndex = text.IndexOf(text.OrderByDescending(x => (int)(x)).First());\n\n for (int i = biggerIndex; i < text.Count; i++)\n {\n if (i == 0)\n {\n if (text[i] == 'a')\n {\n continue;\n }\n else\n {\n if (((int)text[i]) - ((int)text[i + 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n else if (i == text.Count - 1)\n {\n if (text[i] == 'a')\n {\n continue;\n }\n else\n {\n if (((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n else\n {\n if (text[i] == 'a')\n {\n continue;\n }\n else\n {\n if (((int)text[i]) - ((int)text[i + 1]) == 1 || ((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n }\n if (!errorFound)\n Finished = true;\n }\n Console.WriteLine(c);\n }\n static void Main(string[] args)\n {\n int s = Int32.Parse(Console.ReadLine());\n List text = Console.ReadLine().Select(x => x).ToList();\n\n // PrintAnswer(s,text);\n FindMaxChars(s, text);\n }\n\n static void FindMaxChars(int s, List text)\n {\n if (s == 1) { Console.WriteLine(0); return; }\n bool Finished = false; bool errorFound = false;\n int c = 0;\n while (!Finished)\n {\n errorFound = false;\n List bigChars = text.OrderByDescending(x => (int)x).Distinct().Where(x => x != 'a').ToList();\n\n while (bigChars.Count > 0)\n {\n int bigCharIndex = text.IndexOf(bigChars.First());\n for (int i = 0; i < text.Count; i++)\n {\n if (text[i] == bigChars.First())\n {\n if (i == 0)\n {\n if (((int)text[i]) - ((int)text[i + 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n else if (i == text.Count - 1)\n {\n if (((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n else\n {\n if (((int)text[i]) - ((int)text[i + 1]) == 1 || ((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n }\n bigChars.RemoveAt(0);\n }\n\n if (!errorFound) Finished = true;\n }\n Console.WriteLine(c);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "cb5c7c12fc9d2c1b12f07818faf356d5", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "408e83d15778da592f1487892b8de982", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7535433873763638, "equal_cnt": 31, "replace_cnt": 18, "delete_cnt": 7, "insert_cnt": 5, "fix_ops_cnt": 30, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n\n static void PrintAnswer(int s, List text)\n {\n bool Finished = false; bool errorFound = false;\n int c = 0;\n while (!Finished)\n {\n errorFound = false;\n int biggerIndex = 0;\n\n // biggerIndex = text.IndexOf(text.OrderByDescending(x => (int)(x)).First());\n\n for (int i = biggerIndex; i < text.Count; i++)\n {\n if (i == 0)\n {\n if (text[i] == 'a')\n {\n continue;\n }\n else\n {\n if (text.Count > 1)\n if (((int)text[i]) - ((int)text[i + 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n else if (i == text.Count - 1)\n {\n if (text[i] == 'a')\n {\n continue;\n }\n else\n {\n if (text.Count > 1)\n if (((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n else\n {\n if (text[i] == 'a')\n {\n continue;\n }\n else\n {\n if (text.Count > 1 && i > 0)\n if (((int)text[i]) - ((int)text[i + 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n if (text.Count > 2 && i < text.Count-2)\n if (((int)text[i]) - ((int)text[i + 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n }\n if (!errorFound)\n Finished = true;\n }\n Console.WriteLine(c);\n }\n static void Main(string[] args)\n {\n int s = Int32.Parse(Console.ReadLine());\n List text = Console.ReadLine().Select(x => x).ToList();\n\n // PrintAnswer(s,text);\n FindMaxChars(s, text);\n }\n\n static void FindMaxChars(int s, List text)\n {\n if (s == 1) { Console.WriteLine(0); return; }\n bool Finished = false; bool errorFound = false;\n int c = 0;\n while (!Finished)\n {\n errorFound = false;\n List bigChars = text.OrderByDescending(x => (int)x).Distinct().Where(x => x != 'a').ToList();\n\n while (bigChars.Count > 0)\n {\n int bigCharIndex = text.IndexOf(bigChars.First());\n for (int i = 0; i < text.Count; i++)\n {\n if (text[i] == bigChars.First())\n {\n if (text.Count == 1) { Finished = true; bigChars = new List(); break; }\n if (i == 0)\n {\n if (((int)text[i]) - ((int)text[i + 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n else if (i == text.Count - 1)\n {\n if (((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n else\n {\n if (((int)text[i]) - ((int)text[i + 1]) == 1 || ((int)text[i]) - ((int)text[i - 1]) == 1)\n {\n c++; text.RemoveAt(i); errorFound = true; break;\n }\n }\n }\n }\n if (bigChars.Count > 0)\n bigChars.RemoveAt(0);\n }\n\n if (!errorFound) Finished = true;\n }\n Console.WriteLine(c);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "80351f6aef05c1d149460d6ef943abd2", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "408e83d15778da592f1487892b8de982", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.996745027124774, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\nclass Test\n{\n class a\n {\n public char key;\n public int value;\n }\n // Driver code \n public static void Main()\n {\n\n //// var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n //var t = input[0];\n //while (t > 0)\n {\n\n var input1 = Console.ReadLine().Split(' ').Select(xx => int.Parse(xx)).ToArray();\n var n = input1[0];\n // var k = input1[1];\n\n var x = Console.ReadLine().ToCharArray();\n\t\t\tif (x.Length <= 1)\n\t\t\t{\n\t\t\t\tConsole.WriteLine(0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tint s = 0;\n\t\t\tfor (int i = 25; i > 0; i--)\n\t\t\t{\n\t\t\t\tchar y = (char)(i + 'a'), z = (char)(i - 1 + 'a');\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t{\n\t\t\t\t\tif (x[j] == y)\n\t\t\t\t\t{\n\t\t\t\t\t\tint l = j - 1, r = j + 1;\n\t\t\t\t\t\twhile (l>=0&&(x[l] == '?' || x[l] == y))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (l >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (x[l] == z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\tx[j] = '?';\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (x[r] == '?' || x[r] == y)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (r < n)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (x[r] == z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\tx[j] = '?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tConsole.WriteLine(s);\n\n }\n\n }\n }\n\n\n\n", "lang": "Mono C#", "bug_code_uid": "5dd3a7c0d3426e4547e96431628a42c3", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "798b0416916b2774e37fa745a0103973", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.977663859392164, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\nclass Test\n{\n class a\n {\n public char key;\n public int value;\n }\n // Driver code \n public static void Main()\n {\n\n //// var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n //var t = input[0];\n //while (t > 0)\n {\n\n var input1 = Console.ReadLine().Split(' ').Select(xx => int.Parse(xx)).ToArray();\n var n = input1[0];\n // var k = input1[1];\n\n var x = Console.ReadLine().ToCharArray();\n\t\t\tif (x.Length <= 1)\n\t\t\t\treturn 0;\n\t\t\tint s = 0;\n\t\t\tfor (int i = 25; i > 0; i--)\n\t\t\t{\n\t\t\t\tchar y = (char)(i + 'a'), z = (char)(i - 1 + 'a');\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t{\n\t\t\t\t\tif (x[j] == y)\n\t\t\t\t\t{\n\t\t\t\t\t\tint l = j - 1, r = j + 1;\n\t\t\t\t\t\twhile (l>=0&&(x[l] == '?' || x[l] == y))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (l >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (x[l] == z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\tx[j] = '?';\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (x[r] == '?' || x[r] == y)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (r < n)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (x[r] == z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\tx[j] = '?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tConsole.WriteLine(s);\n\n }\n\n }\n }\n\n\n\n", "lang": "Mono C#", "bug_code_uid": "ad26e801e4c530dec94b51c0117839dd", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "798b0416916b2774e37fa745a0103973", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9772893772893773, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\nclass Test\n{\n class a\n {\n public char key;\n public int value;\n }\n // Driver code \n public static void Main()\n {\n\n //// var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n //var t = input[0];\n //while (t > 0)\n {\n\n var input1 = Console.ReadLine().Split(' ').Select(xx => int.Parse(xx)).ToArray();\n var n = input1[0];\n // var k = input1[1];\n\n var x = Console.ReadLine().ToCharArray();\n\t\t\tif (x.Length <= 1)\n\t\t\t\treturn ;\n\t\t\tint s = 0;\n\t\t\tfor (int i = 25; i > 0; i--)\n\t\t\t{\n\t\t\t\tchar y = (char)(i + 'a'), z = (char)(i - 1 + 'a');\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t{\n\t\t\t\t\tif (x[j] == y)\n\t\t\t\t\t{\n\t\t\t\t\t\tint l = j - 1, r = j + 1;\n\t\t\t\t\t\twhile (l>=0&&(x[l] == '?' || x[l] == y))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (l >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (x[l] == z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\tx[j] = '?';\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (x[r] == '?' || x[r] == y)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (r < n)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (x[r] == z)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ts++;\n\t\t\t\t\t\t\t\tx[j] = '?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tConsole.WriteLine(s);\n\n }\n\n }\n }\n\n\n\n", "lang": "Mono C#", "bug_code_uid": "10cdef541e1ab7c3dd93420eb2528d72", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "798b0416916b2774e37fa745a0103973", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.928052805280528, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System.Collections.Generic;\nusing System;\n\nclass _1321C\n{\n\tstatic void Main()\n\t{\n\t\tint n = int.Parse(Console.ReadLine());\n\t\tstring s = Console.ReadLine();\n\t\tList list = new List(s.ToCharArray());\n\t\tint cnt = 0;\n\t\tconst int LetterLen = 26;\n\t\tfor (int i = LetterLen - 1; i >= 1; --i)\n\t\t{\n\t\t\tchar cur = (char)('a' + i);\n\t\t\tchar prev = (char)(cur - 1);\n\t\t\tfor (int j = 0; j < list.Count; ++j)\n\t\t\t{\n\t\t\t\tif (j >= 1)\n\t\t\t\t{\n\t\t\t\t\tif (list[j] == cur && list[j - 1] == prev)\n\t\t\t\t\t{\n\t\t\t\t\t\tlist.RemoveAt(j);\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t\t++cnt;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (j <= list.Count - 2)\n\t\t\t\t{\n\t\t\t\t\tif (list[j] == cur && list[j + 1] == prev)\n\t\t\t\t\t{\n\t\t\t\t\t\tlist.RemoveAt(j);\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t\t++cnt;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tConsole.WriteLine(cnt);\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "a088a2e8b00c3c083a3cf2970505bba8", "src_uid": "9ce37bc2d361f5bb8a0568fb479b8a38", "apr_id": "efb967560ec42ce47f855e1ca71ef440", "difficulty": 1600, "tags": ["strings", "brute force", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9697458652682533, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace Test\n{\n class Program\n {\n static void Main()\n {\n while (true)\n {\n short[] input = Console.ReadLine().Split(' ').Select(num => Convert.ToInt16(num)).ToArray();\n long cost = 0;\n \n if (input[3] < input[1] * input[2])\n {\n if (input[0] < input[1])\n {\n if (input[0] * input[2] < input[3])\n cost = input[2];\n else\n cost = input[3];\n }\n else\n {\n cost += (input[0] / input[1]) * input[3];\n if (input[0] % input[1] != 0)\n {\n if (input[2] > input[3])\n cost += input[3];\n else\n cost += input[2];\n }\n }\n }\n else\n {\n cost = input[0] * input[2];\n }\n Console.WriteLine(cost);\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "5fe249bb3b7affcaa51a2f6b0351baf7", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "08a6a5f2ad7d8322711630c6b5ca0e53", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9994095069382934, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Runtime.CompilerServices;\nusing System.Text;\nusing static Template;\nusing static System.Console;\nusing static System.Convert;\nusing static System.Math;\nusing Pi = Pair;\n\nclass Solver\n{\n Scanner sc = new Scanner();\n //\n public void Solve()\n {\n int l, r, x, y;\n sc.Make(out l, out r, out x, out y);\n var fx = Factorize(x);\n var fy = Factorize(y);\n foreach (var p in fx)\n {\n if (!fy.ContainsKey(p.Key)||fy[p.Key]();\n foreach (var p in fy)\n {\n if (!fx.ContainsKey(p.Key)) fx[p.Key] = 0;\n n.Add(new P(p.Key, p.Value, fx[p.Key]));\n }\n var res = 0;\n var ok = new Dictionary>();\n for(var i = 0; i < (1 << n.Count); i++)\n {\n long u = 1, v = 1;\n for(var j=0;j> j) == 1)\n {\n for (var k = 0; k < n[j].x; k++)\n u *= n[k].v;\n for (var k = 0; k < n[j].y; k++)\n v *= n[k].v;\n }\n else\n {\n for (var k = 0; k < n[j].x; k++)\n v *= n[k].v;\n for (var k = 0; k < n[j].y; k++)\n u *= n[k].v;\n }\n if (r < u || u < l || r < v || v < l) continue;\n if (!ok.ContainsKey(u))\n ok[u] = new Dictionary();\n if (!ok[u].ContainsKey(v))\n {\n res++;\n ok[u][v] = true;\n }\n }\n WriteLine(res);\n }\n struct P\n {\n public long v, x, y;\n public P(long V,int X,int Y)\n {\n v = V;x = X;y = Y;\n }\n }\n\n public static Dictionary Factorize(long num)\n {\n var dic = new Dictionary();\n for (var i = 2L; i * i <= num; i++)\n {\n var ct = 0;\n while (num % i == 0)\n {\n ct++;\n num /= i;\n }\n if (ct != 0) dic[i] = ct;\n }\n if (num != 1) dic[num] = 1;\n return dic;\n }\n}\n\n#region Template\npublic class Template\n{\n static void Main(string[] args)\n {\n Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });\n new Solver().Solve();\n Console.Out.Flush();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmin(ref T a, T b) where T : IComparable\n { if (a.CompareTo(b) == 1) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmax(ref T a, T b) where T : IComparable\n { if (a.CompareTo(b) == -1) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(ref T a, ref T b)\n { var t = b; b = a; a = t; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static T[] Create(int n, Func f)\n {\n var rt = new T[n];\n for (var i = 0; i < rt.Length; ++i)\n rt[i] = f();\n return rt;\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static T[] Create(int n, Func f)\n {\n var rt = new T[n];\n for (var i = 0; i < rt.Length; ++i)\n rt[i] = f(i);\n return rt;\n }\n public static void Fail(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }\n}\n\npublic class Scanner\n{\n public string Str => ReadLine().Trim();\n public int Int => int.Parse(Str);\n public long Long => long.Parse(Str);\n public double Double => double.Parse(Str);\n public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();\n public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();\n public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());\n public int[] ArrInt1D(int n) => Create(n, () => Int);\n public long[] ArrLong1D(int n) => Create(n, () => Long);\n public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);\n public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);\n public Pair PairMake() => new Pair(Next(), Next());\n public Pair PairMake() => new Pair(Next(), Next(), Next());\n private Queue q = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Next() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }\n public void Make(out T1 v1) => v1 = Next();\n public void Make(out T1 v1, out T2 v2) { v1 = Next(); v2 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next(); }\n}\n\npublic class Pair : IComparable>\n{\n public T1 v1;\n public T2 v2;\n public Pair() { }\n public Pair(T1 v1, T2 v2)\n { this.v1 = v1; this.v2 = v2; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = Comparer.Default.Compare(v1, p.v1);\n if (c == 0)\n c = Comparer.Default.Compare(v2, p.v2);\n return c;\n }\n public override string ToString() => $\"{v1.ToString()} {v2.ToString()}\";\n public void Tie(out T1 a, out T2 b) { a = v1; b = v2; }\n}\n\npublic class Pair : Pair, IComparable>\n{\n public T3 v3;\n public Pair() : base() { }\n public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)\n { this.v3 = v3; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = base.CompareTo(p);\n if (c == 0)\n c = Comparer.Default.Compare(v3, p.v3);\n return c;\n }\n public override string ToString() => $\"{base.ToString()} {v3.ToString()}\";\n public void Tie(out T1 a, out T2 b, out T3 c) { Tie(out a, out b); c = v3; }\n}\n#endregion\n", "lang": "Mono C#", "bug_code_uid": "7bf34d6849a2411d275261c3416399ee", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "b4f364d7e12796ecff3b5e3aade9d258", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9956819913639827, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Nastya_Studies_Informatics\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n writer.WriteLine(Solve(args));\n writer.Flush();\n }\n\n private static int Solve(string[] args)\n {\n int l = Next(), r = Next(), x = Next(), y = Next();\n\n if (y % x != 0)\n return 0;\n\n y /= x;\n l /= x;\n r /= x;\n\n int ans = 0;\n for (int i = Math.Max(1, l); i <= r; i++)\n {\n if (i*i > y)\n break;\n\n if (y%i == 0)\n {\n int z = y/i;\n int g = Gcd(i, z);\n if (g == 1)\n {\n if (z <= r)\n ans += 2;\n if (z == i)\n ans--;\n }\n }\n }\n return ans;\n }\n\n public static int Gcd(int a, int b)\n {\n return b == 0 ? a : Gcd(b, a%b);\n }\n\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "2cb36edd10c2a528c75d57c134e58a0e", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "8e40fa8f6dbe0bd36a76b3de2ffd228a", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9218274111675127, "equal_cnt": 12, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 7, "fix_ops_cnt": 11, "bug_source_code": "using System.Text;\nusing System.Threading.Tasks;\nusing System.Diagnostics;\nusing System.Numerics;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System;\n\nnamespace bla2\n{\n class Program\n {\n static void Main()\n {\n string[] s = Console.ReadLine().Split();\n l = long.Parse(s[0]);\n r = long.Parse(s[1]);\n x = long.Parse(s[2]);\n y = long.Parse(s[3]);\n List yfactors = Factor(y);\n yf = new List();\n long x2 = x;\n for (int i = 0; i < yfactors.Count; i++)\n {\n if(x2 % yfactors[i] == 0)\n {\n x2 /= yfactors[i];\n }\n else if(i != 0 && yfactors[i] == yfactors[i - 1])\n {\n yf[yf.Count - 1] *= yfactors[i];\n }\n else\n {\n yf.Add(yfactors[i]);\n }\n }\n if(x2 != 1)\n {\n Console.WriteLine(\"0\");\n }\n else\n {\n Console.WriteLine(Count(new bool[yf.Count], 0));\n }\n \n }\n\n static long x, y, r, l;\n static List yf;\n\n public static long Count(bool[] b, long at)\n {\n if(at == b.Length)\n {\n long n = x, m = x;\n for (int i = 0; i < b.Length; i++)\n {\n if (b[i])\n n *= yf[i];\n else\n m *= yf[i];\n }\n if (n <= r && n >= l && m <= r && m >= l)\n {\n //Console.WriteLine(n + \", \" + m);\n return 1;\n }\n else\n return 0;\n }\n long e = 0;\n bool[] nb = new bool[b.Length];\n Array.Copy(b, nb, b.Length);\n nb[at] = false;\n e += Count(nb, at + 1);\n nb[at] = true;\n e += Count(nb, at + 1);\n return e;\n }\n\n public static List Factor(long n)\n {\n List r = new List();\n\n while (n % 2 == 0)\n {\n n /= 2;\n r.Add(2);\n }\n while (n % 3 == 0)\n {\n n /= 3;\n r.Add(3);\n }\n\n long sqrtn = (long)(Math.Sqrt(n)) + 1;\n long i = 6;\n while (n > 1 && i <= sqrtn)\n {\n bool nc = false;\n long a;\n while ((a = n % (i - 1)) == 0)\n {\n r.Add(i - 1);\n n /= i - 1;\n nc = true;\n }\n while ((a = n % (i + 1)) == 0)\n {\n r.Add(i + 1);\n n /= i + 1;\n nc = true;\n }\n i += 6;\n if (nc)\n sqrtn = (long)(Math.Sqrt(n)) + 1;\n }\n if (n != 1) r.Add(n);\n return r;\n }\n } \n}", "lang": "Mono C#", "bug_code_uid": "d87b06b45db6ad531d982d0fb372a20b", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "a833eb9148bd767a4d3554a67cd76ea0", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9994579945799458, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System.Text;\nusing System.Threading.Tasks;\nusing System.Diagnostics;\nusing System.Numerics;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System;\n\nnamespace bla2\n{\n class Program\n {\n static void Main()\n {\n //Random rand = new Random();\n\n string[] s = Console.ReadLine().Split();\n l = long.Parse(s[0]);\n r = long.Parse(s[1]);\n x = long.Parse(s[2]);\n y = long.Parse(s[3]);\n //while (true)\n {\n Solve();\n //x = rand.Next(1, 1000000000);\n //y = x * rand.Next(1, 1000000000 / (int)x);\n //l = rand.Next(1, 1000000000);\n //r = rand.Next(1, 1000000000);\n }\n }\n\n static void Solve()\n {\n List yfactors = Factor(y);\n yf = new List();\n long x2 = x;\n long f = -1;\n for (int i = 0; i < yfactors.Count; i++)\n {\n if (x2 % yfactors[i] == 0)\n {\n x2 /= yfactors[i];\n }\n else if (yf.Count != 0 && yfactors[i] == f)\n {\n yf[yf.Count - 1] *= yfactors[i];\n }\n else\n {\n yf.Add(yfactors[i]);\n f = yfactors[i];\n }\n }\n if (x2 != 1)\n {\n Console.WriteLine(\"0 (-)\");\n }\n else\n {\n Console.WriteLine(Count(new bool[yf.Count], 0));\n }\n }\n\n static long x, y, r, l;\n static List yf;\n\n public static long Count(bool[] b, long at)\n {\n if(at == b.Length)\n {\n //Console.WriteLine(string.Join(\", \", b));\n long n = x, m = x;\n for (int i = 0; i < b.Length; i++)\n {\n if (b[i])\n n *= yf[i];\n else\n m *= yf[i];\n }\n if (n <= r && n >= l && m <= r && m >= l)\n {\n //Console.WriteLine(n + \", \" + m);\n return 1;\n }\n else\n return 0;\n }\n long e = 0;\n bool[] nb = new bool[b.Length];\n Array.Copy(b, nb, b.Length);\n nb[at] = false;\n e += Count(nb, at + 1);\n nb[at] = true;\n e += Count(nb, at + 1);\n return e;\n }\n\n public static List Factor(long n)\n {\n List r = new List();\n\n while (n % 2 == 0)\n {\n n /= 2;\n r.Add(2);\n }\n while (n % 3 == 0)\n {\n n /= 3;\n r.Add(3);\n }\n\n long sqrtn = (long)(Math.Sqrt(n)) + 1;\n long i = 6;\n while (n > 1 && i <= sqrtn)\n {\n bool nc = false;\n long a;\n while ((a = n % (i - 1)) == 0)\n {\n r.Add(i - 1);\n n /= i - 1;\n nc = true;\n }\n while ((a = n % (i + 1)) == 0)\n {\n r.Add(i + 1);\n n /= i + 1;\n nc = true;\n }\n i += 6;\n if (nc)\n sqrtn = (long)(Math.Sqrt(n)) + 1;\n }\n if (n != 1) r.Add(n);\n return r;\n }\n } \n}", "lang": "Mono C#", "bug_code_uid": "62972ae5b026914d1576d2f49d6660cf", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "a833eb9148bd767a4d3554a67cd76ea0", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9727825808517451, "equal_cnt": 11, "replace_cnt": 3, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Task\n{\n class Program\n {\n static bool InRange(int l, int r, int x)\n {\n return x >= l && x <= r;\n }\n\n static void Main(string[] args)\n {\n var inpMas = Console.ReadLine().Split(' ').Select(item => int.Parse(item)).ToList();\n int l = inpMas[0];\n int r = inpMas[1];\n int x = inpMas[2];\n int y = inpMas[3];\n\n if (y % x != 0)\n {\n Console.WriteLine(0);\n return;\n }\n\n int i = 0;\n int ans = 0;\n int yx = y / x;\n int yx2 = yx;\n List divs = new List();\n int div = 2;\n\n int k = 0;\n while (yx2 % div == 0)\n {\n k += 1;\n yx2 >>= 1;\n }\n if (k > 0)\n divs.Add((int)Math.Pow(div, k));\n\n div = 3;\n while (yx2 > 1)\n {\n k = 0;\n while (yx2 % div == 0)\n {\n k += 1;\n yx2 /= div;\n }\n if (k > 0)\n divs.Add((int)Math.Pow(div, k));\n div += 2;\n }\n\n div = 1 << divs.Count;\n for (i = 1; i <= div; i ++)\n {\n int j = i;\n int div1 = 1;\n int ind = divs.Count - 1;\n while (j > 0)\n {\n if ((j & 1) == 1)\n {\n div1 *= divs[ind];\n ind -= 1;\n }\n j >>= 1;\n }\n int div2 = yx / div1;\n if (InRange(l, r, div1) && InRange(l, r, div2))\n ans += 1;\n }\n\n Console.WriteLine(ans);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f83d7908ca9856e2f81c28a05f6bb435", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "7dc2c6ef3cd3c107265d638209a3c262", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9927099841521395, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Task\n{\n class Program\n {\n static bool InRange(int l, int r, int x)\n {\n return x >= l && x <= r;\n }\n\n static void Main(string[] args)\n {\n var inpMas = Console.ReadLine().Split(' ').Select(item => int.Parse(item)).ToList();\n int l = inpMas[0];\n int r = inpMas[1];\n int x = inpMas[2];\n int y = inpMas[3];\n\n if (y % x != 0)\n {\n Console.WriteLine(0);\n return;\n }\n\n int i = 0;\n int ans = 0;\n int yx = y / x;\n int yx2 = yx;\n List divs = new List();\n int div = 2;\n\n int k = 0;\n while (yx2 % div == 0)\n {\n k += 1;\n yx2 >>= 1;\n }\n if (k > 0)\n divs.Add((int)Math.Pow(div, k));\n\n div = 3;\n while (yx2 > 1)\n {\n k = 0;\n while (yx2 % div == 0)\n {\n k += 1;\n yx2 /= div;\n }\n if (k > 0)\n divs.Add((int)Math.Pow(div, k));\n div += 2;\n }\n\n //divs.Add(1);\n div = (1 << divs.Count) - 1;\n for (i = 0; i <= div; i++)\n {\n int j = i;\n int div1 = 1;\n int ind = divs.Count - 1;\n while (j > 0)\n {\n if ((j & 1) == 1)\n {\n div1 *= divs[ind];\n ind -= 1;\n }\n j >>= 1;\n }\n int div2 = yx / div1;\n if (InRange(l, r, div1 * x) && InRange(l, r, div2 * x))\n ans += 1;\n }\n\n Console.WriteLine(ans);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "5ce8f3684b08340fe907bf4dc8767c3c", "src_uid": "d37dde5841116352c9b37538631d0b15", "apr_id": "7dc2c6ef3cd3c107265d638209a3c262", "difficulty": 1600, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9984036488027366, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication5\n{\n class Program\n {\n static void Main(string[] args)\n {\n long summ = MyConsoleInputStreamParser.GetLong, x = MyConsoleInputStreamParser.GetLong;\n var need = (summ - x) / 2;\n if (need < 0 || need % 2 == 1)\n Console.WriteLine(0);\n else\n {\n var bits = new int[64];\n var temp = x;\n var count = 0;\n var nonZeroBits = 0;\n while (temp > 0)\n {\n var bit = (int)(temp % 2);\n bits[count] = bit;\n count++;\n temp /= 2;\n nonZeroBits += bit == 1 ? 1 : 0;\n }\n if (nonZeroBits == 1 && need == 0)\n Console.WriteLine(0);\n else if (need == 0)\n Console.WriteLine((long)Math.Pow(2, nonZeroBits) - 2);\n else\n {\n temp = need;\n count = 0;\n var fail = false;\n while (temp > 0)\n {\n var bit = (int)(temp % 2);\n if (bits[count] == 1 && bit == 1)\n {\n fail = true;\n break;\n }\n count++;\n temp /= 2;\n }\n if (fail)\n Console.WriteLine(0);\n else\n Console.WriteLine((long)Math.Pow(2, nonZeroBits));\n }\n }\n }\n\n public static class MyConsoleInputStreamParser\n {\n private static TextReader reader = new StreamReader(Console.OpenStandardInput());\n private static Queue currentLineStrings = new Queue();\n\n public static string GetLine { get { return reader.ReadLine(); } }\n\n public static string GetString { get { while (currentLineStrings.Count == 0) currentLineStrings = new Queue(GetStringArray); return currentLineStrings.Dequeue(); } }\n\n public static int GetInt { get { return int.Parse(GetString); } }\n\n public static long GetLong { get { return long.Parse(GetString); } }\n\n public static double GetDouble { get { return double.Parse(GetString, CultureInfo.InvariantCulture); } }\n\n public static char[] GetCharArray { get { return GetLine.ToCharArray(); } }\n\n public static string[] GetStringArray { get { return GetLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); } }\n\n public static int[] GetIntArray { get { return GetStringArray.Select(int.Parse).ToArray(); } }\n\n public static long[] GetLongArray { get { return GetStringArray.Select(long.Parse).ToArray(); } }\n\n public static double[] GetDoubleArray { get { return GetStringArray.Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); } }\n\n public static char[][] ReturnCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetCharArray; return matrix; }\n\n public static string[][] ReturnStringMatrix(int numberOfRows) { string[][] matrix = new string[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetStringArray; return matrix; }\n\n public static int[][] ReturnIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetIntArray; return matrix; }\n\n public static long[][] ReturnLongMatrix(int numberOfRows) { long[][] matrix = new long[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetLongArray; return matrix; }\n\n public static double[][] ReturnDoubleMatrix(int numberOfRows) { double[][] matrix = new double[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = GetDoubleArray; return matrix; }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "eae9f207372c99951765a5b50e6c9f51", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "db80c252859ed30a7a6cfa1c6f42e3c4", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8702201622247973, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{ \n class B\n {\n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n \n for(int i=0;iF? \"YES\":\"NO\");\n\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "f75efe4b04799516da9ab2da4e1b5362", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "d83278fa1ea9d24b81735a9676b53947", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9876543209876543, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n byte n = Convert.ToByte(Console.ReadLine()),yes=0;\n string s = Console.ReadLine();\n for (int i = 0; i 0) { Console.WriteLine(\"yes\"); }\n else { Console.WriteLine(\"no\"); }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "235b839455378c3bf8288d33ed732917", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "e16039b7140bc76a5ae0fd74b793775f", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9313131313131313, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\npublic class Program\n{\n\tpublic static void Main()\n\t{\n\t\tstring input = \"\";\n\t\tint num,f=0,s=0;\n\t\tnum = int.Parse(Console.ReadLine());\n\t\tinput = Console.ReadLine();\n\t\tfor(int i=0; if)\n\t\t{\n\t\t\tConsole.WriteLine(\"YES\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tConsole.WriteLine(\"NO\");\n\t\t}\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "88cea7ef36ba010d384acd96de73671d", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "e9df6ce9eb58c0e9b61bf151d1854f29", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9896296296296296, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Text.RegularExpressions;\n\n{\n class Program\n {\n static void Main(string[] args)\n {\n var n = Console.ReadLine();\n var str = Console.ReadLine();\n Console.WriteLine(Regex.Matches(str, \"SF\").Count> Regex.Matches(str, \"FS\").Count ? \"YES\" : \"NO\");\n }\n }\n ", "lang": "Mono C#", "bug_code_uid": "225d40f1c5956817a0240b66c7f70fc3", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "e41e740d87b0f0c123335936fd7b0a99", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9687964338781575, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Text.RegularExpressions;\n\n class Program\n {\n static void Main(string[] args)\n {\n var n = Console.ReadLine();\n var str = Console.ReadLine();\n Console.WriteLine(Regex.Matches(str, \"SF\").Count> Regex.Matches(str, \"FS\").Count ? \"NO\" : \"YES\");\n }\n }\n ", "lang": "Mono C#", "bug_code_uid": "db8892359b2099f0299dd3d5059fd987", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "e41e740d87b0f0c123335936fd7b0a99", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.4901277584204414, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\n \n \n class Program\n {\n static void Main(string[] args)\n {\n var n = Console.ReadLine();\n var str = Console.ReadLine();\n var c = 0;\n var FS = 0;\n var SF = 0;\n for (var i = 2; i < Convert.ToInt32(n); i+=2)\n {\n \n if (str.Substring(c, i) == \"SF\")\n SF++;\n else FS++;\n c = i;\n }\n Console.WriteLine(FS > SF ? \"NO\" : \"YES\");\n }\n }", "lang": "Mono C#", "bug_code_uid": "10bbd9b1f7f6705dfdd2e08920508401", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "e41e740d87b0f0c123335936fd7b0a99", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7611630321910696, "equal_cnt": 7, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "\n List arr = new List();\n int n,Y=0,N=0,j2;\n string str,s1,s2;\n n = int.Parse(Console.ReadLine());\n for (int i = 0; i < n; i++)\n {\n arr.Add(Console.ReadLine());\n }\n for (int j = 0; j < n; j++)\n {\n if (j+1 < n)\n {\n str = string.Concat(arr[j], arr[j + 1]);\n if (str == \"SF\")\n {\n Y += 1;\n }\n if (str == \"FS\")\n {\n N += 1;\n }\n }\n \n }//for\n if (Y>N)\n {\n Console.WriteLine(\"YES\"); \n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n \n \n", "lang": "Mono C#", "bug_code_uid": "520859d19127da0dd66840831c2dfb61", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "45ca6b21ee8fb1d189bbeafe4e141238", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9941824652658956, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing Debug = System.Diagnostics.Debug;\nusing SB = System.Text.StringBuilder;\nusing System.Numerics;\nusing static System.Math;\nnamespace Program {\n public class Solver {\n Random rnd = new Random(0);\n public void Solve() {\n var n = rl;\n var k = ri;\n solve(n, k);\n }\n void solve(long n, int k) {\n Debug.WriteLine($\"{n} {k}\");\n var rev = Enumerate(100, x => ModInt.Inverse(x));\n\n ModInt all = 1;\n for (int p = 2; n != 1; p++) {\n if (n % p != 0) continue;\n var cnt = 0;\n while (n % p == 0) {\n n /= p;\n cnt++;\n }\n var dp = new ModInt[cnt + 1];\n dp[cnt] = 1;\n for (int i = 0; i < k; i++) {\n var next = new ModInt[cnt + 1];\n for (int j = 0; j < dp.Length; j++)\n for (int jj = 0; jj <= j; jj++) {\n next[jj] += dp[j] * rev[j + 1];\n }\n dp = next;\n }\n ModInt ans = 0;\n for (long i = 0, v = 1; i < dp.Length; i++, v *= p)\n ans += v * dp[i];\n all *= ans;\n\n }\n Console.WriteLine(all);\n }\n const long INF = 1L << 60;\n int ri { get { return sc.Integer(); } }\n long rl { get { return sc.Long(); } }\n double rd { get { return sc.Double(); } }\n string rs { get { return sc.Scan(); } }\n public IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());\n\n static T[] Enumerate(int n, Func f) {\n var a = new T[n];\n for (int i = 0; i < n; ++i) a[i] = f(i);\n return a;\n }\n static public void Swap(ref T a, ref T b) { var tmp = a; a = b; b = tmp; }\n }\n}\n\n#region main\nstatic class Ex {\n static public string AsString(this IEnumerable ie) { return new string(ie.ToArray()); }\n static public string AsJoinedString(this IEnumerable ie, string st = \" \") {\n return string.Join(st, ie);\n }\n static public void Main() {\n Console.SetOut(new Program.IO.Printer(Console.OpenStandardOutput()) { AutoFlush = false });\n var solver = new Program.Solver();\n solver.Solve();\n Console.Out.Flush();\n }\n}\n#endregion\n#region Ex\nnamespace Program.IO {\n using System.IO;\n using System.Text;\n using System.Globalization;\n\n public class Printer: StreamWriter {\n public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }\n public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }\n }\n\n public class StreamScanner {\n public StreamScanner(Stream stream) { str = stream; }\n\n public readonly Stream str;\n private readonly byte[] buf = new byte[1024];\n private int len, ptr;\n public bool isEof = false;\n public bool IsEndOfStream { get { return isEof; } }\n\n private byte read() {\n if (isEof) return 0;\n if (ptr >= len) {\n ptr = 0;\n if ((len = str.Read(buf, 0, 1024)) <= 0) {\n isEof = true;\n return 0;\n }\n }\n return buf[ptr++];\n }\n\n public char Char() {\n byte b = 0;\n do b = read(); while ((b < 33 || 126 < b) && !isEof);\n return (char)b;\n }\n public string Scan() {\n var sb = new StringBuilder();\n for (var b = Char(); b >= 33 && b <= 126; b = (char)read()) sb.Append(b);\n return sb.ToString();\n }\n public string ScanLine() {\n var sb = new StringBuilder();\n for (var b = Char(); b != '\\n' && b != 0; b = (char)read()) if (b != '\\r') sb.Append(b);\n return sb.ToString();\n }\n public long Long() { return isEof ? long.MinValue : long.Parse(Scan()); }\n public int Integer() { return isEof ? int.MinValue : int.Parse(Scan()); }\n public double Double() { return isEof ? double.NaN : double.Parse(Scan(), CultureInfo.InvariantCulture); }\n }\n}\n\n#endregion\n\n\n#region sieve O(NloglogN)\nstatic public partial class MathEx {\n static public bool[] Sieve(int p, List primes = null) {\n var isPrime = new bool[p + 1];\n for (int i = 2; i < isPrime.Length; i++) isPrime[i] = true;\n for (int i = 2; i * i <= p; i++)\n if (!isPrime[i]) continue;\n else for (int j = i * i; j <= p; j += i) isPrime[j] = false;\n if (primes != null) for (int i = 0; i <= p; i++) if (isPrime[i]) primes.Add(i);\n\n return isPrime;\n }\n static public List SieveList(int p) { var ret = new List(); Sieve(p, ret); return ret; }\n}\n#endregion\n\n\n#region ModInt\n/// \n/// [0,) までの値を取るような数\n/// \npublic struct ModInt {\n /// \n /// 剰余を取る値.\n /// \n public const long Mod = (int)1e9 + 7;\n\n /// \n /// 実際の数値.\n /// \n public long num;\n /// \n /// 値が であるようなインスタンスを構築します.\n /// \n /// インスタンスが持つ値\n /// パフォーマンスの問題上,コンストラクタ内では剰余を取りません.そのため, ∈ [0,) を満たすような を渡してください.このコンストラクタは O(1) で実行されます.\n public ModInt(long n) { num = n; }\n /// \n /// このインスタンスの数値を文字列に変換します.\n /// \n /// [0,) の範囲内の整数を 10 進表記したもの.\n public override string ToString() { return num.ToString(); }\n public static ModInt operator +(ModInt l, ModInt r) { l.num += r.num; if (l.num >= Mod) l.num -= Mod; return l; }\n public static ModInt operator -(ModInt l, ModInt r) { l.num -= r.num; if (l.num < 0) l.num += Mod; return l; }\n public static ModInt operator *(ModInt l, ModInt r) { return new ModInt(l.num * r.num % Mod); }\n public static implicit operator ModInt(long n) { n %= Mod; if (n < 0) n += Mod; return new ModInt(n); }\n\n /// \n /// 与えられた 2 つの数値からべき剰余を計算します.\n /// \n /// べき乗の底\n /// べき指数\n /// 繰り返し二乗法により O(N log N) で実行されます.\n public static ModInt Pow(ModInt v, long k) { return Pow(v.num, k); }\n\n /// \n /// 与えられた 2 つの数値からべき剰余を計算します.\n /// \n /// べき乗の底\n /// べき指数\n /// 繰り返し二乗法により O(N log N) で実行されます.\n public static ModInt Pow(long v, long k) {\n long ret = 1;\n for (k %= Mod - 1; k > 0; k >>= 1, v = v * v % Mod)\n if ((k & 1) == 1) ret = ret * v % Mod;\n return new ModInt(ret);\n }\n /// \n /// 与えられた数の逆元を計算します.\n /// \n /// 逆元を取る対象となる数\n /// 逆元となるような値\n /// 法が素数であることを仮定して,フェルマーの小定理に従って逆元を O(log N) で計算します.\n public static ModInt Inverse(ModInt v) { return Pow(v, Mod - 2); }\n}\n#endregion", "lang": "Mono C#", "bug_code_uid": "d0d8a1f972e8b1c1f112a138ccc7a9ff", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "6738836d7dd846db825807b3dbfc7a10", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.868734335839599, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\n\nnamespace codeforces\n{\n\n public class Program\n {\n private const int MOD = 1000 * 1000 * 1000 + 7;\n\n private static int Add(int a, int b)\n {\n int result = a + b;\n if (result >= MOD)\n {\n result -= MOD;\n }\n return result;\n }\n\n private static int Mult(int a, int b)\n {\n return (int)(1L * a * b % MOD);\n }\n\n private static int BinPow(int a, int n)\n {\n int result = 1;\n while (n > 0)\n {\n if (n % 2 == 1)\n {\n result = Mult(result, a);\n }\n a = Mult(a, a);\n n /= 2;\n }\n return result;\n }\n\n private static List> GetPrimes(long x)\n {\n var result = new List>();\n for (int i = 2; 1L * i * i <= x; ++i)\n {\n int count = 0;\n while (x % i == 0)\n {\n x /= i;\n count++;\n }\n if (count > 0)\n {\n result.Add(new KeyValuePair(i, count));\n }\n }\n if (x > 1)\n {\n result.Add(new KeyValuePair(x, 1));\n }\n\n return result;\n }\n\n private static void Main(string[] args)\n {\n var values = Console.ReadLine().Split(' ');\n long n = Convert.ToInt64(values[0]);\n int k = Convert.ToInt32(values[1]);\n\n var primes = GetPrimes(n);\n int mp = 0;\n for (int i = 0; i < primes.Count; ++i)\n {\n mp = Math.Max(primes[i].Value, mp);\n }\n var dp = new int[k + 1, mp + 1];\n int result = 1;\n for (int i = 0; i < primes.Count; ++i)\n {\n var pair = primes[i];\n for (int j = 0; j <= pair.Value; ++j)\n {\n dp[0, j] = 0;\n }\n dp[0, pair.Value] = 1;\n for (int l = 1; l <= k; ++l)\n {\n for (int j = 0; j <= pair.Value; ++j)\n {\n dp[l, j] = 0;\n for (int r = j; r <= pair.Value; ++r)\n {\n int rr = BinPow(r + 1, MOD - 2);\n dp[l, j] = Add(dp[l, j], Mult(rr, dp[l - 1, r]));\n }\n }\n }\n int M = 0;\n int p = 1;\n int v = (int)(pair.Key % MOD);\n for (int j = 0; j <= pair.Value; ++j)\n {\n M = Add(M, Mult(dp[k, j], p));\n p = Mult(p, v);\n }\n result = Mult(result, M);\n }\n Console.WriteLine(result);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "10f1ce2b422d4155d59fdfe73e9e237b", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "6895d2ef42863430f189c7455f7cde4e", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.47626677348287605, "equal_cnt": 34, "replace_cnt": 21, "delete_cnt": 1, "insert_cnt": 11, "fix_ops_cnt": 33, "bug_source_code": "using System;\nusing System.Collections.Generic;\nclass Program\n{\n\tstatic void Main(string[] args)\n\t{\n\t long mod = 1000000007;\n\t\tstring[] str = Console.ReadLine().Split();\n\t\tlong N = long.Parse(str[0]);\n\t\tlong K = long.Parse(str[1]);\n\t\tvar Elist = enum_div(N);\n\t\tElist.Sort((x,y)=>(int)x-(int)y);\n\t\tvar Plist = PrimeFactors(N);\n\t\tPlist.Sort((x,y)=>(int)x-(int)y);\n\t\tvar PAlist = new List();\n\t\tlong t = Plist[0];\n\t\tlong ct = 1;\n\t\tfor(var i=1;i PrimeFactors(long n){\n\t\tlong i = 2;\n\t\tlong tmp = n;\n\t\tvar list = new List();\n\t\twhile(i*i<=n){\n\t\t\tif(tmp%i==0){\n\t\t\t\ttmp /= i;\n\t\t\t\tlist.Add(i);\n\t\t\t} else {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(tmp != 1){\n\t\t\tlist.Add(tmp);\n\t\t}\n\t\treturn list;\n\t}\n\tpublic static List enum_div(long n){\n\t\tlong tmp = n;\n\t\tvar list = new List();\n\t\tfor(var i=1;i*i<=n;i++){\n\t\t\tif(n%i==0){\n\t\t\t\tlist.Add(i);\n\t\t\t\tif(i*i!=n){\n\t\t\t\t\tlist.Add(n/i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}\n\tpublic static long Mpow(long x,long n,long m)\n\t{\n\t\tlong ans = 1;\n\t\twhile(n > 0){\n\t\t\tif(n % 2 == 1){\n\t\t\t\tans = ans * x % m;\n\t\t\t\tn -= 1;\n\t\t\t}\n\t\t\tx = x * x % m;\n\t\t\tn /= 2;\n\t\t}\n\t\treturn ans;\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "37a3fe54ccf5349922b6882fbaa7211c", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "4d9b7d06648ed3228e1d04292b1bdf81", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8634860651865848, "equal_cnt": 15, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nclass Program\n{\n\tstatic void Main(string[] args)\n\t{\n\t long mod = 1000000007;\n\t\tstring[] str = Console.ReadLine().Split();\n\t\tlong N = long.Parse(str[0]);\n\t\tlong K = long.Parse(str[1]);\n\t\tif(N==1){\n\t\t Console.WriteLine(1);\n\t\t} else {\n\t\t var Plist = PrimeFactors(N);\n\t\t Plist.Sort((x,y)=>(int)x-(int)y);\n\t\t var PAlist = new List();\n\t\t long t = Plist[0];\n\t\t long ct = 1;\n \t\tfor(var i=1;i PrimeFactors(long n){\n\t\tlong i = 2;\n\t\tlong tmp = n;\n\t\tvar list = new List();\n\t\twhile(i*i<=n){\n\t\t\tif(tmp%i==0){\n\t\t\t\ttmp /= i;\n\t\t\t\tlist.Add(i);\n\t\t\t} else {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(tmp != 1){\n\t\t\tlist.Add(tmp);\n\t\t}\n\t\treturn list;\n\t}\n\tpublic static long Mpow(long x,long n,long m)\n\t{\n\t\tlong ans = 1;\n\t\twhile(n > 0){\n\t\t\tif(n % 2 == 1){\n\t\t\t\tans = ans * x % m;\n\t\t\t\tn -= 1;\n\t\t\t}\n\t\t\tx = x * x % m;\n\t\t\tn /= 2;\n\t\t}\n\t\treturn ans;\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "33afa222afb60d4b581fa18363ddfb8e", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "4d9b7d06648ed3228e1d04292b1bdf81", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9945168870663041, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.IO;\n\nusing static util;\nusing P = pair;\n\nusing Binary = System.Func;\nusing Unary = System.Func;\n\nclass Program\n{\n static StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };\n static Scan sc = new Scan();\n const int M = 1000000007;\n const int M2 = 998244353;\n const long LM = (long)1e18;\n const double eps = 1e-11;\n static readonly int[] dd = { 0, 1, 0, -1, 0 };\n const string dstring = \"RDLU\";\n static void Main()\n {\n long n;\n int k;\n sc.Multi(out n, out k);\n var lis = new List>();\n long m = n;\n for (long i = 2; i * i <= m; i++)\n {\n int c = 0;\n while (m % i == 0) {\n m /= i;\n ++c;\n }\n if (c > 0) {\n lis.Add(make_pair(i, c));\n }\n }\n if (m > 1) {\n lis.Add(make_pair(m, 1));\n }\n long ans = n % M;\n var inv = new long[100];\n for (int i = 1; i < 100; i++)\n {\n inv[i] = MyMath.inv(i);\n }\n foreach (var item in lis)\n {\n int c = item.v2;\n var dp = new long[c + 1];\n dp[0] = 1;\n for (int i = 0; i < k; i++)\n {\n var nex = new long[c + 1];\n for (int j = 0; j <= c; j++)\n {\n for (int l = 0; l <= j; l++)\n {\n nex[j] = (nex[j] + dp[l] * inv[c - l + 1]) % M;\n }\n }\n dp = nex;\n }\n long a = 0;\n long b = 1;\n for (int i = 0; i < c + 1; i++)\n {\n a = (a + dp[i] * MyMath.inv(b)) % M;\n b = b * (item.v1 % M) % M;\n }\n ans = ans * a % M;\n }\n Prt(ans);\n sw.Flush();\n }\n\n static void DBG(string a) => Console.WriteLine(a);\n static void DBG(IEnumerable a) => DBG(string.Join(\" \", a));\n static void DBG(params object[] a) => DBG(string.Join(\" \", a));\n static void Prt(string a) => sw.WriteLine(a);\n static void Prt(IEnumerable a) => Prt(string.Join(\" \", a));\n static void Prt(params object[] a) => Prt(string.Join(\" \", a));\n}\nclass pair : IComparable>\n{\n public T v1;\n public U v2;\n public pair(T v1, U v2) {\n this.v1 = v1;\n this.v2 = v2;\n }\n public int CompareTo(pair a) {\n int c = Comparer.Default.Compare(v1, a.v1);\n return c != 0 ? c : Comparer.Default.Compare(v2, a.v2);\n }\n public override string ToString() => v1 + \" \" + v2;\n public void Deconstruct(out T a, out U b) {\n a = v1; b = v2;\n }\n}\nstatic class util\n{\n public static pair make_pair(this IList l) => make_pair(l[0], l[1]);\n public static pair make_pair(T v1, U v2) => new pair(v1, v2);\n public static T sq(T a) => Operator.Multiply(a, a);\n public static T Max(params T[] a) => a.Max();\n public static T Min(params T[] a) => a.Min();\n public static bool inside(int i, int j, int h, int w) => i >= 0 && i < h && j >= 0 && j < w;\n public static void swap(ref T a, ref T b) where T : struct { var t = a; a = b; b = t; }\n public static void swap(this IList a, int i, int j) where T : struct { var t = a[i]; a[i] = a[j]; a[j] = t; }\n public static T[] copy(this IList a) {\n var ret = new T[a.Count];\n for (int i = 0; i < a.Count; i++) ret[i] = a[i];\n return ret;\n }\n}\nstatic class Operator\n{\n static readonly ParameterExpression x = Expression.Parameter(typeof(T), \"x\");\n static readonly ParameterExpression y = Expression.Parameter(typeof(T), \"y\");\n public static readonly Func Add = Lambda(Expression.Add);\n public static readonly Func Subtract = Lambda(Expression.Subtract);\n public static readonly Func Multiply = Lambda(Expression.Multiply);\n public static readonly Func Divide = Lambda(Expression.Divide);\n public static readonly Func Plus = Lambda(Expression.UnaryPlus);\n public static readonly Func Negate = Lambda(Expression.Negate);\n public static Func Lambda(Binary op) => Expression.Lambda>(op(x, y), x, y).Compile();\n public static Func Lambda(Unary op) => Expression.Lambda>(op(x), x).Compile();\n}\n\nclass Scan\n{\n public int Int => int.Parse(Str);\n public long Long => long.Parse(Str);\n public double Double => double.Parse(Str);\n public string Str => Console.ReadLine().Trim();\n public pair Pair() where T : IComparable where U : IComparable {\n T a; U b;\n Multi(out a, out b);\n return new pair(a, b);\n }\n public P P {\n get {\n int a, b;\n Multi(out a, out b);\n return new P(a, b);\n }\n }\n public int[] IntArr => StrArr.Select(int.Parse).ToArray();\n public long[] LongArr => StrArr.Select(long.Parse).ToArray();\n public double[] DoubleArr => StrArr.Select(double.Parse).ToArray();\n public string[] StrArr => Str.Split(new[]{' '}, StringSplitOptions.RemoveEmptyEntries);\n bool eq() => typeof(T).Equals(typeof(U));\n T ct(U a) => (T)Convert.ChangeType(a, typeof(T));\n T cv(string s) => eq() ? ct(int.Parse(s))\n : eq() ? ct(long.Parse(s))\n : eq() ? ct(double.Parse(s))\n : eq() ? ct(s[0])\n : ct(s);\n public void Multi(out T a) => a = cv(Str);\n public void Multi(out T a, out U b)\n { var ar = StrArr; a = cv(ar[0]); b = cv(ar[1]); }\n public void Multi(out T a, out U b, out V c)\n { var ar = StrArr; a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); }\n public void Multi(out T a, out U b, out V c, out W d)\n { var ar = StrArr; a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); d = cv(ar[3]); }\n public void Multi(out T a, out U b, out V c, out W d, out X e)\n { var ar = StrArr; a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); d = cv(ar[3]); e = cv(ar[4]); }\n public void Multi(out T a, out U b, out V c, out W d, out X e, out Y f)\n { var ar = StrArr; a = cv(ar[0]); b = cv(ar[1]); c = cv(ar[2]); d = cv(ar[3]); e = cv(ar[4]); f = cv(ar[5]); }\n}\n\nstatic class MyMath\n{\n public static long Mod = 1000000007;\n public static bool isprime(long a) {\n if (a < 2) return false;\n for (long i = 2; i * i <= a; i++) if (a % i == 0) return false;\n return true;\n }\n public static bool[] sieve(int n) {\n var p = new bool[n + 1];\n for (int i = 2; i <= n; i++) p[i] = true;\n for (int i = 2; i * i <= n; i++) if (p[i]) for (int j = i * i; j <= n; j += i) p[j] = false;\n return p;\n }\n public static List getprimes(int n) {\n var prs = new List();\n var p = sieve(n);\n for (int i = 2; i <= n; i++) if (p[i]) prs.Add(i);\n return prs;\n }\n public static long pow(long a, long b) {\n a %= Mod;\n if (a == 0) return 0;\n if (b == 0) return 1;\n var t = pow(a, b / 2);\n if ((b & 1) == 0) return t * t % Mod;\n return t * t % Mod * a % Mod;\n }\n public static long inv(long a) => pow(a, Mod - 2);\n public static long gcd(long a, long b) {\n while (b > 0) { var t = a % b; a = b; b = t; } return a;\n }\n // a x + b y = gcd(a, b)\n public static long extgcd(long a, long b, out long x, out long y) {\n long g = a; x = 1; y = 0;\n if (b > 0) { g = extgcd(b, a % b, out y, out x); y -= a / b * x; }\n return g;\n }\n public static long lcm(long a, long b) => a / gcd(a, b) * b;\n\n static long[] facts, invs;\n public static void setfacts(int n) {\n facts = new long[n + 1];\n facts[0] = 1;\n for (int i = 1; i <= n; i++) facts[i] = facts[i - 1] * i % Mod;\n invs = new long[n + 1];\n invs[n] = inv(facts[n]);\n for (int i = n; i > 0 ; i--) invs[i - 1] = invs[i] * i % Mod;\n }\n public static long comb(long n, long r) {\n if (n < 0 || r < 0 || r > n) return 0;\n if (facts != null && facts.Length > n) return facts[n] * invs[r] % Mod * invs[n - r] % Mod;\n if (n - r < r) r = n - r;\n long numer = 1, denom = 1;\n for (long i = 0; i < r; i++) {\n numer = numer * ((n - i) % Mod) % Mod;\n denom = denom * ((i + 1) % Mod) % Mod;\n }\n return numer * inv(denom) % Mod;\n }\n public static long[][] getcombs(int n) {\n var ret = new long[n + 1][];\n for (int i = 0; i <= n; i++) {\n ret[i] = new long[i + 1];\n ret[i][0] = ret[i][i] = 1;\n for (int j = 1; j < i; j++) ret[i][j] = (ret[i - 1][j - 1] + ret[i - 1][j]) % Mod;\n }\n return ret;\n }\n // nC0, nC2, ..., nCn\n public static long[] getcomb(int n) {\n var ret = new long[n + 1];\n ret[0] = 1;\n for (int i = 0; i < n; i++) ret[i + 1] = ret[i] * (n - i) % Mod * inv(i + 1) % Mod;\n return ret;\n }\n public static bool nextPermutation(IList p) where T : struct, IComparable {\n for (int i = p.Count - 2; i >= 0; --i) {\n if (p[i].CompareTo(p[i + 1]) < 0) {\n for (int j = p.Count - 1; ; --j) {\n if (p[j].CompareTo(p[i]) > 0) {\n p.swap(i, j);\n for(++i, j = p.Count - 1; i < j; ++i, --j)\n p.swap(i, j);\n\n return true;\n }\n }\n }\n }\n return false;\n }\n public static bool nextPermutation(IList p, Comparison compare) where T : struct {\n for (int i = p.Count - 2; i >= 0; --i) {\n if (compare(p[i], p[i + 1]) < 0) {\n for (int j = p.Count - 1; ; --j) {\n if (compare(p[j], p[i]) > 0) {\n p.swap(i, j);\n for (++i, j = p.Count - 1; i < j; ++i, --j)\n p.swap(i, j);\n\n return true;\n }\n }\n }\n }\n return false;\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "edfbb50b2d6092e503f6523e87869840", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "d14a9cdbf033737d0c02ff27640e40a9", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7357871090374979, "equal_cnt": 29, "replace_cnt": 13, "delete_cnt": 3, "insert_cnt": 12, "fix_ops_cnt": 28, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces\n{\n public class MakotoAndABlackboard\n {\n const int MOD = 1000000000 + 7;\n\n ModMath math = new ModMath(MOD);\n\n public static void Main()\n {\n StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };\n new MakotoAndABlackboard().Solve(Console.In, sw);\n sw.Flush();\n }\n\n public void Solve(TextReader tr, TextWriter tw)\n {\n var a = tr.ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n tw.WriteLine(Solve(a[0], a[1]));\n }\n\n public int Solve(long n, int k)\n {\n var res = 1L;\n for (long a = 2; a * a <= n; a++)\n {\n var np = GetNumPrime(a, n);\n var numPrime = np.Item1;\n n = np.Item2;\n if (numPrime == 0)\n {\n continue;\n }\n\n res = math.Mul(res, Calculate(k, a, numPrime));\n }\n if (n != 1)\n {\n res = math.Mul(res, Calculate(k, n, 1));\n }\n return (int)(res);\n }\n\n private long Calculate(int k, long a, long numPrime)\n {\n var dp = new long[k + 1, numPrime + 1];\n dp[0, numPrime] = 1;\n for (int i = 1; i <= k; i++)\n {\n for (int j = 0; j <= numPrime; j++)\n {\n for (int l = j; l <= numPrime; l++)\n {\n dp[i, j] = math.Add(dp[i, j], math.Div(dp[i - 1, l], l + 1));\n }\n }\n }\n\n var t = 0L;\n for (int j = 0; j <= numPrime; j++)\n {\n t = math.Add(t, math.Mul(dp[k, j], math.Pow(a, j)));\n }\n return t;\n }\n\n Tuple GetNumPrime(long a, long n)\n {\n var numPrime = 0L;\n while (n % a == 0)\n {\n numPrime++;\n n /= a;\n }\n return Tuple.Create(numPrime, n);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "4102bb61e215c0922b29373b29e32dd3", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "341f7a66b5f73e6ecac2d9ff860d187e", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8660360085444003, "equal_cnt": 62, "replace_cnt": 15, "delete_cnt": 4, "insert_cnt": 42, "fix_ops_cnt": 61, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces\n{\n public class ModMath\n {\n private int mod;\n\n public ModMath(int mod)\n {\n this.mod = mod;\n }\n\n public long Pow(long x, int n)\n {\n long res = 1;\n for (; n > 0; n >>= 1)\n {\n if ((n & 1) > 0)\n {\n res = res * x % mod;\n }\n x = x * x % mod;\n }\n return res;\n }\n\n public long Div(long l, long r)\n {\n return l * Pow(r, mod - 2) % mod;\n }\n\n internal long Add(long v1, long v2)\n {\n return (v1 + v2) % mod;\n }\n\n internal long Mul(long v1, long v2)\n {\n return v1 * v2 % mod;\n }\n }\n\n public class MakotoAndABlackboard\n {\n const int MOD = 1000000000 + 7;\n\n ModMath math = new ModMath(MOD);\n\n public static void Main()\n {\n StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };\n new MakotoAndABlackboard().Solve(Console.In, sw);\n sw.Flush();\n }\n\n public void Solve(TextReader tr, TextWriter tw)\n {\n var a = tr.ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n tw.WriteLine(Solve(a[0], a[1]));\n }\n\n public int Solve(long n, int k)\n {\n var res = 1L;\n for (long a = 2; a * a <= n; a++)\n {\n var np = GetNumPrime(a, n);\n var numPrime = np.Item1;\n n = np.Item2;\n if (numPrime == 0)\n {\n continue;\n }\n\n res = math.Mul(res, Calculate(k, a, numPrime));\n }\n if (n != 1)\n {\n res = math.Mul(res, Calculate(k, n, 1));\n }\n return (int)(res);\n }\n\n private long Calculate(int k, long a, long numPrime)\n {\n var dp = new long[k + 1, numPrime + 1];\n dp[0, numPrime] = 1;\n for (int i = 1; i <= k; i++)\n {\n for (int j = 0; j <= numPrime; j++)\n {\n for (int l = j; l <= numPrime; l++)\n {\n dp[i, j] = math.Add(dp[i, j], math.Div(dp[i - 1, l], l + 1));\n }\n }\n }\n\n var t = 0L;\n for (int j = 0; j <= numPrime; j++)\n {\n t = math.Add(t, math.Mul(dp[k, j], math.Pow(a, j)));\n }\n return t;\n }\n\n Tuple GetNumPrime(long a, long n)\n {\n var numPrime = 0L;\n while (n % a == 0)\n {\n numPrime++;\n n /= a;\n }\n return Tuple.Create(numPrime, n);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a8a9db34d0e03fe62a9b2ae5eb2b4885", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "341f7a66b5f73e6ecac2d9ff860d187e", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9169126950653732, "equal_cnt": 13, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 4, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces\n{\n public class MakotoAndABlackboard\n {\n public class ModMath\n {\n private int mod;\n Dictionary, long> cache = new Dictionary, long>();\n\n public ModMath(int mod)\n {\n this.mod = mod;\n }\n\n public long Pow(long x, int n)\n {\n var key = Tuple.Create(x, n);\n if (cache.ContainsKey(key))\n {\n return cache[key];\n }\n long res = 1;\n for (; n > 0; n >>= 1)\n {\n if ((n & 1) > 0)\n {\n res = res * x % mod;\n }\n x = x * x % mod;\n }\n return cache[key] = res;\n }\n\n public long Div(long l, long r)\n {\n return l * Pow(r, mod - 2) % mod;\n }\n\n internal long Add(long v1, long v2)\n {\n return (v1 + v2) % mod;\n }\n\n internal long Mul(long v1, long v2)\n {\n return v1 * v2 % mod;\n }\n }\n\n const int MOD = 1000000000 + 7;\n\n ModMath math = new ModMath(MOD);\n\n public static void Main()\n {\n StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };\n new MakotoAndABlackboard().Solve(Console.In, sw);\n sw.Flush();\n }\n\n public void Solve(TextReader tr, TextWriter tw)\n {\n var a = tr.ReadLine().Split();\n tw.WriteLine(Solve(long.Parse(a[0]), int.Parse(a[1])));\n }\n\n public int Solve(long n, int k)\n {\n var res = 1L;\n for (long a = 2; a * a <= n; a++)\n {\n var np = GetNumPrime(a, n);\n var numPrime = np.Item1;\n n = np.Item2;\n if (numPrime == 0)\n {\n continue;\n }\n\n res = math.Mul(res, Calculate(k, a, numPrime));\n }\n if (n != 1)\n {\n res = math.Mul(res, Calculate(k, n, 1));\n }\n return (int)(res);\n }\n\n private long Calculate(int k, long a, long numPrime)\n {\n var current = 0;\n var next = 1;\n var dp = new long[2, numPrime + 1];\n dp[current, numPrime] = 1;\n for (int i = 1; i <= k; i++)\n {\n for (int j = 0; j <= numPrime; j++)\n {\n dp[next, j] = 0;\n for (int l = j; l <= numPrime; l++)\n {\n dp[next, j] = math.Add(dp[next, j], math.Div(dp[current, l], l + 1));\n }\n }\n current ^= 1;\n next ^= 1;\n }\n\n var t = 0L;\n for (int j = 0; j <= numPrime; j++)\n {\n t = math.Add(t, math.Mul(dp[current, j], math.Pow(a, j)));\n }\n return t;\n }\n\n Tuple GetNumPrime(long a, long n)\n {\n var numPrime = 0L;\n while (n % a == 0)\n {\n numPrime++;\n n /= a;\n }\n return Tuple.Create(numPrime, n);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8ae1c129d64e156a3c5d1d1cb15980be", "src_uid": "dc466d9c24b7dcb37c0e99337b4124d2", "apr_id": "341f7a66b5f73e6ecac2d9ff860d187e", "difficulty": 2200, "tags": ["dp", "math", "probabilities", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9791099000908265, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Pipeline\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n long n = Next();\n long k = Next();\n\n long all = k + (k - 1)*(k - 2)/2;\n if (all < n)\n writer.WriteLine(\"-1\");\n else if (n <= k)\n {\n writer.WriteLine(\"1\");\n }\n else\n {\n long l = 1, r = k - 1;\n\n while (l < r)\n {\n long m = (l + r)/2;\n\n if (all - m*(m - 1)/2 < n)\n r = m;\n else l = m + 1;\n }\n writer.WriteLine(k - l + 1);\n }\n\n\n writer.Flush();\n }\n\n private static long Next()\n {\n int c;\n long res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "2b9f7405de6a9514f35a6c83e2a68335", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "43808d38354f7b9cedb04f2b7ea927d6", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9599303135888502, "equal_cnt": 12, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _725B\n{\n class Program\n {\n static void Main(string[] args)\n {\n string S = Console.ReadLine();\n int L = S.Length; int A2 = 0;\n char C = char.Parse(S.Substring(L-1));\n int N = int.Parse(S.Substring(0,L-1));\n\n switch (C)\n {\n case 'f':\n A2 = 1;\n break;\n case 'e':\n A2 = 2;\n break;\n case 'd':\n A2 = 3;\n break;\n case 'a':\n A2 = 4;\n break;\n case 'b':\n A2 = 5;\n break;\n case 'c':\n A2 = 6;\n break;\n\n }\n\n int A1 = 16 * ((N - 1) / 4);\n int A3 = 0;\n if ((N % 2) == 0) A3 = 7;\n int T = A1 + A2 + A3;\n\n Console.WriteLine(T);\n\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "621718dacbf7f93dbba037d4a527095b", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "e13412deeadca44fd74326c4f289ee60", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9645219482862297, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Collections;\n\nnamespace ConsoleApplication1\n{\n class CanadaCup2\n {\n static void Main(string[] args)\n {\n //Console.SetIn(new StreamReader(@\"D:\\Sergey\\Code\\1.txt\"));\n\n string ns = Console.ReadLine();\n int n = int.Parse(ns.Substring(0, ns.Length - 1));\n char s = ns[ns.Length - 1];\n int c = s - 'a';\n int[] d = new int[] { 3, 4, 5, 2, 1, 0 };\n int a = (n - 1) % 2;\n int b = (n - 1) / 4;\n //if (b > 1)\n // b -= 2;\n\n int e = b * 16;\n if (a > 0)\n e+=7;\n e += d[c] + 1;\n\n Console.WriteLine(e);\n\n } // Main\n }\n}", "lang": "MS C#", "bug_code_uid": "a299f762db7f86f1107af1fdfc3961a9", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "79c705865ca5e5ce27536b9f7b61eea8", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9383529411764706, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "using System;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main()\n {\n //var s = Console.ReadLine().Split(' ');\n var str = Console.ReadLine();\n var k = int.Parse(str.Substring(0,str.Length-1));\n byte g = 0;\n switch (str[str.Length - 1])\n {\n case 'a':\n g = 4;\n break;\n case 'b':\n g = 5;\n break;\n case 'c':\n g = 6;\n break;\n case 'd':\n g = 3;\n break;\n case 'e':\n g = 2;\n break;\n case 'f':\n g = 1;\n break;\n }\n var result = k/5*16;\n k %= 4;\n if (k%2 == 0)\n {\n result += 7 + g;\n }\n else result += g;\n Console.WriteLine(result);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "3ad7eba3f783df26d1af0555e0ce2a42", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "7727b69e9be00ca9e3b68992d19d24c8", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9514472455648926, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main()\n {\n //var s = Console.ReadLine().Split(' ');\n var str = Console.ReadLine();\n var k = long.Parse(str.Substring(0,str.Length-1));\n byte g = 0;\n switch (str[str.Length - 1])\n {\n case 'a':\n g = 4;\n break;\n case 'b':\n g = 5;\n break;\n case 'c':\n g = 6;\n break;\n case 'd':\n g = 3;\n break;\n case 'e':\n g = 2;\n break;\n case 'f':\n g = 1;\n break;\n }\n var result = k/5*16;\n k = k%4 == 0 ? 4 : k%4;\n if (k%2 == 0)\n {\n result += 7 + g;\n }\n else result += g;\n Console.WriteLine(result);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "4edbfc3d3ee4d1a8ce1dbc8d3dc174bb", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "7727b69e9be00ca9e3b68992d19d24c8", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9026708918062472, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main()\n {\n //var s = Console.ReadLine().Split(' ');\n var str = Console.ReadLine();\n var k = long.Parse(str.Substring(0,str.Length-1));\n byte g = 0;\n switch (str[str.Length - 1])\n {\n case 'a':\n g = 4;\n break;\n case 'b':\n g = 5;\n break;\n case 'c':\n g = 6;\n break;\n case 'd':\n g = 3;\n break;\n case 'e':\n g = 2;\n break;\n case 'f':\n g = 1;\n break;\n }\n var result = 0;\n while (k > 4)\n {\n result += 16;\n k -= 4;\n }\n if (k%2 == 0)\n {\n result += 7 + g;\n }\n else result += g;\n Console.WriteLine(result);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5ce318cdbd957a381153f3815abb3710", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "7727b69e9be00ca9e3b68992d19d24c8", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5659838018103859, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _725B {\n class Program {\n static void Main(string[] args) {\n int row = Console.Read() - '0';\n int col = Console.Read() - 'c'; //a = -2, b = -1, c = 0, d = 1, e = 2, f = 3\n int seconds = 0;\n\n if(col <= 0) {\n seconds += 6 + col;\n } else {\n seconds += 4 - col;\n }\n\n //1, 2, 5, 6, 9, 10 - attendant A\n //3, 4, 7, 8, 11, 12 - attendant B\n int a = 1;\n int b = 3;\n for(; (a != row) && (b != row); a++, b++) { //quit when attendant reaches row\n if(a % 2 == 0) {\n a += 2;\n b += 2;\n seconds += 2;\n }\n seconds += 7;\n }\n Console.WriteLine(seconds);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "8abd0c301a82867c0838c31b4503df5f", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "8869d3c84b1c0228a3c671e8f1909b6e", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6947890818858561, "equal_cnt": 11, "replace_cnt": 3, "delete_cnt": 4, "insert_cnt": 3, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int a;\n int temp = 0;\n a = Convert.ToInt32(Console.ReadLine());\n if (a%2 != 0)\n {\n Console.WriteLine(\"NO\");\n }\n else if (a%2 == 0)\n {\n for (int i = 0; i <= a; i++)\n {\n if (i%2 == 0)\n {\n if ((a/i)%2 == 0)\n {\n Console.WriteLine(\"YES\");\n temp++;\n break;\n }\n }\n }\n if (temp == 0)\n {\n Console.WriteLine(\"NO\");\n }\n }\n Console.ReadLine();\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ce7fff508af72f6604ebcff23be3d01e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "491b89c5b80b5690905011470cd6f3ba", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9906858594411516, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n string weight0;\n int weight;\n \n weight0 = Console.ReadLine();\n weight = Convert.ToInt32(weight0);\n\n if (weight % 2 == 0 && weight != 2)\n {\n Console.WriteLine(\"YES\");\n\n }\n\n else\n {\n Console.WriteLine(\"NO\");\n\n }\n\n\n }", "lang": "MS C#", "bug_code_uid": "93d7ba1fb5febc8da37af16e0c6f2750", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0dbfe7bea95c03603de40161fc27776a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.016886930983847283, "equal_cnt": 15, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 15, "bug_source_code": "\n\n \n \n Debug\n AnyCPU\n {FC6F239C-0743-41DF-8B79-D5E8087150B1}\n Exe\n _4A\n 4A\n v4.6.1\n 512\n true\n \n \n AnyCPU\n true\n full\n false\n bin\\Debug\\\n DEBUG;TRACE\n prompt\n 4\n \n \n AnyCPU\n pdbonly\n true\n bin\\Release\\\n TRACE\n prompt\n 4\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", "lang": "MS C#", "bug_code_uid": "ee152b96d5f1fedddf9e95306daa0159", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8a9363e4241a2d8b8495e2355230b468", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6054114994363021, "equal_cnt": 25, "replace_cnt": 9, "delete_cnt": 14, "insert_cnt": 2, "fix_ops_cnt": 25, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace p11\n{\n class Program\n {\n static void Main(string[] args)\n {\n while (true)\n {\n int w, p1, p2;\n\n w = Convert.ToInt32(Console.ReadLine());\n \n if (1 <= w && w <= 100)\n {\n if (w % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n p1 = w - (w / 2);\n p2 = w - p1;\n\n if (p1 % 2 == 0 && p2 % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n\n\n\n\n }\n\n\n\n }\n\n }\n\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "54708ccfade691ba657ff4c8d8993beb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a9636aa65e5c661d6bade728b24d6f9c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.6311475409836066, "equal_cnt": 9, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 10, "bug_source_code": "namespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n double x = Convert.ToDouble(Console.ReadLine());\n double y = x / 2;\n if (y % 1 != 0)\n {\n Console.WriteLine(\"NO\");\n }\n else{\n Console.WriteLine(\"YES\");\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "faa6bdf41d31f4023cd054c06387c4d9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4611bfd68774be0322489a04fed90b9f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4741532976827095, "equal_cnt": 10, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": " public class Program\n {\n public static void Main()\n {\n int a = Console.ReadLine(); \n if (a % 2 == 0) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\"); \n }\n }", "lang": "MS C#", "bug_code_uid": "fd11e101345e525228c1260c28631677", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "aac3dbcd99fe3209395acaa1594f0a50", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9832572298325722, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Program1\n{\n class Program1\n {\n static void Main(string[] args)\n {\n int x, j;\n \n bool res = false;\n \n x = Int32.Parse(Console.ReadLine());\n \n for(int i = 2; i < 8; i+2)\n {\n j = x - i;\n \n if(j % 2 == 0)\n res = true;\n }\n \n if(res == true)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\"); \n }\n }\n}", "lang": "MS C#", "bug_code_uid": "0194d7950b951c1d656955093d218526", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ca76d5657e3c22a495b332aff7ce3ae6", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7807258310460506, "equal_cnt": 24, "replace_cnt": 14, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 23, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n const long MAX = 2000000000000000000;\n int n;\n long[] f = new long[51];\n long?[] mem = new long?[51];\n List ans = new List();\n long Fun(int x)\n {\n if (x == n)\n return 1;\n if (mem[x].HasValue)\n return mem[x].Value;\n long ret = 0;\n for (int i = 1; x + i <= n; i++)\n if (ret + 1.0 * f[i - 1] * Fun(x + i) > MAX)\n ret = MAX;\n else\n ret += f[i - 1] * Fun(x + i);\n return (mem[x] = ret).Value;\n }\n\n void Fun2(int x, long y)\n {\n if (x == n)\n return;\n for (int i = 1; x + i <= n; i++)\n if (y - 1.0 * f[i - 1] * Fun(x + i) < 0)\n {\n long z = Fun(x + i);\n ans.Add(x + i);\n if (i > 1)\n {\n var p = Nth(i - 1, y / z);\n foreach (int v in p)\n ans.Add(v + x);\n }\n Fun2(x + i, y % z);\n return;\n }\n else\n y -= f[i - 1] * Fun(x + i);\n throw new Exception();\n }\n\n int[] Nth(int n, long m)\n {\n var p = Enumerable.Range(1, n).ToList();\n var ret = new int[n];\n for (int i = 0; i < n; i++)\n {\n long f = 1;\n for (int j = 2; j <= n - i - 1; j++)\n f = f * j;\n int d = (int)(m / f);\n ret[i] = p[d];\n p.RemoveAt(d);\n m %= f;\n }\n\n return ret;\n }\n\n void Solve()\n {\n f[0] = 1;\n for (int i = 1; i <= 50; i++)\n if (1.0 * f[i - 1] * i > MAX)\n f[i] = MAX;\n else\n f[i] = f[i - 1] * i;\n\n n = ReadInt(); \n long m = ReadLong() - 1;\n\n Fun2(0, m);\n WriteArray(ans);\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"hull.in\");\n //writer = new StreamWriter(\"hull.out\");\n#endif\n try\n {\n // var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n // thread.Start();\n // thread.Join();\n checked\n {\n new Solver().Solve();\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array)writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "cbe259da9d0dd1913b8f61446ac603f3", "src_uid": "e03c6d3bb8cf9119530668765691a346", "apr_id": "28515f30a32304229dd96e85663281d2", "difficulty": 1900, "tags": ["math", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9915309446254071, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n string[] input = Console.ReadLine().Split(' ');\n int v = Convert.ToInt32(input[0]);\n int e = Convert.ToInt32(input[1]);\n\n bool[,] G = new bool[8, 8];\n\n for(int i = 1; i <= e; ++i)\n {\n input = Console.ReadLine().Split(' ');\n int x = Convert.ToInt32(input[0]);\n int y = Convert.ToInt32(input[1]);\n G[x, y] = true;\n G[y, x] = true;\n }\n\n if(v < 7)\n {\n //无重复\n Console.WriteLine(e.ToString());\n }\n else\n {\n //有\n int delmin = 1000;\n for(int i = 1; i <= 7; ++i)\n {\n //i 和 j 为重复\n for(int j = i + 1; j <= 7; ++j)\n {\n int cnt = 0;\n for(int k = 1; k <= 7; ++k)\n {\n if(G[i, k] && G[j, k])\n {\n cnt++;\n }\n }\n delmin = Math.Min(cnt, delmin);\n }\n }\n Console.WriteLine((v - delmin).ToString());\n }\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "94abc95a015e46f3dbbd00218d8b8905", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "eca84dce8f38b8d234d90fac3fae562c", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5211062590975255, "equal_cnt": 16, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 15, "bug_source_code": "using System;\nusing System.Collections.Generic;\nclass Program\n{\n\tstatic void Main(string[] args)\n\t{\n\t\tstring[] str = Console.ReadLine().Split();\n\t\tint N = int.Parse(str[0]);\n\t\tint M = int.Parse(str[1]);\n\t\tint[,]A = new int[M,2];\n\t\tint[]C = new int[N];\n\t\tfor(var i=0;i[m];\n for (int i = 0; i < m; i++)\n {\n int a = Next() - 1;\n int b = Next() - 1;\n mm[i] = new Tuple(a, b);\n t[a]++;\n t[b]++;\n mask[a] |= (1 << b);\n mask[b] |= (1 << a);\n\n int pa = GP(a);\n int pb = GP(b);\n if (pa != pb)\n {\n p[pa] = pb;\n size2[pb] += 1 + size2[pa];\n size1[pb] += size1[pa];\n }\n else\n {\n size2[pa]++;\n }\n }\n\n int ans = 0;\n for (int i = 0; i < n; i++)\n {\n if (p[i] == i)\n {\n if (size1[i] < 7)\n ans += size2[i];\n else\n {\n int min = 5;\n foreach (var y in mm)\n {\n int r = t[y.Item1] + t[y.Item2] - 1 - (SparseBitcount(mask[y.Item1] | mask[y.Item2]) - 1);\n min = Math.Min(min, Math.Max(0, r));\n }\n\n ans = size2[i] - min;\n break;\n }\n }\n }\n\n\n return ans;\n }\n\n private static int SparseBitcount(int n)\n {\n int count = 0;\n while (n != 0)\n {\n count++;\n n &= (n - 1);\n }\n return count;\n }\n\n\n private static int GP(int i)\n {\n if (i == p[i])\n return i;\n return p[i] = GP(p[i]);\n }\n\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "55b8ba194f8dc74d9d5ceb19d82bbbed", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "4a10c6c7aa1b1977197f0118bc2bf31e", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9137591356847792, "equal_cnt": 13, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 7, "fix_ops_cnt": 12, "bug_source_code": "//#define EXTENDSTACKSIZE\n \nusing System;\n using System.Collections.Generic;\n using System.Globalization;\nusing System.IO;\nusing System.Linq;\n using System.Text;\n using System.Threading;\n \n namespace CF\n{\n internal class Program\n {\n private const int stackSize = 64 * 1024 * 1024;\n \n private static void Run()\n {\n using (var sr = new InputReader(Console.In))\n// using (var sr = new InputReader(new StreamReader(\"input.txt\")))\n using (var sw = Console.Out)\n// using (var sw = new StreamWriter(\"output.txt\"))\n using (var task = new Task(sr, sw)) {\n task.Solve();\n// Console.ReadKey();\n }\n }\n \n private static void Main(string[] args)\n {\n#if EXTENDSTACKSIZE\n var threadStart = new ThreadStart(Run);\n var thread = new Thread(threadStart, stackSize);\n thread.Start();\n thread.Join();\n#else\n Run();\n#endif\n }\n }\n \n internal class Task : IDisposable\n {\n private readonly InputReader sr;\n private readonly TextWriter sw;\n private bool isDispose;\n\n private Graph graph;\n\n private int answ;\n \n public Task(InputReader sr, TextWriter sw)\n {\n this.sr = sr;\n this.sw = sw;\n }\n \n public void Solve()\n {\n var n = sr.NextInt32();\n var m = sr.NextInt32();\n graph = new Graph(n);\n for (var i = 0; i < m; i++)\n {\n graph.Insert(sr.NextInt32() - 1, sr.NextInt32() - 1);\n }\n Solution(-1, new int[n]);\n\n sw.WriteLine(answ);\n }\n\n private void Solution(int k, int[] values)\n {\n if (k + 1 == values.Length)\n {\n var curr = graph.Answer(values);\n// var curr = 0;\n answ = Math.Max(curr, answ);\n }\n else\n {\n k++;\n var candidates = GetCandidates(k, values);\n for (var i = 0; i < candidates.Count; i++)\n {\n values[k] = candidates[i];\n Solution(k, values);\n }\n }\n }\n\n private List GetCandidates(int k, int[] values)\n {\n var inSol = new bool[values.Length];\n for (var i = 0; i < k; i++)\n {\n inSol[values[i]] = true;\n }\n\n var candidates = new List();\n for (var i = 0; i < values.Length; i++)\n {\n if (!inSol[i])\n {\n candidates.Add(i);\n }\n }\n\n return candidates;\n }\n\n public void Dispose()\n {\n Dispose(true);\n GC.SuppressFinalize(this);\n }\n \n private void Dispose(bool disposing)\n {\n if (!isDispose) {\n if (disposing) {\n if(sr != null)\n sr.Dispose();\n \n if(sw != null)\n sw.Dispose();\n }\n \n isDispose = true;\n }\n }\n }\n}\n\nclass Graph\n{\n private readonly List[] edges;\n private int[] values;\n private bool[,] pool = new bool[7, 7];\n\n public Graph(int n)\n {\n edges = new List[n];\n }\n\n public int Answer(int[] values)\n {\n this.values = values;\n for (var i = 0; i < 6; i++)\n {\n for (var j = i; j < 6; j++)\n {\n pool[i, j] = true;\n }\n }\n\n var visited = new bool[edges.Length];\n DfsVisit(0, -1, visited);\n var answ = 0;\n for (var i = 0; i < 6; i++)\n {\n for (var j = i; j < 6; j++)\n {\n if (!pool[i, j])\n {\n answ++;\n }\n }\n }\n\n if (edges.Length == 7)\n {\n var lastVert = 0;\n for (var i = 0; i < edges.Length; i++)\n {\n if (values[i] == 6)\n {\n lastVert = i;\n break;\n }\n }\n\n if (edges[lastVert] != null && edges[lastVert].Count > 0)\n {\n answ++;\n }\n }\n\n return answ;\n }\n\n private void DfsVisit(int v, int parent, bool[] visited)\n {\n visited[v] = true;\n if (edges[v] != null)\n {\n for (var i = 0; i < edges[v].Count; i++)\n {\n if (parent != edges[v][i])\n {\n var value = values[v];\n var uValue = values[edges[v][i]];\n if (pool[value, uValue])\n {\n pool[value, uValue] = false;\n }\n else\n {\n if (pool[uValue, value])\n {\n pool[uValue, value] = false;\n }\n }\n\n if (!visited[edges[v][i]])\n {\n DfsVisit(edges[v][i], v, visited);\n }\n }\n }\n }\n }\n\n public void Insert(int x, int y)\n {\n if (edges[x] == null)\n {\n edges[x] = new List();\n }\n\n edges[x].Add(y);\n if (edges[y] == null)\n {\n edges[y] = new List();\n }\n\n edges[y].Add(x);\n }\n}\n \ninternal class InputReader : IDisposable\n{\n private bool isDispose;\n private readonly TextReader sr;\n private string[] buffer;\n private int seek;\n \n public InputReader(TextReader stream)\n {\n sr = stream;\n }\n \n public void Dispose()\n {\n Dispose(true);\n GC.SuppressFinalize(this);\n }\n \n public string NextString()\n {\n var result = sr.ReadLine();\n return result;\n }\n \n public int NextInt32()\n {\n return Int32.Parse(ReadNextToken());\n }\n \n private string ReadNextToken()\n {\n if (buffer == null || seek == buffer.Length) {\n seek = 0;\n buffer = NextSplitStrings();\n }\n \n return buffer[seek++];\n }\n \n public long NextInt64()\n {\n return Int64.Parse(ReadNextToken());\n }\n \n public int[] ReadArrayOfInt32()\n {\n return ReadArray(Int32.Parse);\n }\n \n public long[] ReadArrayOfInt64()\n {\n return ReadArray(Int64.Parse);\n }\n \n public string[] NextSplitStrings()\n {\n return NextString()\n .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n }\n \n public T[] ReadArray(Func func)\n {\n return NextSplitStrings()\n .Select(s => func(s, CultureInfo.InvariantCulture))\n .ToArray();\n }\n \n public T[] ReadArrayFromString(Func func, string str)\n {\n return\n str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)\n .Select(s => func(s, CultureInfo.InvariantCulture))\n .ToArray();\n }\n \n protected void Dispose(bool dispose)\n {\n if (!isDispose)\n {\n if (dispose)\n sr.Close();\n \n isDispose = true;\n }\n }\n \n ~InputReader()\n {\n Dispose(false);\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "ba43c2c21ed08c343f6de53ad866b84a", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "6f2b3171301dc420844007c2a9810367", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.919187898089172, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp5\n{\n class Program\n {\n static Stack GetBinaryNumber(long number)\n {\n Stack result = new Stack();\n while (number != 0)\n {\n result.Push(number % 2 == 1);\n number /= 2;\n }\n return result;\n }\n static long FastDegree(long number, long pow)\n {\n long result = 1;\n Stack StackPow = GetBinaryNumber(pow);\n while (StackPow.Count != 0)\n {\n result *= result;\n result %= (int)(1e9 + 7);\n if (StackPow.Pop())\n {\n result *= number;\n result %= (int)(1e9 + 7);\n }\n }\n return result;\n }\n\n static int GetCountOne(int number)\n {\n int result = 0;\n while (number != 0)\n {\n if ((number & 1) == 1)\n result++;\n number /= 2;\n }\n return result;\n }\n static void Main(string[] args)\n {\n string[] str = Console.ReadLine().Split();\n int n = int.Parse(str[0]);\n int m = int.Parse(str[1]);\n if (n < 7)\n {\n Console.WriteLine(m);\n }\n else\n {\n List> G = new List>();\n for (int i = 0; i < 7; i++)\n {\n G.Add(new List());\n }\n int temp = m;\n while(temp-- !=0)\n {\n str = Console.ReadLine().Split();\n int first = int.Parse(str[0]) - 1;\n int second = int.Parse(str[1]) - 1;\n G[first].Add(second);\n G[second].Add(first);\n }\n int min = 6;\n for(int i =0; i[] g = new List[n];\n for (int i = 0; i < n; i++)\n {\n g[i] = new List();\n }\n for (int i = 0; i < m; i++)\n {\n var uv = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int u = uv[0], v = uv[1];\n u--;\n v--;\n g[u].Add(v);\n g[v].Add(u);\n }\n\n int max = 0;\n if(n<7)\n {\n max = m;\n }\n for(int i=0;i max) max = temp;\n }\n }\n Console.WriteLine(max);\n Console.Read(); \n }\n }\n}\n// 1 7 11 5\n", "lang": "Mono C#", "bug_code_uid": "09979bf38c6217ce2c214cd4ac45c688", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "c036150a1df722308506c31c239e7580", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9382775119617225, "equal_cnt": 22, "replace_cnt": 17, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing static System.Math;\nusing System.Text;\nusing System.Threading;\nnamespace Program\n{\n public static class CODEFORCES1\n {\n static public int numberOfRandomCases = 0;\n static public void MakeTestCase(List _input, List _output, ref Func _outputChecker)\n {\n }\n static public void Solve()\n {\n var n = NN;\n var m = NN;\n var ab = Repeat(0, m).Select(_ => new { a = NN - 1, b = NN - 1 }).ToArray();\n var path = Repeat(0, n).Select(_ => new List()).ToArray();\n foreach (var item in ab)\n {\n path[item.a].Add(item.b);\n path[item.b].Add(item.a);\n }\n var edgeCount = path.Select(e => e.Count).ToArray();\n var domino = new bool[6, 6];\n for (var i = 0; i < 6; i++)\n {\n for (var j = i; j < 6; j++)\n {\n domino[i, j] = true;\n domino[j, i] = true;\n }\n }\n var ans = 0L;\n var done = new bool[n, n];\n var vtxNumber = new long[n];\n foreach (var vtx in edgeCount.Select((e, i) => new { e, i }).OrderByDescending(e => e.e).Select(e => e.i))\n {\n foreach (var item in ab.Where(e => e.a == vtx || e.b == vtx).OrderByDescending(e =>\n {\n if (e.a == vtx) return edgeCount[e.b];\n else return edgeCount[e.a];\n }))\n {\n if (done[item.a, item.b]) continue;\n done[item.a, item.b] = true;\n done[item.b, item.a] = true;\n var aidx = item.a;\n var bidx = item.b;\n if (bidx == vtx)\n {\n var t = aidx; aidx = bidx; bidx = t;\n\n }\n var a = edgeCount[aidx];\n var b = edgeCount[bidx];\n var found = false;\n {// find\n for (var i = 1; i < 7; i++)\n {\n for (var j = 1; j < 7; j++)\n {\n if (domino[i - 1, j - 1])\n {\n if ((vtxNumber[aidx] == 0 || vtxNumber[aidx] == i) &&\n (vtxNumber[bidx] == 0 || vtxNumber[bidx] == j))\n {\n vtxNumber[aidx] = i;\n vtxNumber[bidx] = j;\n domino[i - 1, j - 1] = false;\n domino[j - 1, i - 1] = false;\n found = true;\n break;\n }\n }\n }\n if (found) break;\n }\n }\n if (found) ++ans;\n }\n }\n Console.WriteLine(ans);\n }\n static public void Main(string[] args) { if (args.Length == 0) { var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); } var t = new Thread(Solve, 134217728); t.Start(); t.Join(); Console.Out.Flush(); }\n static class Console_\n {\n static Queue param = new Queue();\n public static string NextString() { if (param.Count == 0) foreach (var item in Console.ReadLine().Split(' ')) param.Enqueue(item); return param.Dequeue(); }\n }\n static long NN => long.Parse(Console_.NextString());\n static double ND => double.Parse(Console_.NextString());\n static string NS => Console_.NextString();\n static long[] NNList(long N) => Repeat(0, N).Select(_ => NN).ToArray();\n static double[] NDList(long N) => Repeat(0, N).Select(_ => ND).ToArray();\n static string[] NSList(long N) => Repeat(0, N).Select(_ => NS).ToArray();\n static IEnumerable OrderByRand(this IEnumerable x) => x.OrderBy(_ => xorshift);\n static IEnumerable Repeat(T v, long n) => Enumerable.Repeat(v, (int)n);\n static IEnumerable Range(long s, long c) => Enumerable.Range((int)s, (int)c);\n static void RevSort(T[] l) where T : IComparable { Array.Sort(l, (x, y) => y.CompareTo(x)); }\n static void RevSort(T[] l, Comparison comp) where T : IComparable { Array.Sort(l, (x, y) => comp(y, x)); }\n static IEnumerable Primes(long x) { if (x < 2) yield break; yield return 2; var halfx = x / 2; var table = new bool[halfx + 1]; var max = (long)(Math.Sqrt(x) / 2); for (long i = 1; i <= max; ++i) { if (table[i]) continue; var add = 2 * i + 1; yield return add; for (long j = 2 * i * (i + 1); j <= halfx; j += add) table[j] = true; } for (long i = max + 1; i <= halfx; ++i) if (!table[i] && 2 * i + 1 <= x) yield return 2 * i + 1; }\n static IEnumerable Factors(long x) { if (x < 2) yield break; while (x % 2 == 0) { x /= 2; yield return 2; } var max = (long)Math.Sqrt(x); for (long i = 3; i <= max; i += 2) while (x % i == 0) { x /= i; yield return i; } if (x != 1) yield return x; }\n static IEnumerable Divisor(long x) { if (x < 1) yield break; var max = (long)Math.Sqrt(x); for (long i = 1; i <= max; ++i) { if (x % i != 0) continue; yield return i; if (i != x / i) yield return x / i; } }\n static uint xorshift { get { _xsi.MoveNext(); return _xsi.Current; } }\n static IEnumerator _xsi = _xsc();\n static IEnumerator _xsc() { uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff); while (true) { var t = x ^ (x << 11); x = y; y = z; z = w; w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)); yield return w; } }\n static long GCD(long a, long b) { while (b > 0) { var tmp = b; b = a % b; a = tmp; } return a; }\n static long LCM(long a, long b) => a * b / GCD(a, b);\n static Mat Pow(Mat x, long y) => Mat.Pow(x, y);\n static Mod Pow(Mod x, long y) { Mod a = 1; while (y != 0) { if ((y & 1) == 1) a.Mul(x); x.Mul(x); y >>= 1; } return a; }\n static long Pow(long x, long y) { long a = 1; while (y != 0) { if ((y & 1) == 1) a *= x; x *= x; y >>= 1; } return a; }\n static List _fact = new List() { 1 };\n static void _B(long n) { if (n >= _fact.Count) for (int i = _fact.Count; i <= n; ++i) _fact.Add(_fact[i - 1] * i); }\n static long Comb(long n, long k) { _B(n); if (n == 0 && k == 0) return 1; if (n < k || n < 0) return 0; return _fact[(int)n] / _fact[(int)(n - k)] / _fact[(int)k]; }\n static long Perm(long n, long k) { _B(n); if (n == 0 && k == 0) return 1; if (n < k || n < 0) return 0; return _fact[(int)n] / _fact[(int)(n - k)]; }\n static Func Lambda(Func, TR> f) { Func t = () => default(TR); return t = () => f(t); }\n static Func Lambda(Func, TR> f) { Func t = x1 => default(TR); return t = x1 => f(x1, t); }\n static Func Lambda(Func, TR> f) { Func t = (x1, x2) => default(TR); return t = (x1, x2) => f(x1, x2, t); }\n static Func Lambda(Func, TR> f) { Func t = (x1, x2, x3) => default(TR); return t = (x1, x2, x3) => f(x1, x2, x3, t); }\n static Func Lambda(Func, TR> f) { Func t = (x1, x2, x3, x4) => default(TR); return t = (x1, x2, x3, x4) => f(x1, x2, x3, x4, t); }\n static List LCS(T[] s, T[] t) where T : IEquatable { int sl = s.Length, tl = t.Length; var dp = new int[sl + 1, tl + 1]; for (var i = 0; i < sl; i++) for (var j = 0; j < tl; j++) dp[i + 1, j + 1] = s[i].Equals(t[j]) ? dp[i, j] + 1 : Max(dp[i + 1, j], dp[i, j + 1]); { var r = new List(); int i = sl, j = tl; while (i > 0 && j > 0) if (s[--i].Equals(t[--j])) r.Add(s[i]); else if (dp[i, j + 1] > dp[i + 1, j]) ++j; else ++i; r.Reverse(); return r; } }\n static long LIS(T[] array, bool strict) { var l = new List(); foreach (var e in array) { var i = l.BinarySearch(e); if (i < 0) i = ~i; else if (!strict) ++i; if (i == l.Count) l.Add(e); else l[i] = e; } return l.Count; }\n class PQ where T : IComparable\n {\n List h; Comparison c; public T Peek => h[0]; public int Count => h.Count;\n public PQ(int cap, Comparison c, bool asc = true) { h = new List(cap); this.c = asc ? c : (x, y) => c(y, x); }\n public PQ(Comparison c, bool asc = true) { h = new List(); this.c = asc ? c : (x, y) => c(y, x); }\n public PQ(int cap, bool asc = true) : this(cap, (x, y) => x.CompareTo(y), asc) { }\n public PQ(bool asc = true) : this((x, y) => x.CompareTo(y), asc) { }\n public void Push(T v) { var i = h.Count; h.Add(v); while (i > 0) { var ni = (i - 1) / 2; if (c(v, h[ni]) >= 0) break; h[i] = h[ni]; i = ni; } h[i] = v; }\n public T Pop() { var r = h[0]; var v = h[h.Count - 1]; h.RemoveAt(h.Count - 1); if (h.Count == 0) return r; var i = 0; while (i * 2 + 1 < h.Count) { var i1 = i * 2 + 1; var i2 = i * 2 + 2; if (i2 < h.Count && c(h[i1], h[i2]) > 0) i1 = i2; if (c(v, h[i1]) <= 0) break; h[i] = h[i1]; i = i1; } h[i] = v; return r; }\n }\n class PQ where TK : IComparable\n {\n PQ> q; public Tuple Peek => q.Peek; public int Count => q.Count;\n public PQ(int cap, Comparison c, bool asc = true) { q = new PQ>(cap, (x, y) => c(x.Item1, y.Item1), asc); }\n public PQ(Comparison c, bool asc = true) { q = new PQ>((x, y) => c(x.Item1, y.Item1), asc); }\n public PQ(int cap, bool asc = true) : this(cap, (x, y) => x.CompareTo(y), asc) { }\n public PQ(bool asc = true) : this((x, y) => x.CompareTo(y), asc) { }\n public void Push(TK k, TV v) => q.Push(Tuple.Create(k, v));\n public Tuple Pop() => q.Pop();\n }\n public class UF\n {\n long[] d;\n public UF(long s) { d = Repeat(-1L, s).ToArray(); }\n public bool Unite(long x, long y) { x = Root(x); y = Root(y); if (x != y) { if (d[y] < d[x]) { var t = y; y = x; x = t; } d[x] += d[y]; d[y] = x; } return x != y; }\n public bool IsSame(long x, long y) => Root(x) == Root(y);\n public long Root(long x) => d[x] < 0 ? x : d[x] = Root(d[x]);\n public long Count(long x) => -d[Root(x)];\n }\n struct Mod : IEquatable, IEquatable\n {\n static public long _mod = 1000000007; long v;\n public Mod(long x) { if (x < _mod && x >= 0) v = x; else if ((v = x % _mod) < 0) v += _mod; }\n static public implicit operator Mod(long x) => new Mod(x);\n static public implicit operator long(Mod x) => x.v;\n public void Add(Mod x) { if ((v += x.v) >= _mod) v -= _mod; }\n public void Sub(Mod x) { if ((v -= x.v) < 0) v += _mod; }\n public void Mul(Mod x) => v = (v * x.v) % _mod;\n public void Div(Mod x) => v = (v * Inverse(x.v)) % _mod;\n static public Mod operator +(Mod x, Mod y) { var t = x.v + y.v; return t >= _mod ? new Mod { v = t - _mod } : new Mod { v = t }; }\n static public Mod operator -(Mod x, Mod y) { var t = x.v - y.v; return t < 0 ? new Mod { v = t + _mod } : new Mod { v = t }; }\n static public Mod operator *(Mod x, Mod y) => x.v * y.v;\n static public Mod operator /(Mod x, Mod y) => x.v * Inverse(y.v);\n static public bool operator ==(Mod x, Mod y) => x.v == y.v;\n static public bool operator !=(Mod x, Mod y) => x.v != y.v;\n static public long Inverse(long x) { long b = _mod, r = 1, u = 0, t = 0; while (b > 0) { var q = x / b; t = u; u = r - q * u; r = t; t = b; b = x - q * b; x = t; } return r < 0 ? r + _mod : r; }\n public bool Equals(Mod x) => v == x.v;\n public bool Equals(long x) => v == x;\n public override bool Equals(object x) => x == null ? false : Equals((Mod)x);\n public override int GetHashCode() => v.GetHashCode();\n public override string ToString() => v.ToString();\n static List _fact = new List() { 1 };\n static void B(long n) { if (n >= _fact.Count) for (int i = _fact.Count; i <= n; ++i) _fact.Add(_fact[i - 1] * i); }\n static public Mod Comb(long n, long k) { B(n); if (n == 0 && k == 0) return 1; if (n < k || n < 0) return 0; return _fact[(int)n] / _fact[(int)(n - k)] / _fact[(int)k]; }\n static public Mod Perm(long n, long k) { B(n); if (n == 0 && k == 0) return 1; if (n < k || n < 0) return 0; return _fact[(int)n] / _fact[(int)(n - k)]; }\n }\n struct Mat\n {\n T[,] m;\n public Mat(T[,] v) { m = (T[,])v.Clone(); }\n static public implicit operator Mat(T[,] v) => new Mat(v);\n public T this[int r, int c] { get { return m[r, c]; } set { m[r, c] = value; } }\n static public Mat operator +(Mat a, T x) { var tm = (T[,])a.m.Clone(); for (int r = 0; r < tm.GetLength(0); ++r) for (int c = 0; c < tm.GetLength(1); ++c) tm[r, c] += (dynamic)x; return tm; }\n static public Mat operator +(Mat a, Mat b) { var tm = (T[,])a.m.Clone(); for (int r = 0; r < tm.GetLength(0); ++r) for (int c = 0; c < tm.GetLength(1); ++c) tm[r, c] += (dynamic)b[r, c]; return tm; }\n static public Mat operator -(Mat a, T x) { var tm = (T[,])a.m.Clone(); for (int r = 0; r < tm.GetLength(0); ++r) for (int c = 0; c < tm.GetLength(1); ++c) tm[r, c] -= (dynamic)x; return tm; }\n static public Mat operator -(Mat a, Mat b) { var tm = (T[,])a.m.Clone(); for (int r = 0; r < tm.GetLength(0); ++r) for (int c = 0; c < tm.GetLength(1); ++c) tm[r, c] -= (dynamic)b[r, c]; return tm; }\n static public Mat operator *(Mat a, T x) { var tm = (T[,])a.m.Clone(); for (int r = 0; r < tm.GetLength(0); ++r) for (int c = 0; c < tm.GetLength(1); ++c) tm[r, c] *= (dynamic)x; return tm; }\n static public Mat operator *(Mat a, Mat b) { var nr = a.m.GetLength(0); var nc = b.m.GetLength(1); var tm = new T[nr, nc]; for (int i = 0; i < nr; ++i) for (int j = 0; j < nc; ++j) tm[i, j] = (dynamic)0; for (int r = 0; r < nr; ++r) for (int c = 0; c < nc; ++c) for (int i = 0; i < a.m.GetLength(1); ++i) tm[r, c] += a[r, i] * (dynamic)b[i, c]; return tm; }\n static public Mat Pow(Mat x, long y) { var n = x.m.GetLength(0); var t = (Mat)new T[n, n]; for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) t[i, j] = (dynamic)(i == j ? 1 : 0); while (y != 0) { if ((y & 1) == 1) t *= x; x *= x; y >>= 1; } return t; }\n }\n class Tree\n {\n long N; int l; List[] p; int[] d; long[][] pr; long r; Tuple[] e; Tuple[] b; bool lca; bool euler; bool bfs;\n public Tree(List[] p_, long r_) { N = p_.Length; p = p_; r = r_; lca = false; euler = false; }\n public Tuple[] BFSRoot() { if (!bfs) { var nb = new List>(); var q = new Queue(); var d = new bool[N]; nb.Add(Tuple.Create(r, -1L)); d[r] = true; q.Enqueue(r); while (q.Count > 0) { var w = q.Dequeue(); foreach (var i in p[w]) { if (d[i]) continue; d[i] = true; q.Enqueue(i); nb.Add(Tuple.Create(i, w)); } } b = nb.ToArray(); bfs = true; } return b; }\n public Tuple[] BFSLeaf() => BFSRoot().Reverse().ToArray();\n public Tuple[] Euler() { if (!euler) { var ne = new List>(); var s = new Stack>(); var d = new bool[N]; d[r] = true; s.Push(Tuple.Create(r, -1L)); while (s.Count > 0) { var w = s.Peek(); var ad = true; foreach (var i in p[w.Item1]) { if (d[i]) continue; d[i] = true; ad = false; s.Push(Tuple.Create(i, w.Item1)); } if (!ad || p[w.Item1].Count == 1) ne.Add(Tuple.Create(w.Item1, w.Item2, 1)); if (ad) { s.Pop(); ne.Add(Tuple.Create(w.Item1, w.Item2, -1)); } } e = ne.ToArray(); euler = true; } return e; }\n public long LCA(long u, long v) { if (!lca) { l = 0; while (N > (1 << l)) l++; d = new int[N]; pr = Repeat(0, l).Select(_ => new long[N]).ToArray(); d[r] = 0; pr[0][r] = -1; var q = new Stack(); q.Push(r); while (q.Count > 0) { var w = q.Pop(); foreach (var i in p[w]) { if (i == pr[0][w]) continue; q.Push(i); d[i] = d[w] + 1; pr[0][i] = w; } } for (var k = 0; k + 1 < l; k++) for (var w = 0; w < N; w++) if (pr[k][w] < 0) pr[k + 1][w] = -1; else pr[k + 1][w] = pr[k][pr[k][w]]; lca = true; } if (d[u] > d[v]) { var t = u; u = v; v = t; } for (var k = 0; k < l; k++) if ((((d[v] - d[u]) >> k) & 1) != 0) v = pr[k][v]; if (u == v) return u; for (var k = l - 1; k >= 0; k--) if (pr[k][u] != pr[k][v]) { u = pr[k][u]; v = pr[k][v]; } return pr[0][u]; }\n }\n class Graph\n {\n int n; List> pathList; Dictionary[] vtxPath; long INF = (long.MaxValue >> 1) - 1;\n public Graph(long _n)\n {\n n = (int)_n;\n pathList = new List>();\n vtxPath = Repeat(0, n).Select(_ => new Dictionary()).ToArray();\n }\n public void AddPath(long a, long b, long c)\n {\n pathList.Add(Tuple.Create((int)a, (int)b, c));\n vtxPath[a][(int)b] = vtxPath[a].ContainsKey((int)b) ? Min(vtxPath[a][(int)b], c) : c;\n }\n public long[,] WarshallFloyd()\n {\n var ret = new long[n, n];\n for (var i = 0; i < n; i++)\n for (var j = 0; j < n; j++)\n ret[i, j] = vtxPath[i].ContainsKey(j) ? vtxPath[i][j] : INF;\n for (var k = 0; k < n; k++)\n for (var i = 0; i < n; i++)\n for (var j = 0; j < n; j++)\n ret[i, j] = Min(ret[i, j], ret[i, k] + ret[k, j]);\n return ret;\n }\n public Tuple BellmanFord(long s)\n {\n var dist = Repeat(INF, n).ToArray();\n var pred = new int?[n];\n var neg = new bool[n];\n dist[s] = 0;\n for (var i = 1; i < n; i++)\n foreach (var path in pathList)\n if (dist[path.Item2] > (dist[path.Item1] == INF ? INF : dist[path.Item1] + path.Item3))\n {\n dist[path.Item2] = dist[path.Item1] + path.Item3;\n pred[path.Item2] = path.Item1;\n }\n for (var i = 0; i < n; i++)\n foreach (var path in pathList)\n if (dist[path.Item2] > (dist[path.Item1] == INF ? INF : dist[path.Item1] + path.Item3) || neg[path.Item1])\n {\n dist[path.Item2] = dist[path.Item1] + path.Item3;\n neg[path.Item2] = true;\n }\n return Tuple.Create(dist, pred, neg);\n }\n public Tuple Dijkstra(long s)\n {\n var dist = Repeat(long.MaxValue >> 2, n).ToArray();\n var pred = new int?[n];\n dist[s] = 0;\n var q = new PQ();\n q.Push(0, (int)s);\n while (q.Count > 0)\n {\n var u = q.Pop().Item2;\n foreach (var path in vtxPath[u])\n {\n var v = path.Key;\n var alt = dist[u] + path.Value;\n if (dist[v] > alt)\n {\n dist[v] = alt;\n pred[v] = u;\n q.Push(alt, v);\n }\n }\n }\n return Tuple.Create(dist, pred);\n }\n }\n class BT where T : IComparable\n {\n class Node { public Node l; public Node r; public T v; public bool b; public int c; }\n Comparison c; Node r; bool ch; T lm;\n public BT(Comparison _c) { c = _c; }\n public BT() : this((x, y) => x.CompareTo(y)) { }\n bool R(Node n) => n != null && !n.b;\n bool B(Node n) => n != null && n.b;\n long C(Node n) => n?.c ?? 0;\n Node RtL(Node n) { Node m = n.r, t = m.l; m.l = n; n.r = t; n.c -= m.c - (t?.c ?? 0); m.c += n.c - (t?.c ?? 0); return m; }\n Node RtR(Node n) { Node m = n.l, t = m.r; m.r = n; n.l = t; n.c -= m.c - (t?.c ?? 0); m.c += n.c - (t?.c ?? 0); return m; }\n Node RtLR(Node n) { n.l = RtL(n.l); return RtR(n); }\n Node RtRL(Node n) { n.r = RtR(n.r); return RtL(n); }\n public void Add(T x) { r = A(r, x); r.b = true; }\n Node A(Node n, T x) { if (n == null) { ch = true; return new Node() { v = x, c = 1 }; } if (c(x, n.v) < 0) n.l = A(n.l, x); else n.r = A(n.r, x); n.c++; return Bl(n); }\n Node Bl(Node n) { if (!ch) return n; if (!B(n)) return n; if (R(n.l) && R(n.l.l)) { n = RtR(n); n.l.b = true; } else if (R(n.l) && R(n.l.r)) { n = RtLR(n); n.l.b = true; } else if (R(n.r) && R(n.r.l)) { n = RtRL(n); n.r.b = true; } else if (R(n.r) && R(n.r.r)) { n = RtL(n); n.r.b = true; } else ch = false; return n; }\n public void Remove(T x) { r = Rm(r, x); if (r != null) r.b = true; }\n Node Rm(Node n, T x) { if (n == null) { ch = false; return n; } n.c--; var r = c(x, n.v); if (r < 0) { n.l = Rm(n.l, x); return BlL(n); } if (r > 0) { n.r = Rm(n.r, x); return BlR(n); } if (n.l == null) { ch = n.b; return n.r; } n.l = RmM(n.l); n.v = lm; return BlL(n); }\n Node RmM(Node n) { n.c--; if (n.r != null) { n.r = RmM(n.r); return BlR(n); } lm = n.v; ch = n.b; return n.l; }\n Node BlL(Node n) { if (!ch) return n; if (B(n.r) && R(n.r.l)) { var b = n.b; n = RtRL(n); n.b = b; n.l.b = true; ch = false; } else if (B(n.r) && R(n.r.r)) { var b = n.b; n = RtL(n); n.b = b; n.r.b = true; n.l.b = true; ch = false; } else if (B(n.r)) { ch = n.b; n.b = true; n.r.b = false; } else { n = RtL(n); n.b = true; n.l.b = false; n.l = BlL(n.l); ch = false; } return n; }\n Node BlR(Node n) { if (!ch) return n; if (B(n.l) && R(n.l.r)) { var b = n.b; n = RtLR(n); n.b = b; n.r.b = true; ch = false; } else if (B(n.l) && R(n.l.l)) { var b = n.b; n = RtR(n); n.b = b; n.l.b = true; n.r.b = true; ch = false; } else if (B(n.l)) { ch = n.b; n.b = true; n.l.b = false; } else { n = RtR(n); n.b = true; n.r.b = false; n.r = BlR(n.r); ch = false; } return n; }\n public T this[long i] { get { return At(r, i); } }\n T At(Node n, long i) { if (n == null) return default(T); if (n.l == null) if (i == 0) return n.v; else return At(n.r, i - 1); if (n.l.c == i) return n.v; if (n.l.c > i) return At(n.l, i); return At(n.r, i - n.l.c - 1); }\n public bool Have(T x) { var t = FindUpper(x); return t < C(r) && At(r, t).CompareTo(x) == 0; }\n public long FindUpper(T x, bool allowSame = true) => allowSame ? FL(r, x) + 1 : FU(r, x);\n long FU(Node n, T x) { if (n == null) return 0; var r = c(x, n.v); if (r < 0) return FU(n.l, x); return C(n.l) + 1 + FU(n.r, x); }\n public long FindLower(T x, bool allowSame = true) { var t = FL(r, x); if (allowSame) return t + 1 < C(r) && At(r, t + 1).CompareTo(x) == 0 ? t + 1 : t < 0 ? C(r) : t; return t < 0 ? C(r) : t; }\n long FL(Node n, T x) { if (n == null) return -1; var r = c(x, n.v); if (r > 0) return C(n.l) + 1 + FL(n.r, x); return FL(n.l, x); }\n public T Min() { Node n = r, p = null; while (n != null) { p = n; n = n.l; } return p == null ? default(T) : p.v; }\n public T Max() { Node n = r, p = null; while (n != null) { p = n; n = n.r; } return p == null ? default(T) : p.v; }\n public bool Any() => r != null;\n public long Count() => C(r);\n public IEnumerable List() => L(r);\n IEnumerable L(Node n) { if (n == null) yield break; foreach (var i in L(n.l)) yield return i; yield return n.v; foreach (var i in L(n.r)) yield return i; }\n }\n class Dict : Dictionary\n {\n Func d;\n public Dict(Func _d) { d = _d; }\n public Dict() : this(_ => default(V)) { }\n new public V this[K i] { get { V v; return TryGetValue(i, out v) ? v : base[i] = d(i); } set { base[i] = value; } }\n }\n class Deque\n {\n T[] b; int o, c;\n public int Count;\n public T this[int i] { get { return b[gi(i)]; } set { b[gi(i)] = value; } }\n public Deque(int cap = 16) { b = new T[c = cap]; }\n int gi(int i) { if (i >= c) throw new Exception(); var r = o + i; return r >= c ? r - c : r; }\n public void PushFront(T x) { if (Count == c) e(); if (--o < 0) o += b.Length; b[o] = x; ++Count; }\n public T PopFront() { if (Count-- == 0) throw new Exception(); var r = b[o++]; if (o >= c) o -= c; return r; }\n public T Front => b[o];\n public void PushBack(T x) { if (Count == c) e(); var i = o + Count++; b[i >= c ? i - c : i] = x; }\n public T PopBack() { if (Count == 0) throw new Exception(); return b[gi(--Count)]; }\n public T Back => b[gi(Count - 1)];\n void e() { T[] nb = new T[c << 1]; if (o > c - Count) { var l = b.Length - o; Array.Copy(b, o, nb, 0, l); Array.Copy(b, 0, nb, l, Count - l); } else Array.Copy(b, o, nb, 0, Count); b = nb; o = 0; c <<= 1; }\n public void Insert(int i, T x) { if (i > Count) throw new Exception(); this.PushFront(x); for (int j = 0; j < i; j++) this[j] = this[j + 1]; this[i] = x; }\n public T RemoveAt(int i) { if (i < 0 || i >= Count) throw new Exception(); var r = this[i]; for (int j = i; j > 0; j--) this[j] = this[j - 1]; this.PopFront(); return r; }\n }\n class SegTree\n {\n int n; T ti; Func f; T[] dat;\n public SegTree(long _n, T _ti, Func _f) { n = 1; while (n < _n) n <<= 1; ti = _ti; f = _f; dat = Repeat(ti, n << 1).ToArray(); for (var i = n - 1; i > 0; i--) dat[i] = f(dat[(i << 1) | 0], dat[(i << 1) | 1]); }\n public SegTree(List l, T _ti, Func _f) : this(l.Count, _ti, _f) { for (var i = 0; i < l.Count; i++) dat[n + i] = l[i]; for (var i = n - 1; i > 0; i--) dat[i] = f(dat[(i << 1) | 0], dat[(i << 1) | 1]); }\n public void Update(long i, T v) { dat[i += n] = v; while ((i >>= 1) > 0) dat[i] = f(dat[(i << 1) | 0], dat[(i << 1) | 1]); }\n public T Query(long l, long r) { var vl = ti; var vr = ti; for (long li = n + l, ri = n + r; li < ri; li >>= 1, ri >>= 1) { if ((li & 1) == 1) vl = f(vl, dat[li++]); if ((ri & 1) == 1) vr = f(dat[--ri], vr); } return f(vl, vr); }\n public T this[long idx] { get { return dat[idx + n]; } set { Update(idx, value); } }\n }\n class LazySegTree\n {\n int n, height; T ti; E ei; Func f; Func g; Func h; T[] dat; E[] laz;\n public LazySegTree(long _n, T _ti, E _ei, Func _f, Func _g, Func _h) { n = 1; height = 0; while (n < _n) { n <<= 1; ++height; } ti = _ti; ei = _ei; f = _f; g = _g; h = _h; dat = Repeat(ti, n << 1).ToArray(); laz = Repeat(ei, n << 1).ToArray(); for (var i = n - 1; i > 0; i--) dat[i] = f(dat[(i << 1) | 0], dat[(i << 1) | 1]); }\n public LazySegTree(List l, T _ti, E _ei, Func _f, Func _g, Func _h) : this(l.Count, _ti, _ei, _f, _g, _h) { for (var i = 0; i < l.Count; i++) dat[n + i] = l[i]; for (var i = n - 1; i > 0; i--) dat[i] = f(dat[(i << 1) | 0], dat[(i << 1) | 1]); }\n T Reflect(long i) => laz[i].Equals(ei) ? dat[i] : g(dat[i], laz[i]);\n void Eval(long i) { if (laz[i].Equals(ei)) return; laz[(i << 1) | 0] = h(laz[(i << 1) | 0], laz[i]); laz[(i << 1) | 1] = h(laz[(i << 1) | 1], laz[i]); dat[i] = Reflect(i); laz[i] = ei; }\n void Thrust(long i) { for (var j = height; j > 0; j--) Eval(i >> j); }\n void Recalc(long i) { while ((i >>= 1) > 0) dat[i] = f(Reflect((i << 1) | 0), Reflect((i << 1) | 1)); }\n public void Update(long l, long r, E v) { Thrust(l += n); Thrust(r += n - 1); for (long li = l, ri = r + 1; li < ri; li >>= 1, ri >>= 1) { if ((li & 1) == 1) { laz[li] = h(laz[li], v); ++li; } if ((ri & 1) == 1) { --ri; laz[ri] = h(laz[ri], v); } } Recalc(l); Recalc(r); }\n public T Query(long l, long r) { Thrust(l += n); Thrust(r += n - 1); var vl = ti; var vr = ti; for (long li = l, ri = r + 1; li < ri; li >>= 1, ri >>= 1) { if ((li & 1) == 1) vl = f(vl, Reflect(li++)); if ((ri & 1) == 1) vr = f(Reflect(--ri), vr); } return f(vl, vr); }\n public T this[long idx] { get { Thrust(idx += n); return dat[idx] = Reflect(idx); } set { Thrust(idx += n); dat[idx] = value; laz[idx] = ei; Recalc(idx); } }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "6234e408b4708e148a7961370affa163", "src_uid": "11e6559cfb71b8f6ca88242094b17a2b", "apr_id": "e86ce886c8c69747138fd2c78092cc56", "difficulty": 1700, "tags": ["graphs", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9957081545064378, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _630C\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n long sum = 0;\n for (int i = 0; i < n; i++)\n {\n sum +=Convert.ToInt32( Math.Pow(2, i+1));\n }\n Console.WriteLine(sum);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "509a1e6fee9c1de47a71b2cf052fc385", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "7c7b65d75f4e102b922b485eb13eb142", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9816711126409087, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n int Gcd(int a, int b)\n {\n if (b == 0)\n return a;\n return Gcd(b, a % b);\n }\n\n private const int SIEVE_SIZE = 1000010;\n private readonly bool[] isComposite = new bool[SIEVE_SIZE + 1];\n private readonly IList primes = new List();\n void Sieve()\n {\n for (int i = 2; i * i <= SIEVE_SIZE; i++)\n if (!isComposite[i])\n for (int j = i * i; j <= SIEVE_SIZE; j += i)\n isComposite[j] = true;\n for (int i = 2; i <= SIEVE_SIZE; i++)\n if (!isComposite[i])\n primes.Add(i);\n }\n\n public void Solve()\n {\n Sieve();\n\n long a = ReadLong();\n if (a == 1)\n {\n Write(1);\n return;\n }\n var d = new SDictionary { { a, 1 } };\n int ans = 0;\n var ts = DateTime.Now;\n for (int i = 0; i < primes.Count; i++)\n {\n var toAdd = new List>();\n var toRemove = new List();\n foreach (var p in d)\n {\n if (p.Key <= primes[i])\n toRemove.Add(p.Key);\n for (long x = primes[i]; x < p.Key; x *= primes[i])\n if (p.Key % (x + 1) == 0)\n {\n long y = p.Key / (x + 1);\n if (y == 1)\n ans += p.Value;\n else if (y > primes[i] && y % 2 == 0)\n toAdd.Add(Tuple.Create(y, p.Value));\n }\n }\n foreach (int x in toRemove)\n d.Remove(x);\n foreach (var p in toAdd)\n d[p.Item1] += p.Item2;\n }\n //Write((DateTime.Now - ts).TotalMilliseconds);\n\n foreach (var p in d)\n if (p.Key > SIEVE_SIZE)\n {\n long x = p.Key - 1;\n bool ok = true;\n for (int i = 0; ok && 1L * primes[i] * primes[i] <= x; i++)\n if (x % primes[i] == 0)\n ok = false;\n if (ok)\n ans += p.Value;\n }\n\n Write(ans);\n }\n \n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"hull.in\");\n //writer = new StreamWriter(\"hull.out\");\n#endif\n try\n {\n// var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n// thread.Start();\n// thread.Join();\n new Solver().Solve(); \n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() {return reader.ReadLine().Split(new[] { ' ', '\\t', '-' }, StringSplitOptions.RemoveEmptyEntries);}\n public static string ReadToken(){while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine());return currentLineTokens.Dequeue();}\n public static int ReadInt(){return int.Parse(ReadToken());}\n public static long ReadLong(){return long.Parse(ReadToken());}\n public static double ReadDouble(){return double.Parse(ReadToken(), CultureInfo.InvariantCulture);}\n public static int[] ReadIntArray(){return ReadAndSplitLine().Select(int.Parse).ToArray();}\n public static long[] ReadLongArray(){return ReadAndSplitLine().Select(long.Parse).ToArray();}\n public static double[] ReadDoubleArray(){return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();}\n public static int[][] ReadIntMatrix(int numberOfRows){int[][] matrix = new int[numberOfRows][];for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray();return matrix;}\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows){int[][] matrix = ReadIntMatrix(numberOfRows);int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++){ret[i] = new int[numberOfRows];for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i];}return ret;}\n public static string[] ReadLines(int quantity){string[] lines = new string[quantity];for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim();return lines;}\n public static void WriteArray(IEnumerable array){writer.WriteLine(string.Join(\" \", array));}\n public static void Write(params object[] array){WriteArray(array);}\n public static void WriteLines(IEnumerable array){foreach (var a in array)writer.WriteLine(a);}\n private class SDictionary : Dictionary{public new TValue this[TKey key]{\n get { return ContainsKey(key) ? base[key] : default(TValue); }set { base[key] = value; }}}\n private static T[] Init(int size) where T : new(){var ret = new T[size];for (int i = 0; i < size; i++)ret[i] = new T();return ret;}\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "674afe0ab1bb89a11f103e590dc1f1d0", "src_uid": "1f68bd6f8b40e45a5bd360b03a264ef4", "apr_id": "26238458478d6e7f44cffcef4da22226", "difficulty": 2600, "tags": ["dp", "hashing", "dfs and similar", "number theory", "math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7819810851169736, "equal_cnt": 25, "replace_cnt": 15, "delete_cnt": 3, "insert_cnt": 6, "fix_ops_cnt": 24, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n int Gcd(int a, int b)\n {\n if (b == 0)\n return a;\n return Gcd(b, a % b);\n }\n\n private const int SIEVE_SIZE = 1000010;\n private readonly bool[] isComposite = new bool[SIEVE_SIZE + 1];\n private readonly IList primes = new List();\n void Sieve()\n {\n for (int i = 2; i * i <= SIEVE_SIZE; i++)\n if (!isComposite[i])\n for (int j = i * i; j <= SIEVE_SIZE; j += i)\n isComposite[j] = true;\n for (int i = 2; i <= SIEVE_SIZE; i++)\n if (!isComposite[i])\n primes.Add(i);\n }\n\n Dictionary, int> mem = new Dictionary, int>(); \n int Fun(long x, int y)\n {\n if (x == 1)\n return 1;\n var key = Tuple.Create(x, y);\n if (mem.ContainsKey(key))\n {\n Write(\"hit\");\n return mem[key];\n }\n int ret = 0;\n for (int i = y; i < primes.Count && primes[i] < x; i++)\n {\n for (long j = primes[i]; j < x; j *= primes[i])\n if (x % (j + 1) == 0)\n ret += Fun(x / (j + 1), i + 1);\n }\n\n return mem[key] = ret;\n }\n\n public void Solve()\n {\n Sieve();\n\n long a = ReadLong();\n var d = new SDictionary { { a, 1 } };\n int ans = 0;\n for (int i = 0; i < primes.Count; i++)\n {\n var toAdd = new List>();\n var toRemove = new List();\n foreach (var p in d)\n {\n if (p.Key <= primes[i])\n toRemove.Add(p.Key);\n for (long x = primes[i]; x < p.Key; x *= primes[i])\n if (p.Key % (x + 1) == 0)\n {\n long y = p.Key / (x + 1);\n if (y == 1)\n ans += p.Value;\n else if (y > primes[i])\n toAdd.Add(Tuple.Create(p.Key / (x + 1), p.Value));\n }\n }\n foreach (var p in toAdd)\n d[p.Item1] += p.Item2;\n foreach (int x in toRemove)\n d.Remove(x);\n }\n\n foreach (var p in d)\n if (p.Key > SIEVE_SIZE)\n {\n long x = p.Key - 1;\n bool ok = true;\n for (int i = 0; ok && 1L * primes[i] * primes[i] <= x; i++)\n if (x % primes[i] == 0)\n ok = false;\n if (ok)\n ans += p.Value;\n }\n\n Write(ans);\n }\n \n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"hull.in\");\n //writer = new StreamWriter(\"hull.out\");\n#endif\n try\n {\n// var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n// thread.Start();\n// thread.Join();\n new Solver().Solve(); \n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() {return reader.ReadLine().Split(new[] { ' ', '\\t', '-' }, StringSplitOptions.RemoveEmptyEntries);}\n public static string ReadToken(){while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine());return currentLineTokens.Dequeue();}\n public static int ReadInt(){return int.Parse(ReadToken());}\n public static long ReadLong(){return long.Parse(ReadToken());}\n public static double ReadDouble(){return double.Parse(ReadToken(), CultureInfo.InvariantCulture);}\n public static int[] ReadIntArray(){return ReadAndSplitLine().Select(int.Parse).ToArray();}\n public static long[] ReadLongArray(){return ReadAndSplitLine().Select(long.Parse).ToArray();}\n public static double[] ReadDoubleArray(){return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();}\n public static int[][] ReadIntMatrix(int numberOfRows){int[][] matrix = new int[numberOfRows][];for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray();return matrix;}\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows){int[][] matrix = ReadIntMatrix(numberOfRows);int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++){ret[i] = new int[numberOfRows];for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i];}return ret;}\n public static string[] ReadLines(int quantity){string[] lines = new string[quantity];for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim();return lines;}\n public static void WriteArray(IEnumerable array){writer.WriteLine(string.Join(\" \", array));}\n public static void Write(params object[] array){WriteArray(array);}\n public static void WriteLines(IEnumerable array){foreach (var a in array)writer.WriteLine(a);}\n private class SDictionary : Dictionary{public new TValue this[TKey key]{\n get { return ContainsKey(key) ? base[key] : default(TValue); }set { base[key] = value; }}}\n private static T[] Init(int size) where T : new(){var ret = new T[size];for (int i = 0; i < size; i++)ret[i] = new T();return ret;}\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "893359ed061482b442b1615e42324b01", "src_uid": "1f68bd6f8b40e45a5bd360b03a264ef4", "apr_id": "26238458478d6e7f44cffcef4da22226", "difficulty": 2600, "tags": ["dp", "hashing", "dfs and similar", "number theory", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.914906141670482, "equal_cnt": 19, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 6, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Threading;\nusing System.Runtime.CompilerServices;\nusing System.Text;\nusing System.Diagnostics;\nusing System.Numerics;\nusing static System.Console;\nusing static System.Convert;\nusing static System.Math;\nusing static Template;\nusing Pi = Pair;\n\nclass Solver\n{\n public Scanner sc;\n public void Solve()\n {\n int N, M;\n sc.Make(out N, out M);\n var A = sc.ArrInt;\n var L = Create(2, () => new HashSet());\n for(int k = 0; k < 2; k++)\n {\n int[] a;\n if (k == 0) a = A.Take(N / 2).ToArray();\n else a = A.Skip(N / 2).ToArray();\n for(int j = 0; j < (1 << a.Length); j++)\n {\n var sum = 0;\n for (int l = 0; l < a.Length; l++)\n if ((1 & j >> l) == 1) { sum += a[l]; if (sum >= M) sum -= M; }\n L[k].Add(sum);\n }\n }\n var dat = Create(2, id => {\n var r = new int[L[id].Count];\n var now = 0;\n foreach (var d in L[id]) r[now++] = d;\n Array.Sort(r);\n return r;\n });\n var max = 0;\n var idx = 0;\n for(int i = 0; i < dat[0].Length; i++)\n {\n while ((dat[1][(idx + 1) % dat[1].Length] + dat[0][i]) % M > (dat[1][idx] + dat[0][i]) % M)\n {\n idx++;if (idx >= dat[1].Length) idx -= dat[1].Length;\n }\n chmax(ref max, (dat[1][idx] + dat[0][i]) % M);\n }\n Console.WriteLine(max);\n }\n}\n\n#region Template\npublic static class Template\n{\n static void Main(string[] args)\n {\n Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });\n var sol = new Solver() { sc = new Scanner() };\n //var th = new Thread(sol.Solve, 1 << 26);th.Start();th.Join();\n sol.Solve();\n Console.Out.Flush();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmin(ref T a, T b) where T : IComparable { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmax(ref T a, T b) where T : IComparable { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(ref T a, ref T b) { var t = b; b = a; a = t; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(this IList A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }\n public static T[] Create(int n, Func f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }\n public static T[] Create(int n, Func f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }\n public static IEnumerable Shuffle(this IEnumerable A) => A.OrderBy(v => Guid.NewGuid());\n public static int CompareTo(this T[] A, T[] B, Comparison cmp = null) { cmp = cmp ?? Comparer.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }\n public static int MaxElement(this IList A, Comparison cmp = null) { cmp = cmp ?? Comparer.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }\n public static T PopBack(this List A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }\n public static void Fail(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }\n}\npublic class Scanner\n{\n public string Str => Console.ReadLine().Trim();\n public int Int => int.Parse(Str);\n public long Long => long.Parse(Str);\n public double Double => double.Parse(Str);\n public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();\n public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();\n public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());\n public int[] ArrInt1D(int n) => Create(n, () => Int);\n public long[] ArrLong1D(int n) => Create(n, () => Long);\n public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);\n public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);\n private Queue q = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Next() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }\n public void Make(out T1 v1) => v1 = Next();\n public void Make(out T1 v1, out T2 v2) { v1 = Next(); v2 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6, out T7 v7) { Make(out v1, out v2, out v3, out v4, out v5, out v6); v7 = Next(); }\n //public (T1, T2) Make() { Make(out T1 v1, out T2 v2); return (v1, v2); }\n //public (T1, T2, T3) Make() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }\n //public (T1, T2, T3, T4) Make() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }\n}\npublic class Pair : IComparable>\n{\n public T1 v1;\n public T2 v2;\n public Pair() { }\n public Pair(T1 v1, T2 v2)\n { this.v1 = v1; this.v2 = v2; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = Comparer.Default.Compare(v1, p.v1);\n if (c == 0)\n c = Comparer.Default.Compare(v2, p.v2);\n return c;\n }\n public override string ToString() => $\"{v1.ToString()} {v2.ToString()}\";\n public void Deconstruct(out T1 a, out T2 b) { a = v1; b = v2; }\n}\n\npublic class Pair : Pair, IComparable>\n{\n public T3 v3;\n public Pair() : base() { }\n public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)\n { this.v3 = v3; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = base.CompareTo(p);\n if (c == 0)\n c = Comparer.Default.Compare(v3, p.v3);\n return c;\n }\n public override string ToString() => $\"{base.ToString()} {v3.ToString()}\";\n public void Deconstruct(out T1 a, out T2 b, out T3 c) { Deconstruct(out a, out b); c = v3; }\n}\n#endregion\n", "lang": "Mono C#", "bug_code_uid": "e7a7c36c03b698afc0a2e6a45fb10a42", "src_uid": "d3a8a3e69a55936ee33aedd66e5b7f4a", "apr_id": "c969a654f1d5325e9b8f31f26463acba", "difficulty": 1800, "tags": ["divide and conquer", "meet-in-the-middle", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9150480674906808, "equal_cnt": 18, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Threading;\nusing System.Runtime.CompilerServices;\nusing System.Text;\nusing System.Diagnostics;\nusing System.Numerics;\nusing static System.Console;\nusing static System.Convert;\nusing static System.Math;\nusing static Template;\nusing Pi = Pair;\n\nclass Solver\n{\n public Scanner sc;\n public void Solve()\n {\n int N, M;\n sc.Make(out N, out M);\n var A = sc.ArrInt;\n var L = Create(2, () => new HashSet());\n for(int k = 0; k < 2; k++)\n {\n int[] a;\n if (k == 0) a = A.Take(N / 2).ToArray();\n else a = A.Skip(N / 2).ToArray();\n for(int j = 0; j < (1 << a.Length); j++)\n {\n var sum = 0;\n for (int l = 0; l < a.Length; l++)\n if ((1 & j >> l) == 1) { sum += a[l]%M; if (sum >= M) sum -= M; }\n L[k].Add(sum);\n }\n }\n var dat = Create(2, id => {\n var r = new int[L[id].Count];\n var now = 0;\n foreach (var d in L[id]) r[now++] = d;\n Array.Sort(r);\n return r;\n });\n var max = 0;\n var idx = 0;\n for(int i = 0; i < dat[0].Length; i++)\n {\n while ((dat[1][(idx + 1) % dat[1].Length] + dat[0][i]) % M > (dat[1][idx] + dat[0][i]) % M)\n {\n idx++;if (idx >= dat[1].Length) idx -= dat[1].Length;\n }\n chmax(ref max, (dat[1][idx] + dat[0][i]) % M);\n }\n Console.WriteLine(max);\n }\n}\n\n#region Template\npublic static class Template\n{\n static void Main(string[] args)\n {\n Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });\n var sol = new Solver() { sc = new Scanner() };\n //var th = new Thread(sol.Solve, 1 << 26);th.Start();th.Join();\n sol.Solve();\n Console.Out.Flush();\n }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmin(ref T a, T b) where T : IComparable { if (a.CompareTo(b) > 0) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static bool chmax(ref T a, T b) where T : IComparable { if (a.CompareTo(b) < 0) { a = b; return true; } return false; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(ref T a, ref T b) { var t = b; b = a; a = t; }\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static void swap(this IList A, int i, int j) { var t = A[i]; A[i] = A[j]; A[j] = t; }\n public static T[] Create(int n, Func f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(); return rt; }\n public static T[] Create(int n, Func f) { var rt = new T[n]; for (var i = 0; i < rt.Length; ++i) rt[i] = f(i); return rt; }\n public static IEnumerable Shuffle(this IEnumerable A) => A.OrderBy(v => Guid.NewGuid());\n public static int CompareTo(this T[] A, T[] B, Comparison cmp = null) { cmp = cmp ?? Comparer.Default.Compare; for (var i = 0; i < Min(A.Length, B.Length); i++) { int c = cmp(A[i], B[i]); if (c > 0) return 1; else if (c < 0) return -1; } if (A.Length == B.Length) return 0; if (A.Length > B.Length) return 1; else return -1; }\n public static int MaxElement(this IList A, Comparison cmp = null) { cmp = cmp ?? Comparer.Default.Compare; T max = A[0]; int rt = 0; for (int i = 1; i < A.Count; i++) if (cmp(max, A[i]) < 0) { max = A[i]; rt = i; } return rt; }\n public static T PopBack(this List A) { var v = A[A.Count - 1]; A.RemoveAt(A.Count - 1); return v; }\n public static void Fail(T s) { Console.WriteLine(s); Console.Out.Close(); Environment.Exit(0); }\n}\npublic class Scanner\n{\n public string Str => Console.ReadLine().Trim();\n public int Int => int.Parse(Str);\n public long Long => long.Parse(Str);\n public double Double => double.Parse(Str);\n public int[] ArrInt => Str.Split(' ').Select(int.Parse).ToArray();\n public long[] ArrLong => Str.Split(' ').Select(long.Parse).ToArray();\n public char[][] Grid(int n) => Create(n, () => Str.ToCharArray());\n public int[] ArrInt1D(int n) => Create(n, () => Int);\n public long[] ArrLong1D(int n) => Create(n, () => Long);\n public int[][] ArrInt2D(int n) => Create(n, () => ArrInt);\n public long[][] ArrLong2D(int n) => Create(n, () => ArrLong);\n private Queue q = new Queue();\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public T Next() { if (q.Count == 0) foreach (var item in Str.Split(' ')) q.Enqueue(item); return (T)Convert.ChangeType(q.Dequeue(), typeof(T)); }\n public void Make(out T1 v1) => v1 = Next();\n public void Make(out T1 v1, out T2 v2) { v1 = Next(); v2 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3) { Make(out v1, out v2); v3 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4) { Make(out v1, out v2, out v3); v4 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5) { Make(out v1, out v2, out v3, out v4); v5 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6) { Make(out v1, out v2, out v3, out v4, out v5); v6 = Next(); }\n public void Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4, out T5 v5, out T6 v6, out T7 v7) { Make(out v1, out v2, out v3, out v4, out v5, out v6); v7 = Next(); }\n //public (T1, T2) Make() { Make(out T1 v1, out T2 v2); return (v1, v2); }\n //public (T1, T2, T3) Make() { Make(out T1 v1, out T2 v2, out T3 v3); return (v1, v2, v3); }\n //public (T1, T2, T3, T4) Make() { Make(out T1 v1, out T2 v2, out T3 v3, out T4 v4); return (v1, v2, v3, v4); }\n}\npublic class Pair : IComparable>\n{\n public T1 v1;\n public T2 v2;\n public Pair() { }\n public Pair(T1 v1, T2 v2)\n { this.v1 = v1; this.v2 = v2; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = Comparer.Default.Compare(v1, p.v1);\n if (c == 0)\n c = Comparer.Default.Compare(v2, p.v2);\n return c;\n }\n public override string ToString() => $\"{v1.ToString()} {v2.ToString()}\";\n public void Deconstruct(out T1 a, out T2 b) { a = v1; b = v2; }\n}\n\npublic class Pair : Pair, IComparable>\n{\n public T3 v3;\n public Pair() : base() { }\n public Pair(T1 v1, T2 v2, T3 v3) : base(v1, v2)\n { this.v3 = v3; }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public int CompareTo(Pair p)\n {\n var c = base.CompareTo(p);\n if (c == 0)\n c = Comparer.Default.Compare(v3, p.v3);\n return c;\n }\n public override string ToString() => $\"{base.ToString()} {v3.ToString()}\";\n public void Deconstruct(out T1 a, out T2 b, out T3 c) { Deconstruct(out a, out b); c = v3; }\n}\n#endregion\n", "lang": "Mono C#", "bug_code_uid": "1786fad5dcf88279ce36eb81f4c20608", "src_uid": "d3a8a3e69a55936ee33aedd66e5b7f4a", "apr_id": "c969a654f1d5325e9b8f31f26463acba", "difficulty": 1800, "tags": ["divide and conquer", "meet-in-the-middle", "bitmasks"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6861051115910727, "equal_cnt": 20, "replace_cnt": 9, "delete_cnt": 5, "insert_cnt": 5, "fix_ops_cnt": 19, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp2\n{\n class Program\n {\n static void Main(string[] args)\n {\n int t = Convert.ToInt32(Console.ReadLine());\n\n string aa = Console.ReadLine();\n\n char[] array = new char[aa.Length];\n \n int a = aa.Length;\n int b = 0;\n while (b < a)\n {\n array[b] = aa[b];\n b++;\n }\n\n int x = 0;\n int y = 0;\n int z = 0;\n int c = 0;\n while (z < aa.Length)\n {\n //Console.WriteLine(\"fAS\");\n if (array[z] == 'L')\n {\n x--;\n }\n if (array[z] == 'D')\n {\n y--;\n }\n if (array[z] == 'U')\n {\n y++;\n }\n if (array[z] == 'R')\n {\n x++;\n }\n if(x==0&& y == 0)\n {\n c = z + 1;\n }\n z++;\n }\n\n Console.WriteLine(c);\n //Console.ReadLine();\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8bf01b5bbed1a0c9efadacefe522a94a", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "608ff0c8adac7048623115c9a3cc041b", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.762778505897772, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces\n{ \n class B\n { \n static void Main(string[] args)\n { \n int n = int.Parse(Console.ReadLine());\n string s = Console.ReadLine();\n \n int x = 0,y=0,ans=0;\n for(int i=0;iDF[0]+df){\n\t\t\t\t\t\tlimit=(HP[0]+hp)/(AT[1]-(DF[0]+df));\n\t\t\t\t\t\tif((HP[0]+hp)%(AT[1]-(DF[0]+df))==0)limit--;\n\t\t\t\t\t}\n\t\t\t\t\tif(limit<=0)continue;\n\t\t\t\t\tint kill=HP[1]/(AT[0]+at-DF[1]);\n\t\t\t\t\tif(HP[1]%(AT[0]+at-DF[1])!=0)kill++;\n\t\t\t\t\tif(kill>0&& limit>0 && kill<=limit){\n\t\t\t\t\t\tmin=Math.Min(H*hp+A*at+D*df,min);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tConsole.WriteLine(min);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\tint[] HP;\n\tint[] AT;\n\tint[] DF;\n\tint H;int A;int D;\n\tpublic Sol(){\n\t\tHP=new int[2];\n\t\tAT=new int[2];\n\t\tDF=new int[2];\n\t\tvar d=ria();\n\t\tHP[0]=d[0];AT[0]=d[1];DF[0]=d[2];\n\t\td=ria();\n\t\tHP[1]=d[0];AT[1]=d[1];DF[1]=d[2];\n\t\td=ria();\n\t\tH=d[0];A=d[1];D=d[2];\n\t}\n\n\n\n\n\tstatic String rs(){return Console.ReadLine();}\n\tstatic int ri(){return int.Parse(Console.ReadLine());}\n\tstatic long rl(){return long.Parse(Console.ReadLine());}\n\tstatic double rd(){return double.Parse(Console.ReadLine());}\n\tstatic String[] rsa(){return Console.ReadLine().Split(' ');}\n\tstatic int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}\n\tstatic long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}\n\tstatic double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}\n}\n", "lang": "Mono C#", "bug_code_uid": "b462af4793971f9a6f226f7556d889d3", "src_uid": "bf8a133154745e64a547de6f31ddc884", "apr_id": "df4c0ba924fbfac1e574df6b08ca1c99", "difficulty": 1800, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9978104472943384, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\n \nclass TEST{\n\tstatic void Main(){\n\t\tSol mySol =new Sol();\n\t\tmySol.Solve();\n\t}\n}\n\nclass Sol{\n\tpublic void Solve(){\n\t\t\n\t\tint INF=(int)1e9;\n\t\tint min=INF;\n\t\t\n\t\tfor(int hp=0;hp<=210;hp++){\n\t\t\tfor(int at=0;at<=210;at++){\n\t\t\t\tif(AT[0]+at<=DF[1])continue;\n\t\t\t\tfor(int df=0;df<=210;df++){\n\t\t\t\t\tint limit=INF;\n\t\t\t\t\tif(AT[1]>DF[0]+df){\n\t\t\t\t\t\tlimit=(HP[0]+hp)/(AT[1]-(DF[0]+df));\n\t\t\t\t\t\tif((HP[0]+hp)%(AT[1]-(DF[0]+df))==0)limit--;\n\t\t\t\t\t}\n\t\t\t\t\tif(limit<=0)continue;\n\t\t\t\t\tint kill=HP[1]/(AT[0]+at-DF[1]);\n\t\t\t\t\tif(HP[1]%(AT[0]+at-DF[1])!=0)kill++;\n\t\t\t\t\tif(kill>0 limit>0 && kill<=limit){\n\t\t\t\t\t\tmin=Math.Min(H*hp+A*at+D*df,min);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tConsole.WriteLine(min);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\tint[] HP;\n\tint[] AT;\n\tint[] DF;\n\tint H;int A;int D;\n\tpublic Sol(){\n\t\tHP=new int[2];\n\t\tAT=new int[2];\n\t\tDF=new int[2];\n\t\tvar d=ria();\n\t\tHP[0]=d[0];AT[0]=d[1];DF[0]=d[2];\n\t\td=ria();\n\t\tHP[1]=d[0];AT[1]=d[1];DF[1]=d[2];\n\t\td=ria();\n\t\tH=d[0];A=d[1];D=d[2];\n\t}\n\n\n\n\n\tstatic String rs(){return Console.ReadLine();}\n\tstatic int ri(){return int.Parse(Console.ReadLine());}\n\tstatic long rl(){return long.Parse(Console.ReadLine());}\n\tstatic double rd(){return double.Parse(Console.ReadLine());}\n\tstatic String[] rsa(){return Console.ReadLine().Split(' ');}\n\tstatic int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}\n\tstatic long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}\n\tstatic double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}\n}\n", "lang": "Mono C#", "bug_code_uid": "808ebf00d4fba5540efc2115207a5616", "src_uid": "bf8a133154745e64a547de6f31ddc884", "apr_id": "df4c0ba924fbfac1e574df6b08ca1c99", "difficulty": 1800, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9609591146633877, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Task_41C\n{\n class Program\n {\n static void Main(string[] args)\n {\n /*\n string s = Console.ReadLine();\n int sLen = s.Length, atInd = -1;\n for (int i = 1; i < sLen - 3; i++)\n if (s[i] == 'a' && s[i + 1] == 't')\n {\n atInd = i;\n //s.Remove(atInd, 2);\n //s.Insert(atInd, \"@\");\n s = s.Replace(\"at\", \"@\");\n break;\n }\n \n Console.WriteLine(s);\n */\n /* 0123456\n \"abcdatz\" 7\n i\n 01234567\n \"abatatzz\"\n i\n 0123456\n \"ab@atzz\"\n i\n 01234567\n \"abcdedot\" 8\n i\n 012345678910\n \"azzdotdotzz\"\n\n 0123456789\n \"azz.dotzz\"\n */\n StringBuilder builder = new StringBuilder(Console.ReadLine());\n for(int i = 1; i < builder.Length - 2; i++)\n {\n if (builder[i] == 'a' && builder[i + 1] == 't')\n builder.Replace(\"at\", \"@\", i, 2);\n else if (i != builder.Length - 3 && builder.ToString().Substring(i, 3).Equals(\"dot\"))\n builder.Replace(\"dot\", \".\", i, 3);\n }\n\n Console.WriteLine(builder.ToString());\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "034fef2a4b9526989cc1d90fe266b31d", "src_uid": "a11c9679d8e2dca51be17d466202df6e", "apr_id": "19059f848ba620f3995549b0da1a9dab", "difficulty": 1300, "tags": ["implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9991111111111111, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Text;\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n StringBuilder result = new StringBuilder();\n int doggy = input.IndexOf(\"at\", 1), i = 1;\n result.Append(input[i]);\n Writer(result, ref i, doggy, input);\n result.Append('@');\n Writer(result, ref i, input.Length-1, input);\n result.Append(input[input.Length - 1]);\n Console.WriteLine(result.ToString());\n } \n private static void Writer(StringBuilder res, ref int strt, int end, string d)\n {\n for(int b; strt 0)\n {\n email = email.Remove(at, 2);\n email = email.Insert(at, \"@\");\n }\n string domen = email.Substring(at + 1);\n int dotd = domen.LastIndexOf(\"dot\");\n for (int i = 0; i < domen.Length; i++)\n {\n if (dotd < domen.Length)\n domen = domen.Replace(\"dot\", \".\");\n }\n string user = email.Substring(0, at+1);\n for (int i = 0; i < user.Length; i++)\n {\n user = user.Replace(\"dot\", \".\");\n }\n email = user + domen;\n Console.WriteLine(email);\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "29fecbc250910a43206e7ad52dd38a8a", "src_uid": "a11c9679d8e2dca51be17d466202df6e", "apr_id": "b17d5cdd0f82e9e7cbf8be6fdc005b25", "difficulty": 1300, "tags": ["implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8158148505303761, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nclass Program\n{\n\tstatic void Main()\n\t{\n\t\tstring st = Console.ReadLine();\n\t\tst = st.Replace(\"at\", \"@\");\n\t\tst = st.Replace(\"dot\", \".\");\n\n\t\tfor(int i = 0; i < st.Length; i++)\n\t\t{\n\t\t\tif((i == 0 || i == (st.Length - 1)) && st[i] == '.')\n\t\t\t\tConsole.Write(\"dot\");\n\t\t\telse if((i == 0 || i == (st.Length - 1)) && st[i] == '@')\n\t\t\t\tConsole.Write(\"at\");\n\t\t\telse\n\t\t\t\tConsole.Write(st[i]);\n\t\t}\n\t\tConsole.WriteLine();\n\t}\n}\n", "lang": "Mono C#", "bug_code_uid": "3990343b966cf56d28543a2fe619f09b", "src_uid": "a11c9679d8e2dca51be17d466202df6e", "apr_id": "a827c1c2c5a144992e7a5b5200417f68", "difficulty": 1300, "tags": ["implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9175257731958762, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Text;\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n var builder = new StringBuilder(Console.ReadLine());\n for(int i=1; i < builder.Length - 2; i++)\n {\n if (i '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "865a6e2bfd14e37beefd6618161585df", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "47706f04a7a4e55ab52ec5eea3e4e122", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8761785040854808, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace AlgoTraining.Codeforces._8VCVentureCup2016\n{\n\n class FastScanner : StreamReader\n {\n private string[] _line;\n private int _iterator;\n\n public FastScanner(Stream stream) : base(stream)\n {\n _line = null;\n _iterator = 0;\n }\n public int NextInt()\n {\n if (_line == null || _iterator >= _line.Length)\n {\n _line = base.ReadLine().Split(' ');\n _iterator = 0;\n }\n if (_line.Count() == 0) throw new IndexOutOfRangeException(\"Input string is empty\");\n return Convert.ToInt32(_line[_iterator++]);\n }\n public long NextLong()\n {\n if (_line == null || _iterator >= _line.Length)\n {\n _line = base.ReadLine().Split(' ');\n _iterator = 0;\n }\n if (_line.Count() == 0) throw new IndexOutOfRangeException(\"Input string is empty\");\n return Convert.ToInt64(_line[_iterator++]);\n }\n }\n class XorEquationC\n {\n public static void Main(string[] args)\n {\n using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))\n using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))\n {\n long s = fs.NextLong(), x = fs.NextLong();\n if ((s - x) % 2 != 0)\n {\n writer.WriteLine(0);\n return;\n }\n long and = (s - x) / 2;\n string xorStr = Convert.ToString(x, 2), andStr = Convert.ToString(and, 2);\n int onesNum = 0;\n foreach (char c in xorStr)\n {\n if (c == '1') onesNum++;\n }\n writer.WriteLine(Math.Pow(2, onesNum) - (and == 0 ? 2 : 0));\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "9db7a6eb934bcc901553c29dab05e4ad", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "cdda515eedb7cce52514a6f73b8f4fb3", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9458031696341225, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace AlgoTraining.Codeforces._8VCVentureCup2016\n{\n\n class FastScanner : StreamReader\n {\n private string[] _line;\n private int _iterator;\n\n public FastScanner(Stream stream) : base(stream)\n {\n _line = null;\n _iterator = 0;\n }\n public int NextInt()\n {\n if (_line == null || _iterator >= _line.Length)\n {\n _line = base.ReadLine().Split(' ');\n _iterator = 0;\n }\n if (_line.Count() == 0) throw new IndexOutOfRangeException(\"Input string is empty\");\n return Convert.ToInt32(_line[_iterator++]);\n }\n public long NextLong()\n {\n if (_line == null || _iterator >= _line.Length)\n {\n _line = base.ReadLine().Split(' ');\n _iterator = 0;\n }\n if (_line.Count() == 0) throw new IndexOutOfRangeException(\"Input string is empty\");\n return Convert.ToInt64(_line[_iterator++]);\n }\n }\n class XorEquationC\n {\n public static void Main(string[] args)\n {\n using (FastScanner fs = new FastScanner(new BufferedStream(Console.OpenStandardInput())))\n using (StreamWriter writer = new StreamWriter(new BufferedStream(Console.OpenStandardOutput())))\n {\n long s = fs.NextLong(), x = fs.NextLong();\n if (s < x || (s - x) % 2 != 0)\n {\n writer.WriteLine(0);\n return;\n }\n long and = (s - x) / 2;\n string xorStr = Convert.ToString(x, 2), andStr = Convert.ToString(and, 2);\n int onesNum = 0;\n foreach (char c in xorStr)\n {\n if (c == '1') onesNum++;\n }\n int p = xorStr.Length - 1;\n for (int i = andStr.Length - 1; i >= 0; i--, p--)\n {\n if (andStr[i] == '1' && xorStr[p] == '1')\n {\n writer.WriteLine(0);\n return;\n }\n }\n writer.WriteLine(Math.Pow(2, onesNum) - (and == 0 ? 2 : 0));\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "f5231f922b0f6a2e6bf84cf485f29bfa", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "cdda515eedb7cce52514a6f73b8f4fb3", "difficulty": 1700, "tags": ["dp", "math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9989068648885002, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n public void Solve()\n {\n long n = ReadLong();\n long m = ReadLong();\n\n var dp = new long[2];\n dp[0] = 1;\n long p = 1;\n for (int i = 0; p <= n; i++, p <<= 1)\n {\n var ndp = new long[2];\n if ((m >> i & 1) == 1)\n {\n if ((n >> i & 1) == 1)\n {\n ndp[0] = 2 * dp[0];\n }\n else\n {\n ndp[1] = 2 * dp[1];\n }\n }\n else\n {\n if ((n >> i & 1) == 1)\n {\n ndp[0] = dp[1];\n ndp[1] = dp[1];\n }\n else\n {\n ndp[0] = dp[0];\n ndp[1] = dp[0];\n }\n }\n dp = ndp;\n }\n\n if (n == m)\n dp[0] -= 2;\n Write(dp[0]);\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n try\n {\n //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n //thread.Start();\n //thread.Join();\n new Solver().Solve();\n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array)writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "5eaf5c65011734297b0031f6df853340", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "747a596687250c9d2b38709f8015c98b", "difficulty": 1700, "tags": ["dp", "math", "constructive algorithms", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5984251968503937, "equal_cnt": 16, "replace_cnt": 12, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 15, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Linq;\nusing System.Numerics;\n\n\n\n\nnamespace contest\n{\n\n class contest\n {\n\n\n static void Main(string[] args)\n {\n\n\n //int n = int.Parse(Console.ReadLine());\n //var input = Console.ReadLine().Split().Select(int.Parse).ToArray();\n\n //var num = Console.ReadLine().Split().Select(int.Parse).ToArray();\n\n\n\n //int n = int.Parse(Console.ReadLine());\n //var num = Console.ReadLine().Split().Select(int.Parse).ToArray();\n\n\n\n long n = long.Parse(Console.ReadLine());\n\n long count = 0;\n\n bool first = true;\n long tmp = n;\n while (tmp>1)\n {\n count++;\n tmp = (tmp + 1) / 2 ;\n if(first)\n {\n tmp += (n % 2);\n first = false;\n }\n\n }\n\n Console.WriteLine(count);\n\n\n\n //Console.WriteLine(ans.ToString(System.Globalization.CultureInfo.InvariantCulture));\n\n\n\n\n\n\n\n\n\n\n\n }\n\n \n \n\n }\n\n \n \n}\n", "lang": "MS C#", "bug_code_uid": "ad6f13e20dbdc3592aafe6405f5c06bb", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "a6ec973c9e751c9aec035a058efc7573", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9990550704917414, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\n//Гавно код недорешенный\npublic class Source\n{\n public void Program()\n {\n }\n long fib(int x)\n {\n long f1 = 1, f2 = 1, cur = 1;\n for (int i = 3; i <= 1000000; i++)\n { \n f1 = f2;\n f2 = cur;\n cur = f1 + f2;\n if (cur < 0)\n break;\n if (cur >= x)\n return i;\n }\n return -1;\n }\n void Read()\n {\n int x = ri();\n if(x==2)\n {\n writeLine(1);\n return;\n }\n if (x == 3)\n {\n writeLine(2);\n return;\n }\n writeLine(fib(x)-3);\n }\n\n #region hide it\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n var source = new Source();\n source.Read();\n source.Program();\n\n /* try\n {\n new Source().Program();\n }\n catch (Exception ex)\n {\n #if DEBUG\n Console.WriteLine(ex);\n #else\n throw;\n #endif\n }*/\n reader.Close();\n writer.Close();\n }\n\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n public static int ri() { return int.Parse(ReadToken()); }\n public static char ReadChar() { return char.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static ulong ReaduLong() { return ulong.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(i => int.Parse(i)).ToArray(); }\n public static char[] ReadCharArray() { return ReadAndSplitLine().Select(i => char.Parse(i)).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(i => long.Parse(i)).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }\n public static char[][] ReadCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadCharArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }\n return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void write(T value) { writer.Write(value); }\n public static void writeLine(T value) { writer.WriteLine(value); }\n public static void writeArray(T[] array, string split) { for (int i = 0; i < array.Length; i++) { write(array[i] + split); } }\n public static void writeMatrix(T[][] matrix, string split) { for (int i = 0; i < matrix.Length; i++) { writeArray(matrix[i], split); writer.Write(\"\\n\"); } }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }\n #endregion\n\n #region Methods\n #region DSU\n public void MakeSet(int[] poi)\n {\n for (int i = 0; i < poi.Length; i++)\n {\n poi[i] = i;\n }\n }\n public int Find(int x, int[] poi)\n {\n if (poi[x] == x) return x;\n return poi[x] = Find(poi[x], poi);\n }\n Random rand = new Random();\n public void Unite(int x, int y, int[] poi)\n {\n y = Find(y, poi);\n x = Find(x, poi);\n if (rand.Next() % 2 == 0)\n Swap(ref x, ref y);\n poi[x] = y;\n }\n #endregion\n\n class Deque\n {\n T[] array;\n int start, length;\n public Deque()\n {\n start = 0; length = 0; array = new T[1];\n }\n public T this[int index] { get { return array[(start + index) % array.Length]; } set { array[(start + index) % array.Length] = value; } }\n int last { get { return (start + length) % array.Length; } }\n /// \n /// сÑâ€Ã\n /// \n public T PeekFirst()\n {\n return array[start];\n }\n public int Count { get { return length; } }\n /// \n /// конецбез удаления\n /// \n public T PeekLsat()\n {\n return array[last];\n }\n public T PopLast()\n {\n if (length == 0)\n throw new IndexOutOfRangeException(\"OutOfRange\");\n length--;\n return array[last];\n }\n public T PopFirst()\n {\n if (length == 0)\n throw new IndexOutOfRangeException(\"OutOfRange\");\n length--;\n if (start >= array.Length - 1) start = 0; else start++;\n return array[start - 1 < 0 ? array.Length - 1 : start - 1];\n }\n public void AddFirst(T value)\n {\n IncreaseAndInspection();\n if (start <= 0) start = array.Length - 1; else start--;\n array[start] = value;\n length++;\n }\n public void AddLast(T value)\n {\n IncreaseAndInspection();\n array[last] = value;\n length++;\n }\n bool overflow { get { return length == array.Length; } }\n void IncreaseAndInspection()\n {\n if (overflow)\n increase();\n\n }\n void increase()\n {\n T[] array2 = new T[array.Length * 2];\n for (int i = 0; i < array.Length; i++)\n {\n int pos = (start + i) % array.Length;\n array2[i] = array[pos];\n }\n array = array2;\n start = 0;\n array2 = null;\n }\n public void Clear()\n {\n start = 0; length = 0; array = new T[1];\n }\n }\n class Heap\n {\n Comparison ic;\n List storage = new List();\n public Heap(Comparison ic)\n {\n this.ic = ic;\n }\n public void Add(T element)\n {\n storage.Add(element);\n int pos = storage.Count - 1;\n while (pos != 0 && ic(storage[((int)(pos - 1) >> 1)], element) > 0)\n {\n Swap(storage, pos, ((int)(pos - 1) / 2));\n pos = ((int)(pos - 1) / 2);\n }\n }\n public T Pop()\n {\n T t = storage[0];\n Swap(storage, 0, storage.Count - 1);\n int pos = 0;\n storage.RemoveAt(storage.Count - 1);\n if (Count > 0)\n while (true)\n {\n T my = storage[pos];\n if (pos * 2 + 1 >= Count)\n break;\n T left = storage[pos * 2 + 1];\n if (pos * 2 + 2 >= Count)\n {\n if (ic(left, my) < 0)\n {\n Swap(storage, pos, pos * 2 + 1);\n pos = pos * 2 + 1;\n }\n break;\n }\n T right = storage[pos * 2 + 2];\n if (ic(left, my) < 0 || ic(right, my) < 0)\n {\n if (ic(left, right) < 0)\n {\n Swap(storage, pos, pos * 2 + 1);\n pos = pos * 2 + 1;\n }\n else\n {\n\n Swap(storage, pos, pos * 2 + 2);\n pos = pos * 2 + 2;\n }\n }\n else break;\n }\n return t;\n }\n\n public void Clear()\n {\n storage.Clear();\n }\n /// \n /// без удаления\n /// \n /// \n public T Peek()\n {\n return storage[0];\n }\n public int Count\n {\n get { return storage.Count; }\n }\n //void RemoveLast, Size, peeklast, add\n }\n static void Swap(ref T lhs, ref T rhs)\n {\n T temp;\n temp = lhs;\n lhs = rhs;\n rhs = temp;\n }\n static void Swap(T[] a, int l, int r)\n {\n T temp;\n temp = a[l];\n a[l] = a[r];\n a[r] = temp;\n }\n static void Swap(List a, int l, int r)\n {\n T temp;\n temp = a[l];\n a[l] = a[r];\n a[r] = temp;\n }\n\n bool outregion(long y, long x, long n, long m)\n {\n if (x < 0 || x >= m || y < 0 || y >= n)\n return true;\n return false;\n }\n static void initlist(ref List[] list, int n)\n {\n list = new List[n];\n for (int i = 0; i < n; i++)\n list[i] = new List();\n }\n static void newarray(ref T[][] array, int n, int m)\n {\n array = new T[n][];\n for (int i = 0; i < n; i++)\n array[i] = new T[m];\n }\n static void newarray(ref T[] array, int n)\n {\n array = new T[n];\n }\n static void fill(T[] array, T value)\n {\n for (int i = 0; i < array.Length; i++)\n array[i] = value;\n }\n static void fill(T[][] array, T value)\n {\n for (int i = 0; i < array.Length; i++)\n for (int j = 0; j < array[i].Length; j++)\n array[i][j] = value;\n }\n public bool NextPermutation(T[] b, Comparison ic)\n {\n for (int j = b.Length - 2; j >= 0; j--)\n {\n if (ic(b[j], b[j + 1]) < 0)\n {\n for (int l = b.Length - 1; l >= 0; l--)\n {\n if (ic(b[l], b[j]) > 0)\n {\n Swap(b, j, l);\n Array.Reverse(b, j + 1, b.Length - (j + 1));\n return true;\n }\n }\n }\n }\n return false;\n }\n int[,] step8 = new int[,]\n {\n {-1,0 },\n {1,0 },\n {0,-1 },\n {0,1 },\n {1,1 },\n {-1,1 },\n {-1,-1 },\n {1,-1 },\n };\n int[,] step4 = new int[,]\n {\n {-1,0 },\n {1,0 },\n {0,-1 },\n {0,1 },\n };\n struct Vector2\n {\n public double x;\n public double y;\n public Vector2(double x, double y)\n {\n this.x = x;\n this.y = y;\n }\n public double Dist(Vector2 to)\n {\n return Math.Sqrt(Math.Abs(Math.Pow(to.x - x, 2)) + Math.Abs(Math.Pow(to.y - y, 2)));\n }\n public static bool operator ==(Vector2 left, Vector2 right) { return left.x == right.x && left.y == right.y; }\n public static bool operator !=(Vector2 left, Vector2 right) { return left.x != right.x || left.y != right.y; }\n }\n #endregion\n #endregion\n\n }", "lang": "MS C#", "bug_code_uid": "d02b1a122cd7b71bdc796cf2b769ed39", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "6c73fa060888b7d228c4790d01311728", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9553485823859745, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nclass Program\n{\n static void Main(string[] args)\n {\n long n = RL();\n Console.Write(1 + Solve(n - 2, 0));\n }\n\n private static long Solve(long x1, long x2)\n {\n if (x1 == 0) return 0;\n if (x1 == 1) return 1;\n\n if (x2 == 0)\n {\n x1--;\n return 1 + Solve(x1 / 2, x1 % 2);\n }\n\n if (x2 == 1)\n {\n x1--;\n x1--;\n return 1 + Solve(1 + (x1 / 2), x1 % 2);\n }\n\n return 0;\n }\n\n private const int Mod = 1000000000 + 7;\n\n #region Data Read\n private static char ReadSign()\n {\n while (true)\n {\n int ans = consoleReader.Read();\n if (ans == '+' || ans == '-' || ans == '?')\n return (char)ans;\n }\n }\n\n private static long GCD(long a, long b)\n {\n if (a % b == 0) return b;\n return GCD(b, a % b);\n }\n\n private static List[] ReadGraph(int n, int m)\n {\n List[] g = new List[n];\n for (int i = 0; i < g.Length; i++) g[i] = new List();\n for (int i = 0; i < m; i++)\n {\n int a = RI() - 1;\n int b = RI() - 1;\n\n g[a].Add(b);\n g[b].Add(a);\n }\n\n return g;\n }\n\n private static int[,] ReadGraphAsMatrix(int n, int m)\n {\n int[,] matrix = new int[n + 1, n + 1];\n for (int i = 0; i < m; i++)\n {\n int a = RI();\n int b = RI();\n matrix[a, b] = matrix[b, a] = 1;\n }\n\n return matrix;\n }\n\n private static void Sort(ref int a, ref int b)\n {\n if (a > b) Swap(ref a, ref b);\n }\n\n private static void Swap(ref int a, ref int b)\n {\n int tmp = a;\n a = b;\n b = tmp;\n }\n\n private const int BufferSize = 1 << 16;\n private static StreamReader consoleReader;\n private static MemoryStream testData;\n\n private static int RI()\n {\n int ans = 0;\n int mul = 1;\n do\n {\n ans = consoleReader.Read();\n if (ans == -1)\n return 0;\n if (ans == '-') mul = -1;\n } while (ans < '0' || ans > '9');\n\n ans -= '0';\n while (true)\n {\n int chr = consoleReader.Read();\n if (chr < '0' || chr > '9')\n return ans * mul;\n ans = ans * 10 + chr - '0';\n }\n }\n\n private static ulong RUL()\n {\n ulong ans = 0;\n int chr;\n do\n {\n chr = consoleReader.Read();\n if (chr == -1)\n return 0;\n } while (chr < '0' || chr > '9');\n\n ans = (uint)(chr - '0');\n while (true)\n {\n chr = consoleReader.Read();\n if (chr < '0' || chr > '9')\n return ans;\n ans = ans * 10 + (uint)(chr - '0');\n }\n }\n\n private static long RL()\n {\n long ans = 0;\n int mul = 1;\n do\n {\n ans = consoleReader.Read();\n if (ans == -1)\n return 0;\n if (ans == '-') mul = -1;\n } while (ans < '0' || ans > '9');\n\n ans -= '0';\n while (true)\n {\n int chr = consoleReader.Read();\n if (chr < '0' || chr > '9')\n return ans * mul;\n ans = ans * 10 + chr - '0';\n }\n }\n\n private static int[] RIA(int n)\n {\n int[] ans = new int[n];\n for (int i = 0; i < n; i++)\n ans[i] = RI();\n return ans;\n }\n\n private static long[] RLA(int n)\n {\n long[] ans = new long[n];\n for (int i = 0; i < n; i++)\n ans[i] = RL();\n return ans;\n }\n\n private static char[] ReadWord()\n {\n int ans;\n\n do\n {\n ans = consoleReader.Read();\n } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));\n\n List s = new List();\n do\n {\n s.Add((char)ans);\n ans = consoleReader.Read();\n } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));\n\n return s.ToArray();\n }\n\n private static char[] ReadString(int n)\n {\n int ans;\n\n do\n {\n ans = consoleReader.Read();\n } while (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')));\n\n char[] s = new char[n];\n int pos = 0;\n do\n {\n s[pos++] = (char)ans;\n if (pos == n) break;\n ans = consoleReader.Read();\n } while ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'));\n\n return s;\n }\n\n private static char[] ReadStringLine()\n {\n int ans;\n\n do\n {\n ans = consoleReader.Read();\n } while (ans == 10 || ans == 13);\n\n List s = new List();\n\n do\n {\n s.Add((char)ans);\n ans = consoleReader.Read();\n } while (ans != 10 && ans != 13);\n\n return s.ToArray();\n }\n\n private static char ReadLetter()\n {\n while (true)\n {\n int ans = consoleReader.Read();\n if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))\n return (char)ans;\n }\n }\n private static char ReadNonLetter()\n {\n while (true)\n {\n int ans = consoleReader.Read();\n if (!((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z')))\n return (char)ans;\n }\n }\n\n private static char ReadAnyOf(IEnumerable allowed)\n {\n while (true)\n {\n char ans = (char)consoleReader.Read();\n if (allowed.Contains(ans))\n return ans;\n }\n }\n\n private static char ReadDigit()\n {\n while (true)\n {\n int ans = consoleReader.Read();\n if (ans >= '0' && ans <= '9')\n return (char)ans;\n }\n }\n\n private static int ReadDigitInt()\n {\n return ReadDigit() - (int)'0';\n }\n\n private static char ReadAnyChar()\n {\n return (char)consoleReader.Read();\n }\n\n private static string DoubleToString(double x)\n {\n return x.ToString(CultureInfo.InvariantCulture);\n }\n\n private static double DoubleFromString(string x)\n {\n return double.Parse(x, CultureInfo.InvariantCulture);\n }\n\n static Program()\n {\n //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;\n consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);\n }\n\n private static void PushTestData(StringBuilder sb)\n {\n PushTestData(sb.ToString());\n }\n private static void PushTestData(string data)\n {\n#if TOLYAN_TEST\n if (testData == null)\n {\n testData = new MemoryStream();\n consoleReader = new StreamReader(testData);\n }\n\n var pos = testData.Position;\n var bytes = Encoding.UTF8.GetBytes(data);\n testData.Write(bytes, 0, bytes.Length);\n testData.Flush();\n testData.Position = pos;\n#endif\n }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "030437c8dbf8ed9222a106e4ed28c49b", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "a63f4622d1ede239b1d07bc15cfcc6cd", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7815596725549332, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Hack\n{\n\n class Program\n {\n static int Gcd (int a , int b)\n {\n if (b == 0) return a;\n return Gcd(b, a % b);\n }\n static int Lcm (int a , int b)\n {\n return (a * b) / Gcd(a, b);\n }\n\n static void Main(string[] args)\n {\n // Console.ForegroundColor = ConsoleColor.Green;\n string[] s = Console.ReadLine().Split(' ');\n int x = int.Parse(s[0]), y = int.Parse(s[1]), a = int.Parse(s[2]), b = int.Parse(s[3]);\n int k = Lcm(x, y);\n int count = 0;\n for (; a <= b; a++)\n {\n if (a % k == 0)\n count++;\n }\n Console.WriteLine(count);\n // Console.ResetColor();\n }\n \n }\n}\n", "lang": "MS C#", "bug_code_uid": "ddbf0f50ecb4d6cc74948359a583312d", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "960f376a4a398d3a284ac1bc9e49b50c", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.901113736078299, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\n\nnamespace FixedPoints\n{\n class TheWall\n {\n static void Main(string[] args)\n {\n int ou = 0;\n int[] num = new int[4];\n string input = Console.ReadLine();\n string[] inarr = input.Split(' ');\n\n for (int x = 0; x < 4; x++)\n {\n num[x] = int.Parse(inarr[x]);\n }\n\n if (num[0] <= num[3] && num[1] <= num[3])\n {\n int multi = num[0] * num[1];\n int max = 0, min = 0;\n\n if (num[0] > num[1])\n {\n max = num[0];\n min = num[1];\n }\n else if (num[1] > num[0])\n {\n max = num[1];\n min = num[0];\n }\n else\n {\n max = num[0];\n min = num[0];\n }\n\n int counter = 1;\n int lcm = max;\n while (lcm % min != 0 && min != max)\n {\n lcm = max * counter;\n counter++;\n }\n\n int temp = lcm;\n counter = 2;\n while (temp <= num[3])\n {\n if (temp >= num[2])\n ou++;\n temp = lcm * counter;\n counter++;\n }\n }\n Console.WriteLine(ou);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "985f8200820002b1a78ea132cc40b7fe", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "73c466b6e03ed78637b1d68d71e8cad2", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8190675017397355, "equal_cnt": 13, "replace_cnt": 6, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\n\nnamespace FixedPoints\n{\n class TheWall\n {\n static void Main(string[] args)\n {\n int output = 0;\n int[] num = new int[4];\n string input = Console.ReadLine();\n string[] inarr = input.Split(' ');\n\n for (int x = 0; x < 4; x++)\n {\n num[x] = int.Parse(inarr[x]);\n }\n\n if (num[0] <= num[3] && num[1] <= num[3])\n {\n int multi = num[0] * num[1];\n int max = 0, min = 0;\n\n if (num[0] > num[1])\n {\n max = num[0];\n min = num[1];\n }\n else if (num[1] > num[0])\n {\n max = num[1];\n min = num[0];\n }\n\n int counter = 1;\n int lcm = min;\n while (lcm % min != 0 || lcm == min)\n {\n lcm = max * counter;\n counter++;\n }\n int temp = lcm;\n int ou = 0;\n counter = 2;\n while (temp <= num[3])\n {\n if (temp >= num[2])\n ou++;\n temp = lcm * counter;\n counter++;\n }\n\n Console.WriteLine(ou);\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "e7525fb0a7b0432a682a6e31b6119afd", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "73c466b6e03ed78637b1d68d71e8cad2", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8072880168185004, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections;\nusing System.IO;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Op\n{\n class Program\n { \n public static int Main(string[] args)\n { \n string[] line =Console.ReadLine().Split();\n long x,y,a,b,ans=0;\n x=long.Parse(line[0]);\n y=long.Parse(line[1]);\n a=long.Parse(line[2]);\n b=long.Parse(line[3]);\n for(long i=a;i<=b;i++){\n if (i%x==0&&i%y==0) {ans++; }\n }\n Console.WriteLine(ans);\n //Console.ReadKey();\n return 0;\n }\n }\n }", "lang": "MS C#", "bug_code_uid": "cf25279f4df786e8eb7e754b5f7f67d5", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "22ea11cfa08c7961da23c03c5858ba11", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.25443786982248523, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\nclass Program\n{\n static void Main(string[] args)\n {\n var _ = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int x = _[0], y = _[1], a = _[2], b = _[3];\n var ans = new HashSet();\n int c = 0;\n for (int i = (int)Math.Ceiling(a / (double)x) * x, j = (int)Math.Ceiling(a / (double)y) * y;\n i <= b || j <= b; i += x, j += y)\n {\n if (!ans.Contains(i))\n {\n ans.Add(i);\n }\n else\n {\n c++;\n }\n if (!ans.Contains(j))\n {\n ans.Add(j);\n }\n else\n {\n c++;\n }\n }\n Console.WriteLine(c);\n }\n}", "lang": "MS C#", "bug_code_uid": "c45dbba40305fb0121f1e60e8b3e26fa", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "2672c6e449692f4a961d4188e0c17ba6", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.48929032258064514, "equal_cnt": 39, "replace_cnt": 30, "delete_cnt": 3, "insert_cnt": 6, "fix_ops_cnt": 39, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _340A_The_Wall\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] str = Console.ReadLine().Split();\n int x = int.Parse(str[0]);\n int y = int.Parse(str[1]);\n long a = long.Parse(str[2]);\n long b = long.Parse(str[3]);\n List lijst_x_y = new List();\n int divisor = GCD(x, y);\n long brick = divisor;\n\n while (brick < a)\n brick += divisor;\n\n while (brick >= a && brick <= b)\n {\n if (brick % x == 0 && brick % y == 0)\n {\n lijst_x_y.Add(brick);\n }\n\n brick += divisor;\n }\n\n Console.WriteLine(lijst_x_y.Count());\n\n }\n\n static int GCD(int x, int y)\n {\n if (x == 1 || y == 1)\n return 1;\n else if (x % 2 == 0 && y % 2 == 0)\n return 2 * GCD(x / 2, y / 2);\n else if (x % 2 == 0)\n return GCD(x / 2, y);\n else if (y % 2 == 0)\n return GCD(x, y / 2);\n else\n return GCD((int)Math.Abs(x - y), (int)Math.Min(x, y));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "2c8cda6a8690e0bdbefad62facd980a2", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "963d3161d8bb0927a78a778ca4aeaa57", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8372416995588576, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _340A_The_Wall\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] str = Console.ReadLine().Split();\n int x = int.Parse(str[0]);\n int y = int.Parse(str[1]);\n long a = long.Parse(str[2]);\n long b = long.Parse(str[3]);\n int counter = 0;\n int Colour = x * y / Stein_GCD(x, y);\n long brick = Colour;\n\n while (brick < a)\n brick += Colour;\n\n while (brick >= a && brick <= b)\n {\n counter++;\n brick += Colour;\n }\n\n Console.WriteLine(counter);\n }\n\n static int Euclid_GCD(int a, int b)\n {\n if (a == 0)\n return b;\n else\n {\n while (a != 0 && b != 0)\n {\n while (a >= b)\n a -= b;\n while (b >= a && a != 0)\n b -= a;\n }\n\n return Math.Max(a, b);\n }\n }\n\n static int Stein_GCD(int a, int b)\n {\n if (a == 0)\n return b;\n else if (b == 0)\n return a;\n else\n {\n if (a % 2 == 0 && b % 2 == 0)\n return 2 * Stein_GCD(a / 2, b / 2);\n else if (a % 2 == 0)\n return Stein_GCD(a / 2, b);\n else if (b % 2 == 0)\n return Stein_GCD(a, b / 2);\n else\n return Stein_GCD((int)Math.Abs(a - b), Math.Min(a, b));\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "cf02fe775e463437d72581260bf63095", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "963d3161d8bb0927a78a778ca4aeaa57", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9992641648270787, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.IO;\nusing System.Linq;\n\nclass Program\n{\n static char[] SPACE = new[] { ' ' };\n\n static void Main(string[] args)\n {\n#if DEBUG\n using (var input = new StreamReader(\"input.txt\"))\n using (var output = new StreamWriter(\"output.txt\"))\n {\n Console.SetIn(input);\n Console.SetOut(output);\n\n int n = 0;\n do\n {\n Console.WriteLine();\n Console.WriteLine(\"Sample {0}\", ++n);\n Prog();\n } while (Console.ReadLine() == string.Empty);\n }\n#else\n Prog();\n#endif\n }\n\n static int __ptr = 0;\n static string[] __input;\n static int NextInt()\n {\n return int.Parse(__input[__ptr++]);\n }\n static long NextLong()\n {\n return long.Parse(__input[__ptr++]);\n }\n static void ReadTokens(int n)\n {\n __ptr = 0;\n __input = Console.ReadLine().Split(SPACE, n);\n }\n\n //\n\n static void Prog()\n {\n ReadTokens(1);\n int n = NextInt();\n var s = Console.ReadLine();\n\n int FS = 0, SF = 0;\n for (int i = 0; i < n - 1; i++)\n {\n if (s[i] == 'F' && s[i + 1] == 'S') SF++;\n else if (s[i] == 'S' && s[i + 1] == 'F') SF++;\n }\n\n Console.WriteLine(SF > FS ? \"YES\" : \"NO\");\n }\n}", "lang": "MS C#", "bug_code_uid": "e46d85aaa9b77984e629309d533a171d", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "c22ff20d8252a3530286adf32563a44d", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9985815602836879, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace example\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n String str = Console.ReadLine();\n int countF = 0;\n int countS = 0;\n for(int i=0;i list = new List{x1,x2,x3};\n var sorted = SortMerge(list);\n Console.WriteLine(Friend(sorted));\n }\n \n static int Friend(List list)\n {\n return list.Last() - list.First();\n }\n static List SortMerge(List list)\n {\n if (list.Count <= 1) return list;\n List left = new List();\n List right = new List();\n \n for (int i = 0; i < list.Count / 2; i++)\n {\n left.Add(list[i]);\n }\n \n for (int i = list.Count / 2; i < list.Count; i++)\n {\n right.Add(list[i]);\n }\n \n left = SortMerge(left);\n right = SortMerge(right);\n return Merge(left, right);\n }\n \n static List Merge(List left, List right)\n {\n List merged = new List();\n while (left.Count > 0 || right.Count > 0)\n {\n if (left.Count > 0 && right.Count > 0)\n {\n if (left.First() <= right.First())\n {\n merged.Add(left.First());\n left.Remove(left.First());\n }\n else\n {\n merged.Add(right.First());\n right.Remove(right.First());\n }\n }\n else if (left.Count > 0)\n {\n merged.Add(left.First());\n left.Remove(left.First());\n }\n else if (right.Count > 0)\n {\n merged.Add(right.First());\n right.Remove(right.First());\n }\n }\n return merged;\n }\n \n }\n}", "lang": "Mono C#", "bug_code_uid": "b6b2d53ccdfe4c5df5c50affb2a28ec4", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "e502e46818c4e7e8c30e99a3b5983f45", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.22629073599414135, "equal_cnt": 18, "replace_cnt": 13, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace SortingProblems\n{\n class Program\n {\n static void Main(string[] args)\n {\n List list = new List();\n int length = Convert.ToInt32(Console.ReadLine());\n for (int i = 0; i < length; i++)\n {\n list.Add(Convert.ToInt32(Console.ReadLine()));\n }\n list.Sort();\n Console.WriteLine(Friend(list));\n \n }\n} }", "lang": "Mono C#", "bug_code_uid": "bf4e57c6d172f0f65546152e20ce6388", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "e502e46818c4e7e8c30e99a3b5983f45", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9624615384615385, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace SortingAlgorithms\n{\n class Program\n {\n static void Main(string[] args)\n {\n FriendMeeting();\n }\n public void FriendMeeting()\n {\n int count;\n int[] arr = Array.ConvertAll(Console.ReadLine().Split(' '), arrTemp => Convert.ToInt32(arrTemp));\n for (int i = 1; i < arr.Length; i++)\n {\n int next = arr[i];\n int j = i - 1;\n while (j >= 0 && arr[j] > next)\n {\n arr[j + 1] = arr[j];\n --j;\n }\n\n arr[j + 1] = next;\n }\n\n count = (arr[2] - arr[1]) + (arr[1] - arr[0]);\n Console.WriteLine(count);\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "64d0150c72f35ceb030b3811ff0029a0", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "3f30ec649508c4b8699866bc38190dbd", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9287305122494433, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Diagnostics;\nusing System.Runtime.InteropServices;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int a;\n String b;\n a =int.Parse(b);\n Console.WriteLine(a);\n if ((a>2) && ((a - 2) % 2 == 0))\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "431ea82df4a863c0e318f05fe09d6235", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ff467ab13a78cc7cceb0d9d61af27e83", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7707129094412332, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "static void Main(string[] args)\n {\n int w = Int32.Parse(Console.ReadLine());\n if (w % 2 == 0) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n Console.ReadKey();\n\n }", "lang": ".NET Core C#", "bug_code_uid": "fb3b77a2e8fc7c4bf163f56bb43fe6ef", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fe5b2270a3bd8415cbe324f45152580c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9925093632958801, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n \n \nclass Program\n{\n static void Main(string[] args)\n {\n int w = Convert.ToInt32(Console.ReadLine());\n string a = \"NO\";\n if((w % 2 == 0)and(w!=2))\n {\n a = \"YES\";\n }\n Console.WriteLine(a);\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "ac7b67e76d0dba82f4437de2f5ac896d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "41164849e5c037505f7af9a7dc4954d4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9277899343544858, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "namespace check1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int i;\n Console.Write(\"Enter a Number : \");\n i = int.Parse(Console.ReadLine());\n if (i % 2 == 0 && i > 2)\n {\n Console.Write(\"YES\");\n Console.Read();\n }\n else\n {\n Console.Write(\"NO\");\n Console.Read();\n }\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "e9d00025cb9c7a3c65ee2e9e1f5922cc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2f2e897f123044c8b5d59aaaa4d929bf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.1496881496881497, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 10, "bug_source_code": "bool main()\n{\n\tint w = Console.ReadLine();\n\treturn w%2==0;\n}", "lang": ".NET Core C#", "bug_code_uid": "6177d871abd7451f37e07d054337fb5c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b9eb14e482386e0c7811001f8144da5a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5304659498207885, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "using System;\n \nnamespace CodeForces {\n public class Problem4A {\n public static void Main(string[] args) {\n int.TryParse(Console.ReadLine(), int a);\n Console.WriteLine(a % 2 == 0 ? \"YES\" : \"NO\");\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "032ecb5c24d69a7eb88d8d2b9ec0d274", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "43826fde32c2551685435e5a608a24ec", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4378698224852071, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "int w;\n\n if (w % 2 == 0)\n Console.Write(\"YES\");\n else Console.Write(\"NO\");", "lang": "Mono C#", "bug_code_uid": "e478c94221a06ac468b560c6d7eeda07", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "62d9370e002afebfaa8f5c40b9b5d096", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9988584474885844, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\n\nnamespace CF317\n{\n\tinternal class Program\n\t{\n\t\tprivate static void Main(string[] args)\n\t\t{\n\t\t\tvar sr = new InputReader(Console.In);\n\t\t\t//var sr = new InputReader(new StreamReader(\"input.txt\"));\n\t\t\tvar task = new Task();\n\t\t\tusing (var sw = Console.Out)\n\t\t\t\t//using (var sw = new StreamWriter(\"output.txt\"))\n\t\t\t{\n\t\t\t\ttask.Solve(sr, sw);\n\t\t\t\t//Console.ReadKey();\n\t\t\t}\n\t\t}\n\t}\n\n\tinternal class Task\n\t{\n\t\tprivate int[] a;\n\t\tprivate int[] b;\n\t\tprivate int[] c;\n\t\tprivate int[] d;\n\n\t\tpublic void Solve(InputReader sr, TextWriter sw)\n\t\t{\n\t\t\tvar input = sr.ReadArray(Int32.Parse);\n\t\t\tvar n = input[0];\n\t\t\tvar m = input[1];\n\t\t\tvar cTesto = input[2];\n\t\t\tvar dTesto = input[3];\n\t\t\ta = new int[m];\n\t\t\tb = new int[m];\n\t\t\tc = new int[m];\n\t\t\td = new int[m];\n\t\t\tfor (var i = 0; i < m; i++) {\n\t\t\t\tinput = sr.ReadArray(Int32.Parse);\n\t\t\t\ta[i] = input[0];\n\t\t\t\tb[i] = input[1];\n\t\t\t\tc[i] = input[2];\n\t\t\t\td[i] = input[3];\n\t\t\t}\n\t\t\tvar dp = new int[n + 1, m + 1];\n\t\t\tfor (var i = 1; i <= n; i++) {\n\t\t\t\tfor (var j = 1; j <= m; j++) {\n\t\t\t\t\tfor (var k = 1; k <= a[j - 1] / b[j - 1]; k++) {\n\t\t\t\t\t\tif (i - c[j - 1] * k >= 0) {\n\t\t\t\t\t\t\tdp[i, j] = Math.Max(dp[i, j], dp[i - c[j - 1] * k, j - 1] + k * d[j - 1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar max = 0;\n\t\t\tfor (var i = 0; i <= n; i++) {\n\t\t\t\tfor (var j = 1; j <= m; j++) {\n\t\t\t\t\tmax = Math.Max(dp[i, j] + ((n - i) / cTesto) * dTesto, max);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsw.WriteLine(max);\n\t\t}\n\t}\n}\n\ninternal class InputReader : IDisposable\n{\n\tprivate bool isDispose;\n\tprivate readonly TextReader sr;\n\n\tpublic InputReader(TextReader stream)\n\t{\n\t\tsr = stream;\n\t}\n\n\tpublic void Dispose()\n\t{\n\t\tDispose(true);\n\t\tGC.SuppressFinalize(this);\n\t}\n\n\tpublic string NextString()\n\t{\n\t\tvar result = sr.ReadLine();\n\t\treturn result;\n\t}\n\n\tpublic int NextInt32()\n\t{\n\t\treturn Int32.Parse(NextString());\n\t}\n\n\tpublic long NextInt64()\n\t{\n\t\treturn Int64.Parse(NextString());\n\t}\n\n\tpublic string[] NextSplitStrings()\n\t{\n\t\treturn NextString()\n\t\t\t.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\t}\n\n\tpublic T[] ReadArray(Func func)\n\t{\n\t\treturn NextSplitStrings()\n\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t.ToArray();\n\t}\n\n\tpublic T[] ReadArrayFromString(Func func, string str)\n\t{\n\t\treturn\n\t\t\tstr.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)\n\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t.ToArray();\n\t}\n\n\tprotected void Dispose(bool dispose)\n\t{\n\t\tif (!isDispose) {\n\t\t\tif (dispose)\n\t\t\t\tsr.Close();\n\t\t\tisDispose = true;\n\t\t}\n\t}\n\n\t~InputReader()\n\t{\n\t\tDispose(false);\n\t}\n}", "lang": "MS C#", "bug_code_uid": "756338b91e0e722cbece333f7dff942a", "src_uid": "4e166b8b44427b1227e0f811161d3a6f", "apr_id": "86ac8d05fd6655b9332fd59e56cc65c3", "difficulty": 1700, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.17089678510998307, "equal_cnt": 39, "replace_cnt": 28, "delete_cnt": 5, "insert_cnt": 7, "fix_ops_cnt": 40, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Buns\n{\n class BunWithoutFiling\n {\n public int AllPastry { get; set; } //всего теста\n public int KindsFiling { get; set; } // видов начинки\n public int WithoutFiling { get; set; } // тесто на булки без начинки\n public int CostWithoutFiling { get; set; } // цена за булку без начинки\n\n public static int Calculation(BunWithoutFiling bunWF, List buns)\n {\n int summa = 0;\n for (int i = 0; i < buns.Count; i++)\n {\n while (buns[i].NeedFiling <= buns[i].RemainFiling)\n {\n summa = summa + buns[i].Cost;\n buns[i].RemainFiling -= buns[i].NeedFiling;\n bunWF.AllPastry -= buns[i].NeedPastry;\n if (bunWF.AllPastry < buns[i].NeedPastry)\n {\n break;\n }\n }\n }\n\n while (bunWF.AllPastry >= bunWF.WithoutFiling)\n {\n summa = summa + bunWF.CostWithoutFiling;\n bunWF.AllPastry -= bunWF.WithoutFiling;\n }\n\n return summa;\n }\n\n\n }\n\n class Bun\n {\n public int RemainFiling { get; set; } //осталось начинки для i-того вида булок\n public int NeedFiling { get; set; }// нужно начинки ан 1 булку\n public int NeedPastry { get; set; } // нужно теста на 1 булку\n public int Cost { get; set; } // цена за 1 булку\n }\n\n class Program\n {\n static void Main(string[] args)\n {\n string firstStr = Console.ReadLine();\n var first = firstStr.Split(' ');\n BunWithoutFiling bunWithout = new BunWithoutFiling\n {\n AllPastry = Convert.ToInt32(first[0]),\n KindsFiling = Convert.ToInt32(first[1]),\n WithoutFiling = Convert.ToInt32(first[2]),\n CostWithoutFiling = Convert.ToInt32(first[3])\n };\n\n List bunsColl = new List();\n for (int i = 0; i < bunWithout.KindsFiling; i++)\n {\n string str = Console.ReadLine();\n var str2 = str.Split(' ');\n\n bunsColl.Add(new Bun\n {\n RemainFiling = Convert.ToInt32(str2[0]),\n NeedFiling = Convert.ToInt32(str2[1]),\n NeedPastry = Convert.ToInt32(str2[2]),\n Cost = Convert.ToInt32(str2[3])\n });\n }\n\n\n Console.WriteLine( BunWithoutFiling.Calculation(bunWithout, bunsColl).ToString());\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "90444ac30a9e6018171200c402d7e053", "src_uid": "4e166b8b44427b1227e0f811161d3a6f", "apr_id": "2443143e1dddca72809316c10478301c", "difficulty": 1700, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.048111888111888115, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\n\nnamespace A\n{\n struct vec\n {\n public int x, y;\n public vec(int x, int y) { this.x = x; this.y = y; }\n public static vec operator +(vec a, vec b) { return new vec(a.x + b.x, a.y + b.y); }\n public static vec operator -(vec a, vec b) { return new vec(a.x - b.x, a.y - b.y); }\n public static bool operator ==(vec a, vec b) { return a.x == b.x && a.y == b.y; }\n public static bool operator !=(vec a, vec b) { return a.x != b.x || a.y != b.y; }\n public static vec FromConsole()\n {\n string[] s = Console.ReadLine().Split(new char[] { ' ' });\n return new vec(Convert.ToInt32(s[0]), Convert.ToInt32(s[1]));\n }\n }\n\n class Program\n {\n static bool IsReachable(vec target, string operate)\n {\n vec[] path = new vec[operate.Length + 1];\n for (int i = 0, n = operate.Length; i < n; ++i)\n {\n switch (operate[i])\n {\n case 'U': path[i + 1] = path[i] + new vec(0, 1); break;\n case 'D': path[i + 1] = path[i] + new vec(0, -1); break;\n case 'L': path[i + 1] = path[i] + new vec(-1, 0); break;\n case 'R': path[i + 1] = path[i] + new vec(1, 0); break;\n }\n if (path[i + 1] == target)\n return true;\n }\n \n vec mod = path[operate.Length];\n if (mod.x != 0 || mod.y != 0)\n {\n for (int i = 0, n = operate.Length; i < n; ++i)\n {\n vec diff = target - path[i];\n if (mod.x == 0 && mod.y != 0)\n {\n if (diff.x == 0 && diff.y % mod.y == 0 && diff.y / mod.y >= 0)\n return true;\n }\n else if (mod.x != 0 && mod.y == 0)\n {\n if (diff.x % mod.x == 0 && diff.y == 0 && diff.x / mod.x >= 0)\n return true;\n }\n else\n {\n if (diff.x % mod.x == 0 && diff.y % mod.y == 0 && diff.x / mod.x == diff.y / mod.y && diff.x / mod.x >= 0)\n return true;\n }\n }\n }\n return false;\n }\n\n static void Main(string[] args)\n {\n vec target = vec.FromConsole();\n string operate = Console.ReadLine();\n Console.WriteLine(IsReachable(target, operate) ? \"Yes\" : \"No\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "39cb8b5a781648a9301ffa018736b9c5", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "a8c9172810da5bafd80ed7f347ea4b88", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.843219958718478, "equal_cnt": 26, "replace_cnt": 16, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 25, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\n\nnamespace Issue_327A\n{\n class Program\n {\n public static void Main(string[] args) {\n var numbers_count = IO.Read();\n var groups = ReadGroups(numbers_count);\n \n Console.WriteLine(CountOnes(groups));\n }\n\n private static int CountOnes(List groups) {\n var isZerosGroupsFirst = groups[0].Value == 0;\n \n if (groups.Count == 1) {\n if (isZerosGroupsFirst)\n return groups[0].Count;\n else \n return groups[0].Count - 1;\n }\n\n var index = isZerosGroupsFirst ? 0 : 1;\n var max_zeros = 0;\n\n int end_index;\n int max_index_start = 0;\n int max_index_end = 0;\n\n while (index < groups.Count) {\n if (IsGroupGoal(groups, index)) {\n var zeros = groups[index].Count + groups[index + 2].Count;\n var ones = groups[index + 1].Count;\n var buff = zeros - ones;\n end_index = index + 2;\n\n // check if A + C + E is still more than lost of ones in [... A, B, C, D, E ...]\n for (int i = index + 3; i < groups.Count; i += 2) {\n // if no goal -> just stop\n if (groups.Count <= (i + 1) && groups[i].Count > (buff + groups[i + 1].Count))\n break;\n\n zeros += groups[i + 1].Count;\n buff += groups[i + 1].Count - groups[i].Count;\n end_index = i + 1;\n }\n\n if (zeros > max_zeros) {\n max_zeros = zeros;\n max_index_start = index;\n max_index_end = end_index;\n }\n\n index = end_index + 1;\n } else {\n if (groups[index].Count > max_zeros) {\n max_index_start = max_index_end = index;\n max_zeros = groups[index].Count;\n }\n\n index++;\n }\n }\n\n var amount = 0;\n\n for (int i = 0; i < max_index_start; ++i) {\n if (groups[i].Value == 1)\n amount += groups[i].Count;\n }\n\n for (int i = max_index_start; i <= max_index_end; i += 2) {\n amount += groups[i].Count;\n }\n\n for (int i = max_index_end + 1; i < groups.Count; ++i) {\n if (groups[i].Value == 1)\n amount += groups[i].Count;\n }\n\n return amount;\n }\n\n // checks that inveted count of two nearest groups of zeroz more then lost ones\n private static bool IsGroupGoal(List groups, int index) {\n return (groups.Count > index + 2) && \n // if A + C group of zeros > B group of 1 in [... A, B, C ...]\n (groups[index].Count + groups[index + 2].Count) > (groups[index + 1].Count);\n }\n\n private static List ReadGroups(int numbers_count) {\n var value = IO.Read();\n var groups = new List();\n var group = new Pair { \n Value = value,\n Count = 1\n };\n\n for (int i = 1; i < numbers_count; ++i) {\n value = IO.Read();\n\n if (value == group.Value) {\n group.Count++;\n } else {\n groups.Add(group);\n group = new Pair {\n Value = value,\n Count = 1\n };\n }\n }\n\n // add last group\n groups.Add(group);\n\n return groups;\n }\n }\n\n public struct Pair {\n public int Value;\n public int Count;\n }\n\n public static class IO {\n static IO() {\n Reader = new StreamReader(\n Console.OpenStandardInput(sizeof(int)),\n System.Text.Encoding.ASCII,\n false, \n sizeof(int),\n false);\n }\n\n public static StreamReader Reader { get; set; }\n\n public static int Read() {\n const int zeroCode = (int) '0';\n\n int result = 0;\n int digit;\n int cache1;\n int cache2;\n\n var isNegative = false;\n var symbol = Reader.Read();\n\n while (symbol == ' ') {\n symbol = Reader.Read();\n }\n\n if (symbol == '-') {\n isNegative = true;\n symbol = Reader.Read();\n }\n\n for ( ;\n (symbol != -1) && (symbol != ' ');\n symbol = Reader.Read()\n ) {\n digit = symbol - zeroCode;\n \n if (digit < 10 && digit >= 0) {\n cache1 = result << 1;\n cache2 = cache1 << 2;\n result = cache1 + cache2 + digit;\n } else {\n if (symbol == 13) // if symbol == \\n\n Reader.Read(); // skip next \\r symbol\n break;\n }\n }\n\n return isNegative ? ~result + 1 : result;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "19a95221df2e9cc87e7e6dbf982b6def", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "79c35439acfc1d9506befcdbbdf0cc9a", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9988193624557261, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "\nusing System;\nusing System.Linq;\nusing System.Collections.Generic;\n\npublic class App1\n{\n public static void Main()\n {\n Func read = ()=>Console.ReadLine();\n Action write = _=>Console.WriteLine(_.ToString());\n \n var n=read().ToInt();\n var a=read().ToIntA();\n Func f=(x,y)=>util.RangeN(x,y).Rd(0,(s,v)=>s+(1-a[v])*2-1);\n var l=\n from i in util.RangeN(0,n-2)\n from j in util.RangeN(i+1,n-1)\n select f(i,j);\n var d=l.Max();\n write(a.Count(v=>v==1)+d);\n }\n}\n\nstatic class Exts\n{\n public static int ToInt(this string s)\n {\n return int.Parse(s);\n }\n \n public static int[] ToIntA(this string s)\n {\n return s.Split(\" \").Select(ToInt).ToArray();\n }\n \n public static long ToLong(this string s)\n {\n return long.Parse(s);\n }\n \n public static string[] Split(this string s,string sp)\n {\n return s.Split(new[]{sp},StringSplitOptions.RemoveEmptyEntries);\n }\n \n public static string ToStr(this IEnumerable a)\n {\n return new string((a is char[])?(char[])a:a.ToArray());\n }\n}\n\n\n\nstatic class FuncExts\n{\n public static T Rd(this IEnumerable l,T df,Func f)\n {\n return Fold(l,df,f);\n }\n \n public static U Fold(this IEnumerable l,U df,Func f)\n {\n foreach(var i in l)\n {\n df=f(df,i);\n }\n return df;\n }\n}\n\nstatic class util\n{\n public static IEnumerable RangeN(int from,int to)\n {\n while(from<=to)\n {\n yield return from;\n from++;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "a0295a9e7efe27f8147f4b1a020939d5", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "0c3e881e2f2e4fa6f4ae4b84cb2e6a0d", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8251121076233184, "equal_cnt": 22, "replace_cnt": 11, "delete_cnt": 2, "insert_cnt": 9, "fix_ops_cnt": 22, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\n\nnamespace COJ\n{\n class Program\n {\n /*\n * Author: Luismo\n * Idea: BinarySearch + DFS\n * \n * */\n\n\n static void Main(string[] args)\n {\n TextReader tr = Console.In;\n // Console.SetIn(new StreamReader(@\"d:\\lmo.in\"));\n\n SolveSingleProblem();\n \n Console.SetIn(tr);\n Console.ReadLine();\n\n //string[] data = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n static List intervals;\n static void SolveSingleProblem()\n {\n int n = int.Parse(Console.ReadLine());\n int[] arr = new int[n];\n string[] data = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n \n \n int firstZ = -1;\n int totalOnes = 0;\n\n for (int i = 0; i < data.Length; i++)\n {\n arr[i] = int.Parse(data[i]);\n\n if (arr[i] == 0)\n {\n if(firstZ==-1)\n firstZ = i;\n }\n else totalOnes++; \n }\n //\n int zeroes = 0, ones = 0, max =0, cnt=0;\n for (int i = firstZ; i < arr.Length; i++)\n {\n if (arr[i] == 0)\n zeroes++;\n else ones++;\n\n if (zeroes - ones > max)\n {\n max = zeroes - ones;\n cnt = zeroes - ones + totalOnes - ones;\n }\n }\n\n Console.WriteLine(cnt);\n\n }\n\n }\n\n\n}\n", "lang": "MS C#", "bug_code_uid": "cf75f6c19847dd45e57840e21881abbd", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "57f644db7f19c04329429882b2a5edf8", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8317428427925665, "equal_cnt": 21, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 9, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\n\nnamespace COJ\n{\n class Program\n {\n /*\n * Author: Luismo\n * Idea: BinarySearch + DFS\n * \n * */\n\n\n static void Main(string[] args)\n {\n TextReader tr = Console.In;\n // Console.SetIn(new StreamReader(@\"d:\\lmo.in\"));\n\n SolveSingleProblem();\n \n Console.SetIn(tr);\n Console.ReadLine();\n\n //string[] data = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n \n static void SolveSingleProblem()\n {\n int n = int.Parse(Console.ReadLine());\n int[] arr = new int[n];\n string[] data = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n \n \n int firstZ = -1;\n int totalOnes = 0;\n\n for (int i = 0; i < data.Length; i++)\n {\n arr[i] = int.Parse(data[i]);\n\n if (arr[i] == 0)\n {\n if(firstZ==-1)\n firstZ = i;\n }\n else totalOnes++; \n }\n //\n int zeroes = 0, ones = 0, max =0, cnt=0;\n for (int i = firstZ; i < arr.Length; i++)\n {\n if (arr[i] == 0)\n zeroes++;\n else ones++;\n\n if (zeroes - ones > max)\n {\n max = zeroes - ones;\n cnt = zeroes - ones + totalOnes - ones;\n }\n }\n\n Console.WriteLine(cnt);\n\n }\n\n }\n\n\n}\n", "lang": "MS C#", "bug_code_uid": "970265eea29edf468e1d767b67f26cc7", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "57f644db7f19c04329429882b2a5edf8", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7862969004893964, "equal_cnt": 14, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace TC1\n{\n class Program\n {\n static string[] input = File.ReadAllLines(\"input.txt\");\n static string[] line1 = input[1].Split(' '), line2 = input[2].Split(' ');\n static string result = \"\";\n static void Main(string[] args)\n {\n int i = 0;\n bool ret = false;\n while (true)\n {\n string q = i.ToString();\n foreach (string l in line1)\n {\n if (q.IndexOf(l) > -1)\n {\n foreach (string z in line2)\n {\n if (q.IndexOf(z) > -1)\n {\n result = q;\n ret = true;\n }\n }\n }\n }\n if (ret) break;\n i++;\n }\n StreamWriter sw = new StreamWriter(\"output.txt\");\n sw.Write(result);\n sw.Close();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "89b8d635fb72f2b85cc355ef5053c169", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "55b483e616b106fd927f46e3b9fd9ed4", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8642292067564679, "equal_cnt": 15, "replace_cnt": 4, "delete_cnt": 5, "insert_cnt": 5, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication3\n{\n\n class Program\n {\n\n static void Main(string[] args)\n {\n\n int L1, L2;\n\n string temp;\n\n //Console.WriteLine(\"Please enter the len of list number 1\");\n\n //temp = Console.ReadLine();\n\n //L1 = Convert.ToInt32(temp);\n\n //Console.WriteLine(\"Please enter the len of list number 2\");\n\n //temp = Console.ReadLine();\n\n //L2 = Convert.ToInt32(temp);\n\n string[] sListx = System.Console.ReadLine().Split();\n\n //Console.WriteLine(\"Please enter the list of number 1\");\n\n string[] sList1 = System.Console.ReadLine().Split();\n\n //Console.WriteLine(\"Please enter the list of number 2\");\n\n string[] sList2 = System.Console.ReadLine().Split();\n\n int z = 0;\n\n\n int[] pretty_numbers = new int[(sList1.Length * sList2.Length) * 2];\n\n for (int i = 0; i < sList1.Length; i++)\n {\n for (int j = 0; j < sList2.Length; j++)\n {\n if (sList1[i] != sList2[j])\n {\n temp = sList1[i] + sList2[j];\n }\n else\n {\n temp = sList1[i];\n }\n \n pretty_numbers[j + i + z] = Convert.ToInt32(temp);\n }\n z = z + sList1.Length-1;\n }\n\n z = z + sList1.Length;\n\n for (int i = 0; i < sList2.Length; i++)\n {\n for (int j = 0; j < sList1.Length; j++)\n {\n if (sList1[i] != sList2[j])\n {\n temp = sList2[i] + sList1[j];\n }\n else\n {\n temp = sList2[i];\n }\n \n pretty_numbers[j + i + z] = Convert.ToInt32(temp);\n }\n z = z + sList2.Length - 1;\n }\n\n\n int maxValue = pretty_numbers.Min();\n\n\n\n System.Console.WriteLine(maxValue);\n\n \n\n\n\n }\n\n }\n\n}", "lang": "MS C#", "bug_code_uid": "85eb54719e723541194d37218d0b749d", "src_uid": "3a0c1b6d710fd8f0b6daf420255d76ee", "apr_id": "c56e689f2197da8fd351b3c70673bcc5", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.817684811029237, "equal_cnt": 29, "replace_cnt": 10, "delete_cnt": 7, "insert_cnt": 13, "fix_ops_cnt": 30, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication3\n{\n\n class Program\n\n {\n\n static void Main(string[] args)\n\n {\n\n int L1, L2;\n\n string temp;\n\n //Console.WriteLine(\"Please enter the len of list number 1\");\n\n //temp = Console.ReadLine();\n\n //L1 = Convert.ToInt32(temp);\n\n //Console.WriteLine(\"Please enter the len of list number 2\");\n\n //temp = Console.ReadLine();\n\n //L2 = Convert.ToInt32(temp);\n\n string[] sListx = System.Console.ReadLine().Split();\n\n //Console.WriteLine(\"Please enter the list of number 1\");\n\n string[] sList1 = System.Console.ReadLine().Split();\n\n //Console.WriteLine(\"Please enter the list of number 2\");\n\n string[] sList2 = System.Console.ReadLine().Split();\n\n int z = 0;\n\n\n int[] pretty_numbers = new int[(sList1.Length*sList2.Length )*2];\n\n for (int i = 0; i < sList1.Length; i++)\n\n {\n for (int j=0;j();\n for (int i = 15; i >= 0; i--)\n if ((n >> i & 1) == 1) {\n a.Add(i + 1);\n }\n Console.WriteLine(a.AsJoinedString());\n\n }\n const long INF = 1L << 60;\n int[] dx = { -1, 0, 1, 0 };\n int[] dy = { 0, 1, 0, -1 };\n\n int ri { get { return sc.Integer(); } }\n long rl { get { return sc.Long(); } }\n double rd { get { return sc.Double(); } }\n string rs { get { return sc.Scan(); } }\n public IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());\n\n static T[] Enumerate(int n, Func f) {\n var a = new T[n];\n for (int i = 0; i < n; ++i) a[i] = f(i);\n return a;\n }\n\n static public void Swap(ref T a, ref T b) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n }\n}\n\n#region main\n\nstatic class Ex {\n static public string AsString(this IEnumerable ie) {\n return new string(ie.ToArray());\n }\n\n static public string AsJoinedString(this IEnumerable ie, string st = \" \") {\n return string.Join(st, ie.Select(x => x.ToString()).ToArray());\n //return string.Join(st, ie);\n }\n\n static public void Main() {\n Console.SetOut(new Program.IO.Printer(Console.OpenStandardOutput()) { AutoFlush = false });\n var solver = new Program.Solver();\n solver.Solve();\n Console.Out.Flush();\n }\n}\n\n#endregion\n#region Ex\n\nnamespace Program.IO {\n using System.IO;\n using System.Text;\n using System.Globalization;\n\n public class Printer: StreamWriter {\n public override IFormatProvider FormatProvider {\n get { return CultureInfo.InvariantCulture; }\n }\n public Printer(Stream stream) : base(stream, new UTF8Encoding(false, true)) { }\n }\n\n public class StreamScanner {\n public StreamScanner(Stream stream) {\n str = stream;\n }\n\n public readonly Stream str;\n private readonly byte[] buf = new byte[1024];\n private int len, ptr;\n public bool isEof = false;\n public bool IsEndOfStream {\n get { return isEof; }\n }\n\n private byte read() {\n if (isEof) return 0;\n if (ptr >= len) {\n ptr = 0;\n if ((len = str.Read(buf, 0, 1024)) <= 0) {\n isEof = true;\n return 0;\n }\n }\n return buf[ptr++];\n }\n\n public char Char() {\n byte b = 0;\n do b = read(); while ((b < 33 || 126 < b) && !isEof);\n return (char)b;\n }\n\n public string Scan() {\n var sb = new StringBuilder();\n for (var b = Char(); b >= 33 && b <= 126; b = (char)read()) sb.Append(b);\n return sb.ToString();\n }\n\n public string ScanLine() {\n var sb = new StringBuilder();\n for (var b = Char(); b != '\\n' && b != 0; b = (char)read()) if (b != '\\r') sb.Append(b);\n return sb.ToString();\n }\n\n public long Long() {\n return isEof ? long.MinValue : long.Parse(Scan());\n }\n\n public int Integer() {\n return isEof ? int.MinValue : int.Parse(Scan());\n }\n\n public double Double() {\n return isEof ? double.NaN : double.Parse(Scan(), CultureInfo.InvariantCulture);\n }\n }\n}\n\n#endregion\n\n\n", "lang": "MS C#", "bug_code_uid": "c30f3696684aab9686678ffbe960902e", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "7703babebc0162f5428c0e6e4b4981ca", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8551859099804305, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication5\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = int.Parse(Console.ReadLine());\n\n int[] somearr = new int[1];\n\n somearr[0] = 1;\n\n int current = 0;\n\n\n for (int i = 0; i < k; i++)\n {\n Array.Resize(ref somearr, somearr.Length + 1);\n current++;\n\n while (somearr.Length > 1 && somearr[current] == somearr[current - 1])\n {\n somearr[current - 1] += 1;\n current--;\n Array.Resize(ref somearr, somearr.Length - 1);\n }\n }\n foreach (int i in somearr)\n Console.Write(i + \" \");\n\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ee4bdffa04ac0ef5a01dd681f29d3892", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "fd7b52e2a8b87981e542c9c124d9a03e", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9969902182091799, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n public void Solve()\n {\n int n = ReadInt();\n var s = new Stack();\n for (int i = 0; i < n; i++)\n {\n int x = 1;\n while (s.Count > 0 && s.Peek() == x)\n {\n s.Pop();\n x++;\n }\n s.Push(x);\n }\n\n Write(s.Count);\n WriteArray(s.Reverse());\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n try\n {\n //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n //thread.Start();\n //thread.Join();\n new Solver().Solve();\n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array)writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "4543c356b372992175e98ac4db66bdad", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "51c92acb12939baea85a294bdf88132a", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.971540726202159, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Text;\n\nnamespace WunderFund\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n var nBits = Convert.ToString(int.Parse(Console.ReadLine()), toBase: 2);\n\n\t\t\tConsole.WriteLine(nBits);\n var lengths = new StringBuilder();\n for (var i = 0; i < nBits.Length; ++i)\n if (nBits[i] == '1')\n lengths.Append((nBits.Length - i) + \" \");\n\n Console.WriteLine(lengths.ToString());\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "4b232c6f3d6c771862c53fd7ba369773", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "d7748e5855a8a0379e3f792a39a41c98", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9128137384412153, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "//Rextester.Program.Main is the entry point for your code. Don't change it.\n//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\nnamespace Rextester\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n //input BITCH\n int n=int.Parse(Console.ReadLine());\n \n //Logic BITCH\n int ans=0;\n while(n>0){\n int pow=(int)(Math.Log(n,2));\n ans+=1+pow;\n n-=(int)Math.Pow(2,pow);\n }\n Console.WriteLine(ans);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "74f9150fcd17fbf338b35d60ce90c6dc", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "9960fa5e7042f068f4bf0af9a6a5631b", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9949622166246851, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main()\n {\n string answ = \"\";\n string result = \"\";\n int count = Int32.Parse(Console.ReadLine());\n if (count == 0) { Console.WriteLine(\"0\"); return; }\n int num = 4096*2*2*2;\n\n while (num != 0)\n {\n int param = count / num;\n if (param > 0) { result += \"1\"; count = count % num; } else { result += \"0\"; }\n num = num / 2;\n }\n for(var i = 0; i < result.Length; i++)\n {\n if (result[i] == '1') { answ += (result.Length - i) + \" \"; }\n\n }\n\n Console.WriteLine(answ);\n Console.Read();\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "af4452df86432c452df041f4796d3ab0", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "01a68c6d85202fe68d2536c31685808f", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8038461538461539, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace cforce135bb\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] tmp = Console.ReadLine().Split(' ');\n long p = long.Parse(tmp[0]), d = long.Parse(tmp[1]), i=p, n=p, k, f;\n int count = 1;\n while (i>=p-d)\n {\n f = (long)Math.Pow(10, count);\n k=(long)((i + 1) % f);\n if (k == 0)\n {\n count++;\n n = i;\n }\n i -= (long)Math.Pow(10, count - 1);\n }\n Console.WriteLine(n);\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b9133b47cd98999204e7df80cb38bfb8", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "7583776081f48abdb042db3c01f97316", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9802411252511721, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace CF {\n class Program {\n\n static void Main(string[] args) {\n\n#if DEBUG\n TextReader reader = new StreamReader(\"../../input.txt\");\n TextWriter writer = Console.Out;\n#else\n\t\t\tTextReader reader = Console.In;\n TextWriter writer = Console.Out;\n#endif\n\n var p = reader.Read();\n var d = reader.Read();\n\n var q = p;\n\n var best = p;\n var dropped = 0L;\n var power = 1L;\n while (q >= 10) {\n var lastDigit = q % 10;\n dropped += (lastDigit + 1) * power;\n power *= 10;\n if (dropped > d) break;\n q /= 10;\n if (lastDigit != 9) {\n best = p - dropped;\n q = best / power;\n }\n \n }\n\n // 2348699999999999\n Console.WriteLine(best);\n\n#if DEBUG\n Console.ReadKey();\n#endif\n }\n\n\n }\n\n\n class Pair {\n public Pair(T1 first, T2 second) {\n First = first;\n Second = second;\n }\n public T1 First { get; set; }\n public T2 Second { get; set; }\n public override string ToString() {\n return \"{\" + First + \" \" + Second + \"}\";\n }\n }\n\n static class ReaderExtensions {\n\n public static string ReadToken(this TextReader reader) {\n int val;\n var builder = new StringBuilder();\n while (true) {\n val = reader.Read();\n if (val == ' ' || val == -1) {\n if (builder.Length == 0) continue;\n break;\n }\n if (val == 13) {\n reader.Read();\n if (builder.Length == 0) continue;\n break;\n }\n builder.Append((char)val);\n }\n return builder.ToString();\n }\n\n public static T Read(this TextReader reader) {\n return (T)Convert.ChangeType(reader.ReadToken(), typeof(T));\n }\n\n public static T[] ReadArr(this TextReader reader) {\n return reader.ReadLine()\n .Split(' ').Select(str =>\n (T)Convert.ChangeType(str, typeof(T))\n ).ToArray();\n }\n\n }\n\n static class LinqExtensions {\n /// Value / Index\n public static IEnumerable> SelectIndexes(this IEnumerable collection) {\n return collection.Select((v, i) => new Pair(v, i));\n }\n public static IEnumerable SelectValues(this IEnumerable> collection) {\n return collection.Select(p => p.First);\n }\n }\n\n}", "lang": "Mono C#", "bug_code_uid": "4673f4cafbeade92400c1433a3b41f9e", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "7063b773f9ed1bb5e6345dd0acb357b7", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9925452609158679, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace OlimpBlya\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int s=0, k=1;\n for(int i=1;i<=n;i++)\n {\n k *= 2;\n s += k;\n }\n Console.WriteLine(s);\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "0f46bfa743d05f50dede6182c08cea24", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "b62db91c3df04b87d0b283888a1eacb9", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8581081081081081, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n long r = (long)Math.Pow(2, n) + 2;\n Console.WriteLine(r.ToString().Replace(',','.'));\n Console.ReadLine();\n }\n}\n", "lang": "MS C#", "bug_code_uid": "7b0b8c9cb48c6a8c712cfb2474cc67d1", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "c0ccdd7e1250b3662b6f3e51f7fbd539", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.44421699078812693, "equal_cnt": 11, "replace_cnt": 4, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace Codeforces\n{\n internal static class Program\n {\n private static void Main()\n {\n var n = long.Parse(Console.ReadLine());\n\n var max = Math.Pow(10, n) - 1.0;\n\n var count = 0;\n\n for (var i = 7; i < max; i++)\n {\n var cs = i.ToString().ToCharArray();\n if (cs.All(x => x == '7' || x == '8'))\n {\n count++;\n }\n }\n\n Console.WriteLine(count);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "580cff9b9c026d02fb89bd2a6e71941b", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "7b513503dfec107346ca73f8a52e3a7f", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9701834862385321, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine()), res = 0, j=1;\n for (int i = 0; i < n; i++)\n {\n j = j * 2;\n res = res + j;\n }\n Console.Write(res);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ce264baa60a4849142214ceead40bc97", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "1b269b7f87a15622a6decb4dac2876d7", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.3409436834094368, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\n\nnamespace LuckyNumbers\n{\n class Program\n {\n static void Main(string[] args)\n {\n sbyte n = Convert.ToSByte(Console.ReadLine());\n\n int output = 2,say7 = 0,say8 = 0;\n\n if (n == 1) { Console.WriteLine(output); return; }\n \n for (string i = \"77\"; !i.Equals( Math.Pow(10,n).ToString()); )\n {\n \n for (int j = 0; j < i.Length; j++)\n {\n if (i[j] == '7') say7++;\n else if (i[j] == '8') say8++;\n else break;\n \n }\n if (i.Length == (say7 + say8)) output++;\n\n i = i.Substring(0, i.Length - 2) + (Convert.ToInt32(i.Substring(i.Length-2,2)) + 1) ;\n say7 = 0;\n say8 = 0;\n }\n Console.WriteLine(output);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "35aa8447d9d77c2afe2812e6a096c191", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "ded70a8bbc79f7e12b68151b55c1aec2", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9833546734955185, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\n\nnamespace LuckyNumbers\n{\n class Program\n {\n static void Main(string[] args)\n {\n sbyte n = Convert.ToSByte(Console.ReadLine());\n int output = 0;\n\n for (int i = n; i > 0; i--)\n {\n output += Convert.ToInt32( Math.Pow(2,i) );\n }\n Console.WriteLine(output);\n }\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "12cd4fc8fcf19db6d33d46e7729ad774", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "ded70a8bbc79f7e12b68151b55c1aec2", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9610894941634242, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nclass Program{\n public static void Main(string[] args){\n int n = int.Parse(Console.ReadLine());\n int res = 2;\n for(int i = 2; i <= n; i++)\n res += Math.Pow(2,i);\n Console.WriteLine(res);\n }\n}", "lang": "MS C#", "bug_code_uid": "6d50c0127aa93f202db45079f677f6e7", "src_uid": "f1b43baa14d4c262ba616d892525dfde", "apr_id": "4bcb56d1104f91014e18cc644193a606", "difficulty": 1100, "tags": ["math", "combinatorics"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9991902834008097, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n internal class Program\n {\n\n public static void Main(string[] args)\n {\n //2010200\n string x = Console.ReadLine();\n string k = string.Empty;\n for (int i = x.Count()-1; i >= 0; i--)\n k+= x[i];\n int res = 0;\n for(int i = 0; i < x.Length; i++)\n {\n if(isPal(k))\n {\n res++;\n break;0\n }\n else\n {\n k += \"0\";\n }\n }\n\n if(res > 0)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n\n public static bool isPal(string k)\n {\n var st = string.Empty;\n for (int i = k.Count() - 1; i >= 0; i--)\n st += k[i];\n if (st == k)\n {\n return true;\n }\n else\n return false;\n }\n\n }\n}", "lang": "MS C#", "bug_code_uid": "48700050e51b72851c3eaee558b5304b", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "588f16321f8a1d3fa6c4f9bb12156329", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9627492130115425, "equal_cnt": 21, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 17, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp3\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int k;\n string s = Console.ReadLine();\n string[] tmp = s.Split(' ');\n k = int.Parse(tmp[0]);\n string a = k.ToString();\n\n int kolnul=0;\n for (int i =0;i 0)\n {\n for (int i = 0; i < kolnul; i++)\n {\n b[i] = '0';\n }\n for (int i = 0; i < a.Length; i++)\n {\n int l = i+kolnul;\n b[l] = a[i];\n }\n string m1 = new string(b);\n\n char[] z = new char[a.Length + kolnul];\n\n for (int i = 0; i < a.Length + kolnul; i++)\n {\n int l = a.Length +kolnul- i-1;\n z[l] = m1[i];\n }\n string m2 = new string(z);\n\n if (m2 == m1) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"No\");\n Console.ReadLine();\n\n\n }\n\n for (int i = 0; i < a.Length; i++)\n {\n int l = a.Length - i-1;\n b[l] = a[i];\n }\n string m = new string(b);\n\n if (a == m) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"No\");\n \n\n\n\n\n }\n \n\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ebf287489fad01c501586b6d1bf4a637", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "00ba2e3f3c886ae251d02b7f4c45a1e2", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9420142421159715, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ProgrammingContest\n{\n class Program\n {\n static void Main(string[] args)\n {\n var n = Console.ReadLine();\n var answer = true;\n int j = n.Length;\n int c = 0;\n if (n.Equals(\"0\"))\n {\n c++;\n }\n else\n {\n\n while (j >= 0 && (n[j - 1]).ToString().Equals(\"0\"))\n {\n c++;\n j--;\n }\n }\n\n var p = new String('0', c) + n ; \n\n for (int i = 0; i < p.Length / 2; i++)\n {\n if (p[i] - p[p.Length - i - 1] != 0)\n {\n answer = false;\n break;\n }\n }\n \n Console.WriteLine(answer);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "de8dd16ece63491b889147429f16a64d", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "dc1e472fe3eade56f232e2d816cb483f", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9562256809338522, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces12\n{\n class Program\n {\n static void Main(string[] args)\n {\n int nameLength = Convert.ToInt32(Console.ReadLine());\n string fileName = Console.ReadLine();\n ColichestvoX(fileName);\n }\n public void ColichestvoX(string fileName)\n {\n //количество стоящих подряд символов х\n int x = 0;\n //количесвто символов для удаления\n int count = 0;\n\n for (int i = 0; i < fileName.Length; i++)\n {\n if (fileName[i] == 'x')\n {\n x++;\n }\n else\n {\n x = 0;\n }\n\n if(x > 2)\n {\n count++;\n }\n }\n\n Console.WriteLine(count);\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8956bd2eae2e476b3a3ea99ce74213c9", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "83a5fb9d8969ba531897ff4898d09694", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9981851179673321, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nclass Program\n {\n static void Main(string[] args)\n {\n string input = Console.In.ReadToEnd().Split(new char[] { '\\r', '\\n' }, StringSplitOptions.RemoveEmptyEntries)[1];\n int result = 0;\n for(int i = 0, xes=0; i 1) result++;\n else xes++;\n }\n else xes = 0;\n }\n Console.WriteLine(result);\n }\n }", "lang": "Mono C#", "bug_code_uid": "55d0d88134f80a123a27e1238077bd36", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "349edda17dbd6b413899a405c183cbdf", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8715728715728716, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n Solve();\n }\n\n static void Solve()\n {\n int n = int.Parse(Console.ReadLine());\n string s = Console.ReadLine();\n int count = 0;\n int result = 0;\n for(int i = 0; i < n; i++)\n {\n if (s[i] == 'x') count++;\n else if(count >= 3)\n {\n result += count - 2;\n count = 0;\n }\n }\n if (count >= 3) result += count - 2;\n Console.WriteLine(result);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "82e3009edef4c9e1172f51577d5d4ef6", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "03d5061b38e9f03f1d69513814b7d5a1", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.41254125412541254, "equal_cnt": 26, "replace_cnt": 12, "delete_cnt": 7, "insert_cnt": 6, "fix_ops_cnt": 25, "bug_source_code": "using System;\n\nnamespace B831\n{\n class Program\n {\n static void Main(string[] args)\n {\n var fl= Console.ReadLine();\n var sl = Console.ReadLine();\n var txt = Console.ReadLine();\n var ans = new char[txt.Length];\n var index = new int[2,txt.Length];\n for (int i = 0; i < txt.Length; i++)\n {\n if (txt[i] >= 'a' && txt[i] <= 'z' || txt[i] >= 'A' && txt[i] <= 'Z')\n {\n for (int j = 0; j < fl.Length; j++)\n {\n if (txt[i].ToString().ToLower().Equals(fl[j].ToString()))\n {\n index[0, i] = j;\n if (txt[i] <= 'Z')\n index[1, i] = 1;\n }\n }\n\n }\n else\n {\n ans[i] = txt[i];\n index[0, i] = -1;\n } \n }\n\n for (int i = 0; i < txt.Length; i++)\n {\n if (index[1, i] == 1 && index[0,i] != -1)\n ans[i] = Convert.ToChar(sl[index[0, i]].ToString().ToUpper());\n else if(index[0, i] != -1)\n ans[i] = sl[index[0, i]];\n }\n\n Console.WriteLine(ans);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "1d71eea5ac2d5bedb7126f7eb89d23bb", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "1a863aabbf91ebc950032ea007420cb5", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9269703543022415, "equal_cnt": 16, "replace_cnt": 0, "delete_cnt": 16, "insert_cnt": 0, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ProblemSolving.CodeForces\n{\n class File_Name_978_problem_B\n {\n public static void Main(string[] args)\n {\n while (true)\n {\n string st = Console.ReadLine();\n string str = Console.ReadLine();\n string s = \"xxx\";\n int cnt = 0;\n for(int i = 0; i < str.Length-2; i++)\n {\n if(str.Substring(i, 3).Equals(s))\n {\n cnt++;\n }\n }\n Console.WriteLine(cnt);\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "3f068b09c599f0a065f1694d9e303be3", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "5e9b6f081287050c2cb6393dd1954031", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.1423650975889782, "equal_cnt": 11, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing TasksCodeForce._700;\nusing TasksCodeForce._800;\n\nnamespace TasksCodeForce\n{\n class Program\n {\n static void Main(string[] args)\n {\n _978B_FileName.Method();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "2a87476d08206cba4bc4ada6827419e2", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "c107d6bb73c3424312e6aeead24b217f", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7816711590296496, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " string n = Console.ReadLine();\n string mas = Console.ReadLine();\n List array = mas.ToCharArray().ToList();\n int x = 0;\n for (int i = 0; i < array.Count-2; i++)\n {\n if ((array[i] == array[i+1])&(array[i] == array[i+2])&(array[i]=='x'))\n {\n x += 1;\n }\n }\n Console.Write(x);\n ", "lang": "Mono C#", "bug_code_uid": "5b3675201f80d914433d2c303377a2ae", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "f8f5625625725afc272bcc95d43f2d5b", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9464847848898216, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace File_Name\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n int count = 0;\n for (int i = 0; i < input.Length-2; i++)\n {\n if (input[i] == 'x' && input[i + 1] == 'x' && input[i + 2] == 'x')\n count++;\n }\n Console.WriteLine(count);\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8895f380b14b93af85627bce2c74b113", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "6592a6792a4c2778963d20590361cd46", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9680170575692963, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nclass program\n{ \n static int Main()\n {\n int n = int.Parse(Console.ReadLine());\n string input = Console.ReadLine();\n int result = 0;\n int count = 0;\n for (int i = 0; i < input.Length; i++)\n {\n if(input[i]=='x')\n {\n count++;\n }\n else if(count>2)\n {\n result += (count - 2);\n count = 0;\n }\n }\n if(count>2)\n result += (count - 2);\n Console.WriteLine(result);\n return 0;\n }\n}\n\n", "lang": "Mono C#", "bug_code_uid": "d60c8161f8c3542df6db60d771c87f7e", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "b945f5992071ef733d68d9aaf99a7b07", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9961089494163424, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace FlightTask\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine()), k =0;\n string messeage = Console.ReadLine();\n for (int i = 0; i < messeage.Length; i++)\n {\n if ((messeage[i] == 'x') && (messeage[i + 1] == 'x') && (messeage[i + 2] == 'x'))\n {\n k++;\n }\n }\n Console.WriteLine(k);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b2e646edaae734715eec451d600eaf6d", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "951d53f288d8fcab7bd35e1e83dcb037", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9929335756107409, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Linq;\nusing System.Security;\nusing System.Text;\n\nnamespace Codeforces\n{\n class Program\n {\n private static string readString() => Console.ReadLine();\n private static T readValue() => (T)Convert.ChangeType(readString(), typeof(T));\n private static string[] readStrings(char delimiter = ' ') => readString().Split(delimiter);\n private static T[] readValues(char delimiter = ' ') => readStrings(delimiter: delimiter).Select(x => (T)Convert.ChangeType(x, typeof(T))).ToArray();\n private static void write(T s) => Console.WriteLine(s);\n\n private static int binarySearch(List list, T target) where T : IComparable\n {\n int l = 0, r = list.Count - 1;\n while (l <= r)\n {\n var m = (int)Math.Floor((double)(l + r) / 2);\n if (list[m].CompareTo(target) <= 0)\n if (m == r || list[m + 1].CompareTo(target) > 0)\n return m;\n else\n l = m + 1;\n else\n r = m - 1;\n }\n return -1;\n }\n\n private static int quickSortPartition(List arr, int left, int right, Comparer comparer)\n {\n T pivot = arr[left];\n while (true)\n {\n while (comparer.Compare(arr[left], pivot) < 0)\n left++;\n while (comparer.Compare(arr[right], pivot) > 0)\n right--;\n if (left < right)\n {\n if (comparer.Compare(arr[left], arr[right]) == 0)\n return right;\n\n T temp = arr[left];\n arr[left] = arr[right];\n arr[right] = temp;\n }\n else\n return right;\n }\n }\n private static void quickSort(List arr, int left, int right, Comparer comparer)\n {\n if (left < right)\n {\n int pivot = quickSortPartition(arr, left, right, comparer);\n if (pivot > 1)\n quickSort(arr, left, pivot - 1, comparer);\n if (pivot + 1 < right)\n quickSort(arr, pivot + 1, right, comparer);\n }\n }\n\n private static void watermelon()\n {\n var w = readValue();\n write(w >= 4 && w % 2 == 0 ? \"YES\" : \"NO\");\n }\n private static void wayTooLongWords()\n {\n var words = new List();\n\n var n = readValue();\n for (int i = 0; i < n; ++i)\n words.Add(readString());\n\n foreach (var word in words)\n write(word.Length <= 10 ? word : $\"{word.First()}{word.Length - 2}{word.Last()}\");\n }\n private static void team()\n {\n int solve = 0;\n\n var n = readValue();\n for (int i = 0; i < n; ++i)\n if (readValues().Where(x => x == 1).Count() > 1)\n ++solve;\n\n write(solve);\n }\n private static void football()\n {\n var positions = readString();\n for (int i = 6; i < positions.Length; ++i)\n if (positions.Substring(i - 6, 6) == (positions[i] == '0' ? \"000000\" : \"111111\"))\n {\n write(\"YES\");\n return;\n }\n write(\"NO\");\n }\n private static void theatreSquare()\n {\n var sizes = readValues();\n write((long)Math.Ceiling((double)sizes[0] / (double)sizes[2]) * (long)Math.Ceiling((double)sizes[1] / (double)sizes[2]));\n }\n private static void stringTask()\n {\n var Vowels = new HashSet { 'a', 'o', 'y', 'e', 'u', 'i' };\n var sb = new StringBuilder();\n var s = readString().ToLower();\n foreach (var c in s)\n if (!Vowels.Contains(c))\n {\n sb.Append('.');\n sb.Append(c);\n }\n\n write(sb.ToString());\n }\n private static void taxi()\n {\n int taxis = 0;\n var groups = new Dictionary { { 1, 0 }, { 2, 0 }, { 3, 0 } };\n\n readValue();\n var groupSizes = readValues();\n foreach (var size in groupSizes)\n if (size == 4)\n ++taxis;\n else\n groups[size] = groups[size] + 1;\n\n taxis += groups[3];\n groups[1] = groups[1] - Math.Min(groups[1], groups[3]);\n\n taxis += groups[2] / 2;\n if (groups[2] % 2 == 1)\n {\n ++taxis;\n groups[1] = groups[1] - 2;\n }\n\n if (groups[1] > 0)\n taxis += (int)Math.Ceiling((double)groups[1] / 4.0);\n\n write(taxis);\n }\n private static void fancyFence()\n {\n var a = readValue();\n for (double i = 3.0; ; i += 1.0)\n {\n var x = (double)(i - 2.0) * 180.0 / i;\n if (a <= x)\n {\n write(a < x ? \"NO\" : \"YES\");\n break;\n }\n }\n }\n private static void interestingDrink()\n {\n readString();\n var prices = readValues().OrderBy(x => x).ToList();\n var days = readValue();\n for (int i = 0; i < days; ++i)\n write(binarySearch(prices, readValue()) + 1);\n }\n private static void compilationErrors()\n {\n readString();\n Dictionary errors = readValues().GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count()), errors1 = new Dictionary();\n foreach (var error in readValues())\n {\n if (errors[error] > 1)\n errors[error] = errors[error] - 1;\n else\n errors.Remove(error);\n\n if (errors1.TryGetValue(error, out var count))\n errors1[error] = count + 1;\n else\n errors1.Add(error, 1);\n }\n write(errors.First().Key);\n\n foreach (var error in readValues())\n if (errors1[error] > 1)\n errors1[error] = errors1[error] - 1;\n else\n errors1.Remove(error);\n write(errors1.First().Key);\n }\n private static void doubleCola()\n {\n var idToName = new Dictionary { { 0, \"Sheldon\" }, { 1, \"Leonard\" }, { 2, \"Penny\" }, { 3, \"Rajesh\" }, { 4, \"Howard\" } };\n int n = readValue(), i = 1;\n for (; n > i * 5; i *= 2)\n n -= i * 5;\n write(idToName[(n - 1) / i]);\n }\n private static void ilyaAndQueries()\n {\n var dic = new Dictionary();\n var list = new List>();\n\n var s = readString();\n int start = 0, dicStart = 0;\n for (int j = 0; j < s.Length - 1; ++j)\n if (s[j] != s[j + 1])\n {\n if (start < j)\n {\n list.Add(new Tuple(start + 1, j + 1));\n for (; dicStart < j + 1; ++dicStart)\n dic.Add(dicStart, list.Count - 1);\n }\n start = j + 1;\n }\n if (start < s.Length - 1)\n {\n list.Add(new Tuple(start + 1, s.Length));\n for (; dicStart < s.Length; ++dicStart)\n dic.Add(dicStart, list.Count - 1);\n }\n\n var m = readValue();\n for (int j = 0; j < m; ++j)\n {\n var q = readValues();\n int l = q[0], r = q[1], result = 0;\n if (dic.TryGetValue(l, out var i))\n for (; i < list.Count && r >= list[i].Item1; ++i)\n if (l < list[i].Item2)\n result += Math.Min(r, list[i].Item2) - Math.Max(l, list[i].Item1);\n write(result);\n }\n }\n private static void twoTeamsComposing()\n {\n var n = readValue();\n var skills = readValues().GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count());\n }\n #region Laptop\n private class Laptop\n {\n internal int Price { get; private set; }\n internal int Quality { get; private set; }\n internal Laptop(int[] values)\n {\n Price = values[0];\n Quality = values[1];\n }\n }\n private class Laptop_Comparer_Price : Comparer\n {\n public override int Compare([AllowNull] Laptop x, [AllowNull] Laptop y) => x.Price - y.Price;\n }\n private class Laptop_Comparer_Quality : Comparer\n {\n public override int Compare([AllowNull] Laptop x, [AllowNull] Laptop y) => x.Quality - y.Quality;\n }\n private static void laptops()\n {\n List prices = new List(), qualities = new List();\n var n = readValue();\n for (int i = 0; i < n; ++i)\n {\n var laptop = new Laptop(readValues());\n prices.Add(laptop);\n qualities.Add(laptop);\n }\n\n for (int i = 0; i < n; ++i)\n if (prices[i] != qualities[i])\n {\n write(\"Happy Alex\");\n return;\n }\n write(\"Poor Alex\");\n }\n #endregion\n private static void fence()\n {\n int k = readValues()[1], minI = 0, currentH = 0;\n int[] h = readValues();\n\n for (int i = 0; i < k; ++i)\n currentH += h[i];\n var minH = currentH;\n\n for (int i = 1; i < h.Length - k + 1; ++i)\n {\n currentH = currentH - h[i - 1] + h[i + k - 1];\n if (minH > currentH)\n {\n minH = currentH;\n minI = i;\n }\n }\n\n write(minI + 1);\n }\n #region serejaAndSuffixes\n private class SerejaL\n {\n internal int L { get; private set; }\n internal int Result;\n internal SerejaL(int l)\n {\n L = l;\n }\n }\n private class SerejaLComparerL : Comparer\n {\n public override int Compare([AllowNull] SerejaL x, [AllowNull] SerejaL y) => x.L - y.L;\n }\n private static void serejaGetLs(int m, out List listDistinct, out List listOrdered)\n {\n listDistinct = new List();\n listOrdered = new List();\n var dic = new Dictionary();\n for (int i = 0; i < m; ++i)\n {\n var l = readValue() - 1;\n if (!dic.TryGetValue(l, out var item))\n {\n item = new SerejaL(l);\n dic.Add(l, item);\n listDistinct.Add(item);\n }\n listOrdered.Add(item);\n }\n quickSort(listDistinct, 0, listDistinct.Count - 1, new SerejaLComparerL());\n }\n private static void serejaAndSuffixes()\n {\n var m = readValues()[1];\n var a = readValues();\n serejaGetLs(m, out var listDistinct, out var listOrdered);\n\n var distinct = new HashSet();\n for (int i = listDistinct.Count - 1, j = a.Length - 1; i >= 0; --i)\n {\n for (; j >= listDistinct[i].L; --j)\n if (!distinct.Contains(a[j]))\n distinct.Add(a[j]);\n\n listDistinct[i].Result = distinct.Count;\n }\n\n foreach (var item in listOrdered)\n write(item.Result);\n }\n #endregion\n private static void bowWowTimetable()\n {\n string s = readString(), r = \"1\";\n int i = 1;\n for (; r.Length < s.Length; ++i, r = r + \"00\") ;\n if (r.Length > s.Length || !s.Substring(1).Contains('1'))\n write(i - 1);\n else\n write(i);\n }\n private static void digits()\n {\n readString();\n var numbers = readValues().GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count());\n if (!numbers.ContainsKey(0))\n {\n write(-1);\n return;\n }\n }\n private static void lifeWithoutZeros()\n {\n long a = readValue(), b = readValue(), c = a + b;\n write(Convert.ToInt64(a.ToString().Replace(\"0\", \"\")) + Convert.ToInt64(b.ToString().Replace(\"0\", \"\")) == Convert.ToInt64(c.ToString().Replace(\"0\", \"\")) ? \"YES\" : \"NO\");\n }\n private static void permutation()\n {\n var n = readValue();\n var a = readValues();\n write(n - a.Where(x => x <= n).Distinct().Count());\n }\n private static void hamsterFarm()\n {\n var n = readValues()[0];\n var k = readValues();\n int bestI = 0;\n for (int i = 1; i < k.Length; ++i)\n if (n % k[i] < n % k[bestI])\n bestI = i;\n write($\"{bestI + 1} {n / k[bestI]}\");\n }\n private static void shellGame()\n {\n int n = readValue(), x = readValue();\n for (int i = n; i > 0; --i)\n if (i % 2 == 1)\n {\n if (x == 0)\n x = 1;\n else if (x == 1)\n x = 0;\n }\n else if (x == 1)\n x = 2;\n else if (x == 2)\n x = 1;\n write(x);\n }\n\n static void Main(string[] args)\n {\n //var t = readValue();\n //for (int i = 0; i < t; ++i)\n shellGame();\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "c4437c1d358113e89d61f630186f0f75", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "e912d11cbde6d9a3db38c012f89a5fb2", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9790419161676647, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace ConsoleOut\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n int a = int.Parse(Console.ReadLine());//操作数\n int b = int.Parse(Console.ReadLine());//停留数\n while (true)\n {\n if (a % 2 == 0)\n {\n if (b == 1)\n {\n b = 2;\n }\n else if (b == 2)\n {\n b = 1;\n }\n }\n else\n {\n if (b == 0)\n {\n b = 1;\n }\n else if (b == 1)\n {\n b = 0;\n }\n }\n if (--a <= 0)\n {\n break;\n }\n }\n Console.Write(b);\n } \n }\n}", "lang": "Mono C#", "bug_code_uid": "583239ad30116094d3c325b84f34e8e3", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "22a95d7c41b438582ccc364fb6dfc9fc", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9973107952362659, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace KingsWay\n{\n class Program\n {\n \n static void Main(string[] args)\n {\n \n int n = int.Parse(Console.ReadLine());\n int x = int.Parse(Console.ReadLine());\n int initial = 0;\n \n int[] shells = new int[3];\n \n for(int i = 0;i0;i--)\n {\n if(i%2==0)\n {\n int temp1 = shells[2];\n shells[2] = shells[1];\n shells[1] = temp1;\n }\n else\n {\n int temp2 = shells[0];\n shells[0] = shells[1];\n shells[1] = temp2;\n }\n }\n \n for(int i=0;i= 1; i--)\n {\n if (i%2 == 1)\n {\n int temp = arr[0];\n arr[0] = arr[1];\n arr[1] = temp;\n }\n else\n {\n int temp = arr[2];\n arr[2] = arr[1];\n arr[1] = temp;\n }\n }\n\n for (int i = 0; i < arr.Length; i++)\n {\n if (arr[i] == 1)\n {\n Console.WriteLine(i);\n }\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f752080db20d1d171a164dcbafa9ce36", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "5563df8512982652732107e916668f8b", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9825581395348837, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Fight_the_Monster\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n int HPY = Next(), ATKY = Next(), DEFY = Next();\n int HPM = Next(), ATKM = Next(), DEFM = Next();\n int h = Next(), a = Next(), d = Next();\n\n int min = int.MaxValue;\n\n for (int ia = 0; ia <= 200; ia++)\n {\n for (int id = 0; id <= 100; id++)\n {\n int cost = ia*a + id*d;\n\n if (cost > min)\n break;\n\n int dY = Math.Max(0, ATKM - DEFY - id);\n int dM = Math.Max(0, ATKY + ia - DEFM);\n\n int cm = (HPM + dM - 1)/dM;\n int ih = Math.Max(0, cm*dY + 1 - HPY);\n\n cost += ih*h;\n\n if (cost < min)\n min = cost;\n }\n }\n writer.WriteLine(min);\n writer.Flush();\n }\n\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "e6c20c37036390b031f2622cbfb31542", "src_uid": "bf8a133154745e64a547de6f31ddc884", "apr_id": "c2db23c67a1729e815f13f56b84faa63", "difficulty": 1800, "tags": ["brute force", "implementation", "binary search"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5056603773584906, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": " int w = 0;\n Console.WriteLine(\"Enter Wight for Watermelon\");\n w=int.Parse( Console.ReadLine());\n if (w >= 1 && w <= 100)\n {\n if (w % 2 == 0)\n Console.WriteLine(\"YES\");\n }", "lang": "MS C#", "bug_code_uid": "69e5e189ce29cb3bb3e5de783b64f927", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "091b2bea3700ad67047d435b7e94f016", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9380530973451328, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nclass Program\n{\n\tpublic static void Main() {\n\t\tvar n = int.Parse(Console.ReadLine());\n\t\tConsole.WriteLine(n > 5 && n % 2 == 0 ? \"YES\" : \"NO\");\n\t}\n}\nProgram.Main();", "lang": "MS C#", "bug_code_uid": "c81ae9af388e2bcec4d9e67bdbba7559", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1997b7414099503c5311c475437b5636", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.037251123956326265, "equal_cnt": 14, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 15, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"CodeForces_Ex\", \"CodeForces_Ex\\CodeForces_Ex.csproj\", \"{BE4F4D0F-E27F-460E-A4C7-50188C25F76E}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{BE4F4D0F-E27F-460E-A4C7-50188C25F76E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{BE4F4D0F-E27F-460E-A4C7-50188C25F76E}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{BE4F4D0F-E27F-460E-A4C7-50188C25F76E}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{BE4F4D0F-E27F-460E-A4C7-50188C25F76E}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "7aa1c2e3211a613af4ad257cdd912e3b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dd04919112736bf207b8799cc90d077e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9948251528932099, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Exercises\n{\n class Program\n {\n static void Main(string[] args)\n {\n while (true)\n {\n Task4A();\n Console.ReadLine();\n }\n }\n\n static void Task4A()\n {\n Console.WriteLine(\"Input weight of watermellow:\");\n var word = Console.ReadLine().Trim();\n int weight;\n if (int.TryParse(word, out weight))\n {\n if((weight / 2 % 2) == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n else\n {\n Console.WriteLine(\"Input error.\");\n }\n }\n\n static void Task131A()\n {\n Console.WriteLine(\"Введите слово:\");\n var word = Console.ReadLine().Trim();\n var wordArray = word.ToArray();\n\n if (word.Length <= 100 && word.Length > 0 && !word.Contains(\" \"))\n {\n bool isConvertationNeeded = true;\n for (int i = 1; i < wordArray.Length; i++)\n {\n if (isConvertationNeeded && wordArray[i].ToString() == wordArray[i].ToString().ToUpper())\n {\n isConvertationNeeded = true;\n }\n else\n {\n isConvertationNeeded = false;\n }\n }\n\n if (isConvertationNeeded)\n {\n var isFirstLetterLow = wordArray[0].ToString() == wordArray[0].ToString().ToLower();\n\n word = word.ToLower();\n\n if (isFirstLetterLow)\n {\n word = word.Remove(0, 1);\n word = word.Insert(0, wordArray[0].ToString().ToUpper());\n }\n }\n\n Console.WriteLine(word);\n\n }\n else\n {\n Console.WriteLine(\"Ошибка ввода.\");\n }\n }\n\n static void Task460A()\n {\n Console.WriteLine(\"Введите n, m:\");\n var numbers = Console.ReadLine().Trim();\n var numbersArray = numbers.Split(new string[] { \" \" }, StringSplitOptions.RemoveEmptyEntries);\n int n, m;\n \n if (numbersArray.Length == 2 && int.TryParse(numbersArray[0], out n) && int.TryParse(numbersArray[1], out m) \n && n >= 1 && n <= 100 && m >= 1 && m <= 100)\n {\n int day = 0;\n for (int i = n; i > 0; i--) \n {\n day++;\n if (day % m == 0) { i++; }\n }\n Console.WriteLine(day);\n }\n else\n {\n Console.WriteLine(\"Ошибка ввода.\");\n }\n }\n\n static void Task71A()\n {\n Console.WriteLine(\"Введите число строк:\");\n int numberOfStrings;\n if (int.TryParse(Console.ReadLine().Trim(), out numberOfStrings) && numberOfStrings <= 100 && numberOfStrings >= 1)\n {\n var strings = new string[numberOfStrings];\n for (int i = 0; i < numberOfStrings; i++)\n {\n Console.WriteLine(\"Введите {0}ю строку:\", i + 1);\n strings[i] = Console.ReadLine().Trim();\n if (strings[i].Length > 10)\n {\n var length = strings[i].Length;\n var firstLetter = strings[i].ToArray()[0];\n var lastLetter = strings[i].ToArray()[length - 1];\n strings[i] = String.Format(\"{0}{1}{2}\", firstLetter, length, lastLetter);\n }\n }\n\n foreach (var word in strings)\n {\n Console.WriteLine(word);\n }\n\n }\n else\n {\n Console.WriteLine(\"Ошибка ввода.\");\n }\n }\n\n static void Task118A()\n {\n var vowels = new [] { \"a\", \"o\", \"y\", \"e\", \"u\", \"i\" };\n\n Console.WriteLine(\"Введите слово:\");\n var word = Console.ReadLine().Trim().ToLower();\n\n if (word.Length <= 100)\n {\n foreach(var letter in vowels){\n word = word.Replace(letter, \"\");\n }\n\n var wordArray = word.ToArray();\n word = \"\";\n\n for (int i = 0; i < wordArray.Length; i++)\n {\n word = word + \".\" + wordArray[i];\n }\n\n Console.WriteLine(word);\n }\n else\n {\n Console.WriteLine(\"Ошибка ввода.\");\n }\n }\n\n static void Task281A()\n {\n Console.WriteLine(\"Введите слово:\");\n var word = Console.ReadLine().Trim();\n \n if (word.Length < 1000)\n {\n var letter = word.ToArray()[0];\n var letterCap = letter.ToString().ToUpper();\n word = word.Remove(0, 1);\n word = word.Insert(0, letterCap);\n Console.WriteLine(word);\n }\n else\n {\n Console.WriteLine(\"Ошибка ввода.\");\n }\n }\n\n static void Task110A()\n {\n Console.WriteLine(\"Введите число:\");\n var numberString = Console.ReadLine().Trim();\n UInt64 i;\n if (UInt64.TryParse(numberString, out i) && i <= Math.Pow(10, 18))\n {\n var happyDigitsCount = numberString.Count(x => x == '7' || x == '4');\n if (happyDigitsCount.ToString().Any(x => x != '7' && x != '4'))\n {\n Console.WriteLine(\"No\");\n }\n else\n {\n Console.WriteLine(\"Yes\");\n }\n }\n else\n {\n Console.WriteLine(\"Ошибка ввода.\");\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d44627ddc5c5ba94796137317bc9c1bc", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f610e5c2bb8b2ab6df0b97310bb6083f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.6339285714285714, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CleanCode\n{\n class Program\n {\n static void Main(string[] args)\n {\n double n = double.Parse(Console.ReadLine());\n double m = double.Parse(Console.ReadLine());\n double a = double.Parse(Console.ReadLine());\n double res = Math.Round((n / a)) * Math.Round((m / a));\n Console.WriteLine(res.ToString());\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "2ff0a146a0ccb5500cd6d61b393edaa2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "478864bfe78e0836f82a52dd2b03acce", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.02134756504336224, "equal_cnt": 14, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 15, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26228.4\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"msp watermelon\", \"msp watermelon\\msp watermelon.csproj\", \"{EFBC6D34-8A95-4ACC-99BB-51D914FEBA5D}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{EFBC6D34-8A95-4ACC-99BB-51D914FEBA5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{EFBC6D34-8A95-4ACC-99BB-51D914FEBA5D}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{EFBC6D34-8A95-4ACC-99BB-51D914FEBA5D}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{EFBC6D34-8A95-4ACC-99BB-51D914FEBA5D}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "6e47970c331aa48256e37ce2326fa53b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "98f17a6c6cca221feb6038273bbc4d0a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6377142857142857, "equal_cnt": 10, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "void Main()\n{\n int n;\n string nstring = Console.ReadLine();\n if (int.TryParse(nstring, out n)){\n if(n<=0 || n==2){\n Console.WriteLine(\"NO\\n\");\n }else{\n if(n%2==0){\n Console.WriteLine(\"YES\\n\");\n }else{\n Console.WriteLine(\"NO\\n\");\n }\n }\n }else{\n Console.WriteLine(\"numero no valido\\n\");\n }\n}\n\n// Define other methods and classes here\n", "lang": "MS C#", "bug_code_uid": "e569efde1fe86788ba0d7c44afe39298", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3a5df567291d37411850821b8ca958fd", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6077519379844961, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\nnamespace application1\n\n{\n\tclass Program\n\n\t\t{\n\n\t\t\tstatic void Main(string[] args)\n\n\t\t\t{\n\t\t\t\tint w = Console.Read();\n\t\t\t\tif (w==2)\n\t\t\t\t{\n\t\t\t\t\tConsole.Write(\"NO\");\n\t\t\t\t}\n\t\t\t\telseif(w<4)\n\t\t\t\t{\n\t\t\t\t\tConsole.Write(\"NO\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif((w-2)%2==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.Write(\"YES\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.Write(\"NO\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n}", "lang": "MS C#", "bug_code_uid": "debaa0bd89f6f4bb76c48c2428bdfc54", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e245067d5dd3f093251010cc39af3782", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8032786885245902, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\n\t\tvar n = int.Parse(Console.ReadLine());\n\t\tvar min = MinTriangulation(1, n);\n\t\tConsole.WriteLine(min);\n\t}\n\t\n\tprivate static int MinTriangulation(int i, int j){\n\t\tif(j-i<2)\n\t\t\treturn 0;\n\t\t\n\t\tvar min = int.MaxValue;\n\t\tfor(int k=i+1; k<=j-1; k++){\n\t\t\tmin = Math.Min(min, MinTriangulation(i,k) + i*k*j + MinTriangulation(k,j));\n\t\t}\n\t\treturn min;\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "b95aa387e70c10909604533334b7f79b", "src_uid": "1bd29d7a8793c22e81a1f6fd3991307a", "apr_id": "4e428ecff80a9f714aaf5183a77220e4", "difficulty": 1200, "tags": ["dp", "math", "greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5560975609756098, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Text.RegularExpressions;\nusing System.IO;\nusing System.Numerics;\n\n\nnamespace probleme {\n class Program {\n static void Main(string[] args) {\n int n = int.Parse(Console.ReadLine());\n string s1 = Console.ReadLine();\n string s2 = Console.ReadLine();\n int ans = 0;\n for (int i = 0; i < n; i++) {\n int a = s1[i] - '0', b = s2[i] - '0';\n if (a == b)\n continue;\n if (a < b)\n ans += Math.Min(b - a, a + 9 - b + 1);\n else\n ans += Math.Min(a - b, b + 9 - a + 1);\n }\n Console.Write(ans);\n \n // Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "2c1ccc6f028487c6cbe326af78e0f286", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "f85a5bb0680109069cf3a918a45159db", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.36644798500468606, "equal_cnt": 12, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 3, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int[] a = func(7, 3);\n for (int i = 0; i < a.Length; i++)\n {\n Console.WriteLine(a[i].ToString());\n }\n }\n\n private static int[] func(int a,int b)\n {\n //int[] result = new int[2];\n int f = 0;\n int s = 0;\n if (a == b)\n {\n f = a;\n s = 0;\n }\n else if (a < b)\n {\n f = a;\n b = b - a;\n s = b / 2;\n }\n else if (b < a)\n {\n f = b;\n a = a - b;\n s = a / 2;\n }\n\n return result;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "46663b894fd87e1d87ccc2f655833a16", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "b5e684edf4ed038a63bb162c45f4c7aa", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8541114058355438, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int[] a = func(-1, 0);\n for (int i = 0; i < a.Length; i++)\n {\n Console.WriteLine(a[i].ToString());\n }\n }\n\n private static int[] func(int a,int b)\n {\n int[] result = new int[2];\n if (a < 0 || b < 0)\n {\n result[0] = 0;\n result[1] = 0;\n }\n else if (a == b)\n {\n result[0] = a;\n result[1] = 0;\n }\n else if (a < b)\n {\n result[0] = a;\n b = b - a;\n result[1] = b / 2;\n }\n else if (b < a)\n {\n result[0] = b;\n a = a - b;\n result[1] = a / 2;\n }\n\n return result;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "35886dbe2650d506970d93e88c64f5f8", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "b5e684edf4ed038a63bb162c45f4c7aa", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8799291094373062, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n \n int[] r = func(int.Parse(Console.ReadLine()), int.Parse(Console.ReadLine()));\n Console.WriteLine(r[0] + \" \" + r[1]);\n\t\t\t\n }\n\n private static int[] func(int a,int b)\n {\n int[] result = new int[2];\n if (a < 0 || b < 0)\n {\n result[0] = 0;\n result[1] = 0;\n }\n else if (a == b)\n {\n result[0] = a;\n result[1] = 0;\n }\n else if (a < b)\n {\n result[0] = a;\n b = b - a;\n result[1] = b / 2;\n }\n else if (b < a)\n {\n result[0] = b;\n a = a - b;\n result[1] = a / 2;\n }\n\n return result;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "706c4917e74ef8f8bfe89c90c07a36c2", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "b5e684edf4ed038a63bb162c45f4c7aa", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7641853201457575, "equal_cnt": 14, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace VasyaAndTheHipster\n{\n class Program\n {\n static void Main(string[] args)\n {\n int r, dayX = 0, b, dayY = 0;\n //Console.WriteLine(\"Enter 2 Numbers : \");\n\n r = int.Parse(Console.ReadLine());\n b = int.Parse(Console.ReadLine());\n\n\n\n while (b != 0 && r != 0)\n {\n dayX++;\n --r;\n --b;\n\n if (r == 0 && b != 0)\n {\n dayY = b / 2;\n b = 0;\n\n\n }\n else if (r != 0 && b == 0)\n {\n dayY = r / 2;\n r = 0;\n\n }\n }\n\n Console.WriteLine(\"{0}, {1}\",dayX,dayY);\n\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "abcb599c7e70ebf444938bfd79dda53c", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "71a998971e98fded7defcb5f96e6f97d", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9981387117444238, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Reflection;\nusing System.Threading;\nusing System.Diagnostics;\nusing System.Linq;\n\n#region testlib\npublic delegate ReadDelegate ReadDelegate(out T value);\npublic delegate bool ParserDelegate(string word, out T item);\n\npublic class Input : IDisposable\n{\n private static EventArgs DefaultEventArgs = new EventArgs();\n\n public TextReader TextReader { get; private set; }\n\n public event EventHandler OnEndOfStream;\n public event EventHandler OnParseError;\n public event EventHandler OnReadError;\n\n public bool CanRead { get; private set; }\n public bool ThrowExceptions { get; set; }\n\n string line = string.Empty;\n int pos = 0;\n\n static EventHandler emptyHandler;\n\n public Input(string path)\n : this(File.OpenRead(path))\n {\n }\n public Input(Stream s)\n : this(new StreamReader(s))\n {\n\n }\n public Input(TextReader tr)\n {\n TextReader = tr;\n\n if (emptyHandler == null)\n emptyHandler = (a, b) => { };\n\n OnEndOfStream = emptyHandler;\n OnParseError = emptyHandler;\n OnReadError = emptyHandler;\n\n CanRead = true;\n }\n\n public static implicit operator Input(Stream s)\n {\n return new Input(s);\n }\n public static implicit operator Input(TextReader tr)\n {\n return new Input(tr);\n }\n\n private bool ReadStream()\n {\n if (!CanRead) return false;\n if (pos < line.Length) return true;\n\n Clear();\n\n string s = TextReader.ReadLine();\n if (s == null)\n {\n CanRead = false;\n return false;\n }\n\n line = s;\n return true;\n }\n\n public ReadDelegate r(out T value)\n {\n value = ReadData();\n return r;\n }\n\n public void SkipChar()\n {\n if (pos < line.Length) pos++;\n else\n {\n ReadStream();\n }\n }\n public void SkipChars(int length)\n {\n while (length > 0)\n {\n int dt = line.Length - pos;\n if (dt <= 0)\n {\n length--;\n if (!ReadStream()) return;\n }\n dt = Math.Min(length, dt);\n pos += dt;\n length -= dt;\n }\n }\n\n public void SkipWhiteSpace()\n {\n while (true)\n {\n for (; pos < line.Length; pos++)\n {\n if (!char.IsWhiteSpace(line[pos])) return;\n }\n if (!ReadStream())\n {\n OnEndOfStream(this, DefaultEventArgs);\n return;\n }\n }\n }\n public bool CanReadData()\n {\n SkipWhiteSpace();\n return CanRead;\n }\n\n public T[] ReadArray()\n {\n int length = ReadInt32();\n return ReadArray(length);\n }\n public T[] ReadArray(int length)\n {\n ParserDelegate parser = Parser.GetPrimitiveParser();\n return ReadArray(length, parser);\n }\n public T[] ReadArray(ParserDelegate parser)\n {\n int length = ReadInt32();\n return ReadArray(length, parser);\n }\n public T[] ReadArray(int length, ParserDelegate parser)\n {\n T[] res = new T[length];\n for (int i = 0; i < length; i++)\n {\n res[i] = ReadData(parser);\n }\n return res;\n }\n\n public Decimal ReadDecimal()\n {\n return ReadData(Parser.DecimalParser);\n }\n public Double ReadDouble()\n {\n return ReadData(Parser.DoubleParser);\n }\n public Single ReadSingle()\n {\n return ReadData(Parser.SingleParser);\n }\n public UInt64 ReadUInt64()\n {\n return ReadData(UInt64.TryParse);\n }\n public UInt32 ReadUInt32()\n {\n return ReadData(UInt32.TryParse);\n }\n public UInt16 ReadUInt16()\n {\n return ReadData(UInt16.TryParse);\n }\n public Int64 ReadInt64()\n {\n return ReadData(Int64.TryParse);\n }\n public Int32 ReadInt32()\n {\n return ReadData(Int32.TryParse);\n }\n public Int16 ReadInt16()\n {\n return ReadData(Int16.TryParse);\n }\n public Boolean ReadYesNo()\n {\n return ReadData(Parser.YesNoParser);\n }\n public Boolean ReadBoolean()\n {\n return ReadData(Boolean.TryParse);\n }\n public Byte ReadByte()\n {\n return ReadData(Byte.TryParse);\n }\n\n private bool ReadCheck()\n {\n if (!CanRead)\n {\n OnReadError(this, DefaultEventArgs);\n if (ThrowExceptions)\n {\n throw new Exception(\"!CanRead\");\n }\n return false;\n }\n return true;\n }\n public T ReadData()\n {\n return ReadData(true);\n }\n public T ReadData(bool skipWhiteSpace)\n {\n ParserDelegate parser = Parser.GetPrimitiveParser();\n return ReadData(parser, skipWhiteSpace);\n }\n public T ReadData(ParserDelegate parser)\n {\n return ReadData(parser, true);\n }\n public T ReadData(ParserDelegate parser, bool skipWhiteSpace)\n {\n if (skipWhiteSpace)\n SkipWhiteSpace();\n\n if (!ReadCheck()) return default(T);\n\n string s = ReadWord(false);\n\n T res;\n if (!parser.Invoke(s, out res))\n {\n OnParseError(this, DefaultEventArgs);\n if (ThrowExceptions)\n {\n throw new Exception(\"!validate, word = \" + Output.ToString(s, 256));\n }\n }\n return res;\n }\n\n public string ReadWord()\n {\n return ReadWord(true);\n }\n public string ReadWord(bool skipWhiteSpace)\n {\n if (skipWhiteSpace)\n SkipWhiteSpace();\n\n if (!ReadCheck()) return string.Empty;\n\n int from = pos;\n int to = pos;\n for (int i = pos; i < line.Length; i++)\n {\n if (char.IsWhiteSpace(line[i])) break;\n to = i + 1;\n }\n pos = to;\n\n return line.Substring(from, to - from);\n }\n\n public string ReadLine()\n {\n if (!ReadCheck()) return string.Empty;\n\n ReadStream();\n string res = line.Substring(pos);\n pos = line.Length;\n\n return res;\n }\n\n public void Close()\n {\n TextReader.Close();\n }\n public void Clear()\n {\n pos = 0;\n line = string.Empty;\n }\n\n private bool disposed = false;\n public void Dispose()\n {\n Dispose(true);\n GC.SuppressFinalize(this);\n }\n\n protected virtual void Dispose(bool disposing)\n {\n if (!this.disposed)\n {\n if (disposing)\n {\n line = string.Empty;\n TextReader.Dispose();\n }\n disposed = true;\n }\n }\n ~Input()\n {\n Dispose(false);\n }\n}\npublic class Output : IDisposable\n{\n static char[] space = new char[] { ' ' };\n\n public TextWriter TextWriter { get; private set; }\n public bool AutoFlush { get; set; }\n\n\n public static string ToString(object obj, int maxLength)\n {\n return ToString(FormatReal(obj), maxLength);\n }\n public static string ToString(string s, int maxLength)\n {\n if (s.Length <= maxLength) return s;\n else return s.Substring(0, maxLength) + \"...\";\n }\n public static object FormatReal(object v, string format)\n {\n if (v is decimal) return ((decimal)v).ToString(format).Replace(',', '.');\n if (v is double) return ((double)v).ToString(format).Replace(',', '.');\n if (v is float) return ((float)v).ToString(format).Replace(',', '.');\n\n return v;\n }\n public static object FormatReal(object v)\n {\n if (v is decimal || v is double || v is float)\n {\n return v.ToString().Replace(',', '.');\n }\n return v;\n }\n\n public Output()\n : this(new MemoryStream())\n {\n }\n public Output(string path)\n : this(File.Create(path))\n {\n\n }\n public Output(Stream s)\n : this(new StreamWriter(s))\n {\n }\n public Output(TextWriter tw)\n {\n TextWriter = tw;\n }\n\n public static implicit operator Output(Stream s)\n {\n return new Output(s);\n }\n\n public static implicit operator Output(TextWriter tw)\n {\n return new Output(tw);\n }\n\n public static Output operator +(Output output, object obj)\n {\n output.Write(obj);\n return output;\n }\n public Output WriteArray(params T[] array)\n {\n return WriteArray(array, false);\n }\n public Output WriteArray(T[] array, bool appendLength)\n {\n return WriteArray(array, 0, array.Length, appendLength);\n }\n public Output WriteArray(T[] array, int index, int count)\n {\n return WriteArray(array, index, count, false);\n }\n public Output WriteArray(T[] array, int index, int count, bool appendLength)\n {\n if (index + count > array.Length)\n {\n string message = string.Format(\n \"Index out of range: {0} + {1} >= {2}\",\n index,\n count,\n array.Length);\n throw new Exception(message);\n }\n if (appendLength)\n {\n WriteLine(count);\n }\n for (int i = 0; i < count; i++)\n {\n Write(array[i]);\n Write(space, 0, space.Length);\n }\n WriteLine();\n\n return this;\n }\n public Output WriteLine(object obj)\n {\n obj = FormatReal(obj);\n return WriteLine(obj.ToString());\n }\n public Output WriteLine(string format, params object[] args)\n {\n return WriteLine(string.Format(format, args));\n }\n public Output WriteLine(string s)\n {\n return WriteLine(s.ToCharArray());\n }\n public Output WriteLine(char[] buffer)\n {\n return WriteLine(buffer, 0, buffer.Length);\n }\n public Output WriteLine(char[] buffer, int index, int count)\n {\n TextWriter.WriteLine(buffer, index, count);\n if (AutoFlush) TextWriter.Flush();\n return this;\n }\n public Output WriteLine()\n {\n TextWriter.WriteLine();\n if (AutoFlush) TextWriter.Flush();\n return this;\n }\n public Output Write(object obj)\n {\n obj = FormatReal(obj);\n return Write(obj.ToString());\n }\n public Output Write(string format, params object[] args)\n {\n return Write(string.Format(format, args));\n }\n public Output Write(string s)\n {\n return Write(s.ToCharArray());\n }\n public Output Write(char[] buffer)\n {\n return Write(buffer, 0, buffer.Length);\n }\n public Output Write(char[] buffer, int index, int count)\n {\n TextWriter.Write(buffer, index, count);\n if (AutoFlush) TextWriter.Flush();\n return this;\n }\n\n public void Close()\n {\n TextWriter.Close();\n }\n public void Flush()\n {\n TextWriter.Flush();\n }\n\n\n private bool disposed = false;\n public void Dispose()\n {\n Dispose(true);\n GC.SuppressFinalize(this);\n }\n\n protected virtual void Dispose(bool disposing)\n {\n if (!this.disposed)\n {\n if (disposing)\n {\n TextWriter.Dispose();\n }\n disposed = true;\n }\n }\n ~Output()\n {\n Dispose(false);\n }\n}\npublic static class Parser\n{\n public static ParserDelegate GetPrimitiveParser()\n {\n if (!typeof(T).IsPrimitive) throw new Exception(\"Unknown type\");\n else if (default(T) is Byte) return new ParserDelegate(Byte.TryParse) as ParserDelegate;\n else if (default(T) is Boolean) return new ParserDelegate(Boolean.TryParse) as ParserDelegate;\n else if (default(T) is Int16) return new ParserDelegate(Int16.TryParse) as ParserDelegate;\n else if (default(T) is Int32) return new ParserDelegate(Int32.TryParse) as ParserDelegate;\n else if (default(T) is Int64) return new ParserDelegate(Int64.TryParse) as ParserDelegate;\n else if (default(T) is UInt16) return new ParserDelegate(UInt16.TryParse) as ParserDelegate;\n else if (default(T) is UInt32) return new ParserDelegate(UInt32.TryParse) as ParserDelegate;\n else if (default(T) is UInt64) return new ParserDelegate(UInt64.TryParse) as ParserDelegate;\n else if (default(T) is Single) return new ParserDelegate(Parser.SingleParser) as ParserDelegate;\n else if (default(T) is Double) return new ParserDelegate(Parser.DoubleParser) as ParserDelegate;\n else if (default(T) is Decimal) return new ParserDelegate(Parser.DecimalParser) as ParserDelegate;\n else if (default(T) is String) return new ParserDelegate(Parser.StringParser) as ParserDelegate;\n else throw new Exception(\"Unknown type\");\n }\n public static bool YesNoParser(string s, out Boolean result)\n {\n s = s.ToLower();\n if (s == \"yes\") result = true;\n else if (s == \"no\") result = false;\n else\n {\n result = false;\n return false;\n }\n return true;\n }\n public static bool StringParser(string s, out string result)\n {\n result = s;\n return string.IsNullOrEmpty(s);\n }\n public static bool DecimalParser(string s, out Decimal result)\n {\n return Decimal.TryParse(s.Replace('.', ','), out result);\n }\n public static bool DoubleParser(string s, out Double result)\n {\n return Double.TryParse(s.Replace('.', ','), out result);\n }\n public static bool SingleParser(string s, out Single result)\n {\n return Single.TryParse(s.Replace('.', ','), out result);\n }\n}\n#endregion\nstatic class Program\n{\n #region Streams\n static string endl = Environment.NewLine;\n static Input cin = new Input(Console.In);\n static Output cout = new Output(Console.Out);\n static Output cerr = new Output(Console.Error);\n\n static void InitIO()\n {\n#if !DEBUG\n cin = new Input(\"input.txt\");\n cout = new Output(\"output.txt\");\n#endif\n }\n #endregion\n #region Time\n static Stopwatch sw = new Stopwatch();\n static void Start()\n {\n sw.Reset();\n sw.Start();\n }\n static void Restart(string text = \"\")\n {\n Stop(text);\n Start();\n }\n static void Time(string text = \"\")\n {\n if (string.IsNullOrEmpty(text))\n {\n cerr.WriteLine(sw.Elapsed);\n }\n else\n {\n cerr.WriteLine(text + \": \" + sw.Elapsed);\n }\n }\n static void Stop(string text = \"\")\n {\n sw.Stop();\n Time(text);\n }\n //*/\n #endregion\n const string nyan = \"^_^\";\n static void Solve()\n {\n var a = cin.ReadInt32();\n var b = cin.ReadInt32();\n\n cout.WriteLine(\"{0} {1}\", Math.Min(a, b), (Math.Max(a, b) - Math.Min(a, b) / 2);\n }\n\n static string[] Tests =\n {\n @\"3 1 2\n1 1 1\",\n @\"4 2 3\n1 2 4 8\",\n @\"3 1 2\n17 18 4\"\n };\n\n static string Generate(int n, int t, int seed)\n {\n var rnd = new Random(seed);\n var a = new int[n];\n for (var i = 0; i < n; i++)\n {\n a[i] = rnd.Next(1, 101);\n }\n\n var sb = new StringWriter();\n var output = new Output(sb);\n\n output.WriteLine(\"{0} {1}\", n, t);\n output.WriteArray(a, false);\n\n return sb.ToString();\n }\n static void Main()\n {\n#if DEBUG\n if (Tests.Length == 0)\n {\n Solve();\n }\n else\n {\n foreach(var test in Tests)\n {\n cin = new Input(new StringReader(test));\n Solve();\n }\n /*\n for (var i = 0; i < 100; i++)\n {\n var test = Generate(100, 10000000, i);\n Start();\n cin = new Input(new StringReader(test));\n Solve();\n Stop();\n }\n //*/\n }\n\n#else\n Solve();\n#endif\n }\n}", "lang": "MS C#", "bug_code_uid": "8fc0139870f2e7e024f41f0d97e07489", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "8cb727381f420d2dc0ce98702a4b0cc4", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9856418918918919, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\npublic class Program\n{\n public static void Main()\n {\n var input = Console.ReadLine().Split(' ');\n var a = int.Parse(input[0]);\n var ta = int.Parse(input[1]);\n input = Console.ReadLine().Split(' ');\n var b = int.Parse(input[0]);\n var tb = int.Parse(input[1]);\n input = Console.ReadLine().Split(':');\n\n // All time points are in minutes.\n var tripBegin = int.Parse(input[0])*60 + int.Parse(input[1]);\n var trafficBegin = 5*60;\n var trafficEnd = 23*60 + 59;\n var approachingTrafficBegin = Math.Max(tripBegin - tb + 1, trafficBegin);\n var approachingTrafficEnd = Math.Min(tripBegin + ta - 1, trafficEnd);\n var firstApproachingBus = \n approachingTrafficBegin % b == 0 ? \n approachingTrafficBegin : \n approachingTrafficBegin + (b - approachingTrafficBegin % b);\n var approachingBusesCount = 0;\n if (approachingTrafficEnd >= firstApproachingBus)\n approachingBusesCount = (approachingTrafficEnd - firstApproachingBus) / b + 1;\n Console.WriteLine(approachingBusesCount); \n }\n}", "lang": "Mono C#", "bug_code_uid": "d77db829f318353d699aecebbfd092d6", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "9c65096b64ace218a094848e0c2cfdaa", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9969122187913542, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nclass Solution\n{\n\tvoid Main()\n\t{\n\t\tvar inputs = Console.ReadLine().Split();\n\t\tvar a = int.Parse(inputs[0]);\n\t\tvar ta = int.Parse(inputs[1]);\n\t\tinputs = Console.ReadLine().Split();\n\t\tvar b = int.Parse(inputs[0]);\n\t\tvar tb = int.Parse(inputs[1]);\n\t\tinputs = Console.ReadLine().Split(':');\n\t\tvar hh = int.Parse(inputs[0]);\n\t\tvar mm = int.Parse(inputs[1]);\n\t\t\n\t\tvar ts = hh*60 + mm;\n\t\tConsole.WriteLine(GetNumberOfDepartedBuses(ts-tb, ts+ta, b));\n\t}\n\t\n\t//Returns number of departed buses in the given interval, if inteval ends are exclusive, and\n\tstatic int GetNumberOfDepartedBuses(int intervalStart, int intervalEnd, int departureFrequency, int firstDeparture = 5*60, int lastDeparture = 23*60+59)\n\t{\n\t\tint numUntilStart = intervalStart >= firstDeparture\t\n\t\t\t? (intervalStart - firstDeparture) / departureFrequency + 1\t//Inclusive-Inclusive\n\t\t\t: 0;\n\t\tint numUntilEnd = intervalEnd <= lastDeparture\n\t\t\t? ((intervalEnd - 1) - firstDeparture) / departureFrequency + 1\t//Inclusive-Exclusive\n\t\t\t: (lastDeparture - firstDeparture) / departureFrequency + 1;\t//Inclusive-Inclusive\n\t\n\t\treturn numUntilEnd - numUntilStart;\n\t}\n}", "lang": "MS C#", "bug_code_uid": "f7d9843d758948c5a898eda5c732ca4a", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "4f89806987def927f4371a1fc1913fc4", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9641119221411192, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Buses_Between_Cities\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n int a = Next();\n int ta = Next();\n\n int b = Next();\n int tb = Next();\n\n int hh = Next();\n int mm = Next();\n\n var start = new DateTime(10, 10, 10, hh, mm, 0);\n DateTime end = start.AddMinutes(ta);\n\n int count = 0;\n for (var i = new DateTime(10, 10, 10, 5, 0, 0); i < end; i = i.AddMinutes(b))\n {\n DateTime e = i.AddMinutes(tb);\n\n if (e > start)\n count++;\n }\n\n writer.WriteLine(count);\n writer.Flush();\n }\n\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "213107b8376d99c6c843d6adf64a3b85", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "bd8e6f313393a583c69407df67ae1039", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9932395395578294, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\n\nnamespace CF317\n{\n\tinternal class Program\n\t{\n\t\tprivate static void Main(string[] args)\n\t\t{\n\t\t\tvar sr = new InputReader(Console.In);\n\t\t\t//var sr = new InputReader(new StreamReader(\"input.txt\"));\n\t\t\tvar task = new Task();\n\t\t\tusing (var sw = Console.Out)\n\t\t\t{\n\t\t\t//using (var sw = new StreamWriter(\"output.txt\")) {\n\t\t\t\ttask.Solve(1, sr, sw);\n\t\t\t}\n\t\t\t//Console.ReadKey();\n\t\t}\n\t}\n\n\tinternal class Task\n\t{\n\t\tpublic void Solve(int testNumber, InputReader sr, TextWriter sw)\n\t\t{\n\t\t\tvar input = sr.ReadArray(Int32.Parse);\n\t\t\tvar a = input[0];\n\t\t\tvar ta = input[1];\n\t\t\tinput = sr.ReadArray(Int32.Parse);\n\t\t\tvar b = input[0];\n\t\t\tvar tb = input[1];\n\t\t\tvar str = sr.NextString().Split(new[] { ':' }, StringSplitOptions.RemoveEmptyEntries);\n\t\t\tvar h = str[0][0] == '0' ? Int32.Parse(str[0][1].ToString(CultureInfo.InvariantCulture)) : Int32.Parse(str[0]);\n\t\t\tvar m = str[1][0] == '0' ? Int32.Parse(str[1][1].ToString(CultureInfo.InvariantCulture)) : Int32.Parse(str[1]);\n\t\t\tvar count = 0;\n\t\t\tvar start = h * 60 + m;\n\t\t\tint end =start + ta;\n\t\t\tvar times = new List();\n\t\t\tvar bArr = new List>();\n\t\t\tfor (var startB = 5 * 60; startB + tb <= 23*60 + 59; startB += b) {\n\t\t\t\tbArr.Add(new Tuple(startB, startB + tb));\n\t\t\t}\n\t\t\tfor (var i = 0; i < bArr.Count; i++) {\n\t\t\t\tvar next = bArr[i];\n\t\t\t\tif (start < next.Item2 && next.Item1 < end) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsw.WriteLine(count);\n\t\t}\n\t}\n\n\tinternal class InputReader : IDisposable\n\t{\n\t\tprivate bool isDispose;\n\t\tprivate readonly TextReader sr;\n\n\t\tpublic InputReader(TextReader stream)\n\t\t{\n\t\t\tsr = stream;\n\t\t}\n\n\t\tpublic void Dispose()\n\t\t{\n\t\t\tDispose(true);\n\t\t\tGC.SuppressFinalize(this);\n\t\t}\n\n\t\tpublic string NextString()\n\t\t{\n\t\t\tvar result = sr.ReadLine();\n\t\t\treturn result;\n\t\t}\n\n\t\tpublic int NextInt32()\n\t\t{\n\t\t\treturn Int32.Parse(NextString());\n\t\t}\n\n\t\tpublic long NextInt64()\n\t\t{\n\t\t\treturn Int64.Parse(NextString());\n\t\t}\n\n\t\tpublic string[] NextSplitStrings()\n\t\t{\n\t\t\treturn NextString()\n\t\t\t\t.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\t\t}\n\n\t\tpublic T[] ReadArray(Func func)\n\t\t{\n\t\t\treturn NextSplitStrings()\n\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t.ToArray();\n\t\t}\n\n\t\tpublic T[] ReadArrayFromString(Func func, string str)\n\t\t{\n\t\t\treturn\n\t\t\t\tstr.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)\n\t\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t\t.ToArray();\n\t\t}\n\n\t\tprotected void Dispose(bool dispose)\n\t\t{\n\t\t\tif (!isDispose) {\n\t\t\t\tif (dispose)\n\t\t\t\t\tsr.Close();\n\t\t\t\tisDispose = true;\n\t\t\t}\n\t\t}\n\n\t\t~InputReader()\n\t\t{\n\t\t\tDispose(false);\n\t\t}\n\t}\n}", "lang": "MS C#", "bug_code_uid": "4a6273eeb0f294c5ea14d6f06b251c17", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "864a0b9d531a9aa33dd1086fdbe9f88c", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9222180870859695, "equal_cnt": 28, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 21, "fix_ops_cnt": 27, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace A\n{\n class Program\n {\n static void Main(string[] args)\n {\n \n string[] t_A = Console.ReadLine().Split(' ');\n string[] t_B = Console.ReadLine().Split(' ');\n string[] HHH = Console.ReadLine().Split(':');\n int hour = 0;\n if (HHH[0][0] == '0') hour = int.Parse(HHH[0][1].ToString());\n else\n hour = int.Parse(HHH[0][0].ToString()) * 10 + int.Parse(HHH[0][1].ToString());\n int minute = 0;\n if (HHH[1][0] == '0') minute = int.Parse(HHH[1][1].ToString());\n else\n minute = int.Parse(HHH[1][0].ToString()) * 10 + int.Parse(HHH[1][1].ToString());\n int starttime = hour * 60 + minute;\n int endtime = starttime + int.Parse(t_A[1].ToString());\n int ans = 0;\n int start = 300;\n int chastota = int.Parse(t_B[0].ToString());\n int time = int.Parse(t_B[1].ToString());\n while (true)\n {\n if (start>=endtime) break;\n if(start+time>starttime)ans++;\n start += chastota;\n }\n \n \n Console.WriteLine(ans);\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "0cafaca82feefa90c6277b8d1ffe47e4", "src_uid": "1c4cf1c3cb464a483511a8a61f8685a7", "apr_id": "61af8b67e077132e60af4e9771178c21", "difficulty": 1600, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9899930183849197, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Undoubtedly_Lucky_Numbers\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n string s = reader.ReadLine();\n int n = int.Parse(s);\n\n int count;\n if (n <= 100)\n count = n;\n else\n {\n count = 99;\n int d = 4;\n for (int le = 3; le < s.Length; le++)\n {\n count += 9;\n count += 9*(d-1);\n count += 36*(2*d - 2);\n }\n\n int sl = s.Length;\n for (int i = 1; i < 10; i++)\n {\n int k = i;\n for (int j = 1; j < sl; j++)\n {\n k = k*10 + i;\n }\n if (k <= n)\n count++;\n for (int j = 0; j < 10; j++)\n {\n if (j == i)\n continue;\n\n for (int m = (1 << (sl-1)) - 2; m >= 0; m--)\n {\n int mask = m;\n k = i;\n for (int jj = 1; jj < sl; jj++)\n {\n k *= 10;\n if ((mask & 1) == 1)\n k += i;\n else k += j;\n mask >>= 1;\n }\n if (k <= n)\n count++;\n }\n }\n }\n }\n\n writer.WriteLine(count);\n writer.Flush();\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "727ae384324dc5b603c074470c6b706d", "src_uid": "0f7f10557602c8c2f2eb80762709ffc4", "apr_id": "a6c955c56e009fa519b6e678dc582c62", "difficulty": 1600, "tags": ["dfs and similar", "brute force", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9521925486317178, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n\n List list = new List();\n int sum = 0;\n for (int i = 0; i < 10; i++)\n {\n for (int j = 0; j < 10; j++)\n {\n for (int k = 1; k < 1024; k++)\n {\n int t = 0;\n for (int l = k, m = 1; l > 0; l >>= 1, m*=10)\n {\n \n if ((l & 0x1) == 1)\n {\n t += m * i;\n }\n else\n {\n t += m * j;\n } \n }\n if (t > 0 && t <= n)\n {\n list.Add(t);\n }\n }\n }\n }\n\n list.Sort();\n for (int i = 0; i < list.Count - 1; i++)\n {\n if (list[i] != list[i+1])\n {\n sum++;\n }\n }\n Console.WriteLine(sum+1);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "9b08723b569fb89ca2b7a5dbc95cc648", "src_uid": "0f7f10557602c8c2f2eb80762709ffc4", "apr_id": "35c21e1f7f07529c4900a867c887e0eb", "difficulty": 1600, "tags": ["dfs and similar", "brute force", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9955506117908788, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ProgrammingContest.Codeforces.Round91 {\n class C {\n static List num = new List();\n static void gen(long x, int n) {\n if (x <= n) {\n if(x != 0)\n num.Add((int)x);\n gen(x * 10 + 4, n);\n gen(x * 10 + 7, n);\n }\n }\n\n static long fact(long n) { long res = 1; while (n > 1) res *= n--; return res; }\n\n static int n;\n static List val = new List();\n static int dfs(int pos, long k) {\n if (pos > n) return 0;\n int rest = n - pos,\n res = 0;\n for (int i = 0; i < val.Count; i++) {\n if (val[i] == -1) continue;\n if (k < fact(rest)) {\n if (num.Contains(val[i]) && num.Contains(pos)) {\n res = 1;\n }\n //Console.WriteLine(\"dfs: {0} {1}\", pos, val[i]);\n val[i] = -1;\n return res + dfs(pos + 1, k);\n }\n k -= fact(rest);\n }\n throw new Exception();\n }\n\n static void Main() {\n var xs = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n n = xs[0];\n int k = xs[1]-1;\n\n for (int v = k, i = 1; i <= n && v != 0; i++) {\n v /= i;\n if (i == n && v != 0) {\n Console.WriteLine(-1);\n return;\n }\n }\n\n gen(0, n);\n for (long v = 1, i = 1; i <= n; i++) {\n v *= i;\n if (k < v) {\n int res = 0;\n int m = (int)(n - i);\n int id = -1;\n //Console.WriteLine(\"dfs: {0} {1}\", m, res);\n for (int j = 0; j < num.Count; j++) {\n if (num[j] > m) {\n res += j;\n id = j;\n break;\n }\n if (j == num.Count - 1) {\n Console.WriteLine(num.Count);\n return;\n }\n }\n //Console.WriteLine(\"dfs: {0} {1}\", m, res);\n for (int j = m; j < n; j++) {\n val.Add(j + 1);\n }\n Console.WriteLine(dfs(m+1, k) + res);\n return;\n }\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "cb74304c3666a896200bfe8e26ff2f71", "src_uid": "cb2aa02772f95fefd1856960b6ceac4c", "apr_id": "4939148b51f135071e4a8bcb6da22ac2", "difficulty": 1900, "tags": ["brute force", "combinatorics", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9784517158818835, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace cf\n{\n class Program\n {\n private int n;\n private int k;\n private int[] nums;\n private int startIndex;\n private int total;\n\n void searchLuckNumber(uint now)\n {\n if (now <= n)\n {\n if (isLuckNumber(getNum(now))) total++;\n\n searchLuckNumber(now * 10 + 4);\n searchLuckNumber(now * 10 + 7);\n }\n }\n\n uint getNum(uint index)\n {\n if (index < startIndex)\n {\n return index;\n }\n return (uint)nums[index - startIndex];\n }\n\n static Boolean isLuckNumber(uint num)\n {\n string str = string.Format(\"{0}\", num);\n for (int i = 0; i < str.Length; i++)\n {\n if (str[i] != '4' && str[i] != '7')\n {\n return false;\n }\n }\n return true;\n }\n\n void solve()\n {\n int[] f = new int[16];\n f[0] = 1;\n for (int i = 1; i <= 15; i++)\n {\n f[i] = f[i - 1] * i;\n }\n\n string nk = Console.ReadLine();\n string[] nks = nk.Split(' ');\n n = int.Parse(nks[0]);\n k = int.Parse(nks[1]);\n int orin = n;\n int orik = k;\n\n n = Math.Min(n, 15);\n startIndex = orin - n + 1;\n nums = new int[n];\n bool[] used = new bool[n + 1];\n int based = orin - n;\n for (int i = 0; i < n; i++)\n {\n for (int j = 1; j <= n; j++)\n {\n if (used[j]) continue;\n if (k > f[n - 1 - i])\n {\n k -= f[n - 1 - i];\n }\n else\n {\n used[j] = true;\n nums[i] = based + j;\n break;\n }\n }\n }\n\n k = orik;\n n = orin;\n\n searchLuckNumber(4);\n searchLuckNumber(7);\n\n Console.WriteLine(total);\n }\n\n static void Main(string[] args)\n {\n Program m = new Program();\n m.solve();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "904f499f263fae3bc6f0772d1218cd86", "src_uid": "cb2aa02772f95fefd1856960b6ceac4c", "apr_id": "c5c6216a838ab25e7935381d2b7aeb68", "difficulty": 1900, "tags": ["brute force", "combinatorics", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9822761194029851, "equal_cnt": 11, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 6, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\n\nclass MainClass{\n int fact(int x)\n {\n return x == 0 ? 1 : fact(x - 1) * x;\n }\n\n int pow(int x, int y)\n {\n return y == 0 ? 1 : pow(x, y - 1) * x;\n }\n void gen47s(List arr, int piv, int bias, int n)\n {\n if (piv == 0)\n {\n if (bias + 4 <= n)\n arr.Add(bias + 4);\n if (bias + 7 <= n)\n arr.Add(bias + 7);\n }\n else\n {\n gen47s(arr, piv - 1, bias + 4 * pow(10, piv), n);\n gen47s(arr, piv - 1, bias + 7 * pow(10, piv), n);\n }\n }\n\n int main(int n, int k)\n {\n int ans = 0;\n --k;\n if (n <= 12 && k >= fact(n))\n {\n ans = -1;\n return ans;\n }\n int cons = 12;\n for (cons = 12; cons >= 0; --cons)\n if (k >= fact(cons))\n break;\n List rest = new List();\n for (int i = n - cons; i <= n; ++i)\n rest.Add(i);\n List arr47 = new List();\n for (int i = 0; i < (\"\" + n).Length; ++i)\n gen47s(arr47, i, 0, n);\n for (int i = arr47.Count - 1; i >= 0; --i)\n if (arr47[i] < n - cons)\n {\n ans = i + 1;\n break;\n }\n foreach (int i in rest.ToArray())\n {\n int q = k / fact(n - i);\n int current = rest[q];\n rest.Remove(current);\n if (arr47.Contains(i) && arr47.Contains(current))\n ans++;\n k -= q * fact(n - i);\n }\n return ans;\n }\n static void Main(){\n int n, k;\n string[] items = Console.ReadLine().Split(' ');\n n = int.Parse(items[0]);\n k = int.Parse(items[1]);\n\n Console.Write(main(n, k));\n }\n}", "lang": "Mono C#", "bug_code_uid": "7842a9dc3ca891ab76d394a8e321f7af", "src_uid": "cb2aa02772f95fefd1856960b6ceac4c", "apr_id": "e41bf18809725930cc078fd32448c9e6", "difficulty": 1900, "tags": ["brute force", "combinatorics", "number theory"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9933071774751904, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\n\nclass MainClass{\n int fact(int x)\n {\n return x == 0 ? 1 : fact(x - 1) * x;\n }\n\n int pow(int x, int y)\n {\n return y == 0 ? 1 : pow(x, y - 1) * x;\n }\n void gen47s(List arr, int piv, int bias, int n)\n {\n if (piv == 0)\n {\n if (bias + 4 <= n)\n arr.Add(bias + 4);\n if (bias + 7 <= n)\n arr.Add(bias + 7);\n }\n else\n {\n gen47s(arr, piv - 1, bias + 4 * pow(10, piv), n);\n gen47s(arr, piv - 1, bias + 7 * pow(10, piv), n);\n }\n }\n\n int main(int n, int k)\n {\n int ans = 0;\n --k;\n if (n <= 12 && k >= fact(n))\n {\n ans = -1;\n return ans;\n }\n int cons = 12;\n for (cons = 12; cons > 0; --cons)\n if (k >= fact(cons))\n break;\n List rest = new List();\n for (int i = n - cons; i <= n; ++i)\n rest.Add(i);\n List arr47 = new List();\n for (int i = 0; i < (\"\" + n).Length; ++i)\n gen47s(arr47, i, 0, n);\n for (int i = arr47.Count - 1; i >= 0; --i)\n if (arr47[i] < n - cons)\n {\n ans = i + 1;\n break;\n }\n foreach (int i in rest.ToArray())\n {\n int q = k / fact(n - i);\n int current = rest[q];\n rest.Remove(current);\n if (arr47.Contains(i) && arr47.Contains(current))\n ans++;\n k -= q * fact(n - i);\n }\n return ans;\n }\n static void Main(){\n int n, k;\n string[] items = Console.ReadLine().Split(' ');\n n = int.Parse(items[0]);\n k = int.Parse(items[1]);\n MainClass mn = new MainClass();\n Console.Write(mn.main(n, k));\n }\n}", "lang": "Mono C#", "bug_code_uid": "2d523bf18dda29e0e2b82714b432fd80", "src_uid": "cb2aa02772f95fefd1856960b6ceac4c", "apr_id": "e41bf18809725930cc078fd32448c9e6", "difficulty": 1900, "tags": ["brute force", "combinatorics", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9953051643192489, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces1\n{\n class Program\n {\n static void Main(string[] args)\n {\n char[] symbols = ['h', 'e', 'l', 'l', 'o'];\n string inputString = Console.ReadLine();\n\n int count = 0;\n\n foreach(char c in inputString)\n {\n if(count<5\n && c == symbols[count])\n {\n count++;\n }\n }\n\n Console.WriteLine(count == 5 ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "974ece3d5c3e0f8b398eaffba109c048", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "240cd23ae9dbb3a5b52c3cb3967f614f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9599332220367279, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _58A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n int count = 0; string str = \"hello\";\n for (int i = 0; i < s.Length; i++)\n {\n if (s[i] == str[count]) count++;\n }\n if(count == str.Length) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n Console.Read();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a2bd18d6e2dae1886bff677776dbae70", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "88c65752ff89a52b5c618be183fc0d7d", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9648168298875589, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Runtime.InteropServices;\nusing System.Threading;\n\nnamespace ConsoleApp3\n{\n class Program\n {\n static void Main(string[] args)\n {\n int i=0;\n bool flag = false,flag1=false,flag2=false,flag3=false,flag4=false;\n //int n = Convert.ToInt32(Console.ReadLine());\n String s = Console.ReadLine();\n while (i < s.Length)\n {\n if (s[i] == 'h')\n {\n flag = true;\n i++;\n }\n\n if (flag && s[i] == 'e')\n {\n flag1 = true;\n i++;\n }\n\n if (flag1 && s[i] == 'l' && !flag2)\n {\n flag2 = true;\n i++;\n }\n\n if (flag2 && s[i] == 'l')\n {\n flag3 = true;\n i++;\n }\n\n if (flag3 && s[i] == 'o')\n {\n flag4 = true;\n i++;\n }\n else i++;\n\n if (flag4) break;\n\n }\n if (flag4) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "9b50d6986c5a3f3b323205ccf017cb2b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "4b52213bfd6e927e03e47be167855806", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7295597484276729, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "using System;\nnamespace CsharpConsoleApplication\n{\n class Program\n {\n static void Main(string[] args)\n {\n String a = Console.ReadLine();\n int h = a.IndexOf('h');\n if (h == -1)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n int e = a.IndexOf('e', h);\n int l = a.IndexOf('l', e);\n int l2 = a.IndexOf('l', l + 1);\n int o = a.IndexOf('o', l2);\n\n if (h < e && e < l && l < l2 && l2 < o)\n Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "01a4284d1a510d670df2bad312000b01", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "8283dd214b9602768cae253808577962", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9889948642699926, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace CF_Hello {\n class Program {\n static void Main(string[] args) {\n string input = Console.ReadLine();\n string example = \"hello\";\n string output = string.Empty;\n int i = 0;\n while ((example != string.Empty) || (i != input.Length)) {\n if (input[i] == example[0]) {\n output += input[i];\n example = example.Remove(0, 1);\n }\n ++i;\n }\n if (output == \"hello\") {\n Console.WriteLine(\"YES\");\n return;\n }\n Console.WriteLine(\"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "ef2a570f928cf3404c0381fc97ae0e14", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "0b41a92ef9883d08f62309ee47b9051e", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9562146892655368, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\n\n\nnamespace CF_Hello {\n class Program {\n static void Main(string[] args) {\n char[] input = Console.ReadLine().ToCharArray();\n string example = \"hello\";\n string output = string.Empty;\n int i = 0;\n int deleted = 0;\n while ((i < input.Length)) {\n if (input[i] == example[deleted]) {\n output += input[i];\n if (deleted == 5) {\n Console.WriteLine(\"YES\");\n return;\n }\n ++deleted;\n }\n ++i;\n }\n Console.WriteLine(\"NO\");\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "e9578a1f196beb46b154b251fbee266b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "0b41a92ef9883d08f62309ee47b9051e", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9350850077279753, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\n\n\nnamespace CF_Hello {\n class Program {\n static void Main(string[] args) {\n char[] input = Console.ReadLine().ToCharArray();\n string example = \"hello\";\n string output = string.Empty;\n int deleted = 0;\n for(int i=0;i= 1; i--)\n\n\n\n if (m % i == 0 && h % i == 0)\n {\n int x = 0;\n x = i;\n\n return x;\n }\n } while (true);\n return m;\n }\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "0cec3b649aba78388335546f414aa70d", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "c83d8158bb5c679a7cf7f72a24bd89cb", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9322916666666666, "equal_cnt": 17, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 16, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace B\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] temp = Console.ReadLine().Split(' ');\n string a = temp[0];\n char[] s = a.ToCharArray();\n int k = int.Parse(temp[1]), i, j, savej;\n char tempchar;\n i = 0;\n while (k > 0)\n {\n savej = i + 1;\n for (j = i + 1; j <= i + k; j++)\n {\n if (j == a.Length)\n break;\n if (s[savej] < s[j])\n savej = j;\n }\n if (s[savej] > s[i])\n {\n tempchar = s[savej];\n for (j = savej; j > i; j--)\n s[j] = s[j - 1];\n s[i] = tempchar;\n k -= savej - i;\n i++;\n }\n else\n {\n i++;\n if (i == a.Length)\n break;\n }\n }\n Console.Write(s);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "70a11060df25fb44ded0be4db4884907", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "8f1ab4389cc3015a73eb9a1fd5f53656", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8312593330014932, "equal_cnt": 17, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\nnamespace Rextester\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n byte h, e, l, o, = 0;\n char[] str = Console.ReadLine().ToCharArray();\n if (str.Length < 5)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n for (int i = 0; i < str.Length; i++)\n {\n if (h != 1)\n h = 1;\n if (h == 1 && e != 1)\n e = 1;\n if (h == 1 && e == 1 && l!=2)\n l++;\n if (h == 1; e == 1; l == 2; o != 1)\n o = 1;\n }\n if (h + e + l + O == 5)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "517acdc03797499f14cb42448e4eeae1", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "8f0735937b3dea57e68c886dd5171667", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8853695324283559, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nnamespace Sharp\n{\n class Program\n {\n static void Main(string[] args)\n {\n string A = Console.ReadLine();\n char[] Alf = { 'h', 'e', 'l', 'l', 'o' };\n string B = \"\";\n int k = 0;\n\n foreach (char el in A)\n {\n if (el == Alf[k])\n {\n B += el;\n k++;\n }\n }\n\n if (B.Equals(\"hello\") == true) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n\n Console.ReadLine();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "72fce12a7ff55707e4911d687ffff080", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "c88e0b34b93f2ffdd294e01f39c77db8", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9981718464351006, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nclass Program {\n static void Main() {\n var str = Console.ReadLine();\n var str2 = \"hello\";\n var i = 0;\n foreach (var c in str) if (c == str2[i])\n if (++i == str2.Length) { Console.WriteLine(\"YES\"); return }\n Console.WriteLine(\"NO\");\n }\n}", "lang": "MS C#", "bug_code_uid": "9cc9544730d5af34a493d28d67fa39d2", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "36fc5240be984095b1e4fb8228cbd42f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6533101045296167, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing CustomExtensions;\nnamespace CF85_D2_A_ChatRoom\n{\n class Program\n {\n static void Main(string[] args)\n {\n string line = Console.ReadLine().ToLower().Trim();\n line = new string(line.ToCharArray().Distinct().ToArray());\n\n if (line.Contains(\"helo\"))\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c5f1e279786f50e28c5dc81fa0e04e40", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "31b83de4b1c0eeed96d3b469a4682e1b", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9673750374139479, "equal_cnt": 12, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace chatRoom\n{\n class Program\n {\n static void Main(string[] args)\n {\n int h =0;\n int e = 0;\n int l =0;\n int o =0;\n string word = Console.ReadLine();\n string word1 = \"\";\n for(int i =0;i= ml && fr <= ml + 1) \n {\n can = true;\n } if (fl * 3 >= mr && fl <= mr + 1)\n {\n can = true;\n }\n if (can)\n {\n Console.WriteLine(\"YES\");\n }\n else \n {\n Console.WriteLine(\"NO\");\n }\n }\n\n \n }\n}\n", "lang": "MS C#", "bug_code_uid": "5d15b2217edfdbb7750b1f93a5fa388c", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "8ca181441feaa7be151de1306a5b14de", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9784668389319552, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace LearningCSharp\n{\n class _58A\n {\n\n static void Main(string [] args) {\n\n string input = \"hello\";char[] kb = input.ToArray(); int temp = 0;\n string t1 = Console.ReadLine();\n foreach (var ch in t1)\n {\n if (kb[temp] == ch) { temp++; }\n }\n if (temp == 5) { Console.WriteLine(\"YES\"); }\n else { Console.WriteLine(\"NO\"); }\n\n\n }\n\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d95d8b0975cd9eb9f675181e5d0f8efa", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "3764f970328e23ff22803126da91639a", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9786628733997155, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace Tiling.With.Hexagons\n{\n class Program\n {\n static void Main(string[] args)\n {\n var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();\n\n Console.WriteLine((input[0]*input[1]) + (input[1]*(input[2]-1)) + (input[2]-1));\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b46ccc1be0399e151179634d026e9359", "src_uid": "8ab25ed4955d978fe20f6872cb94b0da", "apr_id": "f9dacd9ea42e5e59145de903cced6be1", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9254185692541856, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Diagnostics;\n\nnamespace TestProject\n{\n class Program\n {\n public static void Main(string[] args)\n {\n var n = int.Parse(Console.ReadLine());\n var sqrtN = (int)Math.Ceiling(Math.Sqrt(n));\n var sw = Stopwatch.StartNew();\n for (var h = sqrtN; h >= 1; h--)\n {\n for (var w = sqrtN; w <= n; w++)\n {\n if (h*w == n)\n {\n Console.WriteLine($\"{h} {w}\");\n Console.WriteLine(sw.Elapsed);\n Environment.Exit(0);\n }\n }\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "ee823d4cdff06a2cd3ece2297de2fe2c", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "dabef0bd7a86097896402a9188c46b83", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9993861264579497, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication6\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = Convert.ToInt32(Console.ReadLine());\n int min = 999999999;\n int a = 0;\n int b = 0;\n for (int i = 1; i < n; i++)\n {\n if (n % i == 0)\n {\n int raz = Math.Abs(i - (n / i));\n if (raz < min)\n {\n min = raz;\n a = i;\n b = n / i;\n }\n }\n }\n Console.WriteLine(Math.Min(a,b) + \" \" + Math.Max(a,b));\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "bd5300c81ef6f135ea355c3fc1b4b6cf", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "3875f17d94b03cb4c15d152a4b2a16c9", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9991823385118561, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Test\n{\n class Program\n {\n static void Main()\n {\n int n = Int32.Parse(Console.ReadLine());\n string s = Console.ReadLine();\n int ans = 0;\n for (int begin = 0; begin < n; begin++)\n for (int end = begin; end < n; end++)\n {\n int x = 0, y = 0;\n for (int i = begin; i <= end; i++)\n switch (s[i])\n {\n case 'R':\n x++;\n break;\n\n case 'L':\n x--;\n break;\n\n case 'U':\n y++;\n break;\n\n case 'D':\n x--;\n break;\n }\n if (x == 0 && y == 0)\n ans++;\n }\n Console.Write(ans);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "2798f226657389e7c589b56335a334c4", "src_uid": "7bd5521531950e2de9a7b0904353184d", "apr_id": "795927ba4c19c0bc2f3dc989e45f87b9", "difficulty": 1000, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.017785682525566917, "equal_cnt": 15, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 16, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.29613.14\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Watermelon\", \"Watermelon.csproj\", \"{FE664089-017E-4CA2-8E32-05B760325D39}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{FE664089-017E-4CA2-8E32-05B760325D39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{FE664089-017E-4CA2-8E32-05B760325D39}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{FE664089-017E-4CA2-8E32-05B760325D39}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{FE664089-017E-4CA2-8E32-05B760325D39}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {33726527-E358-426C-802F-152BB8255C8E}\n\tEndGlobalSection\nEndGlobal\n", "lang": "Mono C#", "bug_code_uid": "125b113d50c61a49b338a43fd1ea4977", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "22b526f17a3c93b551f002b0ee2551bf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8431372549019608, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n int x = Console.Read();\n bool kt = (x > 2 && x % 2 < 1);\n Console.WriteLine((kt ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "727fefddff6db2cadeab3c9bcf59b1bf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e477dcc110ebe3f392ce2bb708a1f169", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9149700598802395, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": " class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n Regex regex = new Regex(@\"hello*\");\n Match match = regex.Match(input);\n if (match.Success)\n {\n Console.WriteLine(\"YES\");\n }\n else\n Console.WriteLine(\"NO\");\n }\n }", "lang": "MS C#", "bug_code_uid": "cad9d112bf04b49d0bc716e50aebb78b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "49bae91d64eaa89789da97763eb8e7bb", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8883048620236531, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.RegularExpressions;\n\nnamespace Chat\n{\n\n class ChattyBoy\n {\n \n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n Regex condfilter = new Regex(s);\n if (condfilter.IsMatch(\"^\\w*h*\\w*e*\\w*l{2,}\\w*o*\\w*$\") == true)\n Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n \n }\n \n }\n\n}", "lang": "MS C#", "bug_code_uid": "498f0f0f92ecf9f50b073d9db84f7e3d", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "6e7b3d63149fecdc89701e9edd1964e0", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.49608835710998617, "equal_cnt": 6, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace YOLO\n{\n class Program\n {\n static void Main(string[] args)\n {\n string x;\n x = Console.ReadLine();\n string cth = \"hello\";\n \n int index=0;\n for(int i=0; i0){\n continue;\n }\n else{\n index = 0;\n }\n }\n \n if(index==5){\n Console.Write(\"YES\");\n }\n else{\n Console.Write(\"NO\");\n }\n \n }\n }\n}", "lang": "MS C#", "bug_code_uid": "b25be464a0daf66f5203bd807eaa60e0", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "99e7c75a8592b2b6e3da08a50e65f9c4", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.2454780361757106, "equal_cnt": 19, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 8, "fix_ops_cnt": 19, "bug_source_code": "using System;\nusing System.Collections.Generic;\n//using System.Linq;\n//using System.Text;\n//using System.Threading.Tasks;\n\nnamespace Problem460A {\n class Program {\n static void Main(string[] args) {\n string[] input = Console.ReadLine().Split(' ');\n int socks = Convert.ToInt32(input[0]);\n int newPair = Convert.ToInt32(input[1]);\n\n int days = 0;\n days += socks;\n int newSocks = days / newPair;\n days += newSocks;\n\n while (newSocks > 0) {\n int newSocks2 = newSocks / newPair;\n days += newSocks2;\n\n newSocks = newSocks2;\n }\n if (days % newPair == 0)\n days++;\n\n Console.WriteLine(days);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "1244e2ec6c4d03ed37c3f9b69a2f870c", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "f12373a814e4a14823898679b0f3f554", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9069506726457399, "equal_cnt": 9, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace code\n{\n class Wight\n {\n\n\n\n static void Main(string[] args)\n {\n\n string input = Console.ReadLine();\n\n \n\n\n string word = \"hello\";\n \n int length = input.Length;\n int a = 0;\n int i, count = 0;\n for (i = 0; i < length; i++)\n {\n if (input[i] == word[a])\n {\n a++;\n count++;\n }\n }\n if (count == 5)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"No\");\n }\n\n }\n\n\n\n\n\n }\n\n\n \n}\n", "lang": "MS C#", "bug_code_uid": "b948c6022a895e6e72e9d47b978113b3", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "ce30c151303ce122838e3368b022eeda", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9901301031852848, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace Test\n{\n static class Program\n {\n static void Main(string[] args)\n {\n string temp = Console.ReadLine();\n long[] temps = temp.Split(new[] { \" \" }, StringSplitOptions.None).Select(long.Parse).ToArray();\n string s1 = Convert.ToString(temps[0], 2);\n string s2 = Convert.ToString(temps[1], 2);\n s1 = FindNext(s1);\n s2 = FindPrev(s2);\n Console.WriteLine(Count(s1, s2));\n }\n\n static int Count(string s1, string s2)\n {\n long l1 = Convert.ToInt64(s1, 2);\n long l2 = Convert.ToInt64(s2, 2);\n if (l1 > l2) return 0;\n if (l1 == l2) return 1;\n\n int total = 0;\n int iS = s1.Length;\n int iE = s2.Length;\n int i1 = s1.IndexOf(\"0\");\n int i2 = s2.IndexOf(\"0\");\n if (iS == iE) return i2 - i1 + 1;\n total += iS - i1;\n total += i2;\n for (int i = iS + 1; i < iE; i++) total += i - 1;\n return total;\n }\n\n static string FindNext(string s)\n {\n string t;\n int index = s.IndexOf(\"0\");\n if (index != -1)\n {\n int iindex = s.IndexOf(\"0\", index + 1);\n if (iindex == -1) return s;\n t = s.Remove(index + 1);\n for (int i = index + 1; i < s.Length; i++) t += \"1\";\n return t;\n }\n t = \"10\";\n for (int i = 1; i < s.Length; i++) t += \"1\";\n return t;\n }\n\n static string FindPrev(string s)\n {\n if (s.Equals(\"10\")) return \"1\";\n string t = null;\n int index = s.IndexOf(\"0\");\n if (index != -1)\n {\n int iindex = s.IndexOf(\"0\", index + 1);\n if (iindex == -1) return s;\n for (int i = 0; i < index - 1; i++) t += \"1\";\n t += \"0\";\n for (int i = index; i < s.Length; i++) t += \"1\";\n return t;\n }\n t = s.Remove(s.Length - 1) + \"0\";\n return t;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c68c568b792ec180dbc99194252a1707", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "527b511e3eca0d0512795b43d91ab850", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6424242424242425, "equal_cnt": 12, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Text.RegularExpressions;\nusing System.IO;\nusing System.Numerics;\nusing System.Globalization;\nusing System.Threading;\n\n\nnamespace probleme {\n class Program {\n static void Main(string[] args) {\n //Console.SetIn(new StreamReader(\"file.txt\"));\n string[] s = Console.ReadLine().Split(' ');\n long a = long.Parse(s[0]), b = long.Parse(s[1]);\n long ans = 0;\n for (long i = a; i <= b; i++) {\n int nz = 0;\n long aux = i;\n while (aux > 0) {\n if (aux % 2 == 0) {\n nz++;\n }\n aux >>= 1;\n }\n if (nz == 1) {\n ans++;\n }\n }\n Console.Write(ans);\n //Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "8e706bfa2fbcf9e4b0040336efb0ed78", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "44dd7dd4dd6c4397b05856fdbb145981", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8952380952380953, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Text.RegularExpressions;\nusing System.IO;\nusing System.Numerics;\nusing System.Globalization;\nusing System.Threading;\n\n\nnamespace probleme {\n class Program {\n static void Main(string[] args) {\n //Console.SetIn(new StreamReader(\"file.txt\"));\n string[] s = Console.ReadLine().Split(' ');\n long a = long.Parse(s[0]), b = long.Parse(s[1]);\n long n = 1;\n int p1 = 0;\n int ans = 0;\n while (p1 <= 60) {\n n <<= 1;\n p1++;\n for (int p2 = 0; p2 < p1 - 1; p2++) {\n long nr = n - 1 - (1 << p2);\n if (nr >= a && nr <= b) {\n //Console.WriteLine(\"{0} {1} {2}\",nr,n,p2);\n ans++;\n }\n }\n }\n Console.Write(ans);\n //Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "419f18a20771df5a122e43a859a49d41", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "44dd7dd4dd6c4397b05856fdbb145981", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9982773471145564, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Text.RegularExpressions;\nusing System.IO;\nusing System.Numerics;\nusing System.Globalization;\nusing System.Threading;\n\n\nnamespace probleme {\n class Program {\n static void Main(string[] args) {\n //Console.SetIn(new StreamReader(\"file.txt\"));\n string[] s = Console.ReadLine().Split(' ');\n long a = long.Parse(s[0]), b = long.Parse(s[1]);\n int p1 = 0;\n int ans = 0;\n long[] pow = new long[61];\n pow[0] = 1;\n for (int i = 1; i <= 60; i++) {\n pow[i] = 2 * pow[i - 1];\n }\n while (p1 <= 60) {\n p1++;\n for (int p2 = 0; p2 < p1 - 1; p2++) {\n long nr = pow[p1] - 1 - pow[p2];\n if (nr >= a && nr <= b) {\n //Console.WriteLine(\"{0} {1} {2}\",nr,n,p2);\n ans++;\n }\n }\n }\n Console.Write(ans);\n //Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "eef79b33a3362aa35432c6815ef0c02e", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "44dd7dd4dd6c4397b05856fdbb145981", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.34645115952213634, "equal_cnt": 30, "replace_cnt": 21, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 30, "bug_source_code": "using System;\n\nnamespace _2015B {\n class Program {\n static void Main(string[] args) {\n string[] input = Console.ReadLine().Split(' ');\n ulong first = ulong.Parse(input[0]);\n ulong last = ulong.Parse(input[1]);\n ulong count = 0;\n\n for (; first <= last; first++) {\n if (ToBin(first)) {\n count++;\n }\n }\n Console.WriteLine(count);\n }\n\n static bool ToBin(ulong input) {\n int remainder;\n int count = 0;\n\n while (input > 0) {\n remainder = (int)input % 2;\n if (remainder == 0) {\n count++;\n }\n if (count == 2) {\n break;\n }\n input /= 2;\n\n }\n if (count == 1)\n return true;\n else\n return false;\n }\n\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ff10737e811ecf6b2e01aeeb540c9e42", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "0397eb39b95750043c4a9d27dd4e5959", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9949292767547371, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Text;\n\nnamespace _2015B {\n class Program {\n static void Main(string[] args) {\n string[] input = Console.ReadLine().Split(' ');\n ulong first = ulong.Parse(input[0]);\n ulong last = ulong.Parse(input[1]);\n int res = 0;\n ulong tmp;\n string fS = DecimalToBinary(first);\n string lS = DecimalToBinary(last);\n\n for (int i = fS.Length; i <= lS.Length; i++)\n for (int j = 0; j < i; j++) {\n tmp = BuildTest(i, j);\n if (tmp <= last) {\n if (tmp >= first)\n res++;\n } else\n break;\n }\n\n Console.WriteLine(res);\n }\n\n static string DecimalToBinary(ulong data) {\n StringBuilder result = new StringBuilder();\n int rem = 0;\n while (data > 0) {\n rem = (int)(data % 2);\n data = data >> 1;\n result.Append(rem);\n }\n return ReverseString(result.ToString());\n }\n\n static string ReverseString(string s) {\n char[] arr = s.ToCharArray();\n Array.Reverse(arr);\n return new string(arr);\n }\n\n static ulong BuildTest(int length, int index) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < length - 1; i++) {\n sb.Append('1');\n }\n sb.Insert(length - index - 1, '0');\n return (BinToDec(sb.ToString()));\n }\n\n static ulong BinToDec(string value) {\n ulong res = 0;\n foreach (char c in value) {\n res <<= 1;\n res += (ulong)(c == '1' ? 1 : 0);\n }\n return res;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "52a9d21373aa87e9bdc63578a1fdb4da", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "0397eb39b95750043c4a9d27dd4e5959", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.7637260950030845, "equal_cnt": 14, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 7, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Linq;\n\n\nnamespace _611B\n{\n class Program\n {\n static void Main()\n {\n var s = Console.ReadLine().Split().Select(long.Parse).ToArray();\n var a = s[0] - 1; var b = s[1];\n Console.WriteLine(Calc(b)-Calc(a));\n }\n static long Calc(long num)\n {\n int n = Convert.ToString(num, 2).Length;\n long max = n * (n - 1) / 2; \n for (int k=0; k num) max--;\n else break;\n }\n return max;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c5e6c18f1e02598dd05a354ae2f53f14", "src_uid": "581f61b1f50313bf4c75833cefd4d022", "apr_id": "edd2ac032ad5cc65a8e4656b86ca66b8", "difficulty": 1300, "tags": ["bitmasks", "brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9893155258764608, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Globalization;\n\nnamespace cf_82_div2\n{\n \n class Program\n {\n private static HashSet delims =\n new HashSet { (int)' ', (int)'\\t', (int)'\\n', (int)'\\r' };\n private static StringBuilder token = new StringBuilder();\n\n private static void Skip()\n {\n while (delims.Contains(Console.In.Peek()))\n Console.Read();\n }\n\n public static bool EndOfStream()\n {\n Skip();\n return Console.In.Peek() == -1;\n }\n\n public static string Read()\n {\n Skip();\n int c = Console.Read();\n while (c != -1 && !delims.Contains(c))\n {\n token.Append((char)c);\n c = Console.Read();\n }\n string ret = token.ToString();\n token.Length = 0;\n return ret;\n }\n\n public static int ReadInt()\n {\n return int.Parse(Read());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(Read());\n }\n\n public static bool solve()\n {\n int[][] dp;\n int[] cnt, cost, weight;\n int n, W, a, b, c;\n W = ReadInt();\n n = ReadInt();\n n++;\n\n cnt = new int[n];\n cost = new int[n];\n weight = new int[n];\n dp = new int[2][];\n for (int i = 0; i < 2; i++)\n dp[i] = new int[W + 1];\n\n c = ReadInt();\n weight[0] = c;\n cost[0] = ReadInt();\n cnt[0] = W / c;\n for (int i = 1; i < n; i++)\n {\n a = ReadInt();\n b = ReadInt();\n c = ReadInt();\n cost[i] = ReadInt();\n cnt[i] = System.Math.Min(a / b, W / c);\n weight[i] = c;\n }\n\n for (int i = 0; i < n; i++)\n {\n for (int it = 0; it < cnt[i]; it++)\n {\n System.Array.Clear(dp[1], 0, dp[1].Length);\n for (int w = 0; w + weight[i] <= W; w++)\n {\n dp[1][w + weight[i]] = System.Math.Max(dp[1][w + weight[i]], dp[0][w] + cost[i]);\n }\n System.Array.Copy(dp[1], dp[0], dp[1].Length);\n }\n }\n\n int ans = 0;\n for (int i = 0; i <= W; i++)\n ans = System.Math.Max(ans, dp[0][i]);\n Console.WriteLine(ans);\n return false;\n }\n\n static void Main(string[] args)\n {\n //StreamReader reader = new StreamReader(\"input.txt\");\n //StreamWriter writer = new StreamWriter(\"output.txt\");\n //Console.SetIn(reader);\n //Console.SetOut(writer);\n while (solve() == true);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "360549e12370d11981b08b1958717caf", "src_uid": "4e166b8b44427b1227e0f811161d3a6f", "apr_id": "a01507ae1c41f3134b76a68e0d7e0015", "difficulty": 1700, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9591354272205336, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Globalization;\n\nnamespace cf_82_div2\n{\n \n class Program\n {\n private static HashSet delims =\n new HashSet { (int)' ', (int)'\\t', (int)'\\n', (int)'\\r' };\n private static StringBuilder token = new StringBuilder();\n\n private static void Skip()\n {\n while (delims.Contains(Console.In.Peek()))\n Console.Read();\n }\n\n public static bool EndOfStream()\n {\n Skip();\n return Console.In.Peek() == -1;\n }\n\n public static string Read()\n {\n Skip();\n int c = Console.Read();\n while (c != -1 && !delims.Contains(c))\n {\n token.Append((char)c);\n c = Console.Read();\n }\n string ret = token.ToString();\n token.Length = 0;\n return ret;\n }\n\n public static int ReadInt()\n {\n return int.Parse(Read());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(Read());\n }\n\n public static bool solve()\n {\n int[][] dp;\n int[] cnt, cost, weight;\n int n, W, a, b, c;\n W = ReadInt();\n n = ReadInt();\n n++;\n\n cnt = new int[n];\n cost = new int[n];\n weight = new int[n];\n dp = new int[2][];\n for (int i = 0; i < 2; i++)\n dp[i] = new int[W + 1];\n\n c = ReadInt();\n weight[0] = c;\n cost[0] = ReadInt();\n cnt[0] = W / c;\n for (int i = 1; i < n; i++)\n {\n a = ReadInt();\n b = ReadInt();\n c = ReadInt();\n cost[i] = ReadInt();\n cnt[i] = System.Math.Min(a / b, W / c);\n weight[i] = c;\n }\n\n for (int i = 0; i < n; i++)\n {\n for (int it = 0; it < cnt[i]; it++)\n {\n for (int w = 0; w + weight[i] <= W; w++)\n {\n dp[1][w + weight[i]] = System.Math.Max(dp[1][w + weight[i]], dp[0][w] + cost[i]);\n }\n System.Array.Copy(dp[1], dp[0], dp[1].Length);\n }\n }\n\n int ans = 0;\n for (int i = 0; i <= W; i++)\n ans = System.Math.Max(ans, dp[0][i]);\n Console.WriteLine(ans);\n return false;\n }\n\n static void Main(string[] args)\n {\n StreamReader reader = new StreamReader(\"input.txt\");\n //StreamWriter writer = new StreamWriter(\"output.txt\");\n Console.SetIn(reader);\n //Console.SetOut(writer);\n while (solve() == true);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "d88c5134f7879ce6935b7544613a6f88", "src_uid": "4e166b8b44427b1227e0f811161d3a6f", "apr_id": "a01507ae1c41f3134b76a68e0d7e0015", "difficulty": 1700, "tags": ["dp"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9817997977755308, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Achill\n{\n class Program\n {\n static void Main(string[] args)\n {\n List cord = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToList();\n List step = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToList();\n Func LeftO = y1 => (y1 - cord[1]) / step[1];\n double y = 0.5 * step[1] * ((cord[2] - cord[0])/step[0] + (cord[1] + cord[3]) / step[1]);\n double x = LeftO(y) * step[0] + cord[0];\n bool res = Math.Truncate(x) == x && Math.Truncate(y) == y;\n if (res)\n {\n res = (Math.Abs(x-cord[0])%step[0] == 0) && (Math.Abs(y - cord[1]) % step[1] == 0);\n res = res && (Math.Abs(x - cord[2]) % step[0] == 0) && (Math.Abs(y - cord[3]) % step[1] == 0);\n }\n Console.WriteLine(res ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "ba96da87963d8035d7b0024311a14814", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "23d617898cb217bcf6515e7573ed0ec8", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.010309278350515464, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "Judgement Failed", "lang": "Mono C#", "bug_code_uid": "73b6c170f5b1b80ae7669aed3196dca2", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "2aab95671046e0de2429fd3d033d3d10", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7799067840497151, "equal_cnt": 20, "replace_cnt": 5, "delete_cnt": 7, "insert_cnt": 9, "fix_ops_cnt": 21, "bug_source_code": "\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{\n class A\n {\n static void Main(string[] args)\n {\n string[] token = Console.ReadLine().Split();\n int x1 =int.Parse(token[0]);\n int y1 = int.Parse(token[1]);\n int x2 = int.Parse(token[2]);\n int y2 = int.Parse(token[3]);\n \n string[] token2 = Console.ReadLine().Split();\n int x = int.Parse(token2[0]);\n int y = int.Parse(token2[1]);\n \n if((x1-x2)%x==0&&(y1-y2)%y==0&&((x1-x2)/x)%2==((y1-y2)/y)%2)\n {\n Console.WriteLine(\"YES\");\n }else{\n Console.WriteLine(\"NO\");\n }\n }\n \n }\n}\n \n", "lang": "Mono C#", "bug_code_uid": "67ef3166eeee39ec407eb058d69fd830", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "964a0cafb9b39707fb66d29786f21751", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9673290670259347, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace abbycup1\n{\n\tclass MainClass\n\t{\n\t\tpublic static void Main (string[] args)\n\t\t{\n\t\t\tstring [] n9 = {\"9\", \"81\", \"648\", \"4536\", \"27216\", \"136080\", \"544320\", \"1632960\", \"326592\", \"326592\"};\n\t\t\tstring [] n10 = {\"10\", \"90\", \"720\", \"5040\", \"30240\", \"151200\", \"604800\", \"1814400\", \"3628800\", \"3628800\"};\n\t\t\tchar [] letters = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};\n\t\t\tbool nine = false;\n\t\t\tbool voprfirst=false;\n\t\t\tint count = 0;\n\t\t\tint voprcount=0;\n\t\t\t\n\t\t\tchar [] input = Console.ReadLine().ToCharArray();\n\t\t\t\n\t\t\tif ( Array.BinarySearch(letters, input[0]) >= 0 || input[0] == '?') {\n\t\t\t\tnine = true;\n\t\t\t}\n\t\t\t\n\t\t\tif ( input[0] == '?') {\n\t\t\t\tvoprfirst = true;\n\t\t\t}\n\t\t\t\n\t\t\tArray.Sort(input);\n\t\t\t\n\t\t\tfor (int i=0; i<=9; i++) {\n\t\t\t\tif (Array.BinarySearch(input, letters[i])>=0) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint vopr = Array.BinarySearch(input, '?');\n\t\t\tif (vopr>=0) {\n\t\t\t\tfor (int i=0; i0 && !voprfirst) {\n\t\t\t\tif (nine) {\n\t\t\t\t\tConsole.Write(n9[count-1]);\t\n\t\t\t\t} else {\n\t\t\t\t\tConsole.Write(n10[count-1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (voprfirst && count==0) {\n\t\t\t\tConsole.Write(\"9\");\n\t\t\t}\n\t\t\t\n\t\t\tif (count==0 && !voprfirst) {\n\t\t\t\tConsole.Write(\"1\");\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i=1; i<=voprcount; i++) {\n\t\t\t\tConsole.Write(\"0\");\n\t\t\t}\n\t\t\tConsole.WriteLine(\"\");\n\t\t\t\n\t\t}\n\t}\n}\n", "lang": "Mono C#", "bug_code_uid": "f78ec18846ddc6912210bd04be178fd4", "src_uid": "d3c10d1b1a17ad018359e2dab80d2b82", "apr_id": "bfb2a5da172997992174f509315c956c", "difficulty": 1100, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.38353463150110917, "equal_cnt": 20, "replace_cnt": 10, "delete_cnt": 3, "insert_cnt": 6, "fix_ops_cnt": 19, "bug_source_code": "using System;\n\nnamespace EightPointSets\n{\n public struct Point\n {\n public int x;\n public int y;\n }\n\n class EightPointSets\n {\n static void Main(string[] args)\n {\n string[] input;\n Point[] points = new Point[8];\n\n for (int i = 0; i < 8; i++)\n {\n input = Console.ReadLine().Split();\n points[i].x = int.Parse(input[0]);\n points[i].y = int.Parse(input[1]);\n }\n\n Point centre;\n bool respectable = false;\n\n while (true)\n {\n centre = GetCentrePoint(points[0], points[2]);\n\n if (!Equals(centre, points[1]))\n break;\n\n centre = GetCentrePoint(points[0], points[5]);\n\n if (!Equals(centre, points[3]))\n break;\n\n centre = GetCentrePoint(points[2], points[7]);\n\n if (!Equals(centre, points[4]))\n break;\n\n centre = GetCentrePoint(points[5], points[7]);\n\n if (!Equals(centre, points[6]))\n break;\n\n Point mainCentre1 = GetCentrePoint(points[1], points[6]);\n Point mainCentre2 = GetCentrePoint(points[3], points[4]);\n\n if (!Equals(mainCentre1, mainCentre2))\n break;\n\n respectable = true;\n break;\n }\n\n if (!respectable)\n Console.WriteLine(\"ugly\");\n else\n Console.WriteLine(\"respectable\");\n }\n\n private static Point GetCentrePoint(Point p1, Point p2)\n {\n Point centre = new Point();\n\n centre.x = ((p1.x) + (p2.x)) / 2;\n centre.y = ((p1.y) + (p2.y)) / 2;\n\n return centre;\n }\n\n private static bool Equals(Point p1, Point p2)\n {\n if (p1.x != p2.x || p1.y != p2.y)\n return false;\n else\n return true;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "fdf723bf558b62d6f110741d71ba88f5", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "05bfed4bb590f6cf7e0ae50a6c504232", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9294147199196182, "equal_cnt": 13, "replace_cnt": 5, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Web;\nusing System.Net;\nusing System.Collections;\n\nnamespace ConsoleApplication1 {\n class Program {\n static void Main( string[] args ) {\n List points = new List();\n for ( int i = 0; i < 8; i++ ) {\n points.Add(new int[] { ReadInt(), ReadInt() });\n }\n\n points = points.OrderBy(( point ) => {\n return point[ 1 ].ToString() + point[ 0 ].ToString();\n }).ToList();\n\n bool f = points[ 0 ][ 0 ] < points[ 1 ][ 0 ] && points[ 0 ][ 1 ] == points[ 1 ][ 1 ];\n f = f && \n points[ 1 ][ 0 ] < points[ 2 ][ 0 ] && points[ 0 ][ 1 ] == points[ 2 ][ 1 ];\n f = f &&\n points[ 3 ][ 0 ] == points[ 0 ][ 0 ] && points[ 3 ][ 1 ] > points[ 0 ][ 1 ];\n f = f &&\n points[ 4 ][ 0 ] == points[ 2 ][ 0 ] && points[ 4 ][ 1 ] == points[ 3 ][ 1 ] &&\n points[ 5 ][ 0 ] == points[ 3 ][ 0 ] && points[ 5 ][ 1 ] > points[ 3 ][ 1 ] && \n points[ 6 ][ 0 ] == points[ 1 ][ 0 ] && points[ 6 ][ 1 ] == points[ 5 ][ 1 ] &&\n points[ 7 ][ 0 ] == points[ 2 ][ 0 ] && points[ 7 ][ 1 ] == points[ 6 ][ 1 ];\n if ( f )\n Console.WriteLine(\"respectable\");\n else\n Console.WriteLine(\"ugly\");\n }\n\n\n static int _current = -1;\n static string[] _words = null;\n static int ReadInt() {\n if ( _current == -1 ) {\n _words = Console.ReadLine().Split(new char[] { ' ', '\\r', '\\n' }, StringSplitOptions.RemoveEmptyEntries);\n _current = 0;\n }\n\n int value = int.Parse(_words[ _current ]);\n if ( _current == _words.Length - 1 )\n _current = -1;\n else\n _current++;\n\n return value;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "212e777b93fb9d4f0b8cbbd760cf4802", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "750500436cf73b12e43c807c08e4edf9", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9819244111740003, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 7, "bug_source_code": "#define ONLINE_JUDGE\n\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.IO;\nusing System.Linq;\n\nclass Program\n{\n\n static int tests = 1;\n\n#if (ONLINE_JUDGE)\n static TextReader r = Console.In;\n static TextWriter w = Console.Out;\n#else\n static string path = @\"C:\\Y\\Prog\\Codeforces\\194\\\";\n static string answerFile = \"0{0}Answer.txt\";\n static string resultFile = \"0{0}Result.txt\";\n static string sourceFile = \"0{0}Source.txt\";\n \n static TextReader r;\n static TextWriter w;\n#endif\n\n static void Main(string[] args)\n {\n\n //int[] t = { 1, 2, 3, 3 };\n //int[] xDistinct = t.Distinct().ToArray();\n \n\n for (int i = 1; i <= tests; i++)\n {\n#if (!ONLINE_JUDGE)\n r = new StreamReader(string.Format(path + sourceFile, i));\n w = new StreamWriter(string.Format(path + resultFile, i), false);\n#endif\n int[] x = new int[8];\n int[] y = new int[8];\n for (int j = 0; j < 8; j++)\n {\n string[] buff = r.ReadLine().Split(' ');\n x[j] = Convert.ToInt32(buff[0]);\n y[j] = Convert.ToInt32(buff[1]);\n }\n solve(x, y);\n\n#if (!ONLINE_JUDGE)\n w.Flush(); w.Close();\n Console.WriteLine(\"CASE: {0}\", i);\n string answer = File.ReadAllText(string.Format(path + answerFile, i));\n string result = File.ReadAllText(string.Format(path + resultFile, i));\n if (answer != result)\n {\n Console.WriteLine(\"FAIL:\");\n Console.WriteLine(\"Result\" + Environment.NewLine + result);\n Console.WriteLine(\"Answer\" + Environment.NewLine + answer);\n }\n else\n Console.WriteLine(\"OK\");\n#endif\n }\n }\n\n public static void solve(int[] x, int[] y)\n {\n int[] xDistinct = x.Distinct().ToArray();\n int[] yDistinct = y.Distinct().ToArray();\n if (xDistinct.Length != 3 || yDistinct.Length != 3)\n {\n w.WriteLine(\"ugly\");\n return;\n }\n for (int i = 0; i < xDistinct.Length; i++)\n for (int j = 0; j < yDistinct.Length; j++)\n {\n if (i == 1 && j == 1) continue;\n bool find = false;\n for (int k = 0; k < x.Length; k++)\n {\n if (x[k] == xDistinct[i] && y[k] == yDistinct[j])\n find = true;\n }\n if (!find)\n {\n w.WriteLine(\"ugly\");\n return;\n }\n }\n w.WriteLine(\"respectable\");\n }\n}\n", "lang": "MS C#", "bug_code_uid": "8bf616a0b1a98d533cee5feb2a7f4272", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "5ac97748440b80b320b82c7dd3d6f334", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7832625040863027, "equal_cnt": 13, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 6, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Text;\n\nclass Program\n{\n static void Main()\n {\n int xMin = -1, yMin = 1, xMax = -1, yMax = -1;\n\n var yd = new Dictionary>();\n var xd = new Dictionary>();\n\n for (int i = 0; i < 8; i++)\n {\n string str = Console.ReadLine();\n\n int x = int.Parse(str.Split(new char[] { ' ' })[0]);\n int y = int.Parse(str.Split(new char[] { ' ' })[1]);\n\n if (xMin == -1 || xMin > x) xMin = x;\n if (xMax == -1 || xMax < x) xMax = x;\n if (yMin == -1 || yMin > y) yMin = y;\n if (yMax == -1 || yMax < y) yMax = y;\n\n if (!xd.ContainsKey(x)) xd.Add(x, new List());\n if (!yd.ContainsKey(y)) yd.Add(y, new List());\n\n xd[x].Add(new int[] { x, y });\n yd[y].Add(new int[] { x, y });\n }\n\n // 0 0, 1 0\n // 0 1, \n // 0 2, 1 2, 2 2\n\n if (xd.Count != 3 || yd.Count != 3)\n {\n Console.WriteLine(\"ugly\");\n return;\n }\n\n if (xd[xMin].Count != 3 || xd[xMax].Count != 3 || yd[yMin].Count != 3 || yd[yMax].Count != 3)\n {\n Console.WriteLine(\"ugly\");\n return;\n }\n\n Console.WriteLine(\"respectable\");\n }\n}", "lang": "MS C#", "bug_code_uid": "be0a781d571414f7d0b2f20afe208ef6", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "eae8142498693696c12af04cba643145", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.757250945775536, "equal_cnt": 12, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Text;\n\nclass Program\n{\n static void Main()\n {\n int xMin = -1, yMin = -1, xMax = -1, yMax = -1;\n\n var yd = new Dictionary>();\n var xd = new Dictionary>();\n\n for (int i = 0; i < 8; i++)\n {\n string str = Console.ReadLine();\n\n int x = int.Parse(str.Split(new char[] { ' ' })[0]);\n int y = int.Parse(str.Split(new char[] { ' ' })[1]);\n\n if (xMin == -1 || xMin > x) xMin = x;\n if (xMax == -1 || xMax < x) xMax = x;\n if (yMin == -1 || yMin > y) yMin = y;\n if (yMax == -1 || yMax < y) yMax = y;\n\n if (!xd.ContainsKey(x)) xd.Add(x, new List());\n if (!yd.ContainsKey(y)) yd.Add(y, new List());\n\n xd[x].Add(new int[] { x, y });\n yd[y].Add(new int[] { x, y });\n }\n\n // 0 0, 1 0\n // 0 1, \n // 0 2, 1 2, 2 2\n\n if (xd.Count != 3 || yd.Count != 3)\n {\n Console.WriteLine(\"ugly\");\n return;\n }\n\n if (!xd.ContainsKey(xMin) || !xd.ContainsKey(xMax) || xd[xMin].Count != 3 || xd[xMax].Count != 3 ||\n !yd.ContainsKey(yMin) || !yd.ContainsKey(yMax) || yd[yMin].Count != 3 || yd[yMax].Count != 3)\n {\n Console.WriteLine(\"ugly\");\n return;\n }\n\n Console.WriteLine(\"respectable\");\n }\n}", "lang": "MS C#", "bug_code_uid": "2a71eef4a659ed9c6dd30ca8b6b15761", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "eae8142498693696c12af04cba643145", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8255957780159974, "equal_cnt": 25, "replace_cnt": 11, "delete_cnt": 4, "insert_cnt": 9, "fix_ops_cnt": 24, "bug_source_code": "#define Online\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Numerics;\n\nnamespace CF\n{\n delegate double F(double x);\n delegate decimal Fdec(decimal x);\n\n partial class Program\n {\n\n static void Main(string[] args)\n {\n\n#if FileIO\n StreamReader sr = new StreamReader(\"input.txt\");\n StreamWriter sw = new StreamWriter(\"output.txt\");\n Console.SetIn(sr);\n Console.SetOut(sw);\n#endif\n\n B();\n\n\n#if Online\n Console.ReadLine();\n#endif\n\n#if FileIO\n sr.Close();\n sw.Close();\n#endif\n }\n\n static void A()\n {\n\n }\n\n static void B()\n {\n int[,] points = new int[8, 2];\n for (int i = 0; i < 8; i++)\n {\n ReadArray(' ');\n points[i, 0] = NextInt();\n points[i, 1] = NextInt();\n }\n int[] next = new int[3];\n next[0] = next[2] = 3;\n next[1] = 2;\n int[,] a = new int[3, 3];\n for (int i = 0; i < 3; i++)\n for (int j = 0; j < 3; j++)\n a[i, j] = -1;\n int[] c = new int[3];\n for (int i = 0, k = 0; i <= 1000000 && k < 3; i++)\n {\n for (int j = 0, z = 0; j < 8; j++)\n {\n if (points[j, 0] == i)\n {\n a[k, z++] = points[j, 1];\n c[k]++;\n }\n }\n if (c[k] == next[k])\n {\n k++;\n }\n else\n {\n if (c[k] == 0)\n {\n continue;\n }\n else\n {\n Console.WriteLine(\"ugly\");\n return;\n }\n }\n }\n\n int[] y = new int[1000001];\n for (int i = 0; i < 3; i++)\n for (int j = 0; j < 3; j++)\n if (a[i, j] != -1)\n y[a[i, j]]++;\n int p = 0;\n for (int i = 0; i <= 1000000 && p<3; i++)\n {\n if (y[i]==next[p])\n {\n p++;\n }\n }\n if (p == 3)\n {\n Console.WriteLine(\"respectable\");\n }\n else\n {\n Console.WriteLine(\"ugly\");\n }\n }\n\n static void C()\n {\n long n = ReadLong();\n long ans = 0;\n if (n == 1)\n ans = 1;\n if (n == 2)\n ans = 1;\n if (n == 3)\n ans = 1;\n if (n > 3)\n ans = n - 2;\n Console.WriteLine(ans);\n }\n\n static void D()\n {\n\n }\n\n static void E()\n {\n\n }\n\n static void TestGen()\n {\n\n }\n\n }\n\n public static class MyMath\n {\n public static long BinPow(long a, long n, long mod)\n {\n long res = 1;\n while (n > 0)\n {\n if ((n & 1) == 1)\n {\n res = (res * a) % mod;\n }\n a = (a * a) % mod;\n n >>= 1;\n }\n return res;\n }\n\n public static long GCD(long a, long b)\n {\n while (b != 0) b = a % (a = b);\n return a;\n }\n\n public static int GCD(int a, int b)\n {\n while (b != 0) b = a % (a = b);\n return a;\n }\n\n public static long LCM(long a, long b)\n {\n return (a * b) / GCD(a, b);\n }\n\n public static int LCM(int a, int b)\n {\n return (a * b) / GCD(a, b);\n }\n }\n\n static class ArrayUtils\n {\n public static int BinarySearch(int[] a, int val)\n {\n int left = 0;\n int right = a.Length - 1;\n int mid;\n\n while (left < right)\n {\n mid = left + ((right - left) >> 1);\n if (val <= a[mid])\n {\n right = mid;\n }\n else\n {\n left = mid + 1;\n }\n }\n\n if (a[left] == val)\n return left;\n else\n return -1;\n }\n\n public static double Bisection(F f, double left, double right, double eps)\n {\n double mid;\n while (right - left > eps)\n {\n mid = left + ((right - left) / 2d);\n if (Math.Sign(f(mid)) != Math.Sign(f(left)))\n right = mid;\n else\n left = mid;\n }\n return (left + right) / 2d;\n }\n\n\n public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)\n {\n decimal m1, m2;\n while (r - l > eps)\n {\n m1 = l + (r - l) / 3m;\n m2 = r - (r - l) / 3m;\n if (f(m1) < f(m2))\n if (isMax)\n l = m1;\n else\n r = m2;\n else\n if (isMax)\n r = m2;\n else\n l = m1;\n }\n return r;\n }\n\n public static double TernarySearch(F f, double eps, double l, double r, bool isMax)\n {\n double m1, m2;\n while (r - l > eps)\n {\n m1 = l + (r - l) / 3d;\n m2 = r - (r - l) / 3d;\n if (f(m1) < f(m2))\n if (isMax)\n l = m1;\n else\n r = m2;\n else\n if (isMax)\n r = m2;\n else\n l = m1;\n }\n return r;\n }\n\n public static void Merge(T[] A, int p, int q, int r, T[] L, T[] R, Comparison comp)\n {\n for (int i = p; i <= q; i++)\n L[i] = A[i];\n for (int i = q + 1; i <= r; i++)\n R[i] = A[i];\n\n for (int k = p, i = p, j = q + 1; k <= r; k++)\n {\n if (i > q)\n {\n for (; k <= r; k++, j++)\n A[k] = R[j];\n return;\n }\n if (j > r)\n {\n for (; k <= r; k++, i++)\n A[k] = L[i];\n return;\n }\n if (comp(L[i], R[j]) <= 0)\n {\n A[k] = L[i];\n i++;\n }\n else\n {\n A[k] = R[j];\n j++;\n }\n }\n }\n\n public static void Merge_Sort(T[] A, int p, int r, T[] L, T[] R, Comparison comp)\n {\n if (p >= r) return;\n int q = p + ((r - p) >> 1);\n Merge_Sort(A, p, q, L, R, comp);\n Merge_Sort(A, q + 1, r, L, R, comp);\n Merge(A, p, q, r, L, R, comp);\n }\n\n public static void Merge(T[] A, int p, int q, int r, T[] L, T[] R) where T : IComparable\n {\n for (int i = p; i <= q; i++)\n L[i] = A[i];\n for (int i = q + 1; i <= r; i++)\n R[i] = A[i];\n\n for (int k = p, i = p, j = q + 1; k <= r; k++)\n {\n if (i > q)\n {\n for (; k <= r; k++, j++)\n A[k] = R[j];\n return;\n }\n if (j > r)\n {\n for (; k <= r; k++, i++)\n A[k] = L[i];\n return;\n }\n if (L[i].CompareTo(R[j]) >= 0)\n {\n A[k] = L[i];\n i++;\n }\n else\n {\n A[k] = R[j];\n j++;\n }\n }\n }\n\n public static void Merge_Sort(T[] A, int p, int r, T[] L, T[] R) where T : IComparable\n {\n if (p >= r) return;\n int q = p + ((r - p) >> 1);\n Merge_Sort(A, p, q, L, R);\n Merge_Sort(A, q + 1, r, L, R);\n Merge(A, p, q, r, L, R);\n }\n\n public static void Merge_Sort1(T[] A, int p, int r, T[] L, T[] R) where T : IComparable\n {\n int k = 1;\n while (k < r - p + 1)\n {\n int i = 0;\n while (i < r)\n {\n int _r = Math.Min(i + 2 * k - 1, r);\n int q = Math.Min(i + k - 1, r);\n Merge(A, i, q, _r, L, R);\n i += 2 * k;\n }\n k <<= 1;\n }\n }\n\n public static void Merge_Sort1(T[] A, int p, int r, T[] L, T[] R, Comparison comp)\n {\n int k = 1;\n while (k < r - p + 1)\n {\n int i = 0;\n while (i < r)\n {\n int _r = Math.Min(i + 2 * k - 1, r);\n int q = Math.Min(i + k - 1, r);\n Merge(A, i, q, _r, L, R, comp);\n i += 2 * k;\n }\n k <<= 1;\n }\n }\n\n static void Shake(T[] a)\n {\n Random rnd = new Random(Environment.TickCount);\n T temp;\n int b, c;\n for (int i = 0; i < a.Length; i++)\n {\n b = rnd.Next(0, a.Length);\n c = rnd.Next(0, a.Length);\n temp = a[b];\n a[b] = a[c];\n a[c] = temp;\n }\n }\n }\n\n partial class Program\n {\n static string[] tokens;\n static int cur_token = 0;\n\n static void ReadArray(char sep)\n {\n cur_token = 0;\n tokens = Console.ReadLine().Split(sep);\n }\n\n static int ReadInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static long ReadLong()\n {\n return long.Parse(Console.ReadLine());\n }\n\n static int NextInt()\n {\n return int.Parse(tokens[cur_token++]);\n }\n\n static long NextLong()\n {\n return long.Parse(tokens[cur_token++]);\n }\n\n static double NextDouble()\n {\n return double.Parse(tokens[cur_token++]);\n }\n\n static decimal NextDecimal()\n {\n return decimal.Parse(tokens[cur_token++]);\n }\n\n static string NextToken()\n {\n return tokens[cur_token++];\n }\n\n static string ReadLine()\n {\n return Console.ReadLine();\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "79ded7fb397e08c497c4f851b046ed89", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "2f2283538a0642f6fcd48b76b424c2fc", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8117094325984822, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace _334B_Eight_Points_Set\n{\n class Point\n {\n public int X;\n public int Y;\n }\n\n class Program\n {\n static void Main(string[] args)\n {\n Point[] points = new Point[8];\n for (int i = 0; i < 8; i++)\n {\n var input = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n points[i] = new Point() {X = input[0], Y = input[1]};\n }\n\n\n if (points[0].X == points[1].X && points[1].X == points[2].X &&\n points[3].X == points[4].X &&\n points[5].X == points[6].X && points[6].X == points[7].X &&\n\n points[0].Y == points[3].Y && points[3].Y == points[5].Y &&\n points[1].Y == points[6].Y &&\n points[2].Y == points[4].Y && points[4].Y == points[7].Y)\n {\n Console.WriteLine(\"respectable\");\n }\n else\n {\n Console.WriteLine(\"ugly\");\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "19412be2b36af5d1f093330587919c9d", "src_uid": "f3c96123334534056f26b96f90886807", "apr_id": "fce28f5756e63d7303a66464633d7a77", "difficulty": 1400, "tags": ["sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.989080982711556, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace sm\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int[] ar = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n int[] day = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n int[] night = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n\n int minDay = int.MaxValue;\n for (int i = 0; i < day.Length; i++)\n {\n if(day[i] < minDay) {\n minDay = day[i];\n }\n }\n\n int maxDay = int.MinValue;\n for (int i = 0; i < day.Length; i++)\n {\n if (day[i] > maxDay)\n {\n maxDay = day[i];\n }\n }\n\n if(ar[2] > maxDay * (ar[2]/minDay) + ar[2]% minDay)\n Console.WriteLine(ar[2]);\n else Console.WriteLine((maxDay * (ar[2] / minDay)) + ar[2] % minDay);\n }\n\n\n\n\n\n }\n}", "lang": "Mono C#", "bug_code_uid": "221e6c1d850029ec150312ac9df7e078", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "apr_id": "e98708dcfcf2c797624b56f79a3c7ab5", "difficulty": 800, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9988372093023256, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[]y=Console.ReadLine().Split(' ');\n int n=int.Parse(y[0]);\n int m=int.Parse(y[1]);\n int r=int.Parse(y[2]);\n string[]y1=Console.ReadLine().Split(' ');\n string[]y2=Console.ReadLine().Split(' ');\n int[]a=new int[n];\n int []b=new int[m];\n for(int i=0;i min)\n {\n max = int.Parse(str[i]);\n }\n\n }\n int difference = max - min;\n if(difference<0)\n Console.WriteLine(r);\n else\n {\n int count = r / min;\n Console.WriteLine(r-(r/min)*min+count* max);\n }\n }\n }\n\n}\n", "lang": "Mono C#", "bug_code_uid": "49766fc1f8fcdec954c2328ec7821d6e", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "apr_id": "40716f5fe23799f10596e1d33e468291", "difficulty": 800, "tags": ["greedy", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9987973541791942, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Кассир\n{\n\n class Program\n {\n\n public static long min(long a, long b)\n {\n if (a < b)\n return a;\n return b;\n }\n public struct student\n {\n public long a;\n public long b;\n }\n public static long degree(long a)\n {\n long degree = 1;\n while (a-- != 0)\n {\n degree *= 2;\n }\n return degree - 1;\n }\n static void Main(string[] args)\n {\n string[] str = Console.ReadLine().Split(' ');\n int n = int.Parse(str[0]);\n int m = int.Parse(str[1]);\n int r = int.Parse(str[2]);\n int min = int.MaxValue;\n str = Console.ReadLine().Split(' ');\n for (int i = 0; i < n; i++)\n {\n if (int.Parse(str[i]) min)\n {\n max = int.Parse(str[i]);\n }\n\n }\n int difference = max - min;\n if(difference<0)\n Console.WriteLine(r);\n else\n {\n int count = r / min;\n Console.WriteLine(r-(r/min)*min+count* max);\n }\n }\n }\n\n}\n", "lang": "Mono C#", "bug_code_uid": "16a13999bade332471f89aa9df0b476b", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "apr_id": "40716f5fe23799f10596e1d33e468291", "difficulty": 800, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8741220961642355, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Text;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Linq;\nclass Problem\n{\n static void Main()\n {\n //--------------------------------input--------------------------------//\n\n var inp = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );\n int n = inp[0], m = inp[1], r = inp[2];\n var s = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );\n var b = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );\n Array.Sort( s );\n Array.Sort( b, (x, y) => y - x );\n\n //--------------------------------solve--------------------------------/\n\n int min = Math.Min( s.Length, b.Length );\n int max = r;\n int i=0;\n while(min-- > 0)\n {\n int now = (r / s[i] )* b[i];\n r = r % s[i] + now;\n max = Math.Max( r, max );\n i++;\n }\n Console.WriteLine( max);\n\n }\n\n\n\n}", "lang": "Mono C#", "bug_code_uid": "fdf6ec40d4b75f4d2272c3a6cc0c953c", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "apr_id": "8c43ae715d823bef9dc62cbe8048600b", "difficulty": 800, "tags": ["greedy", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9990842490842491, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "// Problem: 1150A - Stock Arbitraging\n// Author: Gusztav Szmolik\n\nusing System;\n\nclass StockArbitraging\n {\n public static int Main ()\n {\n string line = Console.ReadLine ();\n if (line == null)\n return -1;\n char[] delims = {' ', '\\t'};\n string[] words = line.Split (delims,StringSplitOptions.RemoveEmptyEntries);\n if (words.Length != 3)\n return -1;\n byte n;\n if (!Byte.TryParse (words[0], out n))\n return -1;\n if (n < 1 || n > 30)\n return -1;\n byte m;\n if (!Byte.TryParse (words[1], out m))\n return -1;\n if (m < 1 || m > 30)\n return -1;\n ushort r;\n if (!UInt16.TryParse (words[2], out r))\n return -1;\n if (r < 1 || r > 1000)\n return -1;\n line = Console.ReadLine ();\n if (line == null)\n return -1;\n words = line.Split (delims,StringSplitOptions.RemoveEmptyEntries);\n if (words.Length != n)\n return -1;\n ushort sMin = 1000;\n for (byte i = 0; i < n; i++)\n {\n ushort si;\n if (!UInt16.TryParse (words[i], out si))\n return -1;\n if (si < 1 || si > 1000)\n return -1;\n if (si < sMin)\n sMin = si;\n }\n ushort numShare = Convert.ToUInt16 (r/sMin);\n ushort sumBuy = Convert.ToUInt16 (numShare*sMin);\n line = Console.ReadLine ();\n if (line == null)\n return -1;\n words = line.Split (delims,StringSplitOptions.RemoveEmptyEntries);\n if (words.Length != m)\n return -1;\n ushort bMax = 1;\n for (byte i = 0; i < m; i++)\n {\n ushort bi;\n if (!UInt16.TryParse (words[i], out bi))\n return -1;\n if (bi < 1 || bi > 1000)\n return -1;\n if (bi > bMax)\n bMax = bi;\n }\n uint sumSell = Convert.ToUInt16 (numShare*bMax);\n uint ans = (sumSell > sumBuy ? r+sumSell-sumBuy : r);\n Console.WriteLine (ans);\n return 0;\n }\n }\n", "lang": "Mono C#", "bug_code_uid": "985e1009f614c40527453cb084ad8c7d", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "apr_id": "b3e9412457ee06b6090967156a7d2dd1", "difficulty": 800, "tags": ["greedy", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7104105571847508, "equal_cnt": 9, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 8, "bug_source_code": " using System;\n using System.Collections.Generic;\n using System.Globalization;\n using System.Linq;\n using System.Text;\n using System.Threading;\n using System.Threading.Tasks;\n\n namespace Training_App\n {\n class Program\n {\n\n static void Main(string[] args)\n {\n String input = Console.ReadLine();\n String[] splits = input.Split(' ');\n ulong A = ulong.Parse(splits[0]);\n ulong B = ulong.Parse(splits[1]);\n\n ulong factorialA = calculateFactorial(A);\n ulong factorialB = calculateFactorial(B);\n\n\n Console.WriteLine(calculateGCD(factorialA, factorialB));\n\n\n\n }\n\n public static ulong calculateFactorial(ulong n)\n {\n \n if (n == 1 || n == 2)\n return n;\n else\n {\n \n return n * calculateFactorial(n-1);\n }\n\n }\n\n public static ulong calculateGCD(ulong a , ulong b)\n {\n ulong reminder = 0;\n while(b!=0)\n {\n reminder = a%b;\n a = b;\n b = reminder;\n }\n\n return a;\n }\n\n\n\n }\n \n \n }\n \n\n\n \n\n\n \n\n ", "lang": "MS C#", "bug_code_uid": "42233597ba5e0b643785a0268809ed84", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "855e53e391af52f4e01a62f769d812c4", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9551401869158879, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _822A\n{\n class Program\n {\n static int x, y,diff,solution;\n static void Main(string[] args)\n {\n x = Convert.ToInt32(Console.ReadLine());\n // Console.WriteLine(\"X=\"+x);\n y = Convert.ToInt32(Console.ReadLine());\n // Console.WriteLine(\"Y=\"+y);\n\n\n GCD solver = new GCD();\n diff = solver.makeDifference(x, y);\n solution = solver.factorial(Math.Min(x,y));\n Console.WriteLine(solution);\n // Console.WriteLine(solver.baseGCD(x, y));\n }\n }\n}\n\n\nnamespace _822A\n{\n class GCD\n {\n public int baseGCD(int x, int y)\n {\n if (y != 0)\n return baseGCD(y, x % y);\n else return x;\n }\n\n public int factorial(int x)\n {\n if (x < 0) throw new ArgumentOutOfRangeException(\"numar negativ\");\n else if (x == 0) return 1;\n int solution = x;\n int sum = x;\n for (int i = x - 2; i > 1; i -= 2)\n {\n sum += i;\n solution *= sum;\n }\n if ((x & 1) == 1)\n solution *= x / 2 + 1;\n return solution;\n }\n\n public int makeDifference(int x, int y)\n {\n int diff = 0;\n if (x < y)\n {\n diff = y - x;\n }\n else diff = x - y;\n return diff;\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d5557f86e9230a96d2a2843d9d268e82", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "60d5ce42517592dc3a944b720aa96c48", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7303070761014686, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A.I_m_bored_with_life\n{\n class Program\n {\n public static int factorial(int a)\n {\n if (a == 0)\n return 1;\n return ( a * factorial(a - 1));\n }\n static void Main(string[] args)\n {\n string[] s = Console.ReadLine().Split();\n int a = int.Parse(s[0]);\n int b = int.Parse(s[1]);\n int faca = factorial(a);\n int facb = factorial(b);\n\n int min = Math.Min(faca, facb);\n for(int i=min;i>0;i--)\n {\n if ( faca % i == 0 && facb % i ==0)\n {\n Console.WriteLine(i);\n break;\n }\n }\n\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "52e03881ecf1b1bd34b833a633f00f25", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "ce36ee1c8d12d8adba6e9ac1c1185eba", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9699271921494144, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace Round422A\n{\n class Program\n {\n private static void Main(string[] args)\n {\n using (var sr = new InputReader(Console.In))\n {\n // using (var sr = new InputReader(new StreamReader(\"input.txt\"))) {\n var task = new Task();\n using (var sw = Console.Out)\n {\n //using (var sw = new StreamWriter(\"output.txt\")){\n\n task.Solve(sr, sw);\n //Console.ReadKey();\n\n }\n }\n }\n }\n internal class Task\n {\n public void Solve(InputReader sr, TextWriter sw)\n {\n\n int[] input = sr.ReadArrayOfInt32();\n long a = factorial(input[0]);\n long b = factorial(input[1]);\n long gcd = Math.Min(a, b);\n while (a % gcd!= 0 && b % gcd != 0)\n {\n gcd--;\n }\n sw.WriteLine(gcd);\n\n }\n\n public long factorial(int number)\n {\n if (number == 1)\n return 1;\n else\n return number * factorial(number - 1);\n }\n }\n internal class InputReader : IDisposable\n {\n private bool isDispose;\n private readonly TextReader sr;\n\n public InputReader(TextReader stream)\n {\n sr = stream;\n }\n\n public void Dispose()\n {\n Dispose(true);\n GC.SuppressFinalize(this);\n }\n\n public string NextString()\n {\n var result = sr.ReadLine();\n return result;\n }\n\n public int NextInt32()\n {\n return Int32.Parse(NextString());\n }\n\n public long NextInt64()\n {\n return Int64.Parse(NextString());\n }\n\n public string[] NextSplitStrings()\n {\n return NextString()\n .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public T[] ReadArray(Func func)\n {\n return NextSplitStrings()\n .Select(s => func(s, CultureInfo.InvariantCulture))\n .ToArray();\n }\n\n public int[] ReadArrayOfInt32()\n {\n return ReadArray(Int32.Parse);\n }\n\n public long[] ReadArrayOfInt64()\n {\n return ReadArray(Int64.Parse);\n }\n\n public T[] ReadArrayFromString(Func func, string str)\n {\n return\n str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)\n .Select(s => func(s, CultureInfo.InvariantCulture))\n .ToArray();\n }\n\n protected void Dispose(bool dispose)\n {\n if (!isDispose)\n {\n if (dispose)\n sr.Close();\n isDispose = true;\n }\n }\n\n ~InputReader()\n {\n Dispose(false);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "5a2bd1978b8279372c7de343212f350a", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "3989502e967066f7284167385c501888", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8031974420463629, "equal_cnt": 12, "replace_cnt": 3, "delete_cnt": 4, "insert_cnt": 4, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Numerics;\nusing System.Text;\n\nnamespace _100853_Codeforce\n{\n\n class Program\n {\n \n\n private const string FILENAME = \"distance4\";\n\n private const string INPUT = FILENAME + \".in\";\n\n private const string OUTPUT = FILENAME + \".out\";\n\n private static Stopwatch _stopwatch = new Stopwatch();\n\n static StreamReader _reader = null;\n static StreamWriter _writer = null;\n\n static string[] _curLine;\n static int _curTokenIdx;\n\n static char[] _whiteSpaces = new char[] { ' ', '\\t', '\\r', '\\n' };\n\n public static string ReadNextToken()\n {\n if (_curTokenIdx >= _curLine.Length)\n {\n //Read next line\n string line = _reader.ReadLine();\n if (line != null)\n _curLine = line.Split(_whiteSpaces, StringSplitOptions.RemoveEmptyEntries);\n else\n _curLine = new string[] { };\n _curTokenIdx = 0;\n }\n\n if (_curTokenIdx >= _curLine.Length)\n return null;\n\n return _curLine[_curTokenIdx++];\n }\n\n public static int ReadNextInt()\n {\n return int.Parse(ReadNextToken());\n }\n\n private static void RunTimer()\n {\n#if (DEBUG)\n\n _stopwatch.Start();\n\n#endif\n }\n\n private static void Main(string[] args)\n {\n\n long[] s = Console.ReadLine().Split().Select(long.Parse).ToArray();\n\n long n = s[0];\n long p = s[1];\n long q = s[2];\n long r = s[3];\n\n int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();\n\n RunTimer();\n\n long[] pp = new long[n];\n pp[0] = a[0] * p;\n\n for (int i = 1; i < n; i++)\n {\n if (a[i] * p > pp[i - 1])\n {\n pp[i] = a[i] * p;\n }\n else\n {\n pp[i] = pp[i - 1];\n }\n }\n\n\n long[] rr = new long[n];\n\n rr[n - 1] = a[n - 1] * r;\n\n for (long i = n - 2; i >= 0; i--)\n {\n if (a[i] * r > rr[i + 1])\n {\n rr[i] = a[i] * r;\n }\n else\n {\n rr[i] = rr[i + 1];\n }\n }\n\n long res = long.MinValue;\n\n\n for (int i = 0; i < n; i++)\n {\n long t = pp[i] + a[i] * q + rr[i];\n res = Math.Max(res, t);\n }\n\n Console.WriteLine(res);\n\n#if (DEBUG)\n _stopwatch.Stop();\n\n Console.WriteLine($\"Time elapsed: {_stopwatch.Elapsed}\");\n\n Console.ReadKey();\n#endif\n\n\n }\n\n\n static int[] CopyOfRange(int[] src, int start, int end)\n {\n int len = end - start;\n int[] dest = new int[len];\n Array.Copy(src, start, dest, 0, len);\n return dest;\n }\n\n static string StreamReader()\n {\n\n if (_reader == null)\n _reader = new StreamReader(INPUT);\n string response = _reader.ReadLine();\n if (_reader.EndOfStream)\n _reader.Close();\n return response;\n\n\n }\n\n static void StreamWriter(string text)\n {\n\n if (_writer == null)\n _writer = new StreamWriter(OUTPUT);\n _writer.WriteLine(text);\n\n\n }\n\n\n\n\n\n public static int BFS(int start, int end, int[,] arr)\n {\n Queue> queue = new Queue>();\n List visited = new List();\n for (int i = 0; i < arr.GetLength(0); i++)\n {\n visited.Add(false);\n }\n\n queue.Enqueue(new KeyValuePair(start, 0));\n KeyValuePair node;\n int level = 0;\n bool flag = false;\n\n while (queue.Count != 0)\n {\n node = queue.Dequeue();\n if (node.Key == end)\n {\n return node.Value;\n }\n flag = false;\n for (int i = 0; i < arr.GetLength(0); i++)\n {\n\n if (arr[node.Key, i] == 1)\n {\n if (visited[i] == false)\n {\n if (!flag)\n {\n level = node.Value + 1;\n flag = true;\n }\n queue.Enqueue(new KeyValuePair(i, level));\n visited[i] = true;\n }\n }\n }\n\n }\n return 0;\n\n }\n\n\n\n private static void Write(string source)\n {\n File.WriteAllText(OUTPUT, source);\n }\n\n private static string ReadString()\n {\n return File.ReadAllText(INPUT);\n }\n\n private static void WriteStringArray(string[] source)\n {\n File.WriteAllLines(OUTPUT, source);\n }\n\n private static string[] ReadStringArray()\n {\n return File.ReadAllLines(INPUT);\n }\n\n private static int[] GetIntArray()\n {\n return ReadString().Split(' ').Select(int.Parse).ToArray();\n }\n\n private static double[] GetDoubleArray()\n {\n return ReadString().Split(' ').Select(double.Parse).ToArray();\n }\n\n private static int[,] ReadINT2XArray(List lines)\n {\n int[,] arr = new int[lines.Count, lines.Count];\n\n for (int i = 0; i < lines.Count; i++)\n {\n int[] row = lines[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();\n\n for (int j = 0; j < lines.Count; j++)\n {\n arr[i, j] = row[j];\n }\n }\n\n return arr;\n }\n\n }\n\n}\n", "lang": "MS C#", "bug_code_uid": "5e470979ef56b0c9e6cb8be729ffa535", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "f61eb4e432c2573743068d61387c5361", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.8877742946708463, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main(string[] args)\n {\n long x = Convert.ToInt64(Console.ReadLine());\n string s=\"\";\n for (; x>0 ; )\n {\n if (x % 10 != 0)\n s += x % 10;\n x /= 10;\n }\n for (int i = 0; i < s.Length/2; i++)\n {\n if (s[i] != s[s.Length - i])\n {\n Console.WriteLine(\"NO\");\n return;\n }\n }\n Console.WriteLine(\"YES\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "fc86bf3c7b01a7ee03fb2b526f4f80c1", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "66f72671f61f978db644d074f34eef75", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.4420697412823397, "equal_cnt": 15, "replace_cnt": 11, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 15, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace HomeWork\n{\n class Program\n {\n static void Main(string[] args)\n {\n bool Answer = true;\n string x = Console.ReadLine(), num = \"\";\n for (int i = 0; i < x.Length; i++)\n {\n if (x[i] != '0')\n num += x[i];\n }\n for (int i = 0; i < num.Length / 2; i++)\n {\n if (num[i] != num[num.Length - 1 - i])\n Answer = false;\n }\n if (Answer)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5de343e8a11ea14b222e8933c561418c", "src_uid": "d82278932881e3aa997086c909f29051", "apr_id": "b27c711d93e9f57d9930f92eb995536b", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5909351692484223, "equal_cnt": 17, "replace_cnt": 11, "delete_cnt": 6, "insert_cnt": 0, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n var terms = Console.ReadLine().Split(new[] { ' ' }).Select(long.Parse).ToArray();\n var n = terms[0];\n var c1 = terms[1];\n var c2 = terms[2];\n\n long adults = Console.ReadLine().Count(_ => _ == '1');\n long children = n - adults;\n var min = long.MaxValue;\n for (long count = children; count <= adults; ++count)\n {\n long size = n / count;\n long sum = count * Price(size, c1, c2);\n if (n % count != 0) sum += Price(n % count, c1, c2);\n if (sum < min) min = sum;\n }\n Console.WriteLine(min);\n }\n\n private static long Price(long x, long c1, long c2)\n {\n return c1 + c2 * (x - 1) * (x - 1);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b4029fb02e4649ed9b6f6feb9b940ebd", "src_uid": "78d013b01497053b8e321fe7b6ce3760", "apr_id": "02bb55b5989409305d10091647a238cc", "difficulty": 2100, "tags": ["ternary search"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5856980703745743, "equal_cnt": 17, "replace_cnt": 10, "delete_cnt": 7, "insert_cnt": 0, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n var terms = Console.ReadLine().Split(new[] { ' ' }).Select(long.Parse).ToArray();\n var n = terms[0];\n var c1 = terms[1];\n var c2 = terms[2];\n\n long adults = Console.ReadLine().Count(_ => _ == '1');\n long children = n - adults;\n var min = long.MaxValue;\n for (long count = children > 0 ? children : 1; count <= adults; ++count)\n {\n long size = n / count;\n long sum = count * Price(size, c1, c2);\n if (n % count != 0) sum += Price(n % count, c1, c2);\n if (sum < min) min = sum;\n }\n Console.WriteLine(min);\n }\n\n private static long Price(long x, long c1, long c2)\n {\n return c1 + c2 * (x - 1) * (x - 1);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "e34002850f0e1459436a761edf7412b8", "src_uid": "78d013b01497053b8e321fe7b6ce3760", "apr_id": "02bb55b5989409305d10091647a238cc", "difficulty": 2100, "tags": ["ternary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9763421292083713, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n const int MOD = 1000000007;\n\n long[] f, rf, inv;\n void InitFacts(int size)\n {\n f = new long[size + 1];\n rf = new long[size + 1];\n inv = new long[size + 1];\n f[0] = f[1] = rf[0] = rf[1] = inv[1] = 1;\n for (int i = 2; i <= size; i++)\n {\n f[i] = f[i - 1] * i % MOD;\n inv[i] = inv[MOD % i] * (MOD - MOD / i) % MOD;\n rf[i] = inv[i] * rf[i - 1] % MOD;\n }\n }\n\n public void Solve()\n {\n int n = ReadInt();\n int m = ReadInt();\n\n InitFacts(n);\n long sum = 0;\n for (int i = m + 1; i < n; i++)\n sum = (sum + (i - m + sum) * inv[i]) % MOD;\n\n Write(sum * f[n - 1] % MOD);\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"stations.in\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n try\n {\n new Solver().Solve();\n //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n //thread.Start();\n //thread.Join();\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array)writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "1877637f46d54ac9f3f8dd14c222f7d8", "src_uid": "0644605611a2cd10ab3a9f12f18d7ae4", "apr_id": "7c85d0af7c2adc5c8c5015c3e66a50a3", "difficulty": 2400, "tags": ["dp", "math", "combinatorics"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.85383502170767, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nclass Test {\n static void Main(){\n int k = Int32.Parse(Console.ReadLine());\n double ans = cal(k);\n if(ans>=100000){\n ans -= 3;\n }\n Console.WriteLine(ans);\n }\n static double cal(double n){\n if(n<=1){\n return 1;\n }else{\n return ((3*cal(n-1))%1000000);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d31f7333bf3d83049fb164e89c52f582", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "a1eaa6910679bdc5725d4997ab415964", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6161251504211793, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace Codeforces_64\n{\n class TaskA\n {\n static void Main()\n {\n int number = Int32.Parse(Console.ReadLine());\n\n if(number == 0)\n Console.WriteLine(\"1\");\n\n int ret = 1;\n\n for (int i = 0; i < number - 1; i++)\n {\n ret *= 3;\n }\n\n Console.WriteLine((ret % 1000003).ToString());\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "bfb6a2c7de092db800064c2ab11aa16d", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "d08a93f879b5a410c459ef4f14202566", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8150170648464163, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\n\nnamespace prog_coder_26_03_A\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n if (n == 0)\n {\n Console.WriteLine(\"0\");\n return;\n }\n if (n == 1)\n {\n Console.WriteLine(\"1\");\n return;\n }\n --n;\n BigInteger a = new BigInteger(1);\n BigInteger b3 = new BigInteger(3);\n for (int i = 0; i < n; ++i)\n {\n a = BigInteger.Multiply(a, b3);\n }\n Console.WriteLine(a);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "324e8cb00e63dbbe2bc0b5c46cf9ab35", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "6f6f04f68e460275a4ea9eca13b2dee2", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9684741488020177, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ACming\n{\n class Program\n {\n static void Main()\n {\n int n = int.Parse(Console.ReadLine());\n int o = 1;\n\n for (int i = 1; i < n; i++)\n o = o * 3;\n\n o = o % 1000003;\n Console.WriteLine(o);\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "0844a6d40578cbf37117299853e81380", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "ac146baae00196fddffec2eb40d60e4d", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.45147969717825187, "equal_cnt": 9, "replace_cnt": 2, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ACming\n{\n class Program\n {\n static void Main()\n {\n int n = int.Parse(Console.ReadLine());\n int o = 1;\n int perv = 0;\n \n for (int i = 1; i < n; i++)\n o = Math.Abs(o * 3);\n\n\n int[] a = new int[n];\n int k = 0;\n\n while (o > 0)\n {\n a[k] = o % 10;\n o = o / 10;\n k++;\n }\n\n int q = k;\n while (q > 6)\n {\n if (q == 7)\n perv = perv + a[q - 1];\n else\n perv = perv + a[q] * 10;\n\n q--;\n }\n o = a[0];\n int f = 10;\n for (int i = 1; i < q; i++)\n {\n o = o + a[i] * f;\n f = f * 10;\n }\n o = o - perv * 3;\n Console.WriteLine(o);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "242032b2c4060a15f2a7750d12414007", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "ac146baae00196fddffec2eb40d60e4d", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9175050301810865, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nclass A\n{\n static void Main()\n {\n var n = int.Parse(Console.ReadLine()) - 1;\n var r = n == -1 ? 0 : 1;\n\n for (var i = 0; i < n; i++)\n r = (int)(Math.BigMul(r, 3) % 1000003);\n\n Console.WriteLine(r);\n }\n}", "lang": "Mono C#", "bug_code_uid": "0aef840c5775991d292633cdcb03aab7", "src_uid": "1a335a9638523ca0315282a67e18eec7", "apr_id": "08bb343e2db05e875a69bc83978f7881", "difficulty": 1300, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.8430720506730008, "equal_cnt": 27, "replace_cnt": 20, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 26, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace Codeforces\n{\n internal static class Program\n {\n private const string TEST = \"B2\";\n\n private static void Solve()\n {\n var n = ReadInt();\n var dp = new int[10];\n dp[1] = 9;\n dp[2] = 99;\n for (int i = 3; i < 10; i++)\n {\n dp[i] = (dp[i - 1] - 9)*2 + 90 + dp[i - 1];\n }\n var nStr = n.ToString();\n var res = 0;\n if (n >= 100)\n {\n for (int a = 1; a <= nStr[0] - '0'; a++)\n {\n res += GetCount(a, nStr, 0, a == nStr[0] - '0');\n }\n\n res += dp[nStr.Length - 1];\n }\n else\n {\n res = n;\n }\n \n WriteLine(res);\n }\n\n private static int GetCount(int a, string nStr, int fIndex, bool isLast)\n {\n var next = fIndex + 1;\n if (next == nStr.Length - 1)\n return isLast ? (nStr[next] - '0') + 1 : 10;\n\n var res = 0;\n for (int b = 0; b <= nStr[next] - '0'; b++)\n {\n if (a == b)\n res += GetCount(b, nStr, next, isLast && b == nStr[next] - '0');\n else\n {\n var sum = 1;\n var pow = 0;\n for (int i = next+1; i < nStr.Length; i++)\n {\n if (nStr[i] - '0' >= a)\n pow++;\n if (nStr[i] - '0' >= b)\n pow++;\n sum *= pow;\n }\n res += sum;\n }\n }\n return res;\n }\n\n private static void Main()\n {\n if (Debugger.IsAttached)\n {\n Console.SetIn(new StreamReader(String.Format(@\"..\\..\\..\\..\\Tests\\{0}.in\", TEST)));\n }\n\n Solve();\n\n if (Debugger.IsAttached)\n {\n Console.In.Close();\n Console.SetIn(new StreamReader(Console.OpenStandardInput()));\n Console.ReadLine();\n }\n }\n\n #region Reader\n\n private static string Read()\n {\n return Console.ReadLine();\n }\n\n private static void Read(out int n1, out int n2)\n {\n var input = ReadArray();\n n1 = int.Parse(input[0]);\n n2 = int.Parse(input[1]);\n }\n private static void Read(out int n1, out int n2, out int n3)\n {\n var input = ReadArray();\n n1 = int.Parse(input[0]);\n n2 = int.Parse(input[1]);\n n3 = int.Parse(input[2]);\n }\n private static void Read(out int n1, out int n2, out int n3, out int n4)\n {\n var input = ReadArray();\n n1 = int.Parse(input[0]);\n n2 = int.Parse(input[1]);\n n3 = int.Parse(input[2]);\n n4 = int.Parse(input[3]);\n }\n\n private static void Read(out T a1, out T a2)\n {\n var input = ReadArray();\n a1 = (T)Convert.ChangeType(input[0], typeof(T));\n a2 = (T)Convert.ChangeType(input[1], typeof(T));\n }\n\n private static void Read(out T a1, out T a2, out T a3)\n {\n var input = ReadArray();\n a1 = (T)Convert.ChangeType(input[0], typeof(T));\n a2 = (T)Convert.ChangeType(input[1], typeof(T));\n a3 = (T)Convert.ChangeType(input[2], typeof(T));\n }\n\n private static void Read(out T a1, out T a2, out T a3, out T a4)\n {\n var input = ReadArray();\n a1 = (T)Convert.ChangeType(input[0], typeof(T));\n a2 = (T)Convert.ChangeType(input[1], typeof(T));\n a3 = (T)Convert.ChangeType(input[2], typeof(T));\n a4 = (T)Convert.ChangeType(input[3], typeof(T));\n }\n\n private static int ReadInt()\n {\n return Int32.Parse(Read());\n }\n\n private static long ReadLong()\n {\n return long.Parse(Read());\n }\n\n private static double ReadDouble()\n {\n return double.Parse(Read(), CultureInfo.InvariantCulture);\n }\n\n private static T Read()\n {\n return (T)Convert.ChangeType(Read(), typeof(T));\n }\n\n private static string[] ReadArray()\n {\n var readLine = Console.ReadLine();\n if (readLine != null) \n return readLine.Split(' ');\n\n throw new ArgumentException();\n }\n\n private static List ReadIntArray()\n {\n return ReadArray().Select(Int32.Parse).ToList();\n }\n\n private static List ReadLongArray()\n {\n return ReadArray().Select(long.Parse).ToList();\n }\n\n private static List ReadDoubleArray()\n {\n return ReadArray().Select(d => double.Parse(d, CultureInfo.InvariantCulture)).ToList();\n }\n\n private static List ReadArray()\n {\n return ReadArray().Select(x => (T) Convert.ChangeType(x, typeof (T))).ToList();\n }\n \n private static void WriteLine(int value)\n {\n Console.WriteLine(value);\n }\n\n private static void WriteLine(double value)\n {\n Console.WriteLine(value.ToString(CultureInfo.InvariantCulture));\n }\n\n private static void WriteLine(long value)\n {\n Console.WriteLine(value);\n }\n\n private static void WriteLine(double value, string stringFormat)\n {\n Console.WriteLine(value.ToString(stringFormat, CultureInfo.InvariantCulture));\n }\n\n private static void WriteLine(T value)\n {\n Console.WriteLine(value);\n }\n\n private static void Write(int value)\n {\n Console.Write(value);\n }\n\n private static void Write(double value)\n {\n Console.Write(value.ToString(CultureInfo.InvariantCulture));\n }\n\n private static void Write(long value)\n {\n Console.Write(value);\n }\n\n private static void Write(double value, string stringFormat)\n {\n Console.Write(value.ToString(stringFormat, CultureInfo.InvariantCulture));\n }\n\n private static void Write(T value)\n {\n Console.Write(value);\n }\n\n #endregion\n }\n}", "lang": "Mono C#", "bug_code_uid": "d70b14530ad2c61acc368f7cd345130c", "src_uid": "0f7f10557602c8c2f2eb80762709ffc4", "apr_id": "80e4931e9e392a6895b2d6729441f887", "difficulty": 1600, "tags": ["dfs and similar", "brute force", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8924302788844621, "equal_cnt": 19, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 18, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace for_OLY\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n \n int N;\n N=Convert.ToInt32(Console.ReadLine());\n if (N==1000000000)\n Console.WriteLine(40744);\n if (N == 999999999)\n Console.WriteLine(40743);\n if (N == 999999998)\n Console.WriteLine(40742);\n if(N==999999997)\n Console.WriteLine(40741);\n if(N== 909090901)\n Console.WriteLine(38532);\n if(N== 142498040)\n Console.WriteLine(21671);\n if(N== 603356456)\n Console.WriteLine(31623);\n if(N== 64214872)\n Console.WriteLine(15759);\n if(N== 820040584)\n Console.WriteLine(36407);\n if (N<=101)\n {\n Console.WriteLine(N);\n return;\n }\n int index=0;\n int counter;\n int counter2=0 ;\n char first='s';\n char second=first;\n for(int i=102; i<=N; i++)\n {\n second = first;\n counter = 0;\n string s;\n s=Convert.ToString(i);\n first=s[0];\n for (int j = 1; j < s.Length; j++)\n {\n if (first != s[j])\n {\n second = s[j];\n index = j;\n break;\n }\n }\n if (second != first)\n {\n \n for (int j = 1; j < s.Length; j++)\n {\n if (j == index) continue;\n if (s[j]!=second && s[j]!=first)\n counter++;\n\n }\n\n }\n else if(second==first)\n counter = 0;\n if (counter == 0)\n counter2++;\n }\n Console.WriteLine(101+counter2);\n Console.ReadLine();\n\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "64a997870ed1a6e9d77c39bd1db533bf", "src_uid": "0f7f10557602c8c2f2eb80762709ffc4", "apr_id": "d7def6671a3ddc4ab9bbb335dac32329", "difficulty": 1600, "tags": ["dfs and similar", "brute force", "bitmasks"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.991007868115399, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "\nusing System;\nusing System.IO;\nusing System.Collections;\nusing System.Collections.Generic;\n//using System.Linq;\nusing System.Text;\n\n class Solution\n {\n //x, y幸運\n //n 持っている正の整数\n //数字10^9がxとyだけで構成されているか\n //\n int n;\n long res;\n List a = new List();\n \n public void solve(string[] ind)\n {\n \n n = int.Parse(ind[0]);\n res = 0;\n\n for (int i = 1; i <= 9; i++)\n {\n if (i <= n) res++;\n search(i.ToString(), 1);\n }\n\n Console.WriteLine(res);\n }\n\n\n void search(string str, int count)\n {\n if (int.Parse(str) > n) return;\n int cnt = count;\n string stri;\n for (int i = 0; i <= 9; i++)\n {\n stri = i.ToString();\n\n if (int.Parse(str + stri) > n) continue;\n\n\n if (str.IndexOf(stri) == -1)\n {\n if (cnt == 2) continue;\n //else cnt++;\n }\n\n res++;\n if (int.Parse(str + stri + \"0\") <= n)\n {\n if (str.IndexOf(stri) == -1) search(str + stri, cnt+1);\n else search(str + stri, cnt);\n }\n }\n }\n }\n\n class Program\n {\n const int INPUT_TYPE = 1;\n static int in_line = 1;\n static void Main(string[] args)\n {\n Solution s = new Solution();\n ArrayList indata = new ArrayList();\n\n#if !DEBUG\n\n switch (INPUT_TYPE)\n {\n case 2: //1行目に入力する行数を選択する\n in_line = int.Parse(Console.ReadLine());\n indata.Add(in_line.ToString());\n goto case 1;\n case 1: //入力する行数固定\n for (int i = 0; i < in_line; i++)\n indata.Add(Console.ReadLine());\n\n s.solve((string[])indata.ToArray(typeof(string)));\n break;\n }\n#else\n string[] debug_files = { \n \"test1.txt\", \n //\"test2.txt\", \n //\"test3.txt\" \n };\n\n foreach (var fname in debug_files)\n {\n try\n {\n s.solve(File.ReadAllLines(fname));\n }\n catch (FileNotFoundException)\n {\n //スルー\n }\n\n }\n#endif\n }\n }\n", "lang": "Mono C#", "bug_code_uid": "7e92a412a372b748cb980bdc0ec64dc2", "src_uid": "0f7f10557602c8c2f2eb80762709ffc4", "apr_id": "43b7a5b3cf2e805364c40142b9344c7f", "difficulty": 1600, "tags": ["dfs and similar", "brute force", "bitmasks"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.334020618556701, "equal_cnt": 16, "replace_cnt": 10, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "//Rextester.Program.Main is the entry point for your code. Don't change it.\n//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\nnamespace Rextester\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n var arg = Console.ReadLine().Split(' ');\n var total = int.Parse(arg[0]);\n var num = int.Parse(arg[1]);\n \n var bits = Convert.ToString(num-1, 2).PadLeft(total-1, '0').ToArray();\n \n var s = new Stack();\n var r = new List();\n for (var i = 1; i < total; i++) {\n s.Push(i);\n if (bits[i-1] == '0')\n while (s.Count > 0)\n r.Add(s.Pop().ToString());\n }\n s.Push(total);\n while (s.Count > 0) r.Add(s.Pop().ToString()); \n \n Console.WriteLine(String.Join(\" \", r));\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "8aba2cd8a3c896734a62e859cfd5f573", "src_uid": "e03c6d3bb8cf9119530668765691a346", "apr_id": "b75d3fadb4a0cd2d83b10fcde2b694ca", "difficulty": 1900, "tags": ["combinatorics", "greedy", "math", "implementation", "constructive algorithms", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8788104089219331, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n public static class MainClass\n {\n const int BufferSize = (1 << 10) * 10;\n\n const int Module = 1000000007;\n\n static readonly StreamReader Reader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);\n static readonly StreamWriter Writer = new StreamWriter(Console.OpenStandardOutput(BufferSize), Encoding.ASCII, BufferSize);\n\n static void Main(string[] args)\n {\n //var thread = new Thread(Solve) {Priority = ThreadPriority.Highest};\n //thread.Start();\n Solve();\n //Console.ReadKey();\n }\n\n static void Solve()\n {\n var n = NextNumber();\n var k = ReadLongNumber();\n\n var func = new long[n + 1];\n func[0] = 1;\n func[1] = 1;\n\n for (var i = 2; i <= n; i++)\n {\n func[i] = func[i - 1] + func[i - 2];\n }\n\n for (var i = 1; i <= n; i++)\n {\n if (k > func[n - i])\n {\n //k -= func[n - i];\n\n Writer.Write(\"{0} {1} \", i + 1, i);\n i++;\n }\n else\n {\n Writer.Write(i + \" \");\n }\n }\n\n Writer.Flush();\n }\n\n\n static void ReverseArray(ref int[] array, int left, int right)\n {\n if (right < left) return;\n\n var middle = left + (right - left) / 2;\n for (var i = left; i <= middle; i++)\n {\n Swap(ref array[i], ref array[right + left - i]);\n }\n }\n\n static void Swap(ref T firstElement, ref T secondElement)\n {\n var temp = firstElement;\n firstElement = secondElement;\n secondElement = temp;\n }\n\n static void Swap(IList collection, int firstIndex, int secondIndex)\n {\n var temp = collection[firstIndex];\n collection[firstIndex] = collection[secondIndex];\n collection[secondIndex] = temp;\n }\n\n static int GCD(int firstNumber, int secondNumber)\n {\n return secondNumber == 0 ? firstNumber : GCD(secondNumber, firstNumber % secondNumber);\n }\n\n static int NextNumber()\n {\n var resultNumber = 0;\n var isNegative = false;\n int symbol;\n\n do\n {\n symbol = Reader.Read();\n switch (symbol)\n {\n case '-':\n isNegative = true;\n break;\n case '.':\n return 1;\n case -1:\n return isNegative ? -resultNumber : resultNumber;\n }\n\n if (symbol >= 'a' && symbol <= 'z')\n {\n return -1;\n }\n } while (symbol < '0' || symbol > '9');\n\n resultNumber = symbol - '0';\n while (true)\n {\n symbol = Reader.Read();\n if (symbol < '0' || symbol > '9')\n {\n return isNegative ? -resultNumber : resultNumber;\n }\n\n resultNumber *= 10;\n resultNumber += symbol - '0';\n }\n }\n\n static int ReadNumber()\n {\n return int.Parse(Reader.ReadLine());\n }\n\n static long ReadLongNumber()\n {\n return long.Parse(Reader.ReadLine());\n }\n\n static int[] ReadArray()\n {\n var inputLine = Reader.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n var resultArray = new int[inputLine.Length];\n for (var i = 0; i < inputLine.Length; i++)\n {\n resultArray[i] = int.Parse(inputLine[i]);\n }\n\n return resultArray;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "b8be3d013b9da8fabcd32efb13502c4e", "src_uid": "e03c6d3bb8cf9119530668765691a346", "apr_id": "054b9b8c4147a48df55bd877dfc0cc7a", "difficulty": 1900, "tags": ["combinatorics", "greedy", "math", "implementation", "constructive algorithms", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9874476987447699, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nnamespace ccs\n{\n class MainClass\n {\n public static void Main(string[] args)\n {\n var n = Int64.Parse(Console.ReadLine().Trim());\n\n var answer = 0;\n\n if (n == 2) {\n answer = 1;\n }\n else if (n == 3) {\n answer = 2;\n }\n else {\n var fib = 3;\n var first = 2;\n var second = 3;\n answer = 2;\n while (fib < n) {\n answer += 1;\n fib = first + second;\n first = second;\n second = fib;\n }\n if (fib > n) {\n answer -= 1;\n }\n }\n\n Console.WriteLine(answer);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "fa54f8162f169596e845778e5894fea4", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "d8368e6a348332dc4b7bbe5f10a3ee61", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9942929613189601, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{\n\tpublic class Program\n\t{\n\t\tpublic static void Main(string[] args)\n\t\t{\n\t\t\tint n = int.Parse(Console.ReadLine());\n\n\t\t\tstring num = Console.ReadLine();\n\t\t\tstring[] numArray = num.Split(null);\n\t\t\tint[] a = new int[n];\n\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\ta[i] = int.Parse(numArray[i]);\n\t\t\t}\n\n\t\t\ta = a.Distinct().ToArray();\n\t\t\tArray.Sort(a);\n\n\n\n\t\t\tint flag = 0;\n\t\t\tfor (int i = 2; i < n; i++)\n\t\t\t{\n\t\t\t\tif (a[i] == a[i - 1] + 1 && a[i - 1] == a[i - 2] +1 && a[i] == a[i-2] +2)\n\t\t\t\t{\n\t\t\t\t\tConsole.Write(\"YES\");\n\t\t\t\t\tflag = 1;\n\t\t\t\t}\n\t\t\t\tif (flag == 1)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (flag == 0)\n\t\t\t\tConsole.Write(\"NO\");\n\t\t}\n\n\t}\n}\n", "lang": "MS C#", "bug_code_uid": "88206452a9666f2dab28561472e6cedf", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "cae5a561b724e7bb55a2fa30fa4e611b", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9699062654168722, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace Codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int balls = int.Parse(Console.ReadLine());\n int[] sizes = (Console.ReadLine()).Split(' ').Select(x => int.Parse(x)).Distinct().ToArray();\n bool valid = false;\n Array.Sort(sizes);\n\n for (int i = 0; i < balls - 2; ++i)\n {\n int lastSize = sizes[i];\n\n for (int j = i + 1; j < i + 3; ++j)\n {\n if (sizes[j] - lastSize == 1)\n {\n lastSize = sizes[j];\n valid = true;\n }\n\n else\n {\n valid = false;\n break;\n } \n }\n\n if (valid == true) { break; }\n }\n\n Console.WriteLine(valid == true ? \"YES\" : \"NO\");\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "a21ea9ad61719de5bc819856dc0813a6", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "5c286273ed4013317f8c4d346b0c1e14", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9781144781144782, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nclass Solution{\n\t static void Main(string[] args) {\n int n = int.Parse(Console.ReadLine());\n int[] A = Array.ConvertAll(Console.ReadLine().Split(' '), x => Convert.ToInt32(x));\n A = A.Distinct().ToArray();\n Array.Sort(A);\n\n bool found = false;\n for (int i = 0; i < n - 2 && !found; i++) {\n found = A[i + 2] == A[i + 1] + 1 && A[i + 1] == A[i] + 1;\n }\n Console.WriteLine(found ? \"YES\" : \"NO\");\n\t }\n}", "lang": "MS C#", "bug_code_uid": "35353a5da3c77872613cba9d9e01b40c", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "f42bf7501dccb85c69103325990e82a8", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9183673469387755, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int numb_balls = Convert.ToInt32(Console.ReadLine());\n \n int[] input = new int[numb_balls];\n\n for (int i = 0; i < numb_balls; i++)\n {\n input[i] = Convert.ToInt32(Console.ReadLine());\n }\n\n bool good_set = false;\n\n int[] unique = input.Distinct().ToArray();\n Array.Sort(unique);\n\n numb_balls = unique.Length;\n\n for (int i = 0; i < numb_balls - 2; i++)\n {\n int first_ball = unique[i];\n int second_ball = unique[i + 1];\n int third_ball = unique[i + 2];\n if (Math.Abs(first_ball - second_ball) == 1 && Math.Abs(second_ball - third_ball) == 1)\n {\n good_set = true;\n }\n }\n if (good_set)\n {\n Console.WriteLine(\"YES\");\n }\n else Console.WriteLine(\"NO\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "a368b30c6ddd871d7e3345a64ceae770", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "108180e4e5cbbc6cb774c92de671649b", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.998003992015968, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace DTATest\n{\n class Program\n {\n static List array = new List(1005);\n static void Main(string[] args)\n {\n for (int i = 0; i <= 1000; i++)\n array.Add(0);\n int n =Int32.Parse(Console.ReadLine());\n String str = Console.ReadLine();\n var input = str.Split(' ');\n foreach (var iter in input)\n {\n array[Int32.Parse(iter)]++;\n }\n bool flag = false;\n for (int i = 0; i < 1000;i++ )\n {\n if (array[i] > 0 && array[i + 1] > 0 && array[i + 2] > 0)\n {\n Console.WriteLine(\"Yes\");\n flag = true;\n break;\n }\n }\n if (!flag)\n Console.WriteLine(\"No\");\n\n //Console.Read();\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c321f0ad938141897fc7ddacdc3493d7", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "8438f4a36619ecebea058bf4e0b13227", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9954385964912281, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Threading;\n\nnamespace Codeforces\n{\n class A\n {\n private static ThreadStart s_threadStart = new A().Go;\n private static bool s_time = false;\n private static double s_eps = 1e-16;\n\n private void Go()\n {\n int n = GetInt();\n List li = GetIntArr(n);\n li = li.Distinct().ToList();\n li.Sort();\n\n for (int i = 0; i < n-2; i++)\n {\n if (li[i] + 1 == li[i + 1] && li[i + 1] + 1 == li[i + 2])\n {\n Wl(\"YES\");\n return;\n }\n }\n Wl(\"NO\");\n }\n\n #region Template\n\n public static void Main(string[] args)\n {\n System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();\n Thread main = new Thread(new ThreadStart(s_threadStart), 200 * 1024 * 1024);\n timer.Start();\n main.Start();\n main.Join();\n timer.Stop();\n if (s_time)\n Wl(timer.ElapsedMilliseconds);\n }\n\n private static IEnumerator ioEnum;\n private static string GetString()\n {\n while (ioEnum == null || !ioEnum.MoveNext())\n {\n ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();\n }\n\n return ioEnum.Current;\n }\n\n private static int GetInt()\n {\n return int.Parse(GetString(), CultureInfo.InvariantCulture);\n }\n\n private static long GetLong()\n {\n return long.Parse(GetString(), CultureInfo.InvariantCulture);\n }\n\n private static double GetDouble()\n {\n return double.Parse(GetString(), CultureInfo.InvariantCulture);\n }\n\n private static List GetIntArr(int n)\n {\n List ret = new List(n);\n for (int i = 0; i < n; i++)\n {\n ret.Add(GetInt());\n }\n return ret;\n }\n\n private static void Wl(T o)\n {\n if (o is double)\n {\n Wld((o as double?).Value, \"\");\n }\n else if (o is float)\n {\n Wld((o as float?).Value, \"\");\n }\n else\n Console.WriteLine(o.ToString());\n }\n\n private static void Wl(IEnumerable enumerable)\n {\n Wl(string.Join(\" \", enumerable.Select(e => e.ToString()).ToArray()));\n }\n\n private static void Wld(double d, string format)\n {\n Wl(d.ToString(format, CultureInfo.InvariantCulture));\n }\n\n #endregion\n }\n}", "lang": "MS C#", "bug_code_uid": "8a2c3d798e754ea084f4ff34cd8ee8b8", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "a39056964cf533427a54f8140c4fc856", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.989103101424979, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace _653A\n{\n class Program\n {\n static void Main()\n {\n var n = int.Parse(Console.ReadLine());\n var array = Console.ReadLine().Split().Select(int.Parse).Distinct().OrderBy(x => x).ToArray();\n var validator = 1;\n for (int i = 1; i < n; i++)\n {\n if (array[i] - array[i - 1] == 1) validator++;\n else validator = 1;\n if (validator == 3) break;\n }\n Console.WriteLine(validator == 3 ? \"YES\": \"NO\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "1d3acc06909b52bba326e5c477e3172f", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "efd80a3746ced09281b995429228251a", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9992105955617928, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\nusing System.Linq;\nusing System.Globalization;\nusing System.Threading;\n\nclass Program\n{\n private static void Main(string[] args)\n {\n int n = ReadInt();\n int[] m = ReadIntArray(n).Distinct().ToArray();\n Array.Sort(m);\n for (int i = 1; i < n - 1; i++)\n if (m[i] == m[i - 1] + 1 && m[i] == m[i + 1] - 1)\n {\n Console.Write(\"YES\");\n return;\n }\n Console.Write(\"NO\");\n }\n\n private static List[] ReadGraph(int n, int m)\n {\n List[] g = new List[n + 1];\n for (int i = 0; i <= n; i++) g[i] = new List();\n for (int i = 0; i < m; i++)\n {\n int a = ReadInt() - 1;\n int b = ReadInt() - 1;\n\n g[a].Add(b);\n g[b].Add(a);\n }\n\n return g;\n }\n\n private static int[,] ReadGraphAsMatrix(int n, int m)\n {\n int[,] matrix = new int[n + 1, n + 1];\n for (int i = 0; i < m; i++)\n {\n int a = ReadInt();\n int b = ReadInt();\n matrix[a, b] = matrix[b, a] = 1;\n }\n\n return matrix;\n }\n\n private static void Sort(ref int a, ref int b)\n {\n if (a > b) Swap(ref a, ref b);\n }\n\n private static void Swap(ref int a, ref int b)\n {\n int tmp = a;\n a = b;\n b = tmp;\n }\n\n private const int BufferSize = 1 << 16;\n private static StreamReader consoleReader;\n private static MemoryStream testData;\n\n private static int ReadInt()\n {\n int ans = 0;\n int mul = 1;\n do\n {\n ans = consoleReader.Read();\n if (ans == -1)\n return 0;\n if (ans == '-') mul = -1;\n } while (ans < '0' || ans > '9');\n\n ans -= '0';\n while (true)\n {\n int chr = consoleReader.Read();\n if (chr < '0' || chr > '9')\n return ans * mul;\n ans = ans * 10 + chr - '0';\n }\n }\n\n private static ulong ReadULong()\n {\n ulong ans = 0;\n int chr;\n do\n {\n chr = consoleReader.Read();\n if (chr == -1)\n return 0;\n } while (chr < '0' || chr > '9');\n\n ans = (uint)(chr - '0');\n while (true)\n {\n chr = consoleReader.Read();\n if (chr < '0' || chr > '9')\n return ans;\n ans = ans * 10 + (uint)(chr - '0');\n }\n }\n\n private static long ReadLong()\n {\n long ans = 0;\n int mul = 1;\n do\n {\n ans = consoleReader.Read();\n if (ans == -1)\n return 0;\n if (ans == '-') mul = -1;\n } while (ans < '0' || ans > '9');\n\n ans -= '0';\n while (true)\n {\n int chr = consoleReader.Read();\n if (chr < '0' || chr > '9')\n return ans * mul;\n ans = ans * 10 + chr - '0';\n }\n }\n\n private static int[] ReadIntArray(int n)\n {\n int[] ans = new int[n];\n for (int i = 0; i < n; i++)\n ans[i] = ReadInt();\n return ans;\n }\n\n private static long[] ReadLongArray(int n)\n {\n long[] ans = new long[n];\n for (int i = 0; i < n; i++)\n ans[i] = ReadLong();\n return ans;\n }\n\n private static char[] ReadString()\n {\n int ans;\n\n do\n {\n ans = consoleReader.Read();\n } while (ans < 'a' || ans > 'z');\n\n List s = new List();\n do\n {\n s.Add((char)ans);\n ans = consoleReader.Read();\n } while (ans >= 'a' && ans <= 'z');\n\n return s.ToArray();\n }\n\n private static char[] ReadString(int n)\n {\n int ans;\n\n do\n {\n ans = consoleReader.Read();\n } while (ans < 'A' || ans > 'Z');\n\n char[] s = new char[n];\n int pos = 0;\n do\n {\n s[pos++] = (char)ans;\n if (pos == n) break;\n ans = consoleReader.Read();\n } while (ans >= 'A' && ans <= 'Z');\n\n return s;\n }\n\n private static char ReadLetter()\n {\n while (true)\n {\n int ans = consoleReader.Read();\n if ((ans >= 'a' && ans <= 'z') || (ans >= 'A' && ans <= 'Z'))\n return (char)ans;\n }\n }\n\n private static char ReadDigit()\n {\n while (true)\n {\n int ans = consoleReader.Read();\n if (ans >= '0' && ans <= '9')\n return (char)ans;\n }\n }\n\n private static int ReadDigitInt()\n {\n while (true)\n {\n return ReadDigit() - (int)'0';\n }\n }\n\n private static char ReadAnyChar()\n {\n return (char)consoleReader.Read();\n }\n\n private static string DoubleToString(double x)\n {\n return x.ToString(CultureInfo.InvariantCulture);\n }\n\n static Program()\n {\n //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;\n consoleReader = new StreamReader(Console.OpenStandardInput(BufferSize), Encoding.ASCII, false, BufferSize);\n }\n\n private static void PushTestData(string data)\n {\n#if !ONLINE_JUDGE\n if (testData == null)\n {\n testData = new MemoryStream();\n consoleReader = new StreamReader(testData);\n }\n\n var pos = testData.Position;\n var bytes = Encoding.UTF8.GetBytes(data);\n testData.Write(bytes, 0, bytes.Length);\n testData.Flush();\n testData.Position = pos;\n#endif\n }\n}", "lang": "MS C#", "bug_code_uid": "1296d6026f541fb4fb2b2902e02eb528", "src_uid": "d6c876a84c7b92141710be5d76536eab", "apr_id": "00fbb83b77badd1265fe8933f9beef5d", "difficulty": 900, "tags": ["brute force", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9951638903815153, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net.Configuration;\nusing System.Runtime.Remoting.Metadata.W3cXsd2001;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n string line = Console.ReadLine();\n string[] numbers = line.Split(' ');\n int a = int.Parse(numbers[0]);\n int b = int.Parse(numbers[1]);\n\n if(a == b)\n Console.WriteLine(a + \" \" + b);\n else if (a > b)\n {\n int temp = a - b;\n temp = temp / 2;\n Console.WriteLine(b +\" \" + temp);\n }\n else\n {\n int temp = b - a;\n temp = temp / 2;\n Console.WriteLine(a + \" \" + temp);\n }\n Console.ReadLine();\n }\n", "lang": "MS C#", "bug_code_uid": "78f5ae2de9b3a83515e4b2841b757b48", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "7d969fc7d6006bf6a80ae6ccfbbe679a", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9648405560098119, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A.Vasya_the_Hipster\n{\n class Program\n {\n static void Main(string[] args)\n {\n start:\n int[] omar = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int res = omar.Min();\n int mod = omar.Max() - omar.Min();\n if (mod % 2 != 0 && mod > 2)\n {\n mod--;\n }\n if (mod == 1)\n mod = 0;\n\n Console.Write(res+\" \"+mod/2);\n goto start;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "bc8274f745fcec16491791e9911979d7", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "73e8c817196999cb59f26a0a3cfb64da", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.7123947051744886, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.IO;\n\nnamespace A\n{\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tStreamReader sr = new StreamReader(\"input.txt\");\n\t\t\tStreamWriter sw = new StreamWriter(\"output.txt\");\n\n\t\t\tstring[] input_line = sr.ReadLine().Split();\n\n\t\t\tint a = Convert.ToInt32(input_line[0]);\n\t\t\tint b = Convert.ToInt32(input_line[1]);\n\n\t\t\tif (a < b)\n\t\t\t\tsw.Write(a + \" \" + ((b - a) / 2));\n\t\t\telse\n\t\t\t\tsw.Write(b + \" \" + ((a - b) / 2));\n\n\n\t\t\tsr.Close();\n\t\t\tsw.Close();\n\t\t}\n\t}\n}", "lang": "MS C#", "bug_code_uid": "f59bc4617e27b9ab5b405a5d4039bb95", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "8831f07a355207ae444dc25b27a30c10", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.999862258953168, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Numerics;\nusing System.Text;\n\nnamespace CodeforcesTemplate\n{\n public static class Permutation\n {\n private static bool Next(ref int[] arr)\n {\n int k, j, l;\n for (j = arr.Length - 2; (j >= 0) && (arr[j] >= arr[j + 1]); j--) { }\n if (j == -1)\n {\n arr = arr.OrderBy(c => c).ToArray();\n return false;\n }\n for (l = arr.Length - 1; (arr[j] >= arr[l]) && (l >= 0); l--) { }\n var tmp = arr[j];\n arr[j] = arr[l];\n arr[l] = tmp;\n for (k = j + 1, l = arr.Length - 1; k < l; k++, l--)\n {\n tmp = arr[k];\n arr[k] = arr[l];\n arr[l] = tmp;\n }\n return true;\n }\n public static IEnumerable AllPermutations(int[] arr)\n {\n do yield return arr;\n while (Next(ref arr));\n }\n }\n\n class Program\n {\n private const string FILENAME = \"distance4\";\n\n private const string INPUT = FILENAME + \".in\";\n\n private const string OUTPUT = FILENAME + \".out\";\n\n private static Stopwatch _stopwatch = new Stopwatch();\n\n private static StreamReader _reader = null;\n private static StreamWriter _writer = null;\n\n private static string[] _curLine;\n private static int _curTokenIdx;\n\n private static char[] _whiteSpaces = new char[] { ' ', '\\t', '\\r', '\\n' };\n\n private static string ReadNextToken()\n {\n if (_curTokenIdx >= _curLine.Length)\n {\n //Read next line\n string line = _reader.ReadLine();\n if (line != null)\n _curLine = line.Split(_whiteSpaces, StringSplitOptions.RemoveEmptyEntries);\n else\n _curLine = new string[] { };\n _curTokenIdx = 0;\n }\n\n if (_curTokenIdx >= _curLine.Length)\n return null;\n\n return _curLine[_curTokenIdx++];\n }\n\n private static int ReadNextInt()\n {\n return int.Parse(ReadNextToken());\n }\n\n private static void RunTimer()\n {\n#if (DEBUG)\n\n _stopwatch.Start();\n\n#endif\n }\n\n private static void Main(string[] args)\n {\n\n#if (DEBUG)\n double before = GC.GetTotalMemory(false);\n#endif\n\n int n = int.Parse(Console.ReadLine());\n\n int s = ((1 + n / 2) * (n / 2));\n\n if (n % 2 == 0)\n {\n s += (n + 1) / 2;\n }\n\n Console.WriteLine(s);\n\n\n\n#if (DEBUG)\n _stopwatch.Stop();\n\n double after = GC.GetTotalMemory(false);\n\n double consumedInMegabytes = (after - before) / (1024 * 1024);\n\n Console.WriteLine($\"Time elapsed: {_stopwatch.Elapsed}\");\n\n Console.WriteLine($\"Consumed memory (MB): {consumedInMegabytes}\");\n\n Console.ReadKey();\n#endif\n\n\n }\n\n private static int CountLeadZeros(string source)\n {\n int countZero = 0;\n\n for (int i = source.Length - 1; i >= 0; i--)\n {\n if (source[i] == '0')\n {\n countZero++;\n }\n\n else\n {\n break;\n }\n\n }\n\n return countZero;\n }\n\n private static string ReverseString(string source)\n {\n char[] reverseArray = source.ToCharArray();\n\n Array.Reverse(reverseArray);\n\n string reversedString = new string(reverseArray);\n\n return reversedString;\n }\n\n\n private static int[] CopyOfRange(int[] src, int start, int end)\n {\n int len = end - start;\n int[] dest = new int[len];\n Array.Copy(src, start, dest, 0, len);\n return dest;\n }\n\n private static string StreamReader()\n {\n\n if (_reader == null)\n _reader = new StreamReader(INPUT);\n string response = _reader.ReadLine();\n if (_reader.EndOfStream)\n _reader.Close();\n return response;\n\n\n }\n\n private static void StreamWriter(string text)\n {\n\n if (_writer == null)\n _writer = new StreamWriter(OUTPUT);\n _writer.WriteLine(text);\n\n\n }\n\n\n\n\n\n private static int BFS(int start, int end, int[,] arr)\n {\n Queue> queue = new Queue>();\n List visited = new List();\n for (int i = 0; i < arr.GetLength(0); i++)\n {\n visited.Add(false);\n }\n\n queue.Enqueue(new KeyValuePair(start, 0));\n KeyValuePair node;\n int level = 0;\n bool flag = false;\n\n while (queue.Count != 0)\n {\n node = queue.Dequeue();\n if (node.Key == end)\n {\n return node.Value;\n }\n flag = false;\n for (int i = 0; i < arr.GetLength(0); i++)\n {\n\n if (arr[node.Key, i] == 1)\n {\n if (visited[i] == false)\n {\n if (!flag)\n {\n level = node.Value + 1;\n flag = true;\n }\n queue.Enqueue(new KeyValuePair(i, level));\n visited[i] = true;\n }\n }\n }\n\n }\n return 0;\n\n }\n\n\n\n private static void Write(string source)\n {\n File.WriteAllText(OUTPUT, source);\n }\n\n private static string ReadString()\n {\n return File.ReadAllText(INPUT);\n }\n\n private static void WriteStringArray(string[] source)\n {\n File.WriteAllLines(OUTPUT, source);\n }\n\n private static string[] ReadStringArray()\n {\n return File.ReadAllLines(INPUT);\n }\n\n private static int[] GetIntArray()\n {\n return ReadString().Split(' ').Select(int.Parse).ToArray();\n }\n\n private static double[] GetDoubleArray()\n {\n return ReadString().Split(' ').Select(double.Parse).ToArray();\n }\n\n private static int[,] ReadINT2XArray(List lines)\n {\n int[,] arr = new int[lines.Count, lines.Count];\n\n for (int i = 0; i < lines.Count; i++)\n {\n int[] row = lines[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();\n\n for (int j = 0; j < lines.Count; j++)\n {\n arr[i, j] = row[j];\n }\n }\n\n return arr;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c8f502cfdb0f9dfe65a16e615a993006", "src_uid": "f8af5dfcf841a7f105ac4c144eb51319", "apr_id": "aef908090200090ef8a0bf88542c1734", "difficulty": 1300, "tags": ["math", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8303814713896458, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n \nclass Program{\n static void Main(string[] args){\n string[] input = Console.ReadLine().Split(' ');\n int ridesPlanned = Int32.Parse(input[0]);\n int ridesInSpecialTicket=Int32.Parse(input[1]);\n int priceForSingleRide= Int32.Parse(input[2]);\n int priceForSpecialRides=Int32.Parse(input[3]);\n \n if (ridesPlanned == 0)\n Console.WriteLine(0);\n else if (ridesInSpecialTicket == 0)\n Console.WriteLine(ridesPlanned * priceForSingleRide);\n\n else\n {\n\n if (ridesPlanned % ridesInSpecialTicket == 0)\n Console.WriteLine((ridesPlanned / ridesInSpecialTicket) * priceForSpecialRides);\n else{\n int cost = (ridesPlanned / ridesInSpecialTicket) * priceForSpecialRides + (ridesPlanned % ridesInSpecialTicket) * priceForSingleRide;\n int x = ridesPlanned / ridesInSpecialTicket + 1;\n if(x*priceForSpecialRides < cost)\n {\n ConsoleWriteLine(x * priceForSpecialRides);\n }\n }\n } \n\n \n }\n}", "lang": "Mono C#", "bug_code_uid": "0fd4ab3e7cc85d97e4aace27d7f8a2df", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "e8a28d14581ab507fee63b40f4c08f60", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9553708833487227, "equal_cnt": 13, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n \nclass Program{\n static void Main(string[] args){\n string[] input = Console.ReadLine().Split(' ');\n int ridesPlanned = Int32.Parse(input[0]);\n int ridesInSpecialTicket=Int32.Parse(input[1]);\n int priceForSingleRide= Int32.Parse(input[2]);\n int priceForSpecialRides=Int32.Parse(input[3]);\n \n if (ridesPlanned == 0)\n return 0;\n else if (ridesInSpecialTicket == 0)\n return ridesPlanned * priceForSingleRide;\n\n else\n {\n if (ridesPlanned % ridesInSpecialTicket == 0) \n return (ridesPlanned * priceForSingleRide)< ((ridesPlanned / ridesInSpecialTicket) * priceForSpecialRides)? ridesPlanned * priceForSingleRide :(ridesPlanned / ridesInSpecialTicket) * priceForSpecialRides; \n else\n { \n if (((ridesPlanned / ridesInSpecialTicket + 1) * priceForSpecialRides) < ((ridesPlanned / ridesInSpecialTicket) * priceForSpecialRides + (ridesPlanned % ridesInSpecialTicket) * priceForSingleRide))\n return (ridesPlanned / ridesInSpecialTicket + 1) * priceForSpecialRides;\n else \n return ((ridesPlanned / ridesInSpecialTicket) * priceForSpecialRides + (ridesPlanned % ridesInSpecialTicket) * priceForSingleRide);\n }\n } \n\n\n \n }\n}", "lang": "Mono C#", "bug_code_uid": "c81a543dcc315c5550a9f0286ef2e1c9", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "e8a28d14581ab507fee63b40f4c08f60", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9970149253731343, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace CodeForcesProblems\n{\n class A466_CheapTravel\n {\n public static void Main()\n {\n while (true)\n {\n string[] z = Console.ReadLine().Split(' ');\n int n = int.Parse(z[0]);\n int m = int.Parse(z[1]);\n int a = int.Parse(z[2]);\n int b = int.Parse(z[3]);\n double c =(double) b / m;\n if(c>a)\n {\n Console.WriteLine(a*n);\n }\n else\n {\n int t = n / m;\n int result = (t * b); //+((n-(t*m))*a);\n\n if (((n - (t * m)) * a) > b)\n result += b;\n else\n result += ((n - (t * m)) * a);\n\n Console.WriteLine(result);\n }\n \n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "1f21704aee208e95f97e896ef2b43529", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "60f89179c96a7e01ec1673b9d28a62de", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9990108803165183, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Ladder4\n{\n class Prob21\n {\n static void Main(string[] args)\n {\n List input = Console.ReadLine().Split(' ').Select(alias => int.Parse(alias)).ToList();\n int rides = input[0];\n int loop = rides;\n int multipleRides = input[1];\n int oneRide = input[2];\n int multiplePrice = input[3];\n int sum = 0;\n\n if (multipleRides * oneRide < multiplePrice)\n Console.WriteLine(loop * oneRide);\n else\n {\n int x = loop / multipleRides * multiplePrice;\n int restRides = loop % multipleRides;\n if (restRides * oneRide > multiplePrice)\n x += multiplePrice;\n else\n x += restRides * oneRide;\n Console.WriteLine(x);\n }\n while (true) ;\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "e1fd93ba40ffb829e3bc446d13cdc37f", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "b1f1802876c38dc3b4f595acff54717e", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9939668174962293, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Text;\nusing System.Collections.Generic;\nusing System.Collections;\nclass Problem\n{\n static void Main()\n {\n //--------------------------------input--------------------------------//\n\n var v = Array.ConvertAll( Console.ReadLine().Split(), Convert.ToInt32 );\n\n //--------------------------------solve--------------------------------//\n\n int n = v[0],m=v[1],a=v[2],b=v[3];\n if(b / m > a)\n Console.WriteLine( a * n );\n else\n {\n int kq=0;\n kq = ( n / m ) * b + ( n % m ) * a;\n Console.WriteLine( Math.Min(kq,(n/m+1)*b );\n }\n\n }\n}", "lang": "Mono C#", "bug_code_uid": "b85c32ef1c360aa009964e2bdce5c6fa", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "b60b9e7603e9aa083d7cff7f75e4f000", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.998109640831758, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n String[] inp = new String[4];\n for (int i = 0; i < 4; ++i)\n {\n inp[i] = Console.ReadLine();\n }\n int s;\n for (int i = 1; i < 10; ++i)\n {\n s = 0;\n for (int j = 0; j < 4; ++j)\n {\n for (int k = 0; k < 4; ++k)\n {\n if (inp[j][k] - '0' == i)\n {\n s++;\n }\n }\n }\n if (s > n)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n }\n Console.WriteLine(\"YES\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "cba7031ee5271b20f8d7b6ed0af23dbc", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "d97edba1bed88dcf8c973a77786ecb90", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9973390101117616, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n var line = Console.ReadLine().Split(' ');\n var N = int.Parse(line[0]);\n //var board = new int[4, 4];\n var set = new HashSet();\n var numbers = new int[10];\n for (int n = 0; n <= 4; n++)\n {\n var s = Console.ReadLine();\n for (int i = 0; i < 4; i++)\n {\n\n if (s[i] != '.')\n {\n var number = int.Parse(s[i].ToString());\n numbers[number]++;\n }\n }\n }\n var success = numbers.All(i => i <= N);\n\n string ans = success ? \"YES\" : \"NO\";\n Console.WriteLine(ans);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "4debc05ae9b564d5e96f337bcdd59126", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "52780e82c6817be7ac1326b33f119846", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9444089456869009, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\nnamespace olymp\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = Int32.Parse(Console.ReadLine());\n int e = 0;\n int[] k = new int[9];\n string input;\n while (e != 4)\n {\n input = Console.ReadLine();\n for (int i = 0; i < 4; i++)\n if (input[i] != '.')\n k[Int32.Parse(input.Substring(i, 1)) - 1] += 1;\n e++;\n }\n n *= 2;\n bool b = true;\n for (int i = 0; i < 4; i++)\n if (k[i] > n)\n {\n b = false;\n break;\n }\n Console.WriteLine(b ? \"YES\" : \"NO\");\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "01d99d4f465240c913f97a2f5fa7be1a", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "1e510c6a49f26c25d249e07c7fc10c0a", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9981515711645101, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace _373A___Collecting_Beats_is_Fun\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = Int32.Parse(Console.ReadLine());\n\n string[] lines = new string[4];\n for (int i = 0; i < 4; i++)\n {\n lines[i] = Console.ReadLine();\n }\n\n int[] numbers = new int[17];\n\n for (int i = 0; i < lines.Length; i++)\n {\n for (int j = 0; j < lines[i].Length; j++)\n {\n if (lines[i][j] != '.')\n {\n numbers[Int32.Parse(lines[i][j].ToString())]++;\n }\n }\n }\n\n for (int i = 0; i < numbers.Length; i++)\n {\n if (numbers[i] > 2 * k)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n }\n\n Console.WriteLine(\"Yes\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "7acf732a7cbd2bc34b71c74a431a94e6", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "e80d97cd21544ad0823c0c7fd02a4cc3", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9962181285836281, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n public void Solve()\n {\n int k = ReadInt();\n var cnt = new int[100];\n foreach (char ch in string.Concat(ReadLines(4)))\n cnt[ch]++;\n Write(cnt.Max() > 2 * k ? \"NO\" : \"YES\");\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"cycle.in\");\n //writer = new StreamWriter(\"cycle.out\");\n#endif\n try\n {\n // var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n // thread.Start();\n // thread.Join();\n new Solver().Solve();\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n Console.WriteLine(ex);\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n\n private static Queue currentLineTokens = new Queue();\n\n private static string[] ReadAndSplitLine()\n {\n return reader.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n\n public static int ReadInt()\n {\n return int.Parse(ReadToken());\n }\n\n public static long ReadLong()\n {\n return long.Parse(ReadToken());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(ReadToken(), CultureInfo.InvariantCulture);\n }\n\n public static int[] ReadIntArray()\n {\n return ReadAndSplitLine().Select(int.Parse).ToArray();\n }\n\n public static long[] ReadLongArray()\n {\n return ReadAndSplitLine().Select(long.Parse).ToArray();\n }\n\n public static double[] ReadDoubleArray()\n {\n return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();\n }\n\n public static int[][] ReadIntMatrix(int numberOfRows)\n {\n int[][] matrix = new int[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++)\n matrix[i] = ReadIntArray();\n return matrix;\n }\n\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows);\n int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++)\n {\n ret[i] = new int[numberOfRows];\n for (int j = 0; j < numberOfRows; j++)\n ret[i][j] = matrix[j][i];\n }\n return ret;\n }\n\n public static string[] ReadLines(int quantity)\n {\n string[] lines = new string[quantity];\n for (int i = 0; i < quantity; i++)\n lines[i] = reader.ReadLine().Trim();\n return lines;\n }\n\n public static void WriteArray(IEnumerable array)\n {\n writer.WriteLine(string.Join(\" \", array));\n }\n\n public static void Write(params object[] array)\n {\n WriteArray(array);\n }\n\n public static void WriteLines(IEnumerable array)\n {\n foreach (var a in array)\n writer.WriteLine(a);\n }\n\n class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "ee680e591f5d8c28f112f78f24f5c5f4", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "4a54477b06b72fcac2ea82d483a51b20", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7606837606837606, "equal_cnt": 11, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = Int32.Parse(Console.ReadLine());\n Dictionary match = new Dictionary();\n for (int i = 0; i< 4; i++)\n {\n string goal = Console.ReadLine();\n for(int j=0;j< 4; j++)\n {\n if (goal[j] == '.') continue;\n int time = goal[j] - '0';\n if (!match.ContainsKey(time))\n {\n match.Add(time, 1);\n }\n else\n {\n match[time]++;\n }\n }\n \n }\n int maxPressed = k * 2;\n if(match.OrderByDescending(x => x.Value).ElementAt(0).Value > maxPressed)\n {\n Console.WriteLine(\"NO\");\n } else\n Console.WriteLine(\"YES\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "75c780a50c4a154ccfb85ea2ee78a781", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "b186698d6e82f74dd184787c0a8b0da8", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9903753609239654, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace _219A\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = int.Parse(Console.ReadLine());\n string s;\n char[,] a = new char[4, 4];\n \n for (int i=0; i<4;i++)\n {\n s = Console.ReadLine();\n for(int j = 0; j<4 ; j++)\n {\n a[i, j] = s[j];\n\n\n }\n\n \n }\n\n\n bool flag = true;\n int counter;\n for (int i = 1; i <= 9; i++)\n {\n counter = 0;\n for (int j = 0; j < 4; j++)\n {\n \n for (int m = 0; m < 4; m++)\n {\n if (a[j, m] - '0' == i) counter++;\n\n\n }\n\n\n }\n if (counter > k) { flag = false; break; }\n }\n\n s = flag ? \"YES\" : \"NO\";\n Console.WriteLine(s);\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5cc58185cc3bbcd8be47d2903c1a6e82", "src_uid": "5fdaf8ee7763cb5815f49c0c38398f16", "apr_id": "437ae24aa747e0c4e416ac6a95c5a8c4", "difficulty": 900, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6464208242950108, "equal_cnt": 11, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 5, "fix_ops_cnt": 11, "bug_source_code": "using System;\n\n\nnamespace ConsoleApplication23\n{\n class Program\n {\n static void Main(string[] args)\n {\n while (true)\n {\n \n \n string str = Console.ReadLine();\n string[] str2 = str.Split(' ');\n if (int.Parse(str2[3]) / int.Parse(str2[1]) >=int.Parse(str2[2]))\n {\n Console.WriteLine(int.Parse(str2[2]) * int.Parse(str2[0]));\n }\n else\n {\n int counter = int.Parse(str2[0]);\n int answer = 0;\n do\n {\n answer = answer + int.Parse(str2[3]);\n counter = counter - int.Parse(str2[1]);\n } while (int.Parse(str2[1]) < counter);\n if (counter < 0)\n counter = 0;\n\n if (int.Parse(str2[2]) < int.Parse(str2[3]) || counter == 0)\n {\n answer = answer + int.Parse(str2[2]) * counter;\n }\n else\n {\n answer = answer + int.Parse(str2[3]);\n }\n Console.WriteLine(answer);\n }\n }\n \n Console.ReadLine();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "9291d38762855b0f9d10be732102f53f", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "d25ef462651aaf8d57e90a3d173091b1", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.3802672147995889, "equal_cnt": 28, "replace_cnt": 13, "delete_cnt": 0, "insert_cnt": 16, "fix_ops_cnt": 29, "bug_source_code": "class programm\n{\n static void main()\n {\n int n,m,a,b;\n n=Convert.ToInt32(Console.ReadLine());\n m=Convert.ToInt32(Console.ReadLine());\n a=Convert.ToInt32(Console.ReadLine());\n b=Convert.ToInt32(Console.ReadLine());\n if (a*m<=b) {Console.WriteLine(a*n)}\n else {Console.WriteLine(n/m*b+max(n%m*a,b))};\n \n }\n}", "lang": "MS C#", "bug_code_uid": "ac564ead678095d11a7b3d275a9f4e13", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "68713c81ebf98b51d2b455877b308303", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.32515894641235243, "equal_cnt": 26, "replace_cnt": 14, "delete_cnt": 0, "insert_cnt": 12, "fix_ops_cnt": 26, "bug_source_code": "using System;\nnamespace Myprogramm\n{\n class programm\n {\n static void Main()\n {\n int n,m,a,b;\n n=Convert.ToInt32(Console.ReadLine());\n m=Convert.ToInt32(Console.ReadLine());\n a=Convert.ToInt32(Console.ReadLine());\n b=Convert.ToInt32(Console.ReadLine());\n if (a*m<=b) {Console.WriteLine(a*n);}\n else \n {if (n%m*a>b) {a=n%m*a;}\n else {a=b;};\n Console.WriteLine(n/m*b+a);};\n \n }\n }\n}", "lang": "MS C#", "bug_code_uid": "7c1e52c67addcb6a3bf26e18146cb9ec", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "68713c81ebf98b51d2b455877b308303", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.012607449856733524, "equal_cnt": 8, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nVisualStudioVersion = 12.0.21005.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"A\", \"A\\A.csproj\", \"{72C18F33-1F07-490F-98D2-4940AA438842}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{72C18F33-1F07-490F-98D2-4940AA438842}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{72C18F33-1F07-490F-98D2-4940AA438842}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{72C18F33-1F07-490F-98D2-4940AA438842}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{72C18F33-1F07-490F-98D2-4940AA438842}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "d8b5575eae7f49ae5b61ce09b5572e73", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "9a99cdcf7c779891f710602e34fbc654", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.19102621057307864, "equal_cnt": 27, "replace_cnt": 20, "delete_cnt": 6, "insert_cnt": 2, "fix_ops_cnt": 28, "bug_source_code": "using System;\n\n\nusing System.Text;\n\n\nnamespace A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] mass=new string[4];\n string s;\n s=Console.ReadLine();\n mass=s.Split(new char[] {' '}, 4);\n int n= Convert.ToInt16(mass[0]);\n int m=Convert.ToInt16(mass[1]);\n int a=Convert.ToInt16(mass[2]);\n int b=Convert.ToInt16(mass[3]);\n int g=0;\n int t;\n\n if(na)\n {\n for(t=n;t>0;t--)\n {\n a=a+1;\n }\n Console.WriteLine(a);\n }\n t = 0;\n if(n>m)\n {\n bool poka = true;\n while(poka==true)\n {\n n = n - m;\n g = g + b;\n\n if (n < m && b < a)\n { Console.WriteLine(g + b); poka = false; }\n if (n < m && b > a)\n {\n for (t = n; t > 0; t--)\n {\n g = g + a;\n }\n Console.WriteLine(g);\n poka = false;\n }\n }\n }\n s=Console.ReadLine();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "45c5d85991d1081c173004f1bac000b6", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "9a99cdcf7c779891f710602e34fbc654", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9995925850478713, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\n//using System.Numerics;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n long Sum(int from, int to)\n {\n int len = to - from + 1;\n return 1L * from * len + 1L * len * (len - 1) / 2;\n }\n\n long Fun(int height, int width, int start, int cut)\n {\n long ret = 0;\n if (start - height + 1 <= cut)\n ret += Sum(1, Math.Min(height - 1, cut - start + height));\n if (start <= cut)\n ret += 1L * height * (Math.Min(width, cut - start) + 1);\n if (start + width + 1 <= cut)\n ret += Sum(Math.Max(1, start + width + height - cut), height - 1);\n return ret;\n }\n\n void Solve()\n {\n int a = ReadInt();\n int b = ReadInt();\n int c = ReadInt();\n int v = ReadInt();\n int s = a + b + c;\n long ans = 0;\n for (int i = 0; i <= v; i++, s++)\n {\n int s2 = (s - 1) / 2;\n int ca = s2 - a;\n int cb = s2 - b;\n int cc = s2 - c;\n if (ca < 0 || cb < 0 || cc < 0)\n continue;\n int min = Math.Min(cb, cc);\n int max = Math.Max(cb, cc);\n ans += Fun(min + 1, max - min, i - cb - cc + min, ca) - Fun(min + 1, max - min, i - cb - cc + min, -1);\n }\n\n Write(ans);\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n reader = new StreamReader(\"transform.in\");\n writer = new StreamWriter(\"transform.out\");\n#endif\n try\n {\n // var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n // thread.Start();\n // thread.Join();\n new Solver().Solve();\n }\n catch (Exception ex)\n {\n Console.WriteLine(ex);\n#if DEBUG\n#else\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }\n public static int ReadInt() { return int.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }\n public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void WriteArray(IEnumerable array) { writer.WriteLine(string.Join(\" \", array)); }\n public static void Write(params object[] array) { WriteArray(array); }\n public static void WriteLines(IEnumerable array) { foreach (var a in array)writer.WriteLine(a); }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "1c40c2ed19e606a39d55285550095527", "src_uid": "185ff90a8b0ae0e2b75605f772589410", "apr_id": "fba9b34d2c6234ddbf26a43123771042", "difficulty": 2100, "tags": ["math", "combinatorics", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9978822532825075, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Text;\nusing System.Linq;\nusing System.Collections.Generic;\n\nnamespace SeaBattle\n{\n class Program\n {\n\n public static void Main()\n {\n char[] hello = { 'h', 'e', 'l', 'l', 'o' };\n string word = Console.ReadLine();\n int equals = 0;\n foreach(char letter in word)\n {\n if(letter == hello[equals])\n {\n equals++;\n }\n }\n if(equals == 5)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n //struct Vector3\n //{\n // public int x;\n // public int y;\n // public int z;\n // public Vector3(int[] ar)\n // {\n // x = ar[0];\n // y = ar[1];\n // z = ar[2];\n // }\n // public bool IsEquilibriun(Vector3 vector)\n // {\n // if (x + vector.x == 0 && y + vector.y == 0 && z + vector.z == 0)\n // {\n // return true;\n // }\n // return false;\n // }\n //}\n}", "lang": ".NET Core C#", "bug_code_uid": "dd3325e9eb5f6f2d768ec512a4e40725", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "29da8fff7823f326d06a1be027d0b0b1", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9174454828660437, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace _58A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n string hello = \"hello\";\n int j = 0;\n\n\n for(int i = 0; i < s.Length; i++)\n {\n if(s[i] == hello[j])\n {\n j++;\n }\n }\n if(j == 5)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n \n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "3fca172ca1796ef4a3d396b2852f9244", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "76e971280c22a087a8b24a8806ae1a24", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8968768414849735, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n String s = Console.ReadLine();\n String res = \"\";\n String[] table = new String[5] { \"h\", \"e\", \"l\", \"l\", \"o\" };\n\n int model = 0;\n\n for (int i = 0; i < s.Length; i++)\n {\n if (s[i].ToString().Equals(table[model].ToString()))\n {\n res += table[model];\n model++;\n }\n }\n \n if (res.Equals(\"hello\"))\n {\n Console.Write(\"YES\");\n }\n\n else\n {\n Console.Write(\"NO\");\n }\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f182093805e3787414db192c655a9a7f", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "ab6417640a98e847aa948068b4de420e", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8365817091454273, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n String s = Console.ReadLine().ToString() ;\n String res = \"\";\n char[] table = new char[5] { 'h', 'e', 'l', 'l', 'o'};\n\n int model = 0;\n\n for (int i = 0; i < s.Length; i++)\n {\n if (s[i]==(table[model]))\n {\n res += table[model];\n model++;\n }\n }\n Console.WriteLine(res.Equals(\"hello\") ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "ac4111af890be6f9a16af891cba9b0be", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "ab6417640a98e847aa948068b4de420e", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9991212653778558, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "#if DEBUG\nusing System.Reflection;\nusing System.Threading.Tasks;\n#endif\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\nusing System.Globalization;\n\n\nnamespace ed32e\n{\n class Program\n {\n static string _inputFilename = \"input.txt\";\n static string _outputFilename = \"output.txt\";\n static bool _useFileInput = false;\n\n\n static void Main(string[] args)\n {\n StreamWriter file = null;\n#if DEBUG\n\t\t\tConsole.SetIn(getInput());\n#else\n if (_useFileInput)\n {\n Console.SetIn(File.OpenText(_inputFilename));\n file = new StreamWriter(_outputFilename);\n Console.SetOut(file);\n }\n#endif\n\n try\n {\n solution();\n }\n finally\n {\n if (_useFileInput)\n {\n file.Close();\n }\n }\n }\n\n static void solution()\n {\n #region SOLUTION\n\n var d = readIntArray();\n var n = d[0];\n var m = d[1];\n var a = readIntArray();\n\n var fh = n / 2;\n if (n % 2 == 1)\n {\n fh++;\n }\n var sh = n / 2;\n\n var mv = 0;\n for (int i = 0; i < fh; i++)\n {\n mv |= 1 << i;\n }\n\n var arr = new long[mv + 1];\n for (int i = 0; i <= mv; i++)\n {\n arr[i] = sum(i, a, m, 0);\n }\n\n Array.Sort(arr);\n var max = arr[arr.Length - 1];\n\n\n var sm = 0;\n //for (int i = mv; i < n; i++)\n //{\n // sm &= 1 << i;\n //}\n\n for (int i = 0; i < sh; i++)\n {\n sm |= 1 << i;\n }\n\n //var smin = mv + 1;\n var res = long.MinValue;\n for (int i = 0; i <= sm; i++)\n {\n var val = sum(i, a, m, fh);\n var nr = (val + max) % m;\n if (nr > res)\n {\n res = nr;\n }\n\n var req = m - val - 1;\n if (req <= 0)\n {\n continue;\n }\n\n var l = 0;\n var r = arr.Length - 1;\n while (true)\n {\n if (l == r)\n {\n break;\n }\n\n var mid = l + (r - l + 1) / 2;\n var vv = arr[mid];\n if (vv <= req)\n {\n l = mid;\n }\n else\n {\n r = mid - 1;\n }\n }\n\n if (arr[l] <= req)\n {\n if (val + arr[l] > res)\n {\n res = val + arr[l];\n }\n }\n }\n\n Console.WriteLine(res);\n //var n = readInt();\n //var m = readInt();\n\n //var a = readIntArray();\n //var b = readIntArray();\n #endregion\n }\n\n static long sum(int pattern, int[] a, int m, int start)\n {\n var res = 0;\n for (int i = 0; i < 20; i++)\n {\n if ((pattern & (1 << i)) != 0)\n {\n res += a[i + start];\n res %= m;\n }\n }\n\n return res;\n }\n\n static int readInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static long readLong()\n {\n return long.Parse(Console.ReadLine());\n }\n\n static int[] readIntArray()\n {\n return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();\n }\n\n static long[] readLongArray()\n {\n return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();\n }\n\n#if DEBUG\n\t\tstatic StreamReader getInput()\n\t\t{\n\t\t\tvar resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];\n\t\t\tvar resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);\n\n\t\t\treturn new StreamReader(resource);\n\t\t}\n#endif\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d0b89e2693412b4f6e0f9bca74a221f7", "src_uid": "d3a8a3e69a55936ee33aedd66e5b7f4a", "apr_id": "389df39ddac6153f0fb8292651eccb25", "difficulty": 1800, "tags": ["divide and conquer", "meet-in-the-middle", "bitmasks"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.03333333333333333, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "Program.cs", "lang": "Mono C#", "bug_code_uid": "e73c8151636193547359cf9ae213d1bc", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "499e35469295fad527cd0f51fc6362d0", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.918429003021148, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\n\nclass Program\n{\n static void Main(string[] args)\n {\n int red = int.Parse(Console.ReadLine());\n int blue = int.Parse(Console.ReadLine());\n int resultDoubleSocks;\n int otherSocks;\n\n if (red > blue)\n {\n resultDoubleSocks = red - (red - blue);\n otherSocks = (red - blue) / 2;\n Console.WriteLine(resultDoubleSocks + \" \" + otherSocks);\n }\n else\n {\n resultDoubleSocks = blue - (blue - red);\n otherSocks = (blue - red) / 2;\n Console.WriteLine(resultDoubleSocks + \" \" + otherSocks);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "1960e17c02811234d8d121003e32ffc1", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "968bb19b510484f2e123f45c34baaef6", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9830508474576272, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nclass Program {\n static void Main(string[] args) {\n int x = 10, sum;\n string[] s = Console.ReadLine().Split();\n int l = int.Parse(s[0]);\n int r = int.Parse(s[1]);\n while (r >= x) {\n x *= 10;\n }\n if (r >= x / 2 && l <= x / 2 - 1) {\n sum = x / 2 - 1;\n }\n else if (l > x / 2 - 1) {\n sum = l;\n }\n else {\n sum = r;\n }\n Console.WriteLine(sum * (x - sum - 1));\n }\n}\n", "lang": "MS C#", "bug_code_uid": "eeb52c89d2562b7dd291a2d396b51c63", "src_uid": "2c4b2a162563242cb2f43f6209b59d5e", "apr_id": "a1ba749a716026cb2badacb31a0bd004", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9991728701406121, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace CF\n{\n\tclass Program\n\t{\n\t\tconst int MOD = 1000000007;\n\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tnew Program().run();\n\t\t}\n\n\t\tlong quickpow(long a, long exp)\n\t\t{\n\t\t\tlong res = 1;\n\t\t\twhile(exp > 0)\n\t\t\t{\n\t\t\t\tif((exp & 1) == 1)\n\t\t\t\t{\n\t\t\t\t\tres *= a;\n\t\t\t\t\tres %= MOD;\n\t\t\t\t}\n\t\t\t\ta = a*a;\n\t\t\t\ta %= MOD;\n\t\t\t\texp >>= 1;\n\t\t\t}\n\t\t\treturn res % MOD;\n\t\t}\n\n\t\tvoid run()\n\t\t{\n\t\t\tlong[] arr = ReadLong();\n\n\t\t\tlong x = arr[0], n = arr[1];\n\n\t\t\tList prime = new List();\n\n\t\t\tlong tmp = x;\n\t\t\tfor(long i = 2; i * i <= tmp; ++i)\n\t\t\t{\n\t\t\t\tif(tmp % i == 0)\n\t\t\t\t{\n\t\t\t\t\tprime.Add(i);\n\t\t\t\t\twhile(tmp % i == 0)\n\t\t\t\t\t\ttmp /= i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(tmp > 1)\n\t\t\t\tprime.Add(tmp);\n\n\t\t\tlong res = 1;\n\t\t\tforeach(long p in prime)\n\t\t\t{\n\t\t\t\tlong tn = n;\n\t\t\t\tlong exp = 0;\n\t\t\t\twhile(tn / p > 0)\n\t\t\t\t{\n\t\t\t\t\texp += (tn / p);\n\t\t\t\t\texp %= MOD;\n\t\t\t\t\ttn /= p;\n\t\t\t\t}\n\n\t\t\t\t//Console.WriteLine(\"test: {0} {1} {2}\", tn, p, exp);\n\n\t\t\t\tres *= (quickpow(p, exp) % MOD);\n\t\t\t\tres %= MOD;\n\t\t\t}\n\n\t\t\tConsole.WriteLine(res % MOD);\n\t\t\t//Console.ReadLine();\n\n\t\t}\n\n\t\tlong[] ReadLong()\n\t\t{\n\t\t\treturn Console.ReadLine().Split(' ').Select(long.Parse).ToArray();\n\t\t}\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "d55246bd00f7ef6528f06887a80acda5", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "165861fc6427bec9c533f2fdd1b4930b", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9632520325203252, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tstring[] str = Console.ReadLine().Split(new char[] { ' ' });\n\n\t\t\tlong x = Convert.ToInt64(str[0]);\n\t\t\tlong n = Convert.ToInt64(str[1]);\n\n\t\t\tList primes = new List();\n\n\t\t\tfor (long i = 2; i * i <= x; ++i)\n\t\t\t{\n\t\t\t\tif (isPrime(i) && x % i == 0)\n\t\t\t\t\tprimes.Add(i);\n\t\t\t}\n\n\t\t\tif (isPrime(x))\n\t\t\t\tprimes.Add(x);\n\n\t\t\tlong mod = 1000000007;\n\t\t\tlong res = 1;\n\n\t\t\tList powers = new List();\n\n\t\t\tfor (int i = 0; i < primes.Count(); ++i)\n\t\t\t{\n\t\t\t\tpowers.Add(powerInFact(n, primes[i]));\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < primes.Count(); ++i)\n\t\t\t{\n\t\t\t\tif (powers[i] != 0)\n\t\t\t\t{\n\t\t\t\t\tres = (res * (binpow(primes[i], powers[i], mod) % mod)) % mod;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tConsole.WriteLine(res);\n\t\t\tConsole.ReadLine();\n\t\t}\n\n\t\tpublic static bool isPrime(long n)\n\t\t{\n\t\t\tfor (long i = 2; i * i <= n; ++i)\n\t\t\t{\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic static long powerInFact(long n, long k)\n\t\t{\n\t\t\tlong res = 0;\n\t\t\twhile (n > 0)\n\t\t\t{\n\t\t\t\tn /= k;\n\t\t\t\tres += n;\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\n\t\tpublic static long binpow(long a, long n, long mod)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\treturn 1;\n\t\t\tif (n % 2 == 1)\n\t\t\t\treturn ((binpow(a, n - 1, mod) % mod) * a) % mod;\n\t\t\telse\n\t\t\t{\n\t\t\t\tlong b = binpow(a, n / 2, mod) % mod;\n\t\t\t\treturn (b * b) % mod;\n\t\t\t}\n\t\t}\n\t}\n}\n\n", "lang": "Mono C#", "bug_code_uid": "504c0e232c6c31731dddda0eaee434ba", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "c4119cc7c8dce79899483d5d11df65f6", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8170421670903831, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "/*\ncsc -debug C.cs && mono --debug C.exe <<< \"10 2\"\n*/\n\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\nusing System.Reflection;\n// using System.Numerics;\n\npublic class HelloWorld {\n public static void SolveCodeForces() {\n var x = cin.NUL();\n var n = cin.NUL();\n\n// var sieve = GetPrimeSieve(13);\n// var primes = new List();\n// for (var p = 2; p < sieve.Length; p++) if (!sieve[p]) primes.Add(p);\n// System.Console.WriteLine(\"Sieve: \" + primes.Join());\n // var sieve = GetPrimeSieve(100);\n var sieve = GetPrimeSieve(100000);\n\n var primeDivs = new HashSet();\n for (var p = 1ul; p * p <= x; p++)\n if (x % p == 0) {\n if (p > 1 && !sieve[p]) primeDivs.Add(p);\n var q = x / p;\n if (q > 1 && q != p && (int)q < sieve.Length && !sieve[q]) primeDivs.Add(q);\n }\n if (primeDivs.Count == 0)\n primeDivs.Add(x);\n\n// System.Console.WriteLine(primeDivs.Join());\n\n var ans = 1ul;\n\n // BigInteger nn = n;\n\n foreach (var p in primeDivs) {\n var pow = 0ul;\n\n // var ppow = p;\n // while (ppow <= n) {\n // pow += n / ppow;\n // ppow *= p;\n // }\n\n // BigInteger ppow = p;\n // while (ppow <= n) {\n // pow += n / (ulong)ppow;\n // ppow *= p;\n // }\n\n var ppow = 1ul;\n while (ppow <= n / p) {\n ppow *= p;\n pow += n / ppow;\n }\n\n var curr = ModPow(p, pow, MOD);\n\n ans = ans * curr % MOD;\n }\n\n System.Console.WriteLine(ans);\n }\n\n const ulong MOD = 1000000007ul;\n\n public static ulong ModPow(ulong x, ulong exp, ulong mod) {\n ulong ret = 1ul;\n while (exp > 0) {\n if (exp % 2 == 1) ret = ret * x % mod;\n x = x * x % mod;\n exp /= 2;\n }\n return ret;\n }\n\n static bool[] GetPrimeSieve(int max) {\n var sieve = new bool[max + 1];\n for (var a = 2; 2 * a <= max; a++) {\n if (!sieve[a]) {\n for (var b = 2 * a; b <= max; b += a)\n sieve[b] = true;\n }\n }\n return sieve;\n }\n\n static Scanner cin = new Scanner();\n static StringBuilder cout = new StringBuilder();\n\n static public void Main () {\n SolveCodeForces();\n // IncreaseStack(SolveCodeForces);\n // System.Console.Write(cout.ToString());\n }\n\n public static void IncreaseStack(ThreadStart action, int stackSize = 128000000)\n {\n var thread = new Thread(action, stackSize);\n thread.Start();\n thread.Join();\n }\n}\n\npublic static class Helpers {\n public static string Join(this IEnumerable arr, string sep = \" \") {\n return string.Join(sep, arr);\n }\n\n public static void Swap(ref T a, ref T b) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n public static T[] CreateArray(int length, Func itemCreate) {\n var result = new T[length];\n for (var i = 0; i < result.Length; i++)\n result[i] = itemCreate(i);\n return result;\n }\n}\n\npublic class Scanner\n{\n private string[] line = new string[0];\n private int index = 0;\n\n public string Next() {\n if (line.Length <= index) {\n line = Console.ReadLine().Split(' ');\n index = 0;\n }\n var res = line[index];\n index++;\n return res;\n }\n\n public int NI() {\n return int.Parse(Next());\n }\n\n public long NL() {\n return long.Parse(Next());\n }\n\n public ulong NUL() {\n return ulong.Parse(Next());\n }\n\n public string[] Array() {\n line = Console.ReadLine().Split(' ');\n index = line.Length;\n return line;\n }\n\n public int[] NIA(int emptyPrefixLen = 0) {\n var array = Array();\n var result = new int[emptyPrefixLen + array.Length];\n for (int i = 0; i < array.Length; i++)\n result[emptyPrefixLen + i] = int.Parse(array[i]);\n return result;\n }\n\n public long[] NLA() {\n var array = Array();\n var result = new long[array.Length];\n for (int i = 0; i < array.Length; i++)\n result[i] = long.Parse(array[i]);\n return result;\n }\n\n public ulong[] NULA() {\n var array = Array();\n var result = new ulong[array.Length];\n for (int i = 0; i < array.Length; i++)\n result[i] = ulong.Parse(array[i]);\n return result;\n }\n}", "lang": "Mono C#", "bug_code_uid": "60241451a1770e2126b14762bfd9ce64", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "25310955a5646158f2655fac085bfd80", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8184438040345822, "equal_cnt": 26, "replace_cnt": 16, "delete_cnt": 4, "insert_cnt": 5, "fix_ops_cnt": 25, "bug_source_code": "/*\ncsc -debug C.cs && mono --debug C.exe <<< \"10 2\"\n*/\n\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\nusing System.Reflection;\n// using System.Numerics;\n\npublic class HelloWorld {\n public static void SolveCodeForces() {\n var x = cin.NUL();\n var n = cin.NUL();\n\n// var sieve = GetPrimeSieve(13);\n// var primes = new List();\n// for (var p = 2; p < sieve.Length; p++) if (!sieve[p]) primes.Add(p);\n// System.Console.WriteLine(\"Sieve: \" + primes.Join());\n // var sieve = GetPrimeSieve(100);\n var sieve = GetPrimeSieve(100000);\n\n var primeDivs = new HashSet();\n for (var p = 1ul; p * p <= x; p++)\n if (x % p == 0) {\n if (p > 1 && !sieve[p]) primeDivs.Add(p);\n var q = x / p;\n if (q > 1 && q != p && (int)q < sieve.Length && !sieve[q]) primeDivs.Add(q);\n if (q > 1 && q != p && (int)q >= sieve.Length && IsPrime((int)q, 5)) primeDivs.Add(q);\n }\n if (primeDivs.Count == 0)\n primeDivs.Add(x);\n\n// System.Console.WriteLine(primeDivs.Join());\n\n var ans = 1ul;\n\n // BigInteger nn = n;\n\n foreach (var p in primeDivs) {\n var pow = 0ul;\n\n // var ppow = p;\n // while (ppow <= n) {\n // pow += n / ppow;\n // ppow *= p;\n // }\n\n // BigInteger ppow = p;\n // while (ppow <= nn) {\n // pow += n / (ulong)ppow;\n // ppow *= p;\n // }\n\n var ppow = 1ul;\n while (ppow <= n / p) {\n ppow *= p;\n pow += n / ppow;\n }\n\n var curr = ModPow(p, pow, MOD);\n\n ans = ans * curr % MOD;\n }\n\n System.Console.WriteLine(ans);\n }\n\n const ulong MOD = 1000000007ul;\n\n public static ulong ModPow(ulong x, ulong exp, ulong mod) {\n ulong ret = 1ul;\n while (exp > 0) {\n if (exp % 2 == 1) ret = ret * x % mod;\n x = x * x % mod;\n exp /= 2;\n }\n return ret;\n }\n\n static bool[] GetPrimeSieve(int max) {\n var sieve = new bool[max + 1];\n for (var a = 2; 2 * a <= max; a++) {\n if (!sieve[a]) {\n for (var b = 2 * a; b <= max; b += a)\n sieve[b] = true;\n }\n }\n return sieve;\n }\n\n public static bool IsPrime(int n, int k) {\n if ((n < 2) || (n % 2 == 0)) return (n == 2);\n\n int s = n - 1;\n while (s % 2 == 0) s >>= 1;\n\n Random r = new Random();\n for (int i = 0; i < k; i++) {\n int a = r.Next(n - 1) + 1;\n int temp = s;\n long mod = 1;\n for (int j = 0; j < temp; ++j) mod = (mod * a) % n;\n while (temp != n - 1 && mod != 1 && mod != n - 1) {\n mod = (mod * mod) % n;\n temp *= 2;\n }\n\n if (mod != n - 1 && temp % 2 == 0) return false;\n }\n return true;\n }\n\n static Scanner cin = new Scanner();\n static StringBuilder cout = new StringBuilder();\n\n static public void Main () {\n SolveCodeForces();\n // IncreaseStack(SolveCodeForces);\n // System.Console.Write(cout.ToString());\n }\n\n public static void IncreaseStack(ThreadStart action, int stackSize = 128000000)\n {\n var thread = new Thread(action, stackSize);\n thread.Start();\n thread.Join();\n }\n}\n\npublic static class Helpers {\n public static string Join(this IEnumerable arr, string sep = \" \") {\n return string.Join(sep, arr);\n }\n\n public static void Swap(ref T a, ref T b) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n public static T[] CreateArray(int length, Func itemCreate) {\n var result = new T[length];\n for (var i = 0; i < result.Length; i++)\n result[i] = itemCreate(i);\n return result;\n }\n}\n\npublic class Scanner\n{\n private string[] line = new string[0];\n private int index = 0;\n\n public string Next() {\n if (line.Length <= index) {\n line = Console.ReadLine().Split(' ');\n index = 0;\n }\n var res = line[index];\n index++;\n return res;\n }\n\n public int NI() {\n return int.Parse(Next());\n }\n\n public long NL() {\n return long.Parse(Next());\n }\n\n public ulong NUL() {\n return ulong.Parse(Next());\n }\n\n public string[] Array() {\n line = Console.ReadLine().Split(' ');\n index = line.Length;\n return line;\n }\n\n public int[] NIA(int emptyPrefixLen = 0) {\n var array = Array();\n var result = new int[emptyPrefixLen + array.Length];\n for (int i = 0; i < array.Length; i++)\n result[emptyPrefixLen + i] = int.Parse(array[i]);\n return result;\n }\n\n public long[] NLA() {\n var array = Array();\n var result = new long[array.Length];\n for (int i = 0; i < array.Length; i++)\n result[i] = long.Parse(array[i]);\n return result;\n }\n\n public ulong[] NULA() {\n var array = Array();\n var result = new ulong[array.Length];\n for (int i = 0; i < array.Length; i++)\n result[i] = ulong.Parse(array[i]);\n return result;\n }\n}", "lang": "Mono C#", "bug_code_uid": "ed8f84871b51e96fb5e078da7b904704", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "25310955a5646158f2655fac085bfd80", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9964507542147294, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp5\n{\n class Program\n {\n private static Stack GetBin(ulong number)\n {\n Stack NumInBinNot = new Stack();\n\n while (number != 0)\n {\n NumInBinNot.Push(number % 2 == 1);\n number /= 2;\n }\n return NumInBinNot;\n }\n public static ulong IntNumberToIntDegree(ulong IntNumber, ulong Pow)\n {\n ulong result = 1;\n Stack NumInBinNot = GetBin(Pow);\n while (NumInBinNot.Count != 0)\n {\n result *= result;\n result %= (int)(1e9 + 7);\n if (NumInBinNot.Pop())\n {\n result *= IntNumber;\n result %= (int)(1e9 + 7);\n }\n }\n return result;\n }\n static void Main(string[] args)\n {\n string[] str = Console.ReadLine().Split();\n ulong x = ulong.Parse(str[0]);\n ulong n = ulong.Parse(str[1]);\n HashSet SimpleDividers = new HashSet();\n ulong m = x;\n for (ulong i = 2; i<=Math.Sqrt(x); i++)\n {\n if (m % i == 0)\n {\n SimpleDividers.Add(i);\n while (m % i == 0)\n {\n m /= i;\n }\n }\n }\n if (m > 1)\n SimpleDividers.Add(m);\n ulong result = 1;\n foreach(ulong dev in SimpleDividers)\n {\n ulong Degree = dev;\n ulong count = 0;\n for(; Degree<=n && Degree> 0; Degree*=dev)\n {\n count += n / Degree;\n if (Degree*dev < Degree)\n break;\n }\n ulong res = IntNumberToIntDegree(dev, 1044032052841069); ;\n result *= IntNumberToIntDegree(dev, count);\n result %= (int)(1e9 + 7);\n }\n Console.WriteLine(result);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "7bd3a073007d93af0f2ed8b495c7a9bc", "src_uid": "04610fbaa746c083dda30e21fa6e1a0c", "apr_id": "b4b5f7c1bcd92fd821740e7ff84a3b85", "difficulty": 1700, "tags": ["math", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9596774193548387, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace _29B\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] input = Console.ReadLine().Split(' ');\n int l = int.Parse(input[0]);\n int d = int.Parse(input[1]);\n int v = int.Parse(input[2]);\n int g = int.Parse(input[3]);\n int r = int.Parse(input[4]);\n double t = l * 1.0 / v;\n double td = (d * 1.0 / v);\n int tdmod = (int)td % (g + r);\n if (td < g) Console.WriteLine(\"{0:0.########}\",t);\n else Console.WriteLine(\"{0:0.########}\",t + (g + r - td));\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "e890fbd02cc565992cdb2c7d096559b4", "src_uid": "e4a4affb439365c843c9f9828d81b42c", "apr_id": "28f4a302ba53bca46e6c5ecb1458d00b", "difficulty": 1500, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6740547588005215, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\nclass Program\n {\n public static void Main(string[] args)\n {\n string data;\n {\n string[] input = Console.In.ReadToEnd().Split(new char[] { '\\n', '\\r' }, StringSplitOptions.RemoveEmptyEntries);\n data = input[1];\n }\n int[] info = new int[3];\n info[2] = -1;\n for(int i = 0; i forEach(this IEnumerable stream, Action act) { foreach (var elem in stream) act(elem); return stream; }\n internal static Dictionary ToDictionary(this IList list)\n { var ans = new Dictionary(list.Count); for (var i = 0; i < list.Count; i++) ans.Add(i, list[i]); return ans; }\n internal static TValue? GetOrDefault(this IDictionary dict, TKey key) where TValue : struct\n { TValue ans; if (dict.TryGetValue(key, out ans)) return ans; return null; }\n internal static TValue computeIfAbsent(this IDictionary dict, TKey key, Func fallback)\n { TValue ans; if (dict.TryGetValue(key, out ans)) return ans; ans = fallback(); dict.Add(key, ans); return ans; }\n internal static HashSet ToSet(this IEnumerable stream) { return new HashSet(stream); }\n}\n[DebuggerNonUserCode]\npublic class Helper\n{\n internal const int DEFAULT_BUFFER_SIZE = 4194304;\n internal static IEnumerable range(int left, int right) { for (var i = left; i <= right; i++) yield return i; }\n internal Accumulator accumulate(T init, Func aggregate) where T : struct\n { var ans = new Accumulator(aggregate); ans.Add(init); return ans; }\n [DebuggerDisplay(\"{Value}\")]\n internal class Accumulator where T : struct\n {\n Func aggregate; public T? Value { get; private set; }\n public Accumulator(Func aggregate) { this.aggregate = aggregate; }\n public Accumulator Add(T value) { Value = Value.HasValue ? aggregate(Value.Value, value) : value; return this; }\n }\n internal static int? explainLinearSearchIndex(int rawIndex) { if (rawIndex < 0) return null; return rawIndex; }\n internal static Pair pair(T1 value1, T2 value2) { return Tuple.Create(value1, value2); }\n}\npublic class Solution : StdioHelper\n{\n public Solution()\n {\n var n = readInt32();\n var arr = readLine_TRIM().ToLookup(c => c);\n var L = arr['L'].Count();\n var R = arr['R'].Count();\n var D = arr['D'].Count();\n var U = arr['U'].Count();\n var a = Math.Min(L, R);\n var b = Math.Min(U, D);\n Console.WriteLine(a + b);\n }\n}\n\n//\n\n[DebuggerNonUserCode]\npublic class StdioHelper : Helper\n{\n static void Main() { new Solution(); }\n static void eof() { throw new System.IO.EndOfStreamException(); }\n internal string readLine_TRIM()\n { while (true) { var ans = Console.ReadLine(); if (ans == null) eof(); ans = ans.Trim(); if (ans.Any()) return ans; } }\n IEnumerable stream() { while (true) { var iread = Console.Read(); if (iread < 0) break; yield return (char)iread; } }\n static bool isWhitespace(char c) { return c == ' ' || c == '\\n' || c == '\\r'; }\n internal long readLong64()\n {\n var cap = 21; var sb = new System.Text.StringBuilder(cap, cap);\n var iter = stream().SkipWhile(isWhitespace).TakeWhile(c => !isWhitespace(c));\n foreach (var c in iter) sb.Append(c);\n if (sb.Length == 0) eof(); return long.Parse(sb.ToString());\n }\n internal int readInt32() { return Convert.ToInt32(readLong64()); }\n}", "lang": "MS C#", "bug_code_uid": "58b15c4da0496c7bc0259286afa7e9b0", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "e983afc6c9338ebbcdf15f19aea17034", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7119078104993598, "equal_cnt": 13, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 12, "bug_source_code": "using System;\n\nnamespace CodeForces1\n{\n class Program\n {\n static void Main(string[] args)\n {\n var n = int.Parse(Console.ReadLine());\n var s = Console.ReadLine();\n var max = 0;\n for (int i = 0, x = 0, y = 0; i < n; i++)\n {\n if (s[i] == 'L')\n x++;\n else if (s[i] == 'R')\n x--;\n else if (s[i] == 'U')\n y++;\n else if (s[i] == 'D')\n y--;\n\n if (x == 0 & y == 0)\n {\n max = i + 1;\n }\n\n }\n Console.WriteLine(max);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "0f020e1a6a41b4b8425fdb1549074af5", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "5b4d3ca94a42eea0f1a27e51c168d4d4", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9172899252089749, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.IO;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Numerics;\n\nnamespace cf461\n{\n class Program\n {\n static void Main(string[] args)\n {\n //Console.SetIn(new StreamReader(\"input.txt\"));\n solve_cf461B();\n }\n\n public static void solve_cf461B()\n {\n int n = Convert.ToInt32(Console.ReadLine());\n int max = 0;\n /*\n The big mistake was to use this array of used numbers\n I thought that finding i and j such that their xor gives x\n is enough to remember the numbers i and j in the used array \n so that the next time I will not iterate over the numbers that have been\n used. But the issue with that is that i and j can be from different iterations\n not necessairly from the same iteration.\n Example:\n if i = 2 and j = 3 gives us xor x and we remember i and j in the array - used.\n then next time\n if i = 4 and j = 3 also gives us xor x then we will not even consider this case\n because used[3] will be not 0 which means that we have already considered this case\n and we will skip it. But we should not have skipped it because it is a different pair of numbers\n giving xor which is equal to x.\n */\n //int[] u = new int[2501];\n for (int i = 1; i <= n; i++) \n {\n for (int j = 1; j <= n; j++)\n {\n //if (u[i] == 1 && u[j] == 1)\n //{\n // continue;\n //}\n int x = i ^ j;\n //(x < i && x + i > j) dont' need to look back as associative\n if (x <= n && ((x > j && i + j > x) || (x > i && x < j && i + x > j)))\n {\n max++;\n //u[i] = 1;\n //u[j] = 1;\n }\n }\n }\n\n Console.WriteLine(max);\n }\n\n public static void solve_cf461A()\n {\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "cecd4b23ee189b2c6a83f0a35017ab5a", "src_uid": "838f2e75fdff0f13f002c0dfff0b2e8d", "apr_id": "73a9dde5032673094656ce9732ede817", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6129123202706512, "equal_cnt": 19, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 11, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.IO;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Numerics;\n\nnamespace cf461\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.SetIn(new StreamReader(\"input.txt\"));\n solve_cf461B();\n }\n\n public static void solve_cf461B()\n {\n int n = Convert.ToInt32(Console.ReadLine());\n int max = 0;\n int[] u = new int[2501];\n for (int i = 1; i < n; i++) \n {\n for (int j = i + 1; j <= n; j++)\n {\n if (u[i] == 1 && u[j] == 1)\n {\n continue;\n }\n int x = i ^ j;\n //(x < i && x + i > j) dont' need to look back as associative\n if (x < n && (x > j && i + j > x))\n {\n max++;\n u[i] = 1;\n u[j] = 1;\n }\n }\n }\n\n Console.WriteLine(max);\n }\n\n public static void solve_cf461A()\n {\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "9638fe15a515f177d9f5d8155508297a", "src_uid": "838f2e75fdff0f13f002c0dfff0b2e8d", "apr_id": "73a9dde5032673094656ce9732ede817", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9780893952673094, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace Triangle\n{\n class Program\n {\n static void Main(string[] args)\n {\n int max_number = Int32.Parse(args[0]);\n int res = 0; \n for (int x = 1; x < max_number + 1; x++)\n {\n for (int y = x; y < max_number + 1; y++)\n {\n int z = x ^ y;\n if (z < x + y && z < max_number + 1 && z > y)\n res++;\n }\n } \n Console.WriteLine(res);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "bc233e7ac251f34889bca667af066bea", "src_uid": "838f2e75fdff0f13f002c0dfff0b2e8d", "apr_id": "b6cc4e779c2a3ac26907c46d6af04068", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9949920605838525, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "#if DEBUG\nusing System.Reflection;\nusing System.Threading.Tasks;\n#endif\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\nusing System.Globalization;\n\n\nnamespace _40c\n{\n class Program\n {\n static string _inputFilename = \"input.txt\";\n static string _outputFilename = \"output.txt\";\n static bool _useFileInput = false;\n\n\n static void Main(string[] args)\n {\n StreamWriter file = null;\n#if DEBUG\n\t\t\tConsole.SetIn(getInput());\n#else\n if (_useFileInput)\n {\n Console.SetIn(File.OpenText(_inputFilename));\n file = new StreamWriter(_outputFilename);\n Console.SetOut(file);\n }\n#endif\n\n try\n {\n solution();\n }\n finally\n {\n if (_useFileInput)\n {\n file.Close();\n }\n }\n }\n\n static void solution()\n {\n #region SOLUTION\n var s = Console.ReadLine().ToCharArray();\n for (int i = 1; i < s.Length - 1 - 1; i++)\n {\n if (s[i] == 'a' && s[i + 1] == 't')\n {\n s[i] = '@';\n s[i + 1] = ' ';\n break;\n }\n }\n\n var pos = 0;\n var start = -1;\n for (int i = 1; i < s.Length - 1; i++)\n {\n var next = s[i];\n if (next == ' ')\n {\n continue;\n }\n\n var want = ' ';\n switch (pos)\n {\n case 0:\n want = 'd';\n break;\n case 1:\n want = 'o';\n break;\n case 2:\n want = 't';\n break;\n default:\n break;\n }\n\n if (next != want)\n {\n pos = 0;\n start = -1;\n\n\n if (next == 'd')\n {\n pos++;\n start = i;\n continue;\n }\n }\n\n if (pos < 2)\n {\n if (pos == 0)\n {\n start = i;\n }\n\n pos++;\n continue;\n }\n\n \n s[start] = '.';\n for (int j = start + 1; j < start + 3; j++)\n {\n s[j] = ' ';\n }\n\n pos = 0;\n start = -1;\n }\n\n for (int i = 0; i < s.Length; i++)\n {\n if (s[i] != ' ')\n {\n Console.Write(s[i]);\n }\n }\n //var n = readInt();\n //var m = readInt();\n\n //var a = readIntArray();\n //var b = readIntArray();\n #endregion\n }\n\n static int readInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static long readLong()\n {\n return long.Parse(Console.ReadLine());\n }\n\n static int[] readIntArray()\n {\n return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => int.Parse(i)).ToArray();\n }\n\n static long[] readLongArray()\n {\n return Console.ReadLine().Split(' ').Where(i => !string.IsNullOrEmpty(i)).Select(i => long.Parse(i)).ToArray();\n }\n\n#if DEBUG\n\t\tstatic StreamReader getInput()\n\t\t{\n\t\t\tvar resName = Assembly.GetCallingAssembly().GetManifestResourceNames()[0];\n\t\t\tvar resource = Assembly.GetCallingAssembly().GetManifestResourceStream(resName);\n\n\t\t\treturn new StreamReader(resource);\n\t\t}\n#endif\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d2a25578bf737240858ee4f5bb8e2711", "src_uid": "a11c9679d8e2dca51be17d466202df6e", "apr_id": "4f7fca22635ad00a2a092d2de9dad98d", "difficulty": 1300, "tags": ["implementation", "expression parsing"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9563619660082683, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Collections;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\t\n\t\tint n=Convert.ToInt32(Console.ReadLine());\n\t\tvar a=Console.ReadLine();\n\t\tList l=new List();\n\t\tfor(int i=0; i(output.ToCharArray());\n chars.Sort();\n chars.Reverse();\n string result = new string(chars.ToArray());\n Console.WriteLine(result);\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8fe31ee73edd71836b98c9f84f13ed71", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "6d9aa50560cbcff1e1cf8e424391dd79", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.996600291403594, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace DrazilAndFactorial\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n long a = int.Parse(Console.ReadLine());\n string s = a.ToString();\n string t = \"\";\n\n for (int i = 0; i < s.Length; i++)\n {\n if (s[i] == '4')\n t += \"322\";\n else if (s[i] == '6')\n t += \"53\";\n else if (s[i] == '8')\n t += \"7222\";\n else if (s[i] == '9')\n t += \"7332\";\n else if ((int)s[i]-(int)'0' > 1)\n t += s[i];\n }\n\n char[] c = t.ToCharArray();\n Array.Sort(c);\n for (int i = c.Length - 1; i >= 0; i--)\n Console.Write(c[i]);\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "3341440353cf69f659fd902111c2ac9b", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "36472981c6bd61d3ef0d342395096332", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8021238938053097, "equal_cnt": 14, "replace_cnt": 8, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Drazil_and_Factorial\n{\n class Operacao\n {\n private int contador;\n private string numeros;\n private string[] posicoes = { \"\", \"\", \"2\", \"3\", \"223\", \"5\", \"53\", \"7\", \"7222\", \"7332\" };\n private List resposta;\n\n public Operacao(int x, string y)\n {\n contador = x;\n numeros = y;\n }\n\n public void calcula()\n {\n for (int i = 0; i < contador; i++)\n {\n resposta.Add(posicoes[int.Parse(numeros.Substring(i, 1))]);\n }\n\n resposta.Sort();\n resposta.Reverse();\n exibe();\n }\n\n public void exibe()\n {\n foreach (string x in resposta)\n {\n Console.Write(x);\n }\n }\n }\n class Program\n {\n static void Main(string[] args)\n {\n RecebeDados();\n }\n\n static public void RecebeDados()\n {\n Operacao x = new Operacao(int.Parse(Console.ReadLine()), Console.ReadLine());\n x.calcula();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "00fe5bbe95c75c5c7f377e42ca296aa6", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "1799ce8b5175bb99707243b85cec2a17", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9973118279569892, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace CodeForces\n{\n class MainClass\n {\n public static void Main(string[] args)\n {\n var test = Console.ReadLine();\n var input = Console.ReadLine();\n var dict = GetDict();\n StringBuilder sb = new StringBuilder();\n foreach(char c in input)\n {\n if (c == '0' || c == '1') continue;\n sb.Append(dict[c - '0']);\n }\n var result = sb.ToString().ToCharArray();\n Array.Sort(result);\n Array.Reverse(result);\n Console.WriteLine(new string(result));\n\n }\n\n private static Dictionary GetFactorial()\n {\n Dictionary factorial = new Dictionary();\n factorial.Add(2, 2);\n for (int i = 3; i <= 9; i++)\n {\n factorial.Add(i, factorial[i - 1] * i);\n }\n return factorial;\n }\n\n private static Dictionary GetDict()\n {\n Dictionary dict = new Dictionary();\n var factorial = GetFactorial();\n dict.Add(2, \"2\");\n for (int i = 3; i <= 9; i++)\n { \n string result = \"\";\n int iter = i;\n var temp = factorial.Keys.ToArray();\n Array.Sort(temp);\n Array.Reverse(temp);\n foreach (int z in temp)\n {\n int j = factorial[z];\n while (i % j == 0 && i > 1)\n {\n i = i / j;\n result += z.ToString();\n }\n if (i <= 1) break;\n }\n if(i == 1 )\n {\n result += dict[iter - 1];\n dict.Add(iter, result);\n }\n else\n {\n dict.Add(iter, Convert.ToString(iter));\n }\n i = iter;\n }\n dict[9] = \"332;\"\n return dict;\n }\n\n\n }\n}", "lang": "Mono C#", "bug_code_uid": "6556ec81abe939fbf5649392a8d43695", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "4f6da63b88136cef80b360c633ec9e78", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.6455938697318008, "equal_cnt": 11, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 10, "bug_source_code": "using System;\nclass Test {\n static void Main() {\n string [] str = Console.ReadLine().Split();\n long a = Int64.Parse(str[0]);\n long b = Int64.Parse(str[1]);\n long c = Int64.Parse(str[2]);\n long col = b+c-1;\n long ans = 0;\n int i;\n for( i=0 ; i 0)\n {\n Do();\n WL(GetStr());\n }\n Console.In.Close();\n Console.SetIn(tmp);\n#endif\n Console.ReadLine();\n }\n\n private static void Do()\n {\n int a,b,c;\n GetInts(out a, out b, out c);\n\n long ans = 0;\n for (int i = 0; i < c - 1; i++)\n ans += a + i;\n\n for (int i = 0; i < b; i++)\n ans += a + i;\n\n WL(ans);\n }\n\n #region Utils\n private const double Epsilon = 0.00000001;\n\n private static string GetStr()\n {\n return Console.ReadLine();\n }\n\n private static string[] GetStrs()\n {\n return GetStr().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n private static string[] GetStrs(int cnt)\n {\n var s = new string[cnt];\n for (var i = 0; i < cnt; ++i)\n s[i] = GetStr();\n return s;\n }\n\n private static int GetInt()\n {\n return int.Parse(GetStr());\n }\n\n private static void GetInts(out int a, out int b)\n {\n var q = GetInts();\n a = q[0];\n b = q[1];\n }\n\n private static void GetInts(out int a, out int b, out int c)\n {\n var q = GetInts();\n a = q[0];\n b = q[1];\n c = q[2];\n }\n\n private static int[] GetInts()\n {\n var s = GetStrs();\n var a = new int[s.Length];\n for (var i = 0; i < s.Length; ++i)\n a[i] = int.Parse(s[i]);\n return a;\n }\n\n private static long GetLong()\n {\n return long.Parse(GetStr());\n }\n\n private static IEnumerable GetLongs()\n {\n return GetStrs().Select(long.Parse);\n }\n\n private static void WriteDouble(T d)\n {\n Console.WriteLine(string.Format(\"{0:0.000000000}\", d).Replace(',', '.'));\n }\n\n private static void WL(T s)\n {\n Console.WriteLine(s);\n }\n\n private static void W(T s)\n {\n Console.Write(s);\n }\n\n private static void Assert(bool b)\n {\n if (!b) throw new Exception();\n }\n\n private static void Swap(ref T a, ref T b)\n {\n var temp = a;\n a = b;\n b = temp;\n }\n\n #endregion\n }\n}\n\n", "lang": "Mono C#", "bug_code_uid": "5fb63d594aa01c52f322c00ced761922", "src_uid": "8ab25ed4955d978fe20f6872cb94b0da", "apr_id": "41321192bdb4f01f8a06c7288b4b3c67", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9441930618401206, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\n\nclass Program\n{\n static void Main(string[] args)\n {\n string[] abc = Console.ReadLine().Split(' ');\n\n long a, b, c;\n a = long.Parse(abc[0]);\n b = long.Parse(abc[1]);\n c = long.Parse(abc[2]);\n\n long s = (a + b + c) * 2;\n Console.WriteLine(s);\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "931585d44839fcdbd6691fcf4e245b89", "src_uid": "8ab25ed4955d978fe20f6872cb94b0da", "apr_id": "8ed304b37908d0e0a4ad9db251a48056", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9996863939787644, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Collections;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.Threading;\n\nnamespace CodeForces {\n struct Node {\n public int X, Y, D; \n public Node(int x,int y, int d) {\n X = x;\n Y = y;\n D = d;\n } \n }\n\n class Pair : IComparable {\n public int Vertex, Danger;\n public Pair(int f, int s) {\n Vertex = f;\n Danger = s;\n }\n\n public int CompareTo(Pair other) {\n return Vertex.CompareTo(Danger);\n }\n }\n\n class Desc : IComparer {\n public int Compare(int x, int y) {\n return y.CompareTo(x);\n }\n }\n \n class Cf { \n static TextReader input;\n static void Main(string[] args) { \n#if TESTS \n Stopwatch sw = new Stopwatch();\n sw.Start();\n input = new StreamReader(\"input.txt\"); \n#else\n input = Console.In;\n#endif\n Solve();\n#if TESTS\n Console.WriteLine();\n Console.WriteLine(\"Milliseconds: {0}\", sw.ElapsedMilliseconds);\n Console.ReadLine();\n#endif\n }\n\n const int MOD = 1000000007;\n static int n, m;\n static void Solve() {\n int a = nextInt();\n int b = nextInt();\n int c = nextInt();\n if (a == 1) {\n Console.WriteLine(b * c);\n return;\n }\n if (b == 1) {\n Console.WriteLine(a * c);\n return;\n }\n if (c == 1) {\n Console.WriteLine(b * a);\n return;\n }\n int res = (b + 1) * (c + 1);\n int sum = 0;\n for (int i = 1; i < a; i++) {\n sum += i;\n }\n Console.WriteLine(res - 2*sum);\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static int[] _bitcounts; \n static void InitializeBitcounts() {\n _bitcounts = new int[65536];\n int position1 = -1;\n int position2 = -1;\n for (int i = 1; i < 65536; i++, position1++) { \n if (position1 == position2) {\n position1 = 0;\n position2 = i;\n }\n _bitcounts[i] = _bitcounts[position1] + 1;\n }\n }\n\n static int Bitcount(int value) { \n return _bitcounts[value & 65535] + _bitcounts[(value >> 16)];\n }\n\n static int First(int mask) {\n for (int i = 0; i < 32; i++) {\n if ((mask & (1 << i)) > 0)\n return i;\n }\n return -1;\n }\n\n #region math\n static long gcd(long a, long b) {\n return b != 0 ? gcd(b, a % b) : a;\n }\n\n static long lcm(long a, long b) {\n return a / gcd(a, b) * b;\n }\n \n //static int SquaredDistanceBetweenSegments(int x1, int y1, int x2, int y2, int xx1, int yy1, int xx2, int yy2) {\n // return Math.Min(Math.Min(SquaredDistanceToSegment(x1, y1, xx1, yy1, xx2, yy2), SquaredDistanceToSegment(x2, y2, xx1, yy1, xx2, yy2)),\n // Math.Min(SquaredDistanceToSegment(xx1, yy1, x1, y1, x2, y2), SquaredDistanceToSegment(xx2, yy2, x1, y1, x2, y2)));\n //}\n\n //static int SquaredDistanceToSegment(int x, int y, int x1, int y1, int x2, int y2) {\n // int result = Math.Min(SquaredDistance(x, y, x1, y1), SquaredDistance(x, y, x2, y2));\n // if (x1 == x2 && y1 <= y && y <= y2)\n // result = (x - x1) * (x - x1);\n // else if (y1 == y2 && x1 <= x && x <= x2)\n // result = (y - y1) * (y - y1);\n // return result;\n //}\n\n static long SquaredDistance(long ax, long ay, long bx, long by) {\n return (ax - bx) * (ax - bx) + (ay - by) * (ay - by);\n }\n #endregion\n\n #region read helpers\n static int nextPositive() {\n int t = input.Read();\n while (t < '0' || t > '9') t = input.Read();\n int x = 0;\n while (t >= '0' && t <= '9') {\n x *= 10;\n x += t - '0';\n t = input.Read();\n }\n return x;\n }\n\n static int nextInt() {\n int t = input.Read();\n while ((t < '0' || t > '9') && t != '-') t = input.Read();\n int sign = 1;\n if (t == '-') {\n sign = -1;\n t = input.Read();\n }\n int x = 0;\n while (t >= '0' && t <= '9') {\n x *= 10;\n x += t - '0';\n t = input.Read();\n }\n return x * sign;\n }\n\n static long nextLong() {\n int t = input.Read();\n while (t < '0' || t > '9') t = input.Read();\n long x = 0;\n while (t >= '0' && t <= '9') {\n x *= 10;\n x += t - '0';\n t = input.Read();\n }\n return x;\n }\n\n public static List ReadIntList() {\n return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();\n }\n\n public static int[] ReadIntArray() { \n return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n }\n\n public static double[] ReadDoubleArray() {\n return input.ReadLine().Split(' ').Select(x => double.Parse(x)).ToArray();\n }\n\n public static long[] ReadLongArray() {\n return input.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();\n }\n\n public static List ReadLongList() {\n return input.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList();\n } \n\n public static string ReadLine() {\n return input.ReadLine();\n }\n\n public static int ReadInt() {\n return int.Parse(input.ReadLine());\n }\n\n public static long ReadLong() {\n return long.Parse(input.ReadLine());\n }\n#endregion\n }\n \n public class SegmentTree {\n private int[] a, t;\n private int n;\n public SegmentTree(int[] a) {\n n = a.Length;\n this.a = a; \n t = new int[n << 2];\n buildSegmentTree(0, n - 1, 1);\n }\n\n private void buildSegmentTree(int l, int r, int v) {\n if (l == r)\n t[v] = a[l];\n else {\n int m = (l + r) >> 1;\n int vl = v << 1;\n int vr = (v << 1) | 1;\n buildSegmentTree(l, m, vl);\n buildSegmentTree(m + 1, r, vr);\n t[v] = t[vl] + t[vr];\n }\n }\n\n public int QuerySegmentTree(int l, int r) {\n return querySegmentTree(1, l, r, 0, n - 1);\n }\n\n public void Update(int v, int tl, int tr, int pos, int new_val) {\n if (tl == tr)\n t[v] = new_val;\n else {\n int tm = (tl + tr) / 2;\n if (pos <= tm)\n Update(v << 1, tl, tm, pos, new_val);\n else\n Update(v << 1 + 1, tm + 1, tr, pos, new_val);\n t[v] = t[v << 1] + t[v << 1 + 1];\n }\n }\n\n private int querySegmentTree(int v, int l, int r, int tl, int tr) {\n if (l > r)\n return 0;\n if (l == tl && r == tr)\n return t[v];\n int m = (tl + tr) >> 1; \n return querySegmentTree(v << 1, l, Math.Min(r, m), tl, m) + querySegmentTree((v << 1) | 1, Math.Max(l, m + 1), r, m + 1, tr);\n }\n }\n class Graph : List> {\n public Graph(int num): base(num) {\n for (int i = 0; i < num; i++) {\n this.Add(new List());\n }\n }\n }\n class Heap : IEnumerable {\n List items = new List();\n IComparer comparer;\n public Heap(IComparer comparer) {\n this.comparer = comparer;\n }\n public Heap() {\n comparer = Comparer.Default;\n }\n\n public void Add(T item) {\n items.Add(item);\n MoveUp(Count - 1);\n }\n\n public T Extract() {\n CheckHeap();\n T item = items[0];\n items.Swap(0, Count - 1);\n items.RemoveAt(Count - 1);\n MoveDown(0); \n return item;\n }\n\n public int Count {\n get {\n return items.Count;\n }\n }\n\n public bool IsEmpty {\n get {\n return items.Count == 0;\n }\n }\n\n public T Top {\n get {\n CheckHeap();\n return items[0];\n }\n }\n\n void CheckHeap() {\n if (items.Count == 0)\n throw new ArgumentException(\"Heap is empty\");\n }\n\n void MoveDown(int v) {\n int left = 2 * v + 1;\n int right = 2 * v + 2;\n if (left >= Count)\n return;\n if (right >= Count) {\n if (comparer.Compare(items[v], items[left]) < 0) {\n items.Swap(v, left); \n }\n return;\n }\n int max = comparer.Compare(items[left], items[right]) < 0 ? right : left;\n if (comparer.Compare(items[v], items[max]) < 0) {\n items.Swap(v, max);\n MoveDown(max);\n }\n }\n\n void MoveUp(int v) {\n int parent = (v - 1) / 2;\n if (comparer.Compare(items[parent], items[v]) < 0) {\n items.Swap(v, parent);\n MoveUp(parent);\n }\n }\n\n public IEnumerator GetEnumerator() {\n return items.GetEnumerator();\n }\n\n IEnumerator IEnumerable.GetEnumerator() {\n throw new NotImplementedException();\n }\n } \n public static class Extensions {\n public static void Swap(this IList arr, int i, int j) {\n T temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n\n public static int Max(this int a, int b) {\n return Math.Max(a, b);\n }\n\n public static int Min(this int a, int b) {\n return Math.Min(a, b);\n }\n\n public static void Fill(this int[] array, int val) {\n for (int i = 0; i < array.Length; i++) {\n array[i] = val;\n }\n } \n\n public static int ToInt(this string s) {\n return int.Parse(s);\n }\n \n public static void Print(this IEnumerable arr) {\n foreach (T t in arr)\n Console.Write(\"{0} \", t);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "832cddcb36a493ae275a9b7b2d57c889", "src_uid": "8ab25ed4955d978fe20f6872cb94b0da", "apr_id": "e37069cf2b1f6c72d557723dce93b425", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9477071600965407, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Net.Http.Headers;\nusing System.Text;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] input = Console.ReadLine().Split(' ');\n int red = Convert.ToInt32(input[0]);\n int blue = Convert.ToInt32(input[1]);\n\n StringBuilder sb = new StringBuilder();\n\n int diff = Math.Min(red,blue);\n sb.Append(diff + \" \");\n\n diff = Math.Abs(red - blue);\n diff = diff / 2;\n\n sb.Append(diff);\n Console.WriteLine(sb.ToString());\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f9b1bf3f9f574edb41498b099f9a22b9", "src_uid": "775766790e91e539c1cfaa5030e5b955", "apr_id": "80c315c902ed7c2fa905c07675911a05", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.8421052631578947, "equal_cnt": 13, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 5, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(\"Sayi Giriniz\");\n int sayi =Convert.ToInt32(Console.ReadLine());\n\n if(sayi<2)\n {\n Console.WriteLine(\"NO\");\n } \n else: \n if (sayi % 2 == 0)\n {\n Console.WriteLine(\"YES\"); \n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n Console.ReadLine();\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "98c5c3868f20ce57e586266a3dd6d1d9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0daa2fe639ee9f5580bb34dd58f6798a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9387096774193548, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\nnamespace CodeKata\n{\n class Program\n {\n static void Main(int n)\n {\n Console.WriteLine(CodeForceWaterMelon(n));\n \n\n }\n private static string CodeForceWaterMelon(int w)\n {\n string result;\n try {\n if (w < 1 || w > 100)\n {\n throw new Exception(\"More than 100 or Less Than 1\");\n\n }\n else\n {\n if (w % 2 == 1)\n { //odd Number\n result = \"NO\";\n }\n else\n {\n result = \"YES\";\n }\n }\n\n }\n catch (Exception e)\n {\n return e.Message;\n }\n return result;\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b9863c8c7e8ba56c3b805320513be037", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3d77df116425ce9ebf4c295447b0383a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9432404540763674, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "namespace CodeKata\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n int inp = int.Parse(input);\n if (inp % 2 == 1 || inp == 2 && (inp < 1 || inp > 100))\n { //odd Number\n Console.WriteLine(\"NO\");\n }\n else\n { //even\n Console.WriteLine(\"YES\");\n }\n \n\n }\n \n }\n}", "lang": "Mono C#", "bug_code_uid": "571f1627c8cf3b3267459c31ccd77023", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3d77df116425ce9ebf4c295447b0383a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9110225763612217, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\n\n class Program{\n int Main(){\n\n int w = Console.Read();\n if (w%2 == 0 && w > 0){\n Console.WriteLine(\"YES\");\n }\n else{\n Console.WriteLine(\"NO\");\n }\n return 0;\n }\n }", "lang": "Mono C#", "bug_code_uid": "c41ad7a368cdd0d6e3248a94a54c7f9e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e51d6e7667dc3aa78c6a51c79388a995", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4931237721021611, "equal_cnt": 12, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 6, "fix_ops_cnt": 13, "bug_source_code": "class Program\n {\n static void Main(string[] args)\n {\n int w = int.Parse(Console.ReadLine());\n if (w == 2 || w % 2 != 0)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n Console.WriteLine(\"YES\");\n }\n Console.ReadKey();\n\n }\n }", "lang": "Mono C#", "bug_code_uid": "c0d094f30fc8a8a9acf43098a58bb1bb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "dbda87aa3b8e4503de23320bff8e64c2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9522024367385192, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w;\n w = Convert.ToInt32(Console.ReadLine);\n\n if (w % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a70cb82a6e76375072f9fbdd2e2cfa5a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "557b75987143ea0f33707ff5624daa53", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6030989272943981, "equal_cnt": 12, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "using System;\n\nnamespace Codeforces\n{\n class Codeforces\n {\n public static string Main(string[] args)\n {\n return DivideWatermelon(int.Parse(args[0]));\n }\n\n public static string DivideWatermelon(int w)\n {\n return w % 2 == 0 ? \"YES\" : \"NO\";\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "0ade890de7b3d29d6e9d927cdca31afe", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2da5decb1120fa721b9825f03731b0c1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.619277108433735, "equal_cnt": 11, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\n\nnamespace Codeforces\n{\n class Codeforces\n {\n public static void Main(string[] args)\n {\n DivideWatermelon(int.Parse(args[0]));\n }\n\n public static string DivideWatermelon(int w)\n {\n return w % 2 == 0 ? \"YES\" : \"NO\";\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "9313cc71744b97f1366006f5df5494e4", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2da5decb1120fa721b9825f03731b0c1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9965122072745392, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ProgrammingContest.Codeforces.Round85 {\n class C {\n static int[] ReadInts() { return Array.ConvertAll(Console.ReadLine().Split(' '), sss => int.Parse(sss)); }\n\n static int popcount(int n) { int res = 0; for (; n > 0; n &= n - 1)res++; return res; }\n\n static int n, m;\n static bool check(int v, int j) {\n int mask = (1 << m) - 1;\n return ((v | (v << 1) | (v >> 1) | j) & mask) == mask;\n }\n\n static void Main() {\n var xs = ReadInts();\n n = xs.Max();\n m = xs.Min();\n\n if (m == 1) {\n Console.WriteLine((n + 1) / 2);\n return;\n }\n\n var dp = new int[][,] { new int[1 << m, 1 << m], new int[1 << m, 1 << m] };\n\n for (int v = 0; v < 1 << m; v++)\n for (int j = 0; j < 1 << m; j++)\n dp[0][v, j] = 1 << 29;\n\n dp[0][(1 << m) - 1, 0] = 0;\n\n int a = 0;\n for (int i = 0; i <= n; i++, a ^= 1) {\n var cur = dp[a];\n var next = dp[a ^ 1];\n\n for (int v = 0; v < 1 << m; v++)\n for (int j = 0; j < 1 << m; j++)\n next[v, j] = 1 << 29;\n\n for (int v = 0; v < 1 << m; v++) {\n for (int j = 0; j < 1 << m; j++) {\n for (int k = 0; k < 1 << m; k++) {\n if (check(v, j | k)) {\n next[v, k] = Math.Min(cur[j, v] + popcount(k), next[v, k]);\n }\n }\n }\n }\n }\n\n int res = 1000000000;\n for (int v = 0; v < 1 << m; v++)\n for (int j = 0; j < 1 << m; j++)\n res = Math.Min(res, dp[a][v, j]);\n Console.WriteLine(n * m - res);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "c65148b892b38a29723ce148e8a68945", "src_uid": "097674b4dd696b30e102938f71dd39b9", "apr_id": "2c1786842e4822d714a5216dbcee6c66", "difficulty": 2100, "tags": ["dp", "bitmasks", "dsu"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5029239766081871, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "using System;\n\nnamespace ProblemB\n{\n internal class Program\n {\n public static void Main(string[] args)\n {\n uint n = uint.Parse(Console.ReadLine());\n string binary = Convert.ToString(n, 2);\n int size = binary.Length - binary.IndexOf(\"1\");\n\n decimal result = 1;\n for (int i = 1; i <= 2; i++)\n {\n result *= size - (i - 1);\n result /= i;\n }\n\n Console.WriteLine((int)result / 3);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "3c7c4014809180b16b9e743787b69faf", "src_uid": "838f2e75fdff0f13f002c0dfff0b2e8d", "apr_id": "6db66e744e95e6fc3ef15a155b004779", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8104487608841259, "equal_cnt": 18, "replace_cnt": 6, "delete_cnt": 9, "insert_cnt": 3, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Xorygol\n{\n class Program\n {\n static void Main(string[] args)\n {\n int count = 0;\n int n = Convert.ToInt32(Console.ReadLine());\n for (int a = 1; a <= n; a++)\n {\n for (int b = a; b <= n; b++)\n {\n for (int c = b; (c < a + b) && c <= n; c++)\n {\n if(((a ^ b ^ c) == 0) && (a + b > c) && (a + c > b) && (c + b > a))\n {\n count++;\n }\n }\n }\n }\n Console.WriteLine(count);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "384c3405097d7b159bf123a125e0cb10", "src_uid": "838f2e75fdff0f13f002c0dfff0b2e8d", "apr_id": "efe6714314f371be7ad9dd186c365b91", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.8048615800135044, "equal_cnt": 17, "replace_cnt": 6, "delete_cnt": 8, "insert_cnt": 3, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Xorygol\n{\n class Program\n {\n static void Main(string[] args)\n {\n int count = 0;\n int n = Convert.ToInt32(Console.ReadLine());\n for (int a = 1; a <= n; a++)\n {\n for (int b = a; b <= n; b++)\n {\n for (int c = b; c < a + b; c++)\n {\n if(((a ^ b ^ c) == 0) && (a + b > c) && (a + c > b) && (c + b > a))\n {\n count++;\n }\n }\n }\n }\n Console.WriteLine(count);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "630ac2247a64dcdc7b8d6031d2a7fbb6", "src_uid": "838f2e75fdff0f13f002c0dfff0b2e8d", "apr_id": "efe6714314f371be7ad9dd186c365b91", "difficulty": 1300, "tags": ["brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.5786407766990291, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication3\n{\n class Program\n {\n static void Main(string[] args)\n {\n int W;\n W = Convert.ToInt64(Console.ReadLine();\n if (W%2 == 0) { W = W / 2; };\n if (W % 2 == 0) { Console.WriteLine('YES'); }\n else { Console.WriteLine('NO'); };\n\n\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5d95bdf11829b8d5752b674acbf55d26", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e7b00c9924776f06d392879e102ace43", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9584905660377359, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "public class Program{\n public static void Main(){\n string line = Console.ReadLine();\n int w = Int32.Parse(line);\n string ans=string.Empty;\n if(w%2==0)ans=\"YES\";\n else ans=\"NO\";\n Console.WriteLine(ans);\n }\n}", "lang": "MS C#", "bug_code_uid": "afdc78c7c64235510c2d60321047e51c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "400b3aacd9306def4f08883cc9236f8e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.930379746835443, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "using System;\n class Program\n {\n \n static void Main(string[] args)\n {\n\n int w = int.Parse(Console.ReadLine());\n int a = w / 2;\n if (a % 2 == 0)\n Console.WriteLine(\"Yes\");\n else \n Console.WriteLine(\"NO\");\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ad861f2e2b04da7f92004e80306d1c38", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e4d238779a9460b5a83e9b94da3437cb", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9996222138269739, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\npublic class Solution \n{\n public static void Main(string[] args)\n {\n new Solution().Run();\n }\n \n public void Run()\n {\n try\n {\n Init();\n Solve();\n }\n catch (Exception e)\n {\n Console.WriteLine(e);\n }\n \n Console.ReadLine();\n }\n \n private void Init()\n {\n inputBuffer = new string[0];\n inputBufferIndex = 0;\n }\n \n private string[] inputBuffer;\n private int inputBufferIndex;\n \n private string ReadLine() { return Console.ReadLine(); }\n \n private string ReadString()\n {\n while (inputBufferIndex == inputBuffer.Length)\n {\n inputBuffer = ReadLine().Split(new char[] {' ', '\\t'}, StringSplitOptions.RemoveEmptyEntries);\n inputBufferIndex = 0;\n }\n \n return inputBuffer[inputBufferIndex++];\n }\n \n private int ReadInt() { return Int32.Parse(ReadString()); }\n \n private long ReadLong() { return Int64.Parse(ReadString()); }\n \n private double ReadDouble() { return Double.Parse(ReadString()); }\n \n private void Solve()\n {\n int weight = ReadInt();\n \n bool can = (weight > 2 && weight % 2 == 0);\n Console.WriteLine(can ? \"YES : \"NO\");\n }\n}", "lang": "MS C#", "bug_code_uid": "6f101484b15debde1c16f7ce56966676", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "55738613d1b6b9a5b5bcd265c08facdf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.021505376344086023, "equal_cnt": 16, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 17, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.24720.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Watermelon\", \"Watermelon\\Watermelon.csproj\", \"{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{42DD4B06-A1FE-4B28-8A21-F5AF1788919B}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "3b3c7f18e226767e212fd932af3de850", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "bfb277ee00be2e73c5bd2e4421588e03", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9957983193277311, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int W = int.Parse(Console.ReadLine());\n if ((W%2) == 0, W != 2)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "1764aeaf48fa41489ad64d3d3ee4fc55", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "39234145669a7d829f370ec7e6f698f3", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9753718605218239, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static int[] ReadInt(int size)\n {\n string[] input = Console.ReadLine().Split(' ');\n int[] res = new int[size]; \n for (int i=0; i b ? a : b);\n }\n\n static void WL (T s)\n {\n Console.WriteLine(s);\n } \n \n static void swap(ref int a, ref int b)\n {\n int temp = a;\n a = b;\n b = temp;\n }\n\n static void Main(string[] args)\n {\n int n, m, a, b;\n ReadInt(out n, out m, out a, out b);\n int res = 0;\n if (a*m > b)\n {\n res = (n / m) * b + (n % m) * a;\n }\n else\n {\n res = n * a;\n }\n WL(res);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "6606d83b045fb7947d568d6d5b74e29f", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "8f77082d524a28c8f2296fa5a03daa6e", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9065155807365439, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "using System;\n\npublic class CheapTravel {\n\n\tpublic static void Main(string[] args){\n\t\t\n\t\tvar n = int.Parse(args[0]);\n\t\tvar m = int.Parse(args[1]);\n\t\tvar a = int.Parse(args[2]);\n\t\tvar b = int.Parse(args[3]);\n\t\t\n\t\tif(a <= ((float)b / (float)m))\n\t\t{\n\t\t\tConsole.Write(n * a);\n\t\t}\n\t\telse {\n\t\t\tvar total = 0;\n\t\t\t\n\t\t\twhile(n > 0){\n\t\t\t\t\n\t\t\t if((n-m) < 0)\n\t\t\t {\n\t\t\t\t Console.Write(total + (n * a));\n\t\t\t\t return;\n\t\t\t }\n\t\t\t \n\t\t\t total += (b);\n \t\t n -= m;\n\t\t\t}\n\t\t\t\n\t\t\tConsole.Write(total);\n\t\t}\n\t}\n}", "lang": "MS C#", "bug_code_uid": "da0e119f2bfd71305e85fbb2c2131805", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "apr_id": "bd5b185c0199862e4ecc47e0a78d5c11", "difficulty": 1200, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8056446440025657, "equal_cnt": 14, "replace_cnt": 13, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 13, "bug_source_code": "using System;\n\nnamespace problem_430A\n{\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tstring s = Console.ReadLine();\n\t\t\tchar c = s[s.Length - 1];\n\t\t\ts = Console.ReadLine().Replace(\" \", \"\");\n\t\t\tint max = 0;\n\t\t\tfor (int i = 1; i < s.Length; i++)\n\t\t\t{\n\t\t\t\tif (s[i] != c || s[i - 1] != c)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint l = i - 2, r = i + 1, cur = 2;\n\t\t\t\twhile (l >= 0 && r < s.Length)\n\t\t\t\t{\n\t\t\t\t\tchar tc = s[r];\n\t\t\t\t\tint t = 0;\n\t\t\t\t\twhile (l >= 0 && s[l] == tc)\n\t\t\t\t\t{\n\t\t\t\t\t\tl--;\n\t\t\t\t\t\tt++;\n\t\t\t\t\t}\n\t\t\t\t\twhile (r < s.Length && s[r] == tc)\n\t\t\t\t\t{\n\t\t\t\t\t\tr++;\n\t\t\t\t\t\tt++;\n\t\t\t\t\t}\n\t\t\t\t\tif (t < 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcur += t;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (cur > max)\n\t\t\t\t{\n\t\t\t\t\tmax = cur;\n\t\t\t\t}\n\t\t\t}\n\t\t\tConsole.Write(max);\n\t\t}\n\t}\n}\n", "lang": "Mono C#", "bug_code_uid": "4996d1c33eecc6478f03cc21c016ba6c", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "f3c5df3b97dfdf5b7fb56f5ad893532e", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9279279279279279, "equal_cnt": 9, "replace_cnt": 0, "delete_cnt": 6, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace B\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] data = Console.ReadLine().Split(' ');\n int n = Convert.ToInt32(data[0]);\n int k = Convert.ToInt32(data[1]);\n int x = Convert.ToInt32(data[2]);\n\n data = Console.ReadLine().Split(' ');\n int[] c = new int[n];\n for (int i = 0; i < n; i++)\n c[i] = Convert.ToInt32(data[i]);\n\n int max = 0;\n for (int i = 1; i < n; i++)\n {\n if (c[i] != x || c[i - 1] != x)\n continue;\n\n int l = i - 2, r = i + 1;\n int curr = 2;\n while (l >= 0 && r < n)\n {\n int tmp = 0;\n int q = c[r];\n while (l >= 0)\n {\n if (c[l] == q)\n {\n l--;\n tmp++;\n }\n }\n\n while (r < n)\n {\n if (c[r] == q)\n {\n r++;\n tmp++;\n }\n }\n\n if (tmp < 3)\n break;\n\n curr += tmp;\n }\n\n if (max < curr)\n max = curr;\n }\n\n Console.WriteLine(max.ToString());\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f67aca452f0a57acace15b335b24818a", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "cc5e56c2d1d65cf76ba5405f03a00f07", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9882044560943644, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Numerics;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp2\n{\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tvar number = Console.ReadLine().Split(' ').Select(int.Parse).ToList();\n\t\t\tvar friends = number[0];\n\t\t\tvar bottles = number[1];\n\t\t\tvar milliliters = number[2];\n\t\t\tvar limes = number[3];\n\t\t\tvar slices = number[4];\n\t\t\tvar salt = number[5];\n\t\t\tvar nl = number[6];\n\t\t\tvar np = number[7];\n\n\t\t\tvar totalDrink = bottles * milliliters;\n\t\t\tvar toasts = totalDrink / friends;\n\t\t\tvar toastsWithLimes = limes * slices;\n\t\t\tvar toastsWithSalt = salt / np;\n\n\t\t\tConsole.WriteLine(Math.Min(toasts, Math.Min(toastsWithLimes, toastsWithSalt)) / nl);\n\t\t}\n\t}\n}\n", "lang": ".NET Core C#", "bug_code_uid": "4084c5c827c9742c8fcb6c32c966fd18", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "5db1c4ae50047fd17de172891a721d9f", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9979716024340771, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Hasirovka\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n string[] chysla = Console.ReadLine().Split(' ');\n int n = Int32.Parse(chysla[0]), k = Int32.Parse(chysla[1]), l = Int32.Parse(chysla[2]), c = Int32.Parse(chysla[3]), d = Int32.Parse(chysla[4]),\n p = Int32.Parse(chysla[5]), nl = Int32.Parse(chysla[6]), np = Int32.Parse(chysla[7]);\n int[] tosty = new int[3];\n tosty[0] = k * l/n;\n tosty[1] = c * d;\n tosty[2] = p / np;\n int k_tostiv = tosty.Min() / n;\n Console.WriteLine(k_tostiv);\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "9965e17595f5be823a83506feccdd247", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "0d2453425e17c06236d5bbd40ca1a453", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9995110024449878, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] s = Console.ReadLine().Split(' ');\n int n = Convert.ToInt32(s[0]);\n int k= Convert.ToInt32(s[1]);\n int l= Convert.ToInt32(s[2]);\n int c = Convert.ToInt32(s[3]);\n int d = Convert.ToInt32(s[4]);\n int p = Convert.ToInt32(s[5]);\n int nl = Convert.ToInt32(s[6]);\n int np = Convert.ToInt32(s[7]);\n int[] a = new int[3];\n int gas = k * l;\n int g = gas / n; a[0] = g;\n int lai = c * d; a[1] = lai;\n int soli = p / np; a[2] = soli;\n int min = 100000000;\n for (int i = 0; i < a.Length; i++)\n {\n if (a[i] < min) { min = a[i]; }\n }\n Console.WriteLine(min / n);\n \n\n \n\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "df1b79e1a787753037104986ab6fd755", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "93cda5e4106dc0cc45de88ed2ee31334", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9158679446219382, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Turn\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n long n = long.Parse(reader.ReadLine());\n\n n %= 360;\n\n if (n >= 0)\n {\n if (n <= 45)\n writer.WriteLine(\"0\");\n else if (n <= 45 + 90)\n writer.WriteLine(\"1\");\n else if (n <= 45 + 180)\n writer.WriteLine(\"2\");\n else\n writer.WriteLine(\"3\");\n }\n else\n {\n if (n >= -45)\n writer.WriteLine(\"0\");\n else if (n > -45 - 90)\n writer.WriteLine(\"3\");\n else if (n > -45 - 180)\n writer.WriteLine(\"2\");\n else\n writer.WriteLine(\"1\");\n }\n\n\n writer.WriteLine();\n writer.Flush();\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "08fcfad27f56fa6b8749de220bdadd30", "src_uid": "509db9cb6156b692557ba874a09f150e", "apr_id": "41ced73894f4248419f0bb1f708fa348", "difficulty": 1800, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9432454036770583, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nnamespace BigO_Chapter\n{\n class Program\n {\n public static void Main(string[] args)\n {\n int Weight;\n\n Weight = Convert.ToInt32(Console.ReadLine());\n\n if (Weight < 1 || Weight > 100) return;\n\n\n if (Weight % 2 == 0)\n {\n if ((Weight / 2) % 2 == 0)\n {\n Console.WriteLine(\"Yes\");\n\n }\n else\n {\n Console.WriteLine(\"Yes\");\n return;\n }\n }\n else\n Console.WriteLine(\"No\");\n }\n", "lang": "Mono C#", "bug_code_uid": "45684fcf5979213d52a2ed4de30caacb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f306fce04729a594c8cd3805305dae38", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5469223007063572, "equal_cnt": 11, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 10, "bug_source_code": "using System;\nclass Program\n{\n static int Main()\n {\n int w = Int32.Parse(Console.ReadLine());\n if(w%%2=0){\n int a,b;\n a=w/2;\n b=w/2;\n if(a%2==0 && b%2==0)Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n else Console.WriteLine(\"NO\");\n return 0;\n }\n}", "lang": "Mono C#", "bug_code_uid": "14437fa6f9931fa86307d4e1868d4008", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "85d1c37dbb7f019e33a8b272eaf6e5cf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6554054054054054, "equal_cnt": 14, "replace_cnt": 6, "delete_cnt": 2, "insert_cnt": 6, "fix_ops_cnt": 14, "bug_source_code": "using System;\nclass Program\n{\n static int Main()\n {\n int w = Int32.Parse(Console.ReadLine());\n if (w % 2 == 0)\n {\n int a, b;\n a = w / 2;\n b = w / 2;\n if(a%0==1&&b%0==1) {\n a++;\n b--;\n if(a%0==0&&b%0==0) Console.WriteLine(\"YES\");\n }\n else if(a%0==0&&b%0==0) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n else Console.WriteLine(\"NO\");\n return 0;\n }\n}", "lang": "Mono C#", "bug_code_uid": "3cbf4c9ccce358b0a595816747cf3906", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "85d1c37dbb7f019e33a8b272eaf6e5cf", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4946524064171123, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "using System;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n Console.WriteLine(\"Enter number: \");\n number = Convert.ToInt32(Console.ReadLine());\n\n if (number % 2 == 0)\n {\n Console.WriteLine(\"Yes\");\n }\n else\n {\n Console.WriteLine(\"No\");\n }\n\n Console.ReadKey();\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a7b56e64ed1d477a8dcc825ee74a98c4", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e30f33298e3ad0524dbf9f916256987e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5525291828793775, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "Console.Write(\"Enter the weight of the watermelon :\");\n int x = Convert.ToInt32(Console.ReadLine());\n if (x % 2 == 0 && x!=0 && x>=1)\n {\n Console.WriteLine(\"yes\");\n }\n else\n {\n Console.WriteLine(\"no\");\n }\n", "lang": "Mono C#", "bug_code_uid": "249e672f0f88f5351831c32b99be91a7", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "a9277ab1ca983c9d5f9ed6647fa4cd9b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.02872531418312388, "equal_cnt": 12, "replace_cnt": 9, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"CodeForces\", \"CodeForces\\CodeForces.csproj\", \"{7214E0B5-3D6A-46CA-B703-896E5946EA69}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Debug|x86.ActiveCfg = Debug|x86\n\t\t{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Debug|x86.Build.0 = Debug|x86\n\t\t{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Release|x86.ActiveCfg = Release|x86\n\t\t{7214E0B5-3D6A-46CA-B703-896E5946EA69}.Release|x86.Build.0 = Release|x86\n\tEndGlobalSection\nEndGlobal\n", "lang": "Mono C#", "bug_code_uid": "283023eec06405f832ef39a35b3ec1d2", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8811e11cfd0ad02cc1528c8cdbf75541", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5871330418488445, "equal_cnt": 18, "replace_cnt": 11, "delete_cnt": 6, "insert_cnt": 1, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace novosoft\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int x = 0;\n x =Int32.Parse( Console.ReadLine());\n var res=test(x);\n }\n\n public static string test(int i)\n {\n if (i>=1 && i<=100)\n {\n var res = i % 2;\n if (res == 0)\n {\n var res2 = (i / 2) % 2;\n if (res2 == 0)\n {\n return \"YES\";\n }\n else\n {\n return \"NO\";\n }\n\n }\n else\n return \"NO\";\n\n\n }\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a92ffd19c00e489b55af38733cd8adc3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "93536a03bc6438dcfe3da02f7ac1d31f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8792270531400966, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "class Program{\n static void Main(string[] args){\n byte weight = 0;\n if(args.Length != 1 || !byte.TryParse(args[0], out weight)){\n Console.WriteLine(\"Invalid input\");\n return;\n }\n \n Console.WrileLine((weight %2 == 0 && weight > 2) ? \"YES\" : \"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "de372f8be62b58b034ac7f15d8311564", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b629303a3bff4b48f3010082182ebe57", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9994767137624281, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace C_CS\n{\n class C\n {\n static readonly Int64 MaxN = (Int64)1e18;\n static Int64[] Fibs;\n static void GetFib()\n {\n Fibs = new Int64[1024];\n Fibs[0] = 1;\n Fibs[1] = 1;\n for (Int32 i = 2; i < Fibs.Length; ++i)\n {\n Fibs[i] = Fibs[i - 2] + Fibs[i - 1];\n }\n }\n static void Main(String[] args)\n {\n GetFib();\n String input = Console.ReadLine();\n Int64 n = Int64.Parse(input);\n Int32 result = Array.IndexOf(Fibs, (from x in Fibs\n where x >= n\n select x).First()) - 2;\n Console.WriteLine(\"{0}\\n\", result);\n //Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ef64c464aec1a483c4efe10177f6f8de", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "b305b4c180633044287aec91a2d74a87", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9812646370023419, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": " using System;\n using System.Collections.Generic;\n using System.Text;\n using System.Linq;\n\n class PairVariable : IComparable\n {\n public int a, b;\n public PairVariable()\n {\n\n }\n\n public PairVariable(string s)\n {\n string[] q = s.Split();\n a = int.Parse(q[0]);\n b = int.Parse(q[1]);\n }\n public PairVariable(int a, int b)\n {\n this.a = a;\n this.b = b;\n }\n public int CompareTo(PairVariable pv)\n {\n if (this.a > pv.a)\n {\n return 1;\n }\n else if (this.a < pv.a)\n {\n return -1;\n }\n else\n {\n if (this.b >= pv.b)\n {\n return 1;\n }\n else\n {\n return -1;\n }\n }\n }\n\n }\n\n\n namespace ConsoleApplication2\n {\n class Program\n {\n static void Main(string[] args)\n {\n string[] ss = Console.ReadLine().Split();\n long n = long.Parse(ss[0]);\n List ans = new List();\n long a = 1;\n long b = 2;\n ans.Add(a);\n ans.Add(b);\n while (true)\n {\n long x = a + b;\n ans.Add(x);\n a = b;\n b = x;\n if (x > n)\n {\n break;\n }\n }\n /*for (int i = 0; i < ans.Count; i++)\n {\n Console.Write(ans[i]+\" \");\n }*/\n //Console.WriteLine();\n for (int i = 0; i < ans.Count; i++)\n {\n if (n < ans[i])\n {\n Console.WriteLine(i);\n return;\n }\n }\n\n }\n }\n }\n", "lang": "MS C#", "bug_code_uid": "2f1f26601daefbcb1c97e5e3642435f9", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "e0b798cd030725d76576b3202f2aa465", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9546827794561934, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nnamespace CSharp\n{\n class _735C\n {\n public static void Main()\n {\n int n = int.Parse(Console.ReadLine());\n int max = 1;\n\n int fp = 1;\n int fc = 2;\n\n do\n {\n fc = fp + fc;\n fp = fc - fp;\n\n if (fc <= n)\n {\n max++;\n }\n } while (fc <= n);\n\n Console.WriteLine(max);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "9ea52cfd03db79bd627ce6846e8f0948", "src_uid": "3d3432b4f7c6a3b901161fa24b415b14", "apr_id": "2ff0a5158942a3ac90baed0221f0a8dc", "difficulty": 1600, "tags": ["math", "combinatorics", "greedy", "constructive algorithms"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8765930991607087, "equal_cnt": 25, "replace_cnt": 9, "delete_cnt": 3, "insert_cnt": 12, "fix_ops_cnt": 24, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ZolotojVek\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] s = Console.ReadLine().Split();\n\n long x = Convert.ToInt64(s[0]);\n long y = Convert.ToInt64(s[1]);\n long l = Convert.ToInt64(s[2]);\n long r = Convert.ToInt64(s[3]);\n \n long maxa = Convert.ToInt64(Math.Floor(Math.Log(r) / Math.Log(x)));\n long maxb = Convert.ToInt64(Math.Floor(Math.Log(r) / Math.Log(y)));\n\n List years = new List();\n \n for (long i = 0; i <= maxa; i++)\n for (long j = 0; j <= maxb; j++)\n {\n long year=Convert.ToInt64(Math.Pow(x, i) + Math.Pow(y, j));\n if (year>=l && year<=r)\n years.Add(year);\n }\n\n years = years.OrderBy(n => n).ToList();\n long max=0;\n for (int i=1;imax) max=len;\n }\n\n if (years.Count > 0)\n {\n if (l < years[0]) max = (long)Math.Max(max, years[0] - l);\n if (r > years.Last()) max = (long)Math.Max(max, r - years.Last());\n }\n else\n {\n max = r - l + 1;\n }\n Console.Write(max);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "113f45ebd506b6a01b7b257fd412b495", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "40af89aa581218ee41acfe349d486a47", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9559867486985328, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\n\nnamespace The_Golden_Age\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n long x = Next();\n long y = Next();\n\n long l = Next();\n long r = Next();\n\n var list = new List {0,long.MaxValue};\n for (long i = 1; long.MaxValue/x > i; i *= x)\n {\n for (long j = 1; long.MaxValue/y > j; j *= y)\n {\n if (long.MaxValue - i < j)\n break;\n list.Add(i + j);\n }\n }\n\n list.Sort();\n\n long max = 0;\n for (int i = 1; i < list.Count; i++)\n {\n if (list[i] <= r && list[i] >= l)\n max = Math.Max(max, list[i] - Math.Max(l - 1, list[i - 1]) - 1);\n if (list[i - 1] <= r && list[i - 1] >= l)\n max = Math.Max(max, Math.Min(r + 1, list[i]) - list[i - 1] - 1);\n if (list[i] > r && list[i - 1] < l)\n max = Math.Max(max, r - l + 1);\n }\n\n writer.WriteLine(max);\n writer.Flush();\n }\n\n private static long Next()\n {\n int c;\n long res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "da0e99db84e6bbceb90b06100dbf59b7", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "7aa94d784e031d5ee57c5f2ce34d0f3a", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9975089952947689, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Competitive\n{\n class Program\n {\n\n static int ReadInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static string ReadStr()\n {\n return Console.ReadLine();\n }\n\n static char ReadChr()\n {\n return Console.ReadKey().KeyChar;\n }\n\n static List GetList(long x)\n {\n List Xs = new List();\n\n long num = 1;\n\n while (num <= 1e18)\n {\n Xs.Add(num);\n if ((double)x * num > 1e18)\n {\n break;\n }\n\n num *= x;\n }\n\n return Xs;\n }\n\n static void Main(string[] args)\n {\n var t = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n var x = t[0];\n var y = t[1];\n var l = t[2];\n var r = t[3];\n\n HashSet hset = new HashSet();\n\n List Xs = GetList(x);\n List Ys = GetList(y);\n\n foreach (var xx in Xs)\n {\n foreach (var yy in Ys)\n {\n if (xx + yy >= l && xx + yy <= r)\n {\n hset.Add(xx + yy);\n }\n }\n }\n\n long res = 0;\n\n long curr = l-1;\n\n foreach (var num in hset.OrderBy(z => z))\n {\n res = Math.Max(res, num - curr);\n curr = num;\n }\n\n res = Math.Max(res, r - curr);\n\n Console.WriteLine(res);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "f7edde07157e91361a4d6a88a1f84821", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "0eafbee2e74d61c3ab37c91be2e4dd9e", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9980636237897649, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Competitive\n{\n class Program\n {\n\n static int ReadInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static string ReadStr()\n {\n return Console.ReadLine();\n }\n\n static char ReadChr()\n {\n return Console.ReadKey().KeyChar;\n }\n\n static List GetList(long x)\n {\n List Xs = new List();\n\n long num = 1;\n\n while (num <= 1e18)\n {\n Xs.Add(num);\n if ((double)x * num > 1e18)\n {\n break;\n }\n\n num *= x;\n }\n\n return Xs;\n }\n\n static void Main(string[] args)\n {\n var t = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n var x = t[0];\n var y = t[1];\n var l = t[2];\n var r = t[3];\n\n HashSet hset = new HashSet();\n\n List Xs = GetList(x);\n List Ys = GetList(y);\n\n foreach (var xx in Xs)\n {\n foreach (var yy in Ys)\n {\n if (xx + yy >= l && xx + yy <= r)\n {\n hset.Add(xx + yy);\n }\n }\n }\n\n long res = 0;\n\n long curr = l-1;\n\n foreach (var num in hset.OrderBy(z => z))\n {\n res = Math.Max(res, num - curr-1);\n curr = num;\n }\n\n res = Math.Max(res, r - curr);\n\n Console.WriteLine(res);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "058a637674e8b7a08ad39a33a27cc5a1", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "0eafbee2e74d61c3ab37c91be2e4dd9e", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5131470829909613, "equal_cnt": 17, "replace_cnt": 12, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Globalization;\nusing System.Text;\n\nnamespace CodeForces\n{\n class Program\n {\n //a - 97\n public static void Main(string[] args)\n {\n long[] input = GetIntArr();\n long x = input[0];\n long y = input[1];\n long l = input[2];\n long r = input[3];\n\n bool[] arr = new bool[r - l + 1];\n\n long a = 1; //умножение на x\n while (true)\n {\n long b = 1; //умножение на y\n if (a + b > r)\n break;\n while (true)\n {\n if (a + b < l)\n {\n b *= y;\n continue;\n }\n if (a + b > r)\n break;\n arr[a + b - l] = true;\n b *= y;\n }\n a *= x;\n }\n\n int ans = 0;\n for (int i = 0; i < arr.Length; i++)\n {\n if (arr[i] == false)\n {\n int len = 0;\n while (i < arr.Length && arr[i] == false)\n {\n len++;\n i++;\n }\n if (len > ans)\n ans = len;\n }\n\n }\n Console.WriteLine(ans);\n\n }\n\n public static int[] CountLetters(string s)\n {\n int[] sl = new int[26];\n for (int i = 0; i < s.Length; i++)\n sl[s[i] - 97]++;\n return sl;\n }\n\n public static void MoveRight(StringBuilder sb, int first, int last)\n {\n char c = sb[last];\n for (int i = last; i > first; i--)\n sb[i] = sb[i - 1];\n\n sb[first] = c;\n }\n\n public static string Rw() { return Console.ReadLine(); }\n\n public static long GetInt() { return Int64.Parse(Rw()); }\n public static long[] GetIntArr() { return Array.ConvertAll(Rw().Split(' '), Int64.Parse); }\n\n public static double GetDouble() { return Double.Parse(Rw()); }\n public static double[] GetDoubleArr() { return Array.ConvertAll(Rw().Split(' '), DoubleParse); }\n public static double DoubleParse(string s) { return Double.Parse(s, NumberStyles.Any, System.Globalization.CultureInfo.GetCultureInfo(\"en-US\")); }\n\n public static void GetTwoInts(out long n, out long m)\n {\n long[] input = GetIntArr();\n n = input[0];\n m = input[1];\n }\n\n public const long Module = 1000000000 + 7;\n\n }\n}\n\n", "lang": "MS C#", "bug_code_uid": "b0bb831e529f633b3a21784ab94ca470", "src_uid": "68ca8a8730db27ac2230f9fe9b120f5f", "apr_id": "6fd76d91db8af11e159bbf0f9dc7393e", "difficulty": 1800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9805097451274363, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " using System;\n\n namespace reverseString\n {\n class Program\n {\n static void Main(string[] args)\n {\n while (true)\n {\n System.Int64 ans, rem, r, s;\n String str = Console.ReadLine();\n\n int len = str.Length;\n r = 0;\n for (int i = 0; i < len - 1; i++)\n {\n r = r * 10 + str[i] - '0';\n }\n\n // Console.WriteLine(\"r is {0}\", r);\n s = str[len - 1];\n\n // Console.WriteLine(\"s is {0}\", s);\n\n rem = (r - 1) / 4;\n // Console.WriteLine(\"rem is {0}\", rem);\n\n ans = rem * 12;\n // Console.WriteLine(\"ans is {0}\", ans);\n\n\n if (r % 2 == 0)\n {\n ans += 6;\n //Console.WriteLine(\"ans1 is {0}\", ans);\n }\n\n if (r % 4 == 1 || r % 4 == 2)\n {\n ans += r - 1;\n // Console.WriteLine(\"ans2 is {0}\", ans);\n }\n else if (r % 4 == 3 || r % 4 == 0)\n {\n ans += r - 3;\n // Console.WriteLine(\"ans3 is {0}\", ans);\n }\n\n if (s == 'a')\n {\n ans += 4;\n // Console.WriteLine(\"ans4 is {0}\", ans);\n }\n else if (s == 'b')\n {\n ans += 5;\n Console.WriteLine(\"ans5 is {0}\", ans);\n }\n else if (s == 'c')\n {\n ans += 6;\n // Console.WriteLine(\"ans6 is {0}\", ans);\n }\n else if (s == 'd')\n {\n ans += 3;\n // Console.WriteLine(\"ans is {0}\", ans);\n }\n else if (s == 'e')\n {\n ans += 2;\n // Console.WriteLine(\"ans is {0}\", ans);\n }\n else\n {\n ans += 1;\n // Console.WriteLine(\"ans is {0}\", ans);\n }\n\n Console.WriteLine(ans);\n\n }\n\n }\n }\n\n}\n", "lang": "Mono C#", "bug_code_uid": "5a19eaba130163d1d448f16e6c8f849f", "src_uid": "069d0cb9b7c798a81007fb5b63fa0f45", "apr_id": "cbd5c7ac59d938a81dea96842120d9ec", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9968210717529519, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\npublic class Program\n{\n\tpublic static void Main(string[] args)\n\t{\n\t\tstring num = Console.ReadLine();\n\t\tstring[] numArray = num.Split(null);\n\n\t\tlong s = int.Parse(numArray[0]);\n\t\tlong x = int.Parse(numArray[1]);\n\n\t\tstring sum = Convert.ToString(s, 2);\n\t\tstring xor = Convert.ToString(x, 2);\n\n\t\tint sumdiff = 0, xordiff = 0;\n\t\tif (sum.Length > xor.Length)\n\t\t{\n\t\t\tsumdiff = sum.Length - xor.Length;\n\t\t}\n\t\t{\n\t\t\txordiff = xor.Length - sum.Length;\n\t\t}\n\n\t\tif (sumdiff > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < sumdiff; i++)\n\t\t\t\txor = \"0\" + xor;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i < xordiff; i++)\n\t\t\t\tsum = \"0\" + sum;\n\t\t}\n\n\t\tsum = \"1\" + sum;\n\t\txor = \"1\" + xor;\n\n\t\tchar[] sumChar = sum.ToCharArray();\n\t\tchar[] xorChar = xor.ToCharArray();\n\n\t\tint carry = 0;\n\n\t\tint[] possibilities = new int[xor.Length];\n\n\t\tfor (int i = xor.Length - 1; i >= 0; i--)\n\t\t{\n\t\t\tif (xor[i] == '1')\n\t\t\t{\n\t\t\t\tif (sum[i] == '1')\n\t\t\t\t{\n\t\t\t\t\tpossibilities[i] = 2;\n\n\t\t\t\t\tif (carry == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.Write(\"0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (carry == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tpossibilities[i + 1] = possibilities[i + 1] - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tcarry = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpossibilities[i] = 2;\n\n\t\t\t\t\tif (carry == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.Write(\"0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (carry == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tpossibilities[i + 1] = possibilities[i + 1] - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tcarry = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (sum[i] == '1')\n\t\t\t\t{\n\t\t\t\t\tpossibilities[i] = 2;\n\n\t\t\t\t\tif (carry == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tpossibilities[i + 1] = possibilities[i + 1] - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (carry == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.Write(\"0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcarry = -1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpossibilities[i] = 2;\n\n\t\t\t\t\tif (carry == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.Write(\"0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (carry == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tpossibilities[i + 1] = possibilities[i + 1] - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tcarry = -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong answer = 1;\n\t\tfor (int i = 1; i < possibilities.Length; i++)\n\t\t{\n\t\t\tanswer = answer * possibilities[i];\n\t\t}\n\n\t\tif(s==x)\n\t\t{\n\t\t\tanswer = answer - 2;\n\t\t}\n\n\t\t\tConsole.Write(answer);\n\t\t}\n\n\n}", "lang": "MS C#", "bug_code_uid": "3dfd6c71986541a3cb47bd1848cf4722", "src_uid": "18410980789b14c128dd6adfa501aea5", "apr_id": "87a8efdd3526001380592ceabd76cc2d", "difficulty": 1700, "tags": ["dp", "math", "constructive algorithms", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9673085535154501, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main(string[] args)\n {\n long n = long.Parse(Console.ReadLine());\n string s = Console.ReadLine();\n long[] num = new long[s.Length];\n long[] pow = new long[10];\n for (int i = 0; i < s.Length; i++)\n {\n num[i] = s[i] - 48;\n for (long j = num[i]; j > 1; j--)\n {\n pow[j]++;\n }\n }\n pow[2] += 2 * (pow[4]);\n pow[2] += pow[6];\n pow[3] += pow[3];\n pow[4] = 0;\n pow[6] = 0;\n pow[2] += 3 * pow[8];\n pow[8] = 0;\n pow[3] += 2 * pow[9];\n pow[9] = 0;\n for (int i = 0; pow[2]>0; i++)\n {\n if (pow[7] > 0)\n {\n pow[7]--;\n pow[5]--;\n pow[3] -= 2;\n pow[2] -= 4;\n Console.Write(\"7\");\n }\n else\n {\n if (pow[5] > 0)\n {\n pow[5]--;\n pow[3]--;\n pow[2] -= 3;\n Console.Write(\"5\");\n }\n else\n {\n if (pow[3] > 0)\n {\n pow[3]--;\n pow[2]--;\n Console.Write(\"3\");\n }\n else\n {\n pow[2]--;\n Console.Write(\"2\");\n }\n }\n }\n }\n Console.WriteLine();\n //1234\n //555\n //\n //\n\n //2-5\n //3-2\n //5-\n //7-\n\n //2 \n //2-1\n //3\n //3-1,2-1\n //5\n //5-1 3-1 2-3\n //7\n //7-1 5-1 3-2 2-4\n\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "fe4caa6e15815d4cf0ea09ab4d113d31", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "456f19968498d1202239e1f760fedeae", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.23137598597721298, "equal_cnt": 16, "replace_cnt": 11, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Text.RegularExpressions;\n\nnamespace ConsoleApplication3\n{\n class Program\n {\n public static void Main(string[] args)\n {\n int i = 0;\n string h = \"hello\";\n\n List l = Console.ReadLine().ToList();\n\n foreach (char ch in l) {\n if (ch == h[i])\n {\n h = h.Remove(0, 1);\n }\n\n }\n\n if (h.Length <= 1)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n \n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5adc63879406c36317abfbfc62bae471", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "083cc4bfc118dfffd4b0738991397e54", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.336996336996337, "equal_cnt": 30, "replace_cnt": 7, "delete_cnt": 13, "insert_cnt": 10, "fix_ops_cnt": 30, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Test\n{\n class Program\n {\n static void Main(string[] args)\n {\n List wordChars = new List(Console.ReadLine().ToCharArray());\n\n\n for (byte i = 0; i < wordChars.Count; i++)\n {\n if (wordChars[i] != 'h' && wordChars[i] != 'e' && wordChars[i] != 'l' && wordChars[i] != 'o')\n {\n wordChars.RemoveAt(i);\n i--;\n }\n }\n\n for (int i = 1; i < wordChars.Count; i++)\n {\n if (wordChars[i] == wordChars[i - 1])\n {\n if (wordChars[i] != 'l')\n {\n wordChars.Remove(wordChars[i]);\n i--;\n }\n else if (wordChars[i + 1] == 'l')\n {\n wordChars.Remove(wordChars[i]);\n i--;\n }\n }\n }\n\n if (wordChars.Count == 5)\n {\n if (string.Join(\"\", wordChars.ToArray()) == \"hello\")\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n return;\n }\n else if (wordChars.Count < 5)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n\n\n\n\n Queue fringe = new Queue();\n fringe.Enqueue(string.Join(\"\", wordChars.ToArray()));\n\n\n while (fringe.Peek().Length > 5)\n {\n for (int i = 0; i < fringe.Peek().Length; i++)\n {\n List _wordChars = new List(fringe.Peek().ToList());\n _wordChars.RemoveAt(i);\n\n if (string.Join(\"\", _wordChars.ToArray()) == \"hello\")\n {\n Console.WriteLine(\"YES\");\n return;\n }\n\n if (_wordChars.Contains('h') && _wordChars.Contains('e') && _wordChars.Contains('l') && _wordChars.Contains('o'))\n {\n string word = string.Join(\"\", _wordChars.ToArray());\n if (word.Contains(\"ll\"))\n {\n if (!fringe.Contains(word))\n fringe.Enqueue(word);\n }\n }\n }\n fringe.Dequeue();\n }\n Console.WriteLine(\"NO\");\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "da3ec3bdc28169511205fbb3a27bb9a8", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "26fa87796d2b5b34b6c305fbfcddb428", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9743788218902392, "equal_cnt": 10, "replace_cnt": 7, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "#region Using Statements\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\nusing System.Threading.Tasks;\n\n#endregion\nnamespace csConsoleforStudy\n{\n using System.Collections.Generic;\n using System.Globalization;\n\n public class Printer : StreamWriter\n {\n public override IFormatProvider FormatProvider\n {\n get\n {\n return CultureInfo.InvariantCulture;\n }\n }\n\n public Printer(Stream stream): base (stream, new UTF8Encoding(false, true))\n {\n }\n\n public Printer(Stream stream, Encoding encoding): base (stream, encoding)\n {\n }\n }\n\n class Program\n {\n static readonly Encoding TargetEcoding = Encoding.Unicode;\n static void Main(string[] args)\n {\n OpenStream();\n Solver s = new Solver();\n s.Solve();\n CloseStream();\n }\n\n static void OpenStream()\n {\n }\n\n static void CloseStream()\n {\n }\n\n static void CheckMemory()\n {\n }\n }\n\n class Solver\n {\n public static readonly Encoding TargetEncoding = Encoding.Unicode;\n const int SIZE = 5005;\n private const double AbsoluteError = 1e-10;\n private const double RelativeError = 1e-8;\n static int mod = 1000000007;\n public void Solve()\n {\n var in1 = ria();\n int fx = in1[0];\n int fy = in1[1];\n int tx = in1[2];\n int ty = in1[3];\n int targetx = tx - fx + 1000000;\n int targety = ty - fy + 1000000;\n var in2 = ria();\n int a = 0;\n int b = 0;\n while (targetx > 0)\n {\n targetx -= in2[0];\n a++;\n }\n\n while (targety > 0)\n {\n targety -= in2[1];\n b++;\n }\n\n if ((a + b) % 2 == 0)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n\n#region SolverUtils\n private static List factorial = new List(new int[]{1});\n private static int NextInt()\n {\n int c;\n int res = 0;\n do\n {\n c = Console.Read();\n if (c == -1)\n return res;\n }\n while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = Console.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n\n static string rs()\n {\n return Console.ReadLine();\n }\n\n static int ri()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static uint rui()\n {\n return uint.Parse(Console.ReadLine());\n }\n\n static long rl()\n {\n return long.Parse(Console.ReadLine());\n }\n\n static ulong rul()\n {\n return ulong.Parse(Console.ReadLine());\n }\n\n static double rd()\n {\n return double.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);\n }\n\n static string[] rsa()\n {\n return Console.ReadLine().Split(' ');\n }\n\n static int[] ria()\n {\n return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => int.Parse(e));\n }\n\n static uint[] ruia()\n {\n return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => uint.Parse(e));\n }\n\n static long[] rla()\n {\n return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => long.Parse(e));\n }\n\n static ulong[] rula()\n {\n return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => ulong.Parse(e));\n }\n\n static double[] rda()\n {\n return Array.ConvertAll(Console.ReadLine().Trim(' ').Split(' '), e => double.Parse(e));\n }\n\n static void ReadLineAndAssign(string type, params object[] p)\n {\n dynamic input;\n if (type.StartsWith(\"i\"))\n input = ria();\n else if (type.StartsWith(\"l\"))\n input = rla();\n else if (type.StartsWith(\"d\"))\n input = rda();\n else\n throw new ArgumentException(\"no match \" + type.ToString());\n for (int i = 0; i < p.Length; i++)\n {\n p[i] = input[i];\n }\n }\n\n static void SwapIfGreater(ref T lhs, ref T rhs)where T : IComparable\n {\n T temp;\n if (lhs.CompareTo(rhs) > 0)\n {\n temp = lhs;\n lhs = rhs;\n rhs = temp;\n }\n }\n\n static bool DoubleEqual(double a, double b)\n {\n double diff = Math.Abs(a - b);\n if (diff < AbsoluteError)\n return true;\n return diff <= RelativeError * Math.Max(Math.Abs(a), Math.Abs(b));\n }\n\n static dynamic abs(dynamic num)\n {\n return Math.Abs(num);\n }\n\n static dynamic max(dynamic a, dynamic b)\n {\n return Math.Max(a, b);\n }\n\n static void For(int start, int end, Action method)\n {\n for (int i = start; i < end; i++)\n {\n method.Invoke();\n }\n }\n\n static void For(int start, int end, Action method, int i)\n {\n for (i = start; i < end; i++)\n {\n method.DynamicInvoke(i);\n }\n }\n\n static int C(int n, int k)\n {\n return P(n, k) / Factorial(k);\n }\n\n static int P(int n, int r)\n {\n return Factorial(n) / Factorial(n - r);\n }\n\n static int Factorial(int n)\n {\n if (factorial.Count <= n)\n factorial.Add(Factorial(n - 1) * n);\n return factorial[n];\n }\n\n static bool IsEven(int a)\n {\n return (a % 2) == 0;\n }\n\n static bool IsOdd(int a)\n {\n return !IsEven(a);\n }\n\n static int powmod(int a, int b)\n {\n if (b == 0)\n return 1;\n if (b == 1)\n return a;\n int i = powmod(a, b / 2);\n i *= i;\n i %= mod;\n if (b % 2 == 0)\n return i;\n else\n return ((i * a) % mod);\n }\n#endregion\n }\n#region SolverUtils\n#endregion\n#region Data Structure\n#endregion\n#region Algorithm\n#endregion\n#region Library Method/Fields\n#region Members for Internal Support\n#endregion Members for Internal Support\n#region Public Properties\n#endregion Public Properties\n#region Public Instance Methods\n#endregion Public Instance Methods\n#region Constructors\n#endregion Constructors\n#region Public Static Methods\n#endregion Public Static Methods\n#region Operator Overloads\n#endregion Operator Overloads\n#region explicit conversions from BigRational\n#endregion explicit conversions from BigRational\n#region implicit conversions to BigRational\n#endregion implicit conversions to BigRational\n#region serialization\n#endregion serialization\n#region instance helper methods\n#endregion instance helper methods\n#region static helper methods\n#endregion static helper methods\n#region Exceptions\n#endregion\n#endregion\n}\n#region Libraries\n#region operation methods\n#endregion\n#region Operators\n#endregion\n#region DataStructures\n#region IComparable implementation\n#endregion\n#region Model\n#endregion\n#region Constructors\n#endregion\n#region Internal\n#region IEqualityComparer implementation\n#endregion\n#endregion\n#region IGraph implementation\n#endregion\n#region Clique invariants\n#endregion\n#region Clique methods\n#endregion\n#region IEquatable implementation\n#endregion\n#endregion\n#region Algorithms\n#endregion\n#endregion\n", "lang": "MS C#", "bug_code_uid": "0e109914485d5c02af9671678750bda4", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "8145080381251edfc9fd8af5337662ec", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9991568296795953, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace _817A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] splitStr = Console.ReadLine().Split(' ');\n int startX = int.Parse(splitStr[0]);\n int startY = int.Parse(splitStr[1]);\n int finishX = int.Parse(splitStr[2]);\n int finishY = int.Parse(splitStr[2]);\n string[] splitStrStep = Console.ReadLine().Split(' ');\n int stepX = int.Parse(splitStrStep[0]);\n int stepY = int.Parse(splitStrStep[1]);\n\n if (Math.Abs(finishX - startX)%stepX != 0 || Math.Abs(finishY - startY)%stepY != 0)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n int countStepX = Math.Abs(finishX - startX) / stepX;\n int countStepY = Math.Abs(finishY - startY) / stepY;\n if (countStepX%2 == countStepY%2)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n Console.ReadLine();\n\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "485e5bd3b5dbb5b53baef852d241edb6", "src_uid": "1c80040104e06c9f24abfcfe654a851f", "apr_id": "f39441245f918b3a68f94676a8a8ffbc", "difficulty": 1200, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9996160491457093, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading;\n\nnamespace Codeforces\n{\n class C\n {\n private static ThreadStart s_threadStart = new C().Go;\n private static bool s_time = false;\n\n public class Truple\n {\n public int a;\n public int b;\n public int c;\n }\n\n private void Go()\n {\n int n = GetInt();\n int m = GetInt();\n int k = GetInt();\n List[] data = new List[n];\n for (int i = 0; i < n; i++)\n {\n GetString();\n data[i] = new List();\n for (int j = 0; j < m; j++)\n {\n Truple tr;\n data[i].Add(tr = new Truple());\n tr.a = GetInt();\n tr.b = GetInt();\n tr.c = GetInt();\n }\n }\n int max = 0;\n Tuple[] unitProfit = new Tuple[m];\n for (int i = 0; i < n; i++)\n {\n for (int j = i+1; j < n; j++)\n {\n var buy = data[i];\n var sell = data[j];\n for (int x = 0; x < m; x++)\n {\n unitProfit[x] = new Tuple(sell[x].b - buy[x].a, x);\n }\n Array.Sort(unitProfit);\n Array.Reverse(unitProfit);\n int kk = k;\n int localProfit = 0;\n for (int y = 0; y < m && kk > 0 && unitProfit[y].Item1 > 0; y++)\n {\n int cap = buy[unitProfit[y].Item2].c;\n localProfit += Math.Min(cap, kk) * unitProfit[y].Item1;\n kk -= cap;\n }\n\n if (localProfit > max) max = localProfit;\n }\n }\n\n Wl(max);\n }\n\n #region Template\n\n public static void Main(string[] args)\n {\n System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();\n Thread main = new Thread(new ThreadStart(s_threadStart), 512 * 1024 * 1024);\n timer.Start();\n main.Start();\n main.Join();\n timer.Stop();\n if (s_time)\n Wl(timer.ElapsedMilliseconds);\n }\n\n private static IEnumerator ioEnum;\n private static string GetString()\n {\n while (ioEnum == null || !ioEnum.MoveNext())\n {\n ioEnum = Console.ReadLine().Split().AsEnumerable().GetEnumerator();\n }\n\n return ioEnum.Current;\n }\n\n private static int GetInt()\n {\n return int.Parse(GetString());\n }\n\n private static long GetLong()\n {\n return long.Parse(GetString());\n }\n\n private static double GetDouble()\n {\n return double.Parse(GetString());\n }\n\n private static List GetIntArr(int n)\n {\n List ret = new List(n);\n for (int i = 0; i < n; i++)\n {\n ret.Add(GetInt());\n }\n return ret;\n }\n\n private static void Wl(T o)\n {\n if (o is double)\n {\n Wld((o as double?).Value, \"\");\n }\n else if (o is float)\n {\n Wld((o as float?).Value, \"\");\n }\n else\n Console.WriteLine(o.ToString());\n }\n\n private static void Wl(IEnumerable enumerable)\n {\n Wl(string.Join(\" \", enumerable.Select(e => e.ToString()).ToArray()));\n }\n\n private static void Wld(double d, string format)\n {\n Wl(d.ToString(format, CultureInfo.InvariantCulture));\n }\n\n public struct Tuple : IComparable>\n where T : IComparable\n where K : IComparable\n {\n public T Item1;\n public K Item2;\n\n public Tuple(T t, K k)\n {\n Item1 = t;\n Item2 = k;\n }\n\n public override bool Equals(object obj)\n {\n var o = (Tuple)obj;\n return o.Item1.Equals(Item1) && o.Item2.Equals(Item2);\n }\n\n public override int GetHashCode()\n {\n return Item1.GetHashCode() ^ Item2.GetHashCode();\n }\n\n public override string ToString()\n {\n return \"(\" + Item1 + \" \" + Item2 + \")\";\n }\n\n #region IComparable> Members\n\n public int CompareTo(Tuple other)\n {\n int ret = Item1.CompareTo(other.Item1);\n if (ret != 0) return ret;\n return Item2.CompareTo(other.Item2);\n }\n\n #endregion\n }\n\n #endregion\n }\n}", "lang": "Mono C#", "bug_code_uid": "ab8092d8a75a0e5225bfc68e0a3401bd", "src_uid": "7419c4268a9815282fadca6581f28ec1", "apr_id": "4abeb35e2cc18dd3ed8d39f95a3f8184", "difficulty": 1200, "tags": ["games", "greedy", "graph matchings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.993103448275862, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace for_codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n Console.WriteLine(((n % 2) == 0) && ( n!= 2)) ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "31a81f27a27b7af0c57cdf13afdfa200", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "423efeb57675aa1462c8c8b9f8979fa5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.268857356235997, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.IO;\n\nnamespace Program\n{\n public static class Program\n {\n public static void Main(string[] args)\n {\n var input = Convert.ToInt32(Console.ReadLine());\n \n\t\t\tif (input == 2)\n {\n Console.WriteLine(_no);\n return;\n }\n\t\t\t\n switch (input % 2)\n {\n case 0:\n Console.WriteLine(\"YES\");\n break;\n case 1:\n Console.WriteLine(\"NO\");\n break;\n }\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "14b4729a1e63e5fc77cb43b94cd7be3a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "33b9da56d09523ab0dcf328334830624", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9182763744427934, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace _4A\n{\n class Program\n {\n static void Main(string[] args)\n {\n int res = int.Parse(args.First());\n if (res % 2 == 0){\n Console.WriteLine(\"YES\");\n } else {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "c2afe64ce4b997dc3246fbd56203327b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "127501b0b4559f8f56c9b97e70384299", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.1295774647887324, "equal_cnt": 6, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "n = int(input());\n\nif (n > 1 && n % 2 == 0);\n print(\"YES\");\nelse\n print(\"NO\");", "lang": ".NET Core C#", "bug_code_uid": "365658ab08f2d4b58c61ae674b4a29f7", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f46c6a7cd5a19b948300e3772b0bee93", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6748091603053435, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": " public static void Watermelon(int arg)\n {\n if (arg >= 4 && arg % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n \n }", "lang": ".NET Core C#", "bug_code_uid": "5aa44fd0a373c5406b01dc28978a1c0c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "df390a2550eb498e3258f84935d66d62", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.868421052631579, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n if(Int16.Parse(args[0]) %2 == 0)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n }\n}", "lang": ".NET Core C#", "bug_code_uid": "c954d54d84e656dbd484a01c13a5a4a6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "96ac3ccbc78d26d5807a62696389fc53", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.030405405405405407, "equal_cnt": 7, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "\n\n \n Exe\n netcoreapp3.1\n \n\n\n", "lang": ".NET Core C#", "bug_code_uid": "bab992653435f1b0815094e5a47a1d7e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9c48fa1b4bc1176b6db0d24c04feeb0e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9884169884169884, "equal_cnt": 1, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace ConsoleApp6\n\n{\n\n public class Program\n {\n static void Main()\n {\n int input = int.Parse(Console.ReadLine());\n if (input % 2 != 0 || input == 2)\n {\n Console.WriteLine(\"No\");\n }\n else\n {\n Console.WriteLine(\"Yes\");\n }\n\n\n\n\n\n\n\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "c0c6ff29a1b645424d9c0a24292cf64e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "5e896596857737e84fc7df7bb8b2d3a9", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6146095717884131, "equal_cnt": 11, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 9, "fix_ops_cnt": 12, "bug_source_code": "internal class Program\n {\n private static void Main(string[] args)\n {\n var input = int.Parse(Console.ReadLine());\n if (input % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n\n Console.ReadKey();\n }\n }", "lang": "Mono C#", "bug_code_uid": "597c4fa1bfa57bcf74c742b1d2cf12d3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "18e26193c79ea048f3df1e83eca25d72", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9311163895486936, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\n\nnamespace watermilon\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w = Console.ReadLine();\n\n if (w > 3 && w < 101 )\n\n {\n if (w % 2 == 0)\n {\nConsole.Write(\"YES\");\n }\n \n\n }\n else\n {\n Console.Write(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "70198d0825b0a0f2ccfa145b4eae2ef3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "491097263d075b28a7a4031377f70c51", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.4369114877589454, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": " int weight = int.Parse(Console.ReadLine());\n if (weight % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n } else\n {\n Console.WriteLine(\"NO\");\n }", "lang": "Mono C#", "bug_code_uid": "c8258c0a36397c89a0dcb990de07af2f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "434c66966324388c539a8376f3a22ab1", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.02232435981615233, "equal_cnt": 12, "replace_cnt": 12, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 13, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.28307.136\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"задача арбузы\", \"задача арбузы\\задача арбузы.csproj\", \"{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B1CDA7F2-87E1-41AE-A6D3-1016F6C72BF7}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {7958668B-6340-414D-B092-7FE1A34A16A3}\n\tEndGlobalSection\nEndGlobal\n", "lang": "Mono C#", "bug_code_uid": "d0ff2fbfffbd57a807279b7853bad8a6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ed0493b5b8cbba7e5e0f25c90d2f3392", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.28414442700156983, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 7, "fix_ops_cnt": 10, "bug_source_code": "public void DivisisbleByEven(int weight)\n {\n if (weight / 2)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }", "lang": "Mono C#", "bug_code_uid": "e28f7cac9b40e9440c85f591ca3edb4e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1d15e21268612875008831d2692ebd00", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9386828160484482, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\n\nnamespace ConsoleApplication\n{\n class Program\n {\n static void Main(string[] args)\n {\n int weight = 0;\n string w;\n w = Console.ReadLine();\n bool result = int.TryParse(w, out weight);\n weight = weight - 2\n if (result == true && weight >=1 && weight <=100)\n {\n if ( weight % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n } else {\n Console.WriteLine(\"NO\");\n }\n }\n \n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "5312730101f6f4cfd162f46d24231bdf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "36536721d312540066ecca92a9fb842c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9062996294335627, "equal_cnt": 14, "replace_cnt": 10, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 13, "bug_source_code": "using System;\n\nnamespace codeforces1\n{\n class MainClass\n {\n public static void Main (string[] args)\n {\n UInt16 w = Convert.ToUInt16(Console.ReadLine());\n if(w % 2 == 0){\n w /= 2;\n if(w % 2 == 0){\n Console.WriteLine(\"Yes\");\n }\n else{\n UInt16 one = w - 1;\n if((one != 0) && (one % 2) == 0){\n UInt16 two = w + 1;\n if((two != 0) && (two % 2) == 0){\n Console.WriteLine(\"Yes\"); \n }\n else{\n Console.WriteLine(\"No\");\n }\n }\n else{\n Console.WriteLine(\"No\"); \n }\n }\n }\n else{\n Console.WriteLine(\"No\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "928b4c9422927db064bd192207c64b1f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "47f12e38b98b1e97a4e5a56f535e14ab", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4647408666100255, "equal_cnt": 14, "replace_cnt": 9, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ProgrammingContest.Codeforces.Round82 {\n class C {\n static void Main() {\n var xs = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n int n = xs[0],\n m = xs[1],\n c0 = xs[2],\n d0 = xs[3];\n Listzs = new List();\n for (int i = 0; i < m; i++) {\n var ys = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n int d = ys[0] / ys[1];\n zs.Add(new int[] { d * ys[2], d * ys[3] });\n }\n\n for(int i = 1; i*c0 <= n; i++)\n zs.Add(new int[] { i * c0, i * d0 });\n\n zs.Sort((a, b) => -(a[1] / a[0] - b[1] / b[0]));\n int res = 0, rest = n;\n for (int i = 0; rest > 0 && i < zs.Count; i++) {\n if (rest >= zs[i][0]) {\n rest -= zs[i][0];\n res += zs[i][1];\n }\n }\n\n Console.WriteLine(res);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "2b8af56a63fccd97ed99b4432f534125", "src_uid": "4e166b8b44427b1227e0f811161d3a6f", "apr_id": "cf8cafbb61563dec0fdd0b323900d142", "difficulty": 1700, "tags": ["dp"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9880952380952381, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Pr1\n{\n class Program\n {\n static bool prostoe(int a)\n {\n for(int i=2;i*i<=a;i++)\n if(a%i==0)\n return false;\n return true;\n }\n static void Main()\n {\n int n=Convert.ToInt32(Console.ReadLine());\n string s=Console.ReadLine(),q=\"\";\n int[] a=new int [11];\n for(int i=0;i1)\n for(int j=k;j>=2;j--)\n {\n if(!prostoe(j))\n {\n int u=j;\n while(u%2==0)\n {\n a[2]++;\n u/=2;\n }\n while(u%3==0)\n {\n a[3]++;\n u/=3;\n }\n }\n else\n {\n a[j]++;\n break;\n }\n \n }\n }\n for(int i=9;i>=2;i--)\n {\n while(a[i]!=0)\n {\n a[i]--;\n q+=i;\n }\n }\n \n Console.Write(q);\n\n }\n \n \n }\n}", "lang": "MS C#", "bug_code_uid": "1820d7b8a812e49169d6f13a2318ab4d", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "f9da60723b1ef8b47514eb19ea151502", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8236415633937083, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\n\nnamespace tren\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.ReadLine();\n string s = Console.ReadLine();\n string res = \"\";\n Dictionary d = new Dictionary();\n d.Add('2', \"2\");\n d.Add('3', \"3\");\n d.Add('4', \"322\");\n d.Add('5', \"5\");\n d.Add('6', \"53\");\n d.Add('7', \"7\");\n d.Add('8', \"7222\");\n d.Add('9', \"7332\");\n for (int i = 0; i < s.Length; i++)\n {\n if(s[i] != '1' && s[i] != '1')\n res += d[s[i]];\n }\n char[] c = res.ToCharArray();\n c = c.OrderByDescending(x => x).ToArray();\n foreach(char ch in c) Console.Write(ch); \n }\n }\n}", "lang": "MS C#", "bug_code_uid": "4dec61dec2efc33baad96996208b06a1", "src_uid": "60dbfc7a65702ae8bd4a587db1e06398", "apr_id": "d64333c6bbd2c98dc490f65a8b0cfeb7", "difficulty": 1400, "tags": ["greedy", "math", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7967406066093254, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 4, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication35\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n string s = Console.ReadLine();\n int u = 0, d = 0,l=0,r=0,co=0;\n for (int i = 0; i < s.Length; i++)\n {\n if (s[i]=='U')\n {\n u++;\n }\n else if (s[i] == 'D')\n {\n d++;\n }\n else if (s[i] == 'R')\n {\n r++;\n }\n else if (s[i] == 'L')\n {\n l++;\n }\n }\n if (u>0 && d>0 && u==d)\n {\n co += u + d;\n }\n else if (u != 0 && d != 0)\n {\n co += Math.Max(u, d);\n }\n if (l > 0 && r > 0 && r==l)\n {\n co += l+ r;\n }\n else if(l!=0 && r!=0)\n {\n co += Math.Max(l, r);\n }\n Console.WriteLine(co);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c23a0be2141c9024691aec3167407665", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "8f1941030784fdbeb5b8d159a6ce5b74", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.6402561024409764, "equal_cnt": 14, "replace_cnt": 5, "delete_cnt": 4, "insert_cnt": 4, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication5\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int length_of_sequence ;\n int maximum_possible_number=0;\n int sumY=0;\n int sumX = 0;\n int count = 0;\n string temp; \n temp = Console.ReadLine();\n length_of_sequence = Convert.ToInt32(temp);\n string sequence = System.Console.ReadLine();\n\n foreach (char c in sequence)\n {\n if(c=='D') sumY--;\n else if (c == 'U') sumY++;\n else if (c == 'L') sumX--;\n else sumX++;\n count++;\n if(sumX==0 && sumY==0)\n {\n maximum_possible_number = count;\n break;\n }\n }\n\n \n \n\n //System.Console.WriteLine(\"Sum Y=\" + sumY++);\n //System.Console.WriteLine(\"Sum X=\"+sumX++);\n System.Console.WriteLine(maximum_possible_number);\n //System.Console.ReadLine();\n\n }\n }\n}\n\n\n", "lang": "MS C#", "bug_code_uid": "5f9d4a5dc69f2db64b33f45de833a82c", "src_uid": "b9fa2bb8001bd064ede531a5281cfd8a", "apr_id": "b0db00ca9952c423e3c8b82aa0a0909c", "difficulty": 1000, "tags": ["greedy"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9643835616438357, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main(string[] args)\n {\n int w = int.Parse(Console.ReadLine());\n Console.WriteLine(w % 2 ? \"YES\" : \"NO\");\n }\n}", "lang": "MS C#", "bug_code_uid": "0d1e67d8bdfd455d0435385afa1558e0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e059695ddd088310c1bb4e62a8768079", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.0215633423180593, "equal_cnt": 17, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 17, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"arbuz_01\", \"arbuz_01\\arbuz_01.csproj\", \"{B7A39387-4E95-43B4-BE96-7057A8E7B587}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B7A39387-4E95-43B4-BE96-7057A8E7B587}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "33fcaafd214e52f9014e3301df6a231a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0e3dbc166eb7f0208937e10f649e09bd", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.01696113074204947, "equal_cnt": 11, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 11, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"watermelon\", \"watermelon\\watermelon.csproj\", \"{B8B98514-195E-4417-84F5-ED14B9450660}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{B8B98514-195E-4417-84F5-ED14B9450660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{B8B98514-195E-4417-84F5-ED14B9450660}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{B8B98514-195E-4417-84F5-ED14B9450660}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{B8B98514-195E-4417-84F5-ED14B9450660}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "9a292a3f4589d6b114139d5761488ab8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8e51e1554191b39009f6cc5313612eb2", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5074183976261127, "equal_cnt": 18, "replace_cnt": 8, "delete_cnt": 7, "insert_cnt": 4, "fix_ops_cnt": 19, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main(string[] args)\n {\n \n int w = int32.Parse(Console.ReadLine());\n if (w % 2 == 0 && w>2)\n Console.Write(\"YES\");\n else\n Console.Write(\"NO\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ffa6f474bebaa969f96081d543cfb073", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "1952bd1e5802eaf09dc9e9d7baf94a95", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4683136412459721, "equal_cnt": 7, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\n\nnamespace Problems\n{\n class Program\n {\n static void Main(string[] args)\n {\n \n int[] Arr = new int[3];\n Arr[0] = int.Parse(Console.ReadLine());\n Arr[1] = int.Parse(Console.ReadLine());\n Arr[2]=int.Parse(Console.ReadLine());\n \n Array.Sort(Arr);\n \n Console.WriteLine((Arr[1]-Arr[0])+(Arr[2]-Arr[1]));\n Console.Read();\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "9210f4c2f5ca0593741b445d9a147b67", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "88ec76f3ddeb2cf15240d6ad43d5c1f3", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.1255280627640314, "equal_cnt": 17, "replace_cnt": 11, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main()\n {\n int n = Int32.Parse(Console.ReadLine());\n string[] numbers = Console.ReadLine().Split(' ');\n int[] array = new int[n+1];\n for (int i = 1; i <= n; i++)\n array[i] = int.Parse(numbers[i-1]);\n\n int min = array[1],\n imin = 1, \n max = array[1], \n imax = 1;\n\n for (int i = 1; i <= n; i++)\n {\n if (array[i] < min)\n {\n min = array[i];\n imin = i;\n }\n if (array[i] > max)\n {\n max = array[i];\n imax = i;\n }\n }\n\n int dist = Math.Min(imax - 1, n - imax);\n int dist2 = Math.Min(imin - 1, n - imin);\n Console.WriteLine(Math.Max(imax, imin) - \n Math.Min(imax, imin) + \n Math.Max(dist, dist2));\n //Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "fadb5e038daa8d1695abfc49e3dba814", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "ec4e29a4789279da9ec604bf64383436", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9813278008298755, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace Contest\n{\n class Program\n {\n public static void Main()\n {\n string[] ss = Console.ReadLine().Split(' '); \nint a = Convert.ToInt32(ss[0]); \nint b = Convert.ToInt32(ss[1]); \nint c = Convert.ToInt32(ss[2]); \nint Max = -1; \nint Min = 101; \nif (a > Max) \nMax = a; \nif (b > Max) \nMax = b; \nif (c > Max) \nMax = c; \nif (a < Min) \nMin = a; \nif (b < Min) \nMin = b; \nif (c < Min) \nMin = c; \nConsole.WriteLine((Max+Min)/2);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "d2dcfd17f0ab93d24a5c5938161ca70c", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "ec4e29a4789279da9ec604bf64383436", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9688796680497925, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\nnamespace Contest\n{\n class Program\n {\n public static void Main()\n {\n string[] ss = Console.ReadLine().Split(' '); \nint a = Convert.ToInt32(ss[0]); \nint b = Convert.ToInt32(ss[1]); \nint c = Convert.ToInt32(ss[2]); \nint Max = -1; \nint Min = 101; \nIf (a > Max) \nMax = a; \nIf (b > Max) \nMax = b; \nIf (c > Max) \nMax = c; \nIf (a < Min) \nMin = a; \nIf (b < Min) \nMin = b; \nIf (c < Min) \nMin = c; \nConsole.WriteLine((Min+Max)/2);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "579940eda2cab600cd1d8181dcb8890b", "src_uid": "7bffa6e8d2d21bbb3b7f4aec109b3319", "apr_id": "ec4e29a4789279da9ec604bf64383436", "difficulty": 800, "tags": ["math", "sortings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9456681350954479, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace timusCsharp //1\n{\n static class Program\n {\n static void Main()\n {\n\t\t\tvar ret = 0;\n int a = Int32.Parse(Console.ReadLine());\n\t\t\tdouble y = Int32.Parse(Console.ReadLine());\n\t\t\tdouble z = Int32.Parse(Console.ReadLine());\n\t\t\tint b = Math.Floor(y/2);\n\t\t\tint c = Math.Floor(z/4);\n\t\t\tint[] arr = {a, b*2, c*4};\n\t\t\tint crit = arr.ToList().IndexOf(arr.Max());\n\t\t\tif (crit == 1) ret = a*7;\n\t\t\tif (crit == 2) ret = b*7;\n\t\t\tif (crit == 3) ret = c*7;\n\t\t\n Console.WriteLine(ret);\n }\n }\n} ", "lang": "MS C#", "bug_code_uid": "b5cd255d4d18d75460e374f5a4351d31", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "e18dc14bd47fde23a24e4bde5c51bed9", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7710241465445462, "equal_cnt": 7, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Zad\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] arr = new string[3];\n\n arr = Console.ReadLine().Split();\n int A, B,C,i;\n A = Convert.ToInt32(arr[0]);\n B = Convert.ToInt32(arr[1]);\n C = Convert.ToInt32(arr[2]);\n for (i = A; i >= -1; i--)\n if (B >= 2 * i && C >= 4 * i)\n break;\n Console.WriteLine(7*i);\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "85435f6d8b64c83ff6039b4805bb5dd7", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "3a91f81cf10d84d852f008aa1a7262b1", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.998272884283247, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace ConsoleTest\n{\n class Program\n {\n\n static void Main()\n {\n int a = int.Parse(Console.ReadLine());\n int b = int.Parse(Console.ReadLine());\n int c = int.Parse(Console.ReadLine());\n int sum = 0;\n for (int i = a; i >= 0; i--)\n {\n if (b >= 2*i && c >= 2*i)\n {\n sum = 7 * i;\n break;\n }\n }\n Console.WriteLine(sum);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "bc7a7a274d92f635e07c11b724650206", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "5fa6e0b976a0197b1c72455abcbd2eef", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9776021080368906, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace cf\n{\n class compote\n {\n static void Main(string[] args)\n {\n \n int a = int.Parse(Console.ReadLine());\n int b = int.Parse(Console.ReadLine());\n int c = int.Parse(Console.ReadLine());\n int r = 0;\n for ( int x =0; x<=a ;x++ )\n {\n if (a >= 1 && b>=2 && c>=4)\n {\n a -= 1;\n b -= 2;\n c -= 4;\n r += 7;\n }\n \n \n }\n Console.WriteLine(r);\n }\n\n\n\n }\n}\n\n", "lang": "MS C#", "bug_code_uid": "f702767b5766d3b29cf28364d089b13e", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "9fe306bbb8aedd8276b34114371f14d3", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9617486338797814, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "\nclass check\n\n{\n public static void Main()\n {\n int a=int.Parse(Console.ReadLine());\n if(a%2==0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "038df3891b3237150bf1d4bdf3d3f128", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "27dee437717b096fb482c5c77c94000c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.22939866369710468, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Net;\nusing System.Web;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\nnamespace Dela.Mono.Examples\n{\n class GoogleSearch\n {\n static void Main(string[] args)\n {\n Console.WriteLn(args[2]);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "3c782fd72dacdc368ba57fb700efcbf6", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b32688d101b8da811c4069e7ba07de13", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.2397336293007769, "equal_cnt": 10, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 5, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Net;\nusing System.Web;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\nnamespace Dela.Mono.Examples\n{\n class GoogleSearch\n {\n static void Main(string[] args)\n {\n Console.WriteLine(args[0]);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "63c5c5e5b7c876b035aaf7e91c1e730d", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b32688d101b8da811c4069e7ba07de13", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9045936395759717, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "using System;\npublic class Program\n{\n static void Main(String[]Args)\n {\n int a = Convert.Int32(Console.ReadLine());\n if(a<=2) Console.WriteLine(\"NO\");\n if(a%2==0)Console.Write(\"YES\");\n else Console.WriteLine(\"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "202f21dee02a160e3fbc6485e8d23a95", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fc964fc01b7baf712820235589c03973", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9912536443148688, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nclass Program{\n static void Main(){\n int x = int.Parse(Console.ReadLine());\n Console.WriteLine(x > 2 && (x & 1) == 0 ? \"YES\", \"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "abbfa96f46d2362a9564313fd92d9d8f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fc964fc01b7baf712820235589c03973", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.334610472541507, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 8, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main(string[] args)\n {\n int num = int.Parse(args[0]);\n if (num < 4)\n {\n Console.WriteLine(\"False\");\n }\n else\n {\n int shift = num >> 1;\n shift = shift << 1;\n Console.WriteLine(shift == num);\n\n }\n\n\n }\n}", "lang": "Mono C#", "bug_code_uid": "2064f786f64dc127a1bcea5eec1eae61", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f70d994357a8845ee20f3d01612254c5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.418848167539267, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int num = Convert.ToInt32(Console.ReadLine());\n if (num < 4)\n {\n System.Console.WriteLine(\"No\");\n } else {\n int shift = num >> 1;\n shift = shift << 1;\n if (shift == num) {\n answer = \"yes\";\n } else {\n answer = \"no\"; \n }\n System.Console.WriteLine(answer);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "e5209770ae9c1fd5dd8f23c8b196f6ab", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f70d994357a8845ee20f3d01612254c5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.978601997146933, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int num = Convert.ToInt32(Console.ReadLine());\n string answer=\"No\";\n if (!num < 4)\n {\n int shift = num >> 1;\n shift = shift << 1;\n answer = shift == num ? \"Yes\" : \"No\";\n\n }\n System.Console.WriteLine(answer);\n }\n}", "lang": "Mono C#", "bug_code_uid": "bdcc2169233c3398df2a380a3654d6eb", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f70d994357a8845ee20f3d01612254c5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8460634547591069, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.IO;\n\nclass Solution\n{\n static string Even(int n)\n {\n string ans=\"NO\";\n if(n%2==0)\n {\n ans=\"YES\"\n }\n return ans;\n }\n \n static void Main(string[] args) {\n l: int n=int.Parse(Console.ReadLine());\n \n if(n>=1&&n<=100)\n {\n string final=Even(n);\n Console..WriteLine(final);\n }\n else\n {\n goto l;\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "69663ef66d33c660c3f0f3226b308f22", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b1990f1cd4a80827c8deb27a202994fd", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6037735849056604, "equal_cnt": 17, "replace_cnt": 9, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 18, "bug_source_code": "using System;\nnamespace MON_PROJEC1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w ;\n Console.WriteLine(\"the weight of the watermelon bought\");\n w = int.Parse(Console.ReadLine());\n\n while(1 < w || w >100)\n {\n Console.WriteLine(\"the weight of the watermelon bought\");\n w = int.Parse(Console.ReadLine());\n }\n \n if (w % 2 ==0 )\n {\n Console.WriteLine(\"yes\");\n\n }\n\n else\n {\n Console.WriteLine(\"no\");\n }\n \n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d22e6c0d32def662d9ac5be91947a4af", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9bc236167d803f568dbf1cde49484a7c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "\nusing System;\n\n\nnamespace MON_PROJEC1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w ;\n Console.WriteLine(\"\");\n w = int.Parse(Console.ReadLine());\n \n \n\n}\n\n if ( w> 2 && w % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n\n }\n\n else\n {\n Console.WriteLine(\"NO\");\n }\n \n \n\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "14791c785cd0ea0818d6940cac0f5175", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "9bc236167d803f568dbf1cde49484a7c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6993603411513859, "equal_cnt": 10, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 9, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int w;\n w=Convert.Toint32(Console.ReadLine()) ; \n if(w%2==1) \n Console.Write(\"NO\");\n else\n Console.Write(\"YES\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "e1111455d1c8fcf97c04e5630b5091e1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b269fb7f5e6f1e70afb2261ebafde095", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6467991169977925, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n int pices;\n if( pices >= 1 && pices<=100)\n {\n if(pices %2==0)\n {\n Console.WriteLine(\"Yes\");\n }\n Console.WriteLine(\"No\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "02da7a64d0a03d2ba64281c30981ac53", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0ec4d8902095ab8b2739ecb6899de855", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.7465437788018433, "equal_cnt": 17, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 14, "fix_ops_cnt": 18, "bug_source_code": "\n class Program\n {\n static void Main(string[] args)\n {\n do\n {\n\n \n int W;\n Console.Write(\"Weight of the watermelon: \");\n W = int.Parse(Console.ReadLine());\n if (W%2==0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n } while (true);\n\n }\n }\n", "lang": "Mono C#", "bug_code_uid": "9cc6eb386dc66229d17ee817a67d516a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fe28424c9ed2ff1372a5fe3cee7b2f2e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7925531914893617, "equal_cnt": 19, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 14, "fix_ops_cnt": 19, "bug_source_code": "using System;\n\n\nnamespace A._watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n do\n {\n\n \n int W;\n Console.Write(\"Weight of the watermelon: \");\n W = int.Parse(Console.ReadLine());\n if (W%2==0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n } while (true);\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "5c447db879d0104f9df91f1cf20aaf72", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fe28424c9ed2ff1372a5fe3cee7b2f2e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6895181321410829, "equal_cnt": 21, "replace_cnt": 13, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 20, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int count = 0;\n string[] input = Console.ReadLine().Split(' ');\n int x = int.Parse(input[0]);\n int y = int.Parse(input[1]);\n int a = int.Parse(input[2]);\n int b = int.Parse(input[3]);\n if (x == 1 && y == 1)\n Console.WriteLine(b - a + 1);\n else\n {\n while (true)\n {\n if (a % x == 0 && a % y == 0)\n break;\n a++;\n }\n for (int i = a; i <= b; i += y)\n {\n if (i % x == 0 && i % y == 0)\n count++;\n }\n Console.WriteLine(count);\n }\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "843f1bb3aea43fb250fc96ebc721b059", "src_uid": "c7aa8a95d5f8832015853cffa1374c48", "apr_id": "9592c0ea3a4b4f90569fcb03429aee4a", "difficulty": 1200, "tags": ["math"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.3814736842105263, "equal_cnt": 11, "replace_cnt": 8, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\n\nnamespace ZODACHA\n{\n class Program\n {\n static int GetIdent(string dnk)\n {\n int count = 0, ofs = 0;\n char ch = '0';\n\n for (int i = 0; i < dnk.Length; i++)\n {\n if (ch == '0')\n {\n ch = dnk[i];\n count++;\n }\n else\n {\n if (ch == dnk[i])\n {\n count++;\n continue;\n }\n else if (count % 2 == 0)\n {\n ch = '0';\n ofs++;\n count = 1;\n\n continue;\n }\n else\n {\n ch = '0';\n count = 1;\n\n continue;\n }\n }\n }\n\n if (count % 2 == 0)\n ofs++;\n\n return ofs;\n }\n\n static void Main(string[] args)\n {\n string dnk = Console.ReadLine();\n Console.WriteLine(GetIdent(dnk));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "6517d3ec91a8b932415f62953bca44c7", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "apr_id": "87f17c86fe43e95489ab1bd7029c24b8", "difficulty": null, "tags": ["implementation", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8791208791208791, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace cf\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n try\n {\n string s = Console.ReadLine();\n int c = 0;\n int x = 0;\n for (int i = 0; i < s.Length-1; i++)\n {\n if (s[i] == s[i + 1])\n x++;\n else\n {\n x++;\n if (x % 2 == 0)\n c++;\n x = 0;\n }\n }\n Console.WriteLine(c);\n Console.ReadKey();\n }\n catch { }\n }\n \n }\n}\n", "lang": "MS C#", "bug_code_uid": "ef6e1d92b210749c302b7af578361003", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "apr_id": "c28c3a801f0d248049f3e524491fb5f6", "difficulty": null, "tags": ["implementation", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9392948018902217, "equal_cnt": 11, "replace_cnt": 0, "delete_cnt": 5, "insert_cnt": 5, "fix_ops_cnt": 10, "bug_source_code": "using System;\n\nnamespace OlympApp\n{\n class Program\n {\n static void Main(string[] args)\n {\n string n = Console.ReadLine();\n int i = 0;\n while (n[i] != 'h' && i < n.Length)\n {\n i++;\n }\n if (n[i] != 'h')\n {\n Console.WriteLine(\"NO\");\n return;\n }\n while (n[i] != 'e' && i < n.Length)\n {\n i++;\n }\n if (n[i] != 'e')\n {\n Console.WriteLine(\"NO\");\n return;\n }\n while (n[i] != 'l' && i < n.Length)\n {\n i++;\n }\n if (n[i] != 'l')\n {\n Console.WriteLine(\"NO\");\n return;\n }\n i += i < n.Length ? 1 : 0;\n while (n[i] != 'l' && i < n.Length)\n {\n i++;\n }\n if (n[i] != 'l')\n {\n Console.WriteLine(\"NO\");\n return;\n }\n while (n[i] != 'o' && i < n.Length)\n {\n i++;\n }\n\n if (n[i] != 'o')\n {\n Console.WriteLine(\"NO\");\n return;\n }\n\n Console.WriteLine(\"YES\");\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f9459580f22ebd6d85aaffe6e677b468", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "fdb0f05c5332767fed9527e58314e8bf", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.84, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Chat_Room___Guloso\n{\n static class Operacao\n {\n private static int k = 0; //variável de controle para letras desejadas encontradas\n private static string[] frase = { \"h\", \"e\", \"l\", \"l\", \"o\" }; //string buscada\n\n public static void TesteChatRoom(string s) //funcionamento do algoritmo\n {\n for (int i = 0; i < s.Length; i++) //percorrer a string inserida pelo usuário\n {\n if (frase[k] == Convert.ToString(s[i])) //se a letra na string digitada é equivalente a letra na string procurada\n {\n k++; //prosegue para a próxima letra da string digitada\n\n if (k == 5) //se o contador chegar em 5 -> \"hello\" encontrado\n {\n Console.WriteLine(\"YES\"); //exibe confirmação\n break; //interrompe o algoritmo\n }\n }\n }\n //acabando de percorrer a string\n if (k < 5) //Se o contador de controle for menor que 5\n Console.WriteLine(\"NO\"); //mensagem de negação -> palavra não encontrada\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f2f02d498f1e5c00e34c5c6b6f41434b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "44a697596a52fd9d797730522ff814de", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9575113808801214, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\nnamespace codility\n{\n class Program\n {\n\n public static string solution(string s)\n {\n string a = \"hello\";\n var counter = 0;\n for (int i = 0; i < s.Length; i++)\n {\n if (counter == 5)\n return \"Yes\";\n\n if (s[i] == a[counter])\n counter++;\n }\n if (counter == 5)\n return \"Yes\";\n return \"No\";\n\n }\n static void Main(string[] args)\n {\n Console.WriteLine(solution(args[0]));\n Console.ReadLine();\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8ee913bcdbb4dffdf15cae5ecedb7716", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "dddccbb7362c3cfb7e6d1d691b77536f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9281345565749235, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": " class Program\n {\n\n public static string solution(string s)\n {\n string a = \"hello\";\n var counter = 0;\n for (int i = 0; i < s.Length; i++)\n {\n if (counter == 5)\n return \"Yes\";\n\n if (s[i] == a[counter])\n counter++;\n }\n if (counter == 5)\n return \"Yes\";\n return \"No\";\n\n }\n static void Main(string[] args)\n {\n var a = \"ahhellllloou\";\n Console.WriteLine(solution(args[0]));\n Console.ReadLine();\n }\n", "lang": "Mono C#", "bug_code_uid": "9e56d916301686a19825da602f003640", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "dddccbb7362c3cfb7e6d1d691b77536f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.925255704169945, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A.Chat_room\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n string Hello = \"hello\";\n int index = 0;\n for (int i = 0; i < input.Length; i++)\n {\n if (input[i]==Hello[index])\n {\n index++;\n }\n }\n Console.WriteLine(index == 4 ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "e1466715f5f2b46a5cc0d87d13ea8b6b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "43c947e085ace648d8f4873d28f64acb", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8881069669247009, "equal_cnt": 11, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 8, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace chatroom\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n string name = \"hello\";\n\n int j=0;\n for (int i = 0; i < input.Length; i++)\n { \n if(input[i]==name[j])\n {\n j++;\n }\n }\n if (j >= 5)\n {\n Console.WriteLine(\"YES\");\n }\n else\n Console.WriteLine(\"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "4a321fc6cd2c301b1207a2ae9903ccb7", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "8565a4aad1c2208c2ccc10101dc7ca18", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9622926093514329, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace CF2\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n int in1, in3, in5;\n in1 = s.IndexOf('h');\n in5 = s.LastIndexOf('o');\n if (in1 > in5) Console.WriteLine(\"NO\");\n else\n {\n s = s.Substring(in1, in5 - in1 + 1);\n \n in1 = s.IndexOf('e');\n in5 = s.LastIndexOf('l');\n if (in1 > in5) Console.WriteLine(\"NO\");\n else\n {\n s = s.Substring(in1, in5 - in1 + 1);\n in1 = s.IndexOf('e');\n in5 = s.LastIndexOf('l');\n \n in3 = s.IndexOf('l');\n Console.WriteLine(in3==in5? \"NO\" :\"YES\");\n \n }\n }\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f5aa62465419eaf03b9e4bdd2888bd22", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "1e20af3ca60fe318a191e9d922681fb4", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9760403530895334, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace ChatRoom\n{\n class Program\n {\n static void Main(string[] args)\n {\n string line = Console.ReadLine().ToLower();\n int counter = 0;\n string result = \"NO\";\n\n foreach (char chara in line)\n {\n if ((counter == 0 && chara == 'h')\n || (counter == 1 && chara == 'e')\n || ((counter == 2 || counter == 3) && chara == 'l'))\n {\n counter++;\n lastChar = chara;\n }\n else if (counter == 4 && chara == 'o')\n {\n\n result = \"YES\";\n break;\n }\n \n }\n\n Console.WriteLine(result);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b37cf2b37c53f1673b17f41f3c74c0e5", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "7af0511d46493ffce510902543a68055", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.8274368231046931, "equal_cnt": 19, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 12, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Hello\n{\n class Program\n {\n static void Main(string[] args)\n {\n var Word = Console.ReadLine();\n var Letter1 = Word.IndexOf(\"h\", 0);\n var Letter2 = Word.IndexOf(\"e\", Letter1);\n var Letter3 = Word.IndexOf(\"l\", Letter2);\n var Letter4 = Word.LastIndexOf(\"l\");\n var Letter5 = Word.IndexOf(\"o\", Letter4);\n var Punkty = 0;\n\n \n if (Letter1 < Letter2)\n Punkty++;\n if (Letter2 > Letter1)\n Punkty++;\n if (Letter3 > Letter2)\n Punkty++;\n if (Letter4 > Letter3)\n Punkty++;\n if (Letter5 > Letter4)\n Punkty++;\n\n\n // Console.WriteLine(Letter1); Console.WriteLine(Letter2); Console.WriteLine(Letter3); Console.WriteLine(Letter4);Console.WriteLine(Letter5);\n //Console.WriteLine(\"PKT!! \" + Punkty);\n if (Punkty == 5)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "7839b08733640f596174cb39f60086d3", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "73d528791125b577bf60029395aa8fbd", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.921496698459281, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Hello2\n{\n class Program\n {\n static void Main(string[] args)\n {\n var word1 = Console.ReadLine(); //hello\n var word2 = \"hello\";\n \n var c = 0;\n\n foreach (var item in word1)\n {\n if (item == word2[c]) \n c++;\n }\n if (c == 5) \n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "4ee11694db03aabb2388214e5166827f", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "73d528791125b577bf60029395aa8fbd", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9723756906077348, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nnamespace Dictionary\n{\n class Program\n {\n \n static void Main(string[] args)\n {\n char[] m = new char[] { 'h', 'e', 'l', 'l', 'o' };\n string s = Console.ReadLine();\n int count = 0;\n foreach (char c in s)\n {\n if (c == m[count] && count <5) count++;\n }\n Console.Write(count == 5 ? \"YES\" : \"NO\");\n }\n \n }\n}\n", "lang": "Mono C#", "bug_code_uid": "81985488c25169019ac34fdbfcf6b320", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "1f6a62bb6fe43d112c836284f59851f1", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9591102387962054, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n string BaseWord = \"hello\";\n string s = Console.ReadLine().ToLower();\n int i = 0;\n string temp = string.Empty;\n for (int j = 0; j < BaseWord.Length; j++)\n {\n for (; i < s.Length; i++)\n {\n\n if (BaseWord[j] == s[i])\n {\n temp += i + \",\";\n i++;\n break;\n }\n }\n\n }\n temp = temp.Remove(temp.Length - 1);\n int[] indexes = Array.ConvertAll(temp.Split(','), int.Parse);\n\n if (indexes.Length != 5)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n Console.WriteLine(checkedIfSorted(indexes, indexes.Length) ? \"YES\" : \"NO\");\n\n }\n\n\n\n }\n\n\n public static bool checkedIfSorted(int[] arr, int length)\n {\n\n\n if (length == 0 || length == 1)\n {\n return true;\n }\n\n if (arr[length - 2] > arr[length - 1])\n {\n\n return false;\n }\n\n return checkedIfSorted(arr, length - 1);\n\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "202157551f8cf1b0f39d351e154352e5", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "afffbcf08895c4c2db731bec7174085f", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9910540645663166, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Problem777A\n{\n class Program\n {\n static void Swap(ref bool a, ref bool b)\n {\n bool temp = a;\n a = b;\n b = temp;\n }\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int x = int.Parse(Console.ReadLine());\n bool[] shells0 = new bool[3];\n shells0[0] = true;\n bool[] shells1 = new bool[3];\n shells1[1] = true;\n for (int i = 0; i < n; i++)\n {\n if (i % 2 == 0)\n {\n Swap(ref shells0[0], ref shells0[1]);\n Swap(ref shells1[0], ref shells1[1]);\n }\n else\n {\n Swap(ref shells0[1], ref shells0[2]);\n Swap(ref shells1[1], ref shells1[2]);\n }\n }\n if (shells0[x] == true)\n Console.Write(0);\n else if (shells1[x] == true)\n Console.Write(1);\n else\n Console.Write(2);\n //Console.ReadLine();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "3bc87d1cb66c8ac095000a32347cbbe1", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "7dd006c1cbf878d9167a425f0d35bcff", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.4397905759162304, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication11\n{\n class Program\n {\n static void Main(string[] args)\n {\n Int64 move = new Int64();\n move = Convert.ToInt64(Console.ReadLine());\n int x = Convert.ToInt32(Console.ReadLine());\n int pose = x;\n \n while(move!=0)\n {\n if (move % 2 == 0)\n {\n if (pose == 2)\n pose = 1;\n else if (pose == 1)\n pose = 2;\n }\n else if (move % 2 == 1)\n {\n if (pose == 1)\n pose = 0;\n else if (pose == 0)\n pose = 1;\n }\n move--;\n }\n\n Console.WriteLine(pose);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "7f63e31205c4f0d1023923e38fced07b", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "e69db9037e52ea624a9d41bf61e8d378", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9995693367786391, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace CF\n{\n\tinternal class Program\n\t{\n\t\tprivate static void Main(string[] args)\n\t\t{\n\t\t\tvar sr = new InputReader(Console.In);\n\t\t\t//var sr = new InputReader(new StreamReader(\"input.txt\"));\n\t\t\tvar task = new Task();\n\t\t\tusing (var sw = Console.Out)\n\t\t\t{\n\t\t\t\t//using (var sw = new StreamWriter(\"output.txt\")) {\n\t\t\t\ttask.Solve(sr, sw);\n\t\t\t\t//Console.ReadKey();\n\t\t\t}\n\t\t}\n\t}\n\n\tinternal class Task\n\t{\n\t\tpublic void Solve(InputReader sr, TextWriter sw)\n\t\t{\n\t\t\tvar n = sr.NextInt32();\n\t\t\tvar x = sr.NextInt32();\n\t\t\tn = n % 6;\n\t\t\tfor (var i = 0; i < 2; i++) {\n\t\t\t\tvar curr = i;\n\t\t\t\tfor (var j = 1; j <= n; j++) {\n\t\t\t\t\tif (j % 2 == 1) {\n\t\t\t\t\t\tif (curr == 0)\n\t\t\t\t\t\t\tcurr = 1;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (curr == 1) {\n\t\t\t\t\t\t\t\tcurr = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (j % 2 == 0) {\n\t\t\t\t\t\tif (curr == 1)\n\t\t\t\t\t\t\tcurr = 2;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (curr == 2) {\n\t\t\t\t\t\t\t\tcurr = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (curr == x) {\n\t\t\t\t\tsw.WriteLine(i);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new InvalidOperationException();\n\t\t}\n\t}\n}\n\ninternal class InputReader : IDisposable\n{\n\tprivate bool isDispose;\n\tprivate readonly TextReader sr;\n\n\tpublic InputReader(TextReader stream)\n\t{\n\t\tsr = stream;\n\t}\n\n\tpublic void Dispose()\n\t{\n\t\tDispose(true);\n\t\tGC.SuppressFinalize(this);\n\t}\n\n\tpublic string NextString()\n\t{\n\t\tvar result = sr.ReadLine();\n\t\treturn result;\n\t}\n\n\tpublic int NextInt32()\n\t{\n\t\treturn Int32.Parse(NextString());\n\t}\n\n\tpublic long NextInt64()\n\t{\n\t\treturn Int64.Parse(NextString());\n\t}\n\n\tpublic string[] NextSplitStrings()\n\t{\n\t\treturn NextString()\n\t\t\t\t\t\t.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\t}\n\n\tpublic T[] ReadArray(Func func)\n\t{\n\t\treturn NextSplitStrings()\n\t\t\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t\t\t.ToArray();\n\t}\n\n\tpublic T[] ReadArrayFromString(Func func, string str)\n\t{\n\t\treturn\n\t\t\t\t\t\tstr.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)\n\t\t\t\t\t\t\t\t\t\t.Select(s => func(s, CultureInfo.InvariantCulture))\n\t\t\t\t\t\t\t\t\t\t.ToArray();\n\t}\n\n\tprotected void Dispose(bool dispose)\n\t{\n\t\tif (!isDispose)\n\t\t{\n\t\t\tif (dispose)\n\t\t\t\tsr.Close();\n\t\t\tisDispose = true;\n\t\t}\n\t}\n\n\t~InputReader()\n\t{\n\t\tDispose(false);\n\t}\n}", "lang": "MS C#", "bug_code_uid": "c1c31e0aa3827140621a44d00958023e", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "9509c3faf7419e9b1684434353b0e042", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9966159052453468, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace ConsoleApplication3\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte [] p = {0,0,0};\n\n int n = int.Parse(Console.ReadLine());\n\n p[int.Parse(Console.ReadLine())] = 1;\n\n byte tmp;\n\n for(int i = n; i >= 1; i--)\n {\n tmp = p[0 + (1 - i % 2)];\n p[0 + (1 - i % 2)] = p[1 + (1 - i % 2)];\n p[1 + (1 - i % 2)] = tmp;\n }\n\n Console.WriteLine(p[0] == 1 ? 0 : (p[1] == 1 ? 1 : 2));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "223e2a2fcc0934b1de970dcbcb1b16d3", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "6da713e072af8d083d502770a85bdafe", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.38155619596541784, "equal_cnt": 4, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _777a\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n\n int x = int.Parse(Console.ReadLine());\n\n int result = x;\n \n for(int i = n; i > 0; i--)\n {\n if (i % 2 == 0)\n {\n if (result == 2)\n {\n result = 1;\n }\n else if (result == 1)\n {\n result = 2;\n }\n }\n else\n {\n if (result == 1)\n {\n result = 0;\n }\n else if (result == 0)\n {\n result = 1;\n }\n }\n }\n \n Console.WriteLine(result);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "90d2703c15d73cc1c4481fea8e7864d8", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "ad28c5f19c52f020bf24944dc2ea214d", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8039638087031452, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1.Combynatorycs\n{\n class _776\n {\n static void Main(String[] args)\n {\n var n = int.Parse(Console.ReadLine());\n var x = int.Parse(Console.ReadLine());\n for(var i = n; i >= 1; i--)\n {\n if (i % 2 == 0)\n {\n if (x == 2)\n {\n x = 1;\n } else if (x == 1)\n {\n x = 2;\n }\n } else\n {\n if (x == 0)\n {\n x = 1;\n } else if (x == 1)\n {\n x = 0;\n }\n }\n }\n Console.WriteLine(x);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c273a9e02017c515e44d3bd880cb2434", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "0ba9eab25bde2db6fbae4d98fea2a2a8", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.48466257668711654, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication3\n{\n\n\n class Program\n {\n static void Main(string[] args)\n {\n // String text = Console.ReadLine();\n //String[] nums = text.Split();\n int count = Convert.ToInt32(Console.ReadLine());\n int index =Convert.ToInt32(Console.ReadLine());\n int[] myArray = new int[3];\n myArray[0] =0 ;\n myArray[1] =1;\n myArray[2] = 2;\n int sum = 0;\n for (int i = 0; i < count; i++)\n {\n \n if ( i % 2 == 0)\n {\n sum = myArray[0] + myArray[1];\n myArray[0] = sum - myArray[0];\n myArray[1] = sum - myArray[0]; \n\n }\n else if ( i % 2 != 0)\n {\n sum = myArray[1] + myArray[2];\n myArray[1] = sum - myArray[1];\n myArray[2] = sum - myArray[1];\n }\n \n }\n Console.WriteLine(myArray[index]);\n \n \n }\n\n }\n\n }", "lang": "MS C#", "bug_code_uid": "9fab6af8aae856cdb22757708fe604f9", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "3b3794f906b736228cdd328760f423d3", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.40081135902636916, "equal_cnt": 9, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Shell_Game\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int moves = int.Parse(Console.ReadLine());\n\n int lastind= int.Parse(Console.ReadLine());\n\n\n int[] arr = new int[3];\n\n arr[0] = 0;\n arr[1] = 1;\n arr[2] = 2;\n\n for(int i=1;i<=moves;i++)\n {\n\n if(i % 2!=0)\n {\n //kkk\n int temp = arr[0];\n arr[0] = arr[1];\n arr[1] = temp;\n\n }\n else\n {\n\n int temp = arr[1];\n arr[1] = arr[2];\n arr[2] = temp;\n }\n\n\n }\n\n Console.WriteLine(arr[lastind]);\n // Console.ReadLine();\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "97b9842953105338f38a8aa4f7f0b7da", "src_uid": "7853e03d520cd71571a6079cdfc4c4b0", "apr_id": "f10259bc70e7426423f734e618e6f8ec", "difficulty": 1000, "tags": ["math", "constructive algorithms", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9568627450980393, "equal_cnt": 11, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 8, "fix_ops_cnt": 11, "bug_source_code": "using System;\nnamespace codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int count = int.Parse(Console.ReadLine());\n string rez = \"\";\n while (count > 0)\n while (count != 0)\n {\n int a = (int)Math.Log(count,2);\n int ch = (int)Math.Pow(2, a);\n count -= ch;\n rez += ch + \" \" ;\n }\n Console.WriteLine(rez);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "c42f7c5d15636643411bc84bac3ff9c3", "src_uid": "757cd804aba01dc4bc108cb0722f68dc", "apr_id": "7052774be8874ef2cd5085fa381fa13b", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9155261915998112, "equal_cnt": 9, "replace_cnt": 2, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _58A.Chat_room\n{\n class Program\n {\n static void Main(string[] args)\n {\n char[] typed = Console.ReadLine().ToCharArray();\n char[] hello = \"hello\".ToCharArray();\n if (anlz(typed, hello))\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n\n }\n static bool anlz(char[]t ,char[]h)\n {\n int k = 0;\n for (int i = 0; i < h.Length; i++)\n {\n for (int j = k; j < t.Length; j++)\n {\n if (h[i] == t[j])\n {\n k = j + 1;\n break;\n }\n else if (j + 1 >= t.Length && h[k] != t[i])\n return false;\n }\n \n }\n return true;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "aed4b3d6ad20d7f6e8f4143a8ea3a08a", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "1ebbd268c5bd8c918d32d6b4ddd91cd0", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.3969571230982019, "equal_cnt": 20, "replace_cnt": 12, "delete_cnt": 7, "insert_cnt": 1, "fix_ops_cnt": 20, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Free_Cash_237A\n{\n class Program\n {\n static void Main(string[] args)\n {\n var num = int.Parse(Console.ReadLine());\n int max=1;\n int currentCount = 1;\n string previous = \"abc\";\n for (int i = 0; i < num; i++)\n {\n var current = Console.ReadLine();\n if (current.Equals(previous))\n {\n currentCount++;\n max = Math.Max(max, currentCount);\n }\n else\n {\n currentCount = 1;\n previous = current;\n }\n }\n Console.WriteLine(max);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "75bdc59b746876cf335bed0893a8da1f", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "e57084649018bff226e799c6271269af", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9547325102880658, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace HELLO\n{\n class Program\n {\n static void Main(string[] args)\n {\n string need = \"hello\";\n string str1 = Console.ReadLine();\n int k = 0;\n foreach (char a in str1)\n {\n if (a == need[k])\n k++;\n }\n if (k == 5)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "65601625a80024eb88f37b330cea7518", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "e4d1fe8cdf3f74ce28f976499347cf2c", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.0019342359767891683, "equal_cnt": 1, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "hlelo\n", "lang": "MS C#", "bug_code_uid": "c8969a1fdfdc41332d65aab257fdcbb0", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "74c773cecbdfd1c1e99fea521bd8b8de", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.956, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System; using System.Linq;\n\nclass P { \n static void Main() {\n var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();\n var a = s[0]; var b = s[1]; var c = s[2];\n var res = c * (a+b-1) + b - 1;\n Console.Write(res);\n }\n}", "lang": "MS C#", "bug_code_uid": "eddbbed612c0c21e0ed547b1be5d2bd9", "src_uid": "8ab25ed4955d978fe20f6872cb94b0da", "apr_id": "6a99805d79b0d71e867dcbbed08c6aa4", "difficulty": 1200, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7354596622889306, "equal_cnt": 9, "replace_cnt": 2, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.IO;\n\nnamespace PracticeForDummies\n{\n class Program\n {\n static void Main(string[] args)\n {\n int weight = int.Parse(Console.ReadLine());\n for ( int i=1; i<=weight; i++)\n {\n if ((weight % i == 0) \n Console.WriteLine(\"YES\");\n else \n Console.WriteLine(\"NO\");\n \n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "5e6bd951dc3b4c75d4dcca3218a37034", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4983692baaf85b0bbd7bc3387dcbe723", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.5665024630541872, "equal_cnt": 12, "replace_cnt": 10, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\n namespace Dcoder\n {\n \tpublic class Program\n \t{\n \t\tpublic static void Main(string[] args\n \t\t\t{\n \t\t\tint A;\n \t\t\tA=int.Parse(Console.ReadLine());\n \t\t\tif(A%2==0)\n \t\t\t{\n \t\t\t\tConsole.WriteLine(\"YES\");\n \t\t\t}\n \t\t\telse if(A<=2)\n \t\t\t{\n \t\t\t\tConsole.WriteLine(\"NO\");\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tConsole.WriteLine(\"NO\");\n \t\t\t}\n \t\t\tConsole.ReadKey(true);\n \t\t}\n \t} \n }", "lang": "Mono C#", "bug_code_uid": "438203d4aef59713da188d2087391606", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ea92875a47c17e262188397e44429c70", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6893617021276596, "equal_cnt": 9, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "class Program\n {\n static void Main(string[] args)\n {\n int n = Console.Read();\n if (n % 2 == 0)\n {\n if ((n / 2) % 2 == 0)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n else\n Console.WriteLine(\"NO\");\n }\n }", "lang": "Mono C#", "bug_code_uid": "c9ce753f10e930733d0ce01dc830bc79", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0504919a8d3486bcbc14abb9c94823ef", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8523076923076923, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 3, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing Syusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\n//namespace A.Арбуз\n//{\n class Program\n {\n static void Main()\n {\n int w = int.Parse(Console.ReadLine());\n\n if (w == 2 || w == 1)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n\n if (w % 2 != 0)\n {\n Console.WriteLine(\"NO\");\n }\n\n else\n {\n if ((w / 2) % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n }\n }\n }\n//}\n", "lang": "Mono C#", "bug_code_uid": "e905b94f804b89e702510aea1018a1fa", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "f8e765b1285536eaf596271797290b80", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9832214765100671, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "namespace ConsoleApp2\n{\n class Program\n {\n static void Main(string[] args)\n {\n int x = int.Parse(Console.ReadLine());\n if (x <= 100 & x >= 1)\n {\n if (x % 2 == 0 & x!=2)\n {\n \n Console.WriteLine(\"yes\");\n \n }\n else\n {\n Console.WriteLine(\"no\");\n }\n }\n else\n {\n Console.WriteLine(\"no\");\n }\n \n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d6e3060b49755a541ecee1f61249d609", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "732d96bfae724b900a26fbd38d1ee9d7", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9375, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Numerics;\n \nclass Startup\n{\n static void Main()\n {\n int total = int.Parse(Console.ReadLine());\n if(total == 2) {\n Console.WriteLine(\"NO\");\n break; \n }\n Console.WriteLine(total % 2 == 0 ? \"YES\" : \"NO\" );\n } \n\n \n}", "lang": "Mono C#", "bug_code_uid": "e9df45ea2b4af9f3db2d8d643a2ebd7a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "673776f0a977445fbbd76a1a5011582b", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8844221105527639, "equal_cnt": 8, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\npublic class Program \n{\n\tpublic static void Main(string[] args) \n\t{\n\t\tvar input = int.Parse(System.IO.File.ReadAllText(args[1]));\n\t\tConsole.Writeline(input % 2 == 0 ? \"YES\" : \"NO\");\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "30fad20ca71e616c3984d4447dd1f698", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d8baed0a7058964e5702780b3bf68eb4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8894472361809045, "equal_cnt": 7, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\n\npublic class Program \n{\n\tpublic static void Main(string[] args) \n\t{\n\t\tvar input = int.Parse(System.IO.File.ReadAllText(args[1]));\n\t\tConsole.WriteLine(input % 2 == 0 ? \"YES\" : \"NO\");\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "1e069cb1028d633af79dc2b0fadca730", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d8baed0a7058964e5702780b3bf68eb4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9294403892944039, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\n Console.WriteLine(\"Enter weight: \");\n string input = Console.ReadLine();\n int number;\n\t\tint half;\n Int32.TryParse(input, out number);\n\t\tif (number <= 2 )\n\t\t{\n\t\t Console.WriteLine (\"NO\");\n\t\t}\n\n\t\t else if(number % 2 == 0 )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t Console.WriteLine (\"YES\");\n\t\t\t }\n\n\t\t\t\n\t\t\t\telse\n\t\t Console.WriteLine (\"NO\");\n\n\t\t}\t\n\t\t\n\t\t}\n}", "lang": "Mono C#", "bug_code_uid": "be666999a78b5b7fcea4df98e4cc8270", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e3e6f57442ea2311ecccf70eaab7511c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9948263118994827, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\npublic class Test\n{\n\tpublic static void Main()\n\t{\n\t\tstring s=Console.ReadLine();\n\t\tstring[] values=s.Split(' ');\n\t\tint a=int.Parse(values[0]);\n\t\tint b=int.Parse(values[1]);\n\t\tstring str=Console.ReadLine();\n\t\tstring lower=str.ToLower();\n\t\tint l=lower.Length;\n\t\tchar[] array=new char[l];\n\t\tfor(int i=0;i(array);\n\t\tint count=1;\n\t\tbool joy=false;\n\t\tfor(int j=1;jb)\n\t\t \t{\n\t\t \t joy=false;\t\n\t\t \t}\n\t\t }\n\t\t}\n\t\tif(joy==false)\n\t\t{\n\t\t\tConsole.WriteLine(\"NO\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tConsole.WriteLine(\"YES\");\n\t\t}\n\t\t\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "bc427779f64d1fa4bbec464f7e2b5848", "src_uid": "ceb3807aaffef60bcdbcc9a17a1391be", "apr_id": "6e26dec79d11618a768f20983ae1d3ce", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9849409849409849, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\nnamespace Program\n{\n\tpublic class MainMethod\n\t{\n\t\tpublic static void Main(string[] args)\n\t\t{\n\t\t\tbruteForce();\n\t\t}\n\n\t\tprivate static void bruteForce()\n\t\t{\n\t\t\tvar input = Console.ReadLine().Split(' ');\n\t\t\tvar ballons = int.Parse(input[0]);\n\t\t\tif (ballons == 0)\n\t\t\t\tConsole.WriteLine(\"YES\");\n\t\t\tvar friends = int.Parse(input[1]);\n\t\t\tvar colors = Console.ReadLine();\n\t\t\tstring[] eachFriendBallon = new string[friends];\n\t\t\tvar friendIndex = 0;\n\t\t\tvar lastAllocation = 0;\n\t\t\tfor (var i = 0; i < ballons; i++)\n\t\t\t{\n\t\t\t\tif (friendIndex >= friends)\n\t\t\t\t\tfriendIndex = 0;\n\t\t\t\t\n\t\t\t\tif (eachFriendBallon[friendIndex] == null)\n\t\t\t\t\teachFriendBallon[friendIndex] = \"\";\n\t\t\t\t\n\t\t\t\tif(lastAllocation>friends)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tif (eachFriendBallon[friendIndex].IndexOf(colors[i]) == -1)\n\t\t\t\t{\n\t\t\t\t\teachFriendBallon[friendIndex] += colors[i];\n\t\t\t\t\tlastAllocation = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ti--;\n\t\t\t\t\tlastAllocation++;\n\t\t\t\t}\n\n\t\t\t\tfriendIndex++;\n\t\t\t}\n\n\t\t\tvar uniqueAllocated = 0;\n\t\t\tfor (var j = 0; j < friends; j++)\n\t\t\t{\n\t\t\t\tuniqueAllocated += eachFriendBallon[j].Length;\n\t\t\t}\n\n\t\t\tif (uniqueAllocated == ballons)\n\t\t\t{\n\t\t\t\tConsole.WriteLine(\"YES\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tConsole.WriteLine(\"NO\");\n\t\t\t}\n\t\t}\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "0fc17b947e03c9939435849b8f34c776", "src_uid": "ceb3807aaffef60bcdbcc9a17a1391be", "apr_id": "9c9871fac4d30d00afa1feca4dec20f0", "difficulty": 900, "tags": ["brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.980528511821975, "equal_cnt": 11, "replace_cnt": 9, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace codeforces_charp\n{\n class Program\n {\n static void Main(string[] args)\n {\n Int64 n, c1, c2;\n string s1 = Console.ReadLine();\n string[] s2 = new string[10];\n s2 = s1.Split(' ');\n n = Convert.ToInt64(s2[0]);\n c1 = Convert.ToInt64(s2[1]);\n c2 = Convert.ToInt64(s2[2]);\n\n //Console.WriteLine(Convert.ToSingle(c2));\n string s3 = Console.ReadLine();\n\n int i = 0;\n Int64 cnt = 0;\n Int64 ans = 1000000000;\n ans *= ans;\n while (i < n) {\n if (s3[i] == '1'){\n cnt++;\n }\n ++i;\n }\n i = 1;\n while (i <= cnt)\n {\n Int64 res = i * c1;\n Int64 ost = n - i;\n Int64 exist = ost / i;\n Int64 big = ost % i;\n Int64 small = i - big;\n res += c2 * (small * exist * exist + big * (exist + 1) * (exist + 1));\n if (ans > res)\n {\n ans = res;\n }\n //ans = min(ans, res);\n ++i;\n }\n Console.WriteLine(Convert.ToSingle(ans));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ac6693d578b24b0bf22b67c610f9cee8", "src_uid": "78d013b01497053b8e321fe7b6ce3760", "apr_id": "cb6d85ba84e3bb075688665c25dc457f", "difficulty": 2100, "tags": ["ternary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9689887640449438, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\nnamespace Rextester\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n int n = Convert.ToInt32(Console.ReadLine());\n int esPrimo = 0; \n int menor=n-1; \n int div=1;\n int result=n;\n int div1=1; \n \n for(int i=1;i= 1; i--)\n {\n if (n % a == 0)\n {\n Console.WriteLine(\"{0} {1}\", a, n / a);\n break;\n }\n }\n\n /*\n List list = new List();\n list.Add(\"giorga\");\n list.Add(\"akela\");\n Console.WriteLine(\"{0} {1}\", list[0], list[1]);\n var orderedList = list.OrderBy(name => name[0]);\n foreach (var name in orderedList)\n {\n Console.Write(name);\n Console.Write(\" \");\n }\n\n Console.ReadLine();\n\n \n // server\n //IPHostEntry hostInfo = Dns.GetHostEntry(IP_ADDRESS);\n IPAddress ip = Dns.Resolve(IP_ADDRESS).AddressList[0];\n TcpListener server = new TcpListener(ip, PORT);\n Console.WriteLine(server.LocalEndpoint);\n server.Start();\n TcpClient client = server.AcceptTcpClient();\n NetworkStream stream = client.GetStream();\n byte[] received = new byte[100000];\n stream.Read(received, 0, client.ReceiveBufferSize);\n string messageFromClient = Encoding.ASCII.GetString(received);\n Console.WriteLine(messageFromClient);\n byte[] sent = Encoding.ASCII.GetBytes(\"es mivige bliad: \" + messageFromClient);\n stream.Write(sent, 0, client.SendBufferSize);\n stream.Flush();\n */\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "10b069fddcb1351752e08cf3d6fb6522", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "d5f2a62242bc796cdefa1ad4b1984c7c", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9880743062456999, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\npublic class Source\n{\n public void Program()\n {\n\n }\n void Read()\n {\n int n = ri();\n writeLine(1 + \" \" + n);\n }\n\n #region hide it\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n //reader = new StreamReader(Console.OpenStandardInput());\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"input.txt\");\n //writer = new StreamWriter(\"output.txt\");\n#endif\n var source = new Source();\n source.Read();\n source.Program();\n\n /* try\n {\n new Source().Program();\n }\n catch (Exception ex)\n {\n #if DEBUG\n Console.WriteLine(ex);\n #else\n throw;\n #endif\n }*/\n reader.Close();\n writer.Close();\n }\n\n\n #endregion\n\n #region Read / Write\n private static Queue currentLineTokens = new Queue();\n private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\\t', }, StringSplitOptions.RemoveEmptyEntries); }\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n public static int ri() { return int.Parse(ReadToken()); }\n public static char ReadChar() { return char.Parse(ReadToken()); }\n public static long ReadLong() { return long.Parse(ReadToken()); }\n public static ulong ReaduLong() { return ulong.Parse(ReadToken()); }\n public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }\n public static int[] ReadIntArray() { return ReadAndSplitLine().Select(i => int.Parse(i)).ToArray(); }\n public static char[] ReadCharArray() { return ReadAndSplitLine().Select(i => char.Parse(i)).ToArray(); }\n public static char[] SplitToChar() { string s = ReadToken(); char[] r = new char[s.Length]; for (int i = 0; i < s.Length; i++) r[i] = s[i]; return r; }\n public static byte[] SplitToByte() { string s = ReadToken(); byte[] r = new byte[s.Length]; for (int i = 0; i < s.Length; i++) r[i] = (byte)s[i]; return r; }\n public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }\n public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }\n public static char[][] ReadCharMatrix(int numberOfRows) { char[][] matrix = new char[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadCharArray(); return matrix; }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }\n return ret;\n }\n public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }\n public static void write(T value) { writer.Write(value); }\n public static void writeLine(T value) { writer.WriteLine(value); }\n public static void writeArray(T[] array, string split) { for (int i = 0; i < array.Length; i++) { write(array[i] + split); } }\n public static void writeMatrix(T[][] matrix, string split) { for (int i = 0; i < matrix.Length; i++) { writeArray(matrix[i], split); writer.Write(\"\\n\"); } }\n private class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n private static T[] Init(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }\n #endregion\n\n #region Methods\n #region DSU\n public void MakeSet(int[] poi)\n {\n for (int i = 0; i < poi.Length; i++)\n {\n poi[i] = i;\n }\n }\n public int Find(int x, int[] poi)\n {\n if (poi[x] == x) return x;\n return poi[x] = Find(poi[x], poi);\n }\n Random rand = new Random();\n public void Unite(int x, int y, int[] poi)\n {\n y = Find(y, poi);\n x = Find(x, poi);\n if (rand.Next() % 2 == 0)\n Swap(ref x, ref y);\n poi[x] = y;\n }\n #endregion\n\n class Deque\n {\n T[] array;\n int start, length;\n public Deque()\n {\n start = 0; length = 0; array = new T[1];\n }\n public T this[int index] { get { return array[(start + index) % array.Length]; } set { array[(start + index) % array.Length] = value; } }\n int last { get { return (start + length) % array.Length; } }\n /// \n /// сÑâ€Ã\n /// \n public T PeekFirst()\n {\n return array[start];\n }\n public int Count { get { return length; } }\n /// \n /// конецбез удаления\n /// \n public T PeekLsat()\n {\n return array[last];\n }\n public T PopLast()\n {\n if (length == 0)\n throw new IndexOutOfRangeException(\"OutOfRange\");\n length--;\n return array[last];\n }\n public T PopFirst()\n {\n if (length == 0)\n throw new IndexOutOfRangeException(\"OutOfRange\");\n length--;\n if (start >= array.Length - 1) start = 0; else start++;\n return array[start - 1 < 0 ? array.Length - 1 : start - 1];\n }\n public void AddFirst(T value)\n {\n IncreaseAndInspection();\n if (start <= 0) start = array.Length - 1; else start--;\n array[start] = value;\n length++;\n }\n public void AddLast(T value)\n {\n IncreaseAndInspection();\n array[last] = value;\n length++;\n }\n bool overflow { get { return length == array.Length; } }\n void IncreaseAndInspection()\n {\n if (overflow)\n increase();\n\n }\n void increase()\n {\n T[] array2 = new T[array.Length * 2];\n for (int i = 0; i < array.Length; i++)\n {\n int pos = (start + i) % array.Length;\n array2[i] = array[pos];\n }\n array = array2;\n start = 0;\n array2 = null;\n }\n public void Clear()\n {\n start = 0; length = 0; array = new T[1];\n }\n }\n class Heap\n {\n Comparison ic;\n List storage = new List();\n public Heap(Comparison ic)\n {\n this.ic = ic;\n }\n public void Add(T element)\n {\n storage.Add(element);\n int pos = storage.Count - 1;\n while (pos != 0 && ic(storage[((int)(pos - 1) >> 1)], element) > 0)\n {\n Swap(storage, pos, ((int)(pos - 1) / 2));\n pos = ((int)(pos - 1) / 2);\n }\n }\n public T Pop()\n {\n T t = storage[0];\n Swap(storage, 0, storage.Count - 1);\n int pos = 0;\n storage.RemoveAt(storage.Count - 1);\n if (Count > 0)\n while (true)\n {\n T my = storage[pos];\n if (pos * 2 + 1 >= Count)\n break;\n T left = storage[pos * 2 + 1];\n if (pos * 2 + 2 >= Count)\n {\n if (ic(left, my) < 0)\n {\n Swap(storage, pos, pos * 2 + 1);\n pos = pos * 2 + 1;\n }\n break;\n }\n T right = storage[pos * 2 + 2];\n if (ic(left, my) < 0 || ic(right, my) < 0)\n {\n if (ic(left, right) < 0)\n {\n Swap(storage, pos, pos * 2 + 1);\n pos = pos * 2 + 1;\n }\n else\n {\n\n Swap(storage, pos, pos * 2 + 2);\n pos = pos * 2 + 2;\n }\n }\n else break;\n }\n return t;\n }\n\n public void Clear()\n {\n storage.Clear();\n }\n /// \n /// без удаления\n /// \n /// \n public T Peek()\n {\n return storage[0];\n }\n public int Count\n {\n get { return storage.Count; }\n }\n //void RemoveLast, Size, peeklast, add\n }\n static void Swap(ref T lhs, ref T rhs)\n {\n T temp;\n temp = lhs;\n lhs = rhs;\n rhs = temp;\n }\n static void Swap(T[] a, int l, int r)\n {\n T temp;\n temp = a[l];\n a[l] = a[r];\n a[r] = temp;\n }\n static void Swap(List a, int l, int r)\n {\n T temp;\n temp = a[l];\n a[l] = a[r];\n a[r] = temp;\n }\n\n bool outregion(long y, long x, long n, long m)\n {\n if (x < 0 || x >= m || y < 0 || y >= n)\n return true;\n return false;\n }\n static void initlist(ref List[] list, int n)\n {\n list = new List[n];\n for (int i = 0; i < n; i++)\n list[i] = new List();\n }\n static void newarray(ref T[][] array, int n, int m)\n {\n array = new T[n][];\n for (int i = 0; i < n; i++)\n array[i] = new T[m];\n }\n static void newarray(ref T[] array, int n)\n {\n array = new T[n];\n }\n static void fill(T[] array, T value)\n {\n for (int i = 0; i < array.Length; i++)\n array[i] = value;\n }\n static void fill(T[][] array, T value)\n {\n for (int i = 0; i < array.Length; i++)\n for (int j = 0; j < array[i].Length; j++)\n array[i][j] = value;\n }\n public bool NextPermutation(T[] b, Comparison ic)\n {\n for (int j = b.Length - 2; j >= 0; j--)\n {\n if (ic(b[j], b[j + 1]) < 0)\n {\n for (int l = b.Length - 1; l >= 0; l--)\n {\n if (ic(b[l], b[j]) > 0)\n {\n Swap(b, j, l);\n Array.Reverse(b, j + 1, b.Length - (j + 1));\n return true;\n }\n }\n }\n }\n return false;\n }\n int[,] step8 = new int[,]\n {\n {-1,0 },\n {1,0 },\n {0,-1 },\n {0,1 },\n {1,1 },\n {-1,1 },\n {-1,-1 },\n {1,-1 },\n };\n int[,] step4 = new int[,]\n {\n {-1,0 },\n {1,0 },\n {0,-1 },\n {0,1 },\n };\n struct Vector2\n {\n public double x;\n public double y;\n public Vector2(double x, double y)\n {\n this.x = x;\n this.y = y;\n }\n public double Dist(Vector2 to)\n {\n return Math.Sqrt(Math.Abs(Math.Pow(to.x - x, 2)) + Math.Abs(Math.Pow(to.y - y, 2)));\n }\n public static bool operator ==(Vector2 left, Vector2 right) { return left.x == right.x && left.y == right.y; }\n public static bool operator !=(Vector2 left, Vector2 right) { return left.x != right.x || left.y != right.y; }\n }\n #endregion\n #endregion\n\n}\n", "lang": "MS C#", "bug_code_uid": "5f4a01d128e72b4e659a33f3b1613e0c", "src_uid": "f52af273954798a4ae38a1378bfbf77a", "apr_id": "f8fb7e5c0fb72e88186d518450a7b57f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8853754940711462, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\n\nnamespace _262\n{\n class Program\n {\n static void Main(string[] args)\n {\n //Console.SetIn(new StreamReader(\"input.txt\"));\n\n solve_helvetic2019A1();\n //solve_262A();\n }\n\n\n public static void solve_helvetic2019A1()\n {\n long r = Convert.ToInt64(Console.ReadLine());\n\n bool found = false;\n long x = 0;\n long y = 0;\n long xLen = (int)Math.Sqrt(r);\n for (x = 1; x < xLen; x++)\n {\n long yLen = r <= 100000 ? r : r / (2000 * xLen);\n for (y = 1; y < yLen; y++)\n {\n long h = x * x + 2 * x * y + x + 1;\n if (h > r)\n {\n break;\n }\n \n if (r == h)\n {\n found = true;\n break;\n }\n }\n\n if (found)\n {\n break;\n }\n }\n\n if (found)\n {\n Console.Write(\"{0} {1}\", x, y);\n }\n else\n {\n Console.Write(\"NO\");\n }\n }\n\n public static void solve_262A()\n {\n string[] nm = Console.ReadLine().Split(' ');\n\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n\n int bought = n;\n int max = n;\n while (bought > 0)\n {\n bought = max % m == 0 ? (bought + m - 1) / m : bought / m;\n max += bought;\n }\n Console.WriteLine(max);\n }\n\n /* \n1)4\n2)1 + (1 + 1) + (1 + 1)\n3)1 + (1 + 1 + 1)\n4)1\n\n1 1 \n\t \n2 3 \n \n3 7 \n \n4 14 \n\t\n5 25\n\n1)5\n2)1 + (1 + 1) + (1 + 1) + (1 + 1)\n3)1 + (1 + 1 + 1) + (1 + 1 + 1)\n4)1 + (1 + 1 + 1 + 1)\n5)1\n\n(0) + 1 => (1) + 2 => (1 + 3) + 3 => (3 + 7) + 4 => (7 + 14) + 5\n */\n public static void solve_164B()\n {\n int n = Convert.ToInt32(Console.ReadLine());\n\n int total = 0;\n int prev = 0;\n int prevPrev = 0;\n for (int i = 1; i <= n; i++)\n {\n total = prevPrev + prev + i;\n\n prevPrev = prev;\n prev = total;\n }\n\n Console.WriteLine(total);\n }\n\n\n /*\n Внимание: в данной задаче если крот нажал на кнопку q и было смещение вправо.\n То есть надо восстановить, сместив букву влево, то у нас будет исключение.\n Потомучто в строке keyboard q это первая буква строки. И левее нее у нас ничего нет.\n НО! По условию у нас нигде не сказано, что если крот нажал на самую левую клавишу, то\n мы должны восстановить сообщение взяв самую правую букву. Циклический сдвиг замкнутость.\n То есть такой кейс не рассматривается.\n\n Для ускорения алгоритма, можно избавиться от встроенной проверки символа IndexOf и запихать\n все буквы в словарь. Где буквы будут ключами, а их значение индексом в строке.\n */\n public static void solve_271A()\n {\n string direction = Console.ReadLine();\n string text = Console.ReadLine();\n\n string keyboard = \"qwertyuiopasdfghjkl;zxcvbnm,./\";\n\n string answer = String.Empty;\n if (direction == \"R\")\n {\n for (int i = 0; i < text.Length; i++)\n {\n answer += keyboard[keyboard.IndexOf(text[i]) - 1];\n }\n }\n else\n {\n for (int i = 0; i < text.Length; i++)\n {\n answer += keyboard[keyboard.IndexOf(text[i]) + 1];\n }\n }\n\n Console.WriteLine(answer);\n }\n\n /*\n Данный алгоритм можно еще улучшить, если избавиться от встроенной провекри на символ\n String.Contains.\n и использовать встроенную структуру данных dictionary с проверокой значения за хотя бы\n log(n)\n */\n public static void solve_368A()\n {\n string[] nm = Console.ReadLine().Split(' ');\n\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n\n int count = 0;\n string noir = \"WBG\";\n for (int i = 0; i < n; i++)\n {\n string[] row = Console.ReadLine().Split(' ');\n\n for (int j = 0; j < m; j++)\n {\n if (noir.Contains(row[j]))\n {\n count++;\n }\n }\n }\n\n string answer = (count == n * m) ? \"#Black&White\" : \"#Color\";\n\n Console.WriteLine(answer); \n }\n\n public static void solve_90A()\n {\n string[] abn = Console.ReadLine().Split(' ');\n\n int a = Convert.ToInt32(abn[0]);\n int b = Convert.ToInt32(abn[1]);\n int n = Convert.ToInt32(abn[2]);\n \n int count = 1;\n while (n > 0)\n {\n if (count % 2 == 0)\n {\n n -= gcd(n, b);\n }\n else \n {\n n -= gcd(n, a);\n }\n \n count++;\n }\n\n int answer = (--count % 2 == 0) ? 1 : 0;\n\n Console.WriteLine(answer);\n }\n\n public static int gcd(int a, int b)\n {\n if (b == 0)\n {\n return a;\n }\n\n return gcd(b, a % b);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "977427d9422f1d4a3aaec151c6e193ab", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "068a1a3a0c9c18ced3ce8954d592d52e", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8855774348057477, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\n\nnamespace _262\n{\n class Program\n {\n static void Main(string[] args)\n {\n //Console.SetIn(new StreamReader(\"input.txt\"));\n\n solve_helvetic2019A1();\n //solve_262A();\n }\n\n\n public static void solve_helvetic2019A1()\n {\n long r = Convert.ToInt64(Console.ReadLine());\n\n bool found = false;\n long x = 0;\n long y = 0;\n long xLen = (int)Math.Sqrt(r);\n for (x = 1; x < xLen; x++)\n {\n long yLen = r <= 100000 ? r : r / (2 * xLen);\n for (y = 1; y < yLen; y++)\n {\n long h = x * x + 2 * x * y + x + 1;\n if (h > r)\n {\n break;\n }\n \n if (r == h)\n {\n found = true;\n break;\n }\n }\n\n if (found)\n {\n break;\n }\n }\n\n if (found)\n {\n Console.Write(\"{0} {1}\", x, y);\n }\n else\n {\n Console.Write(\"NO\");\n }\n }\n\n public static void solve_262A()\n {\n string[] nm = Console.ReadLine().Split(' ');\n\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n\n int bought = n;\n int max = n;\n while (bought > 0)\n {\n bought = max % m == 0 ? (bought + m - 1) / m : bought / m;\n max += bought;\n }\n Console.WriteLine(max);\n }\n\n /* \n1)4\n2)1 + (1 + 1) + (1 + 1)\n3)1 + (1 + 1 + 1)\n4)1\n\n1 1 \n\t \n2 3 \n \n3 7 \n \n4 14 \n\t\n5 25\n\n1)5\n2)1 + (1 + 1) + (1 + 1) + (1 + 1)\n3)1 + (1 + 1 + 1) + (1 + 1 + 1)\n4)1 + (1 + 1 + 1 + 1)\n5)1\n\n(0) + 1 => (1) + 2 => (1 + 3) + 3 => (3 + 7) + 4 => (7 + 14) + 5\n */\n public static void solve_164B()\n {\n int n = Convert.ToInt32(Console.ReadLine());\n\n int total = 0;\n int prev = 0;\n int prevPrev = 0;\n for (int i = 1; i <= n; i++)\n {\n total = prevPrev + prev + i;\n\n prevPrev = prev;\n prev = total;\n }\n\n Console.WriteLine(total);\n }\n\n\n /*\n Внимание: в данной задаче если крот нажал на кнопку q и было смещение вправо.\n То есть надо восстановить, сместив букву влево, то у нас будет исключение.\n Потомучто в строке keyboard q это первая буква строки. И левее нее у нас ничего нет.\n НО! По условию у нас нигде не сказано, что если крот нажал на самую левую клавишу, то\n мы должны восстановить сообщение взяв самую правую букву. Циклический сдвиг замкнутость.\n То есть такой кейс не рассматривается.\n\n Для ускорения алгоритма, можно избавиться от встроенной проверки символа IndexOf и запихать\n все буквы в словарь. Где буквы будут ключами, а их значение индексом в строке.\n */\n public static void solve_271A()\n {\n string direction = Console.ReadLine();\n string text = Console.ReadLine();\n\n string keyboard = \"qwertyuiopasdfghjkl;zxcvbnm,./\";\n\n string answer = String.Empty;\n if (direction == \"R\")\n {\n for (int i = 0; i < text.Length; i++)\n {\n answer += keyboard[keyboard.IndexOf(text[i]) - 1];\n }\n }\n else\n {\n for (int i = 0; i < text.Length; i++)\n {\n answer += keyboard[keyboard.IndexOf(text[i]) + 1];\n }\n }\n\n Console.WriteLine(answer);\n }\n\n /*\n Данный алгоритм можно еще улучшить, если избавиться от встроенной провекри на символ\n String.Contains.\n и использовать встроенную структуру данных dictionary с проверокой значения за хотя бы\n log(n)\n */\n public static void solve_368A()\n {\n string[] nm = Console.ReadLine().Split(' ');\n\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n\n int count = 0;\n string noir = \"WBG\";\n for (int i = 0; i < n; i++)\n {\n string[] row = Console.ReadLine().Split(' ');\n\n for (int j = 0; j < m; j++)\n {\n if (noir.Contains(row[j]))\n {\n count++;\n }\n }\n }\n\n string answer = (count == n * m) ? \"#Black&White\" : \"#Color\";\n\n Console.WriteLine(answer); \n }\n\n public static void solve_90A()\n {\n string[] abn = Console.ReadLine().Split(' ');\n\n int a = Convert.ToInt32(abn[0]);\n int b = Convert.ToInt32(abn[1]);\n int n = Convert.ToInt32(abn[2]);\n \n int count = 1;\n while (n > 0)\n {\n if (count % 2 == 0)\n {\n n -= gcd(n, b);\n }\n else \n {\n n -= gcd(n, a);\n }\n \n count++;\n }\n\n int answer = (--count % 2 == 0) ? 1 : 0;\n\n Console.WriteLine(answer);\n }\n\n public static int gcd(int a, int b)\n {\n if (b == 0)\n {\n return a;\n }\n\n return gcd(b, a % b);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b32e8885e12cea20f4d012bfe4f8dfa5", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "068a1a3a0c9c18ced3ce8954d592d52e", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8853082009576652, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\n\nnamespace _262\n{\n class Program\n {\n static void Main(string[] args)\n {\n //Console.SetIn(new StreamReader(\"input.txt\"));\n\n solve_helvetic2019A1();\n //solve_262A();\n }\n\n\n public static void solve_helvetic2019A1()\n {\n long r = Convert.ToInt64(Console.ReadLine());\n\n bool found = false;\n long x = 0;\n long y = 0;\n long xLen = (int)Math.Sqrt(r);\n for (x = 1; x < xLen; x++)\n {\n long yLen = r <= 100000 ? r : r / (2 * y * xLen);\n for (y = 1; y < yLen; y++)\n {\n long h = x * x + 2 * x * y + x + 1;\n if (h > r)\n {\n break;\n }\n \n if (r == h)\n {\n found = true;\n break;\n }\n }\n\n if (found)\n {\n break;\n }\n }\n\n if (found)\n {\n Console.Write(\"{0} {1}\", x, y);\n }\n else\n {\n Console.Write(\"NO\");\n }\n }\n\n public static void solve_262A()\n {\n string[] nm = Console.ReadLine().Split(' ');\n\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n\n int bought = n;\n int max = n;\n while (bought > 0)\n {\n bought = max % m == 0 ? (bought + m - 1) / m : bought / m;\n max += bought;\n }\n Console.WriteLine(max);\n }\n\n /* \n1)4\n2)1 + (1 + 1) + (1 + 1)\n3)1 + (1 + 1 + 1)\n4)1\n\n1 1 \n\t \n2 3 \n \n3 7 \n \n4 14 \n\t\n5 25\n\n1)5\n2)1 + (1 + 1) + (1 + 1) + (1 + 1)\n3)1 + (1 + 1 + 1) + (1 + 1 + 1)\n4)1 + (1 + 1 + 1 + 1)\n5)1\n\n(0) + 1 => (1) + 2 => (1 + 3) + 3 => (3 + 7) + 4 => (7 + 14) + 5\n */\n public static void solve_164B()\n {\n int n = Convert.ToInt32(Console.ReadLine());\n\n int total = 0;\n int prev = 0;\n int prevPrev = 0;\n for (int i = 1; i <= n; i++)\n {\n total = prevPrev + prev + i;\n\n prevPrev = prev;\n prev = total;\n }\n\n Console.WriteLine(total);\n }\n\n\n /*\n Внимание: в данной задаче если крот нажал на кнопку q и было смещение вправо.\n То есть надо восстановить, сместив букву влево, то у нас будет исключение.\n Потомучто в строке keyboard q это первая буква строки. И левее нее у нас ничего нет.\n НО! По условию у нас нигде не сказано, что если крот нажал на самую левую клавишу, то\n мы должны восстановить сообщение взяв самую правую букву. Циклический сдвиг замкнутость.\n То есть такой кейс не рассматривается.\n\n Для ускорения алгоритма, можно избавиться от встроенной проверки символа IndexOf и запихать\n все буквы в словарь. Где буквы будут ключами, а их значение индексом в строке.\n */\n public static void solve_271A()\n {\n string direction = Console.ReadLine();\n string text = Console.ReadLine();\n\n string keyboard = \"qwertyuiopasdfghjkl;zxcvbnm,./\";\n\n string answer = String.Empty;\n if (direction == \"R\")\n {\n for (int i = 0; i < text.Length; i++)\n {\n answer += keyboard[keyboard.IndexOf(text[i]) - 1];\n }\n }\n else\n {\n for (int i = 0; i < text.Length; i++)\n {\n answer += keyboard[keyboard.IndexOf(text[i]) + 1];\n }\n }\n\n Console.WriteLine(answer);\n }\n\n /*\n Данный алгоритм можно еще улучшить, если избавиться от встроенной провекри на символ\n String.Contains.\n и использовать встроенную структуру данных dictionary с проверокой значения за хотя бы\n log(n)\n */\n public static void solve_368A()\n {\n string[] nm = Console.ReadLine().Split(' ');\n\n int n = Convert.ToInt32(nm[0]);\n int m = Convert.ToInt32(nm[1]);\n\n int count = 0;\n string noir = \"WBG\";\n for (int i = 0; i < n; i++)\n {\n string[] row = Console.ReadLine().Split(' ');\n\n for (int j = 0; j < m; j++)\n {\n if (noir.Contains(row[j]))\n {\n count++;\n }\n }\n }\n\n string answer = (count == n * m) ? \"#Black&White\" : \"#Color\";\n\n Console.WriteLine(answer); \n }\n\n public static void solve_90A()\n {\n string[] abn = Console.ReadLine().Split(' ');\n\n int a = Convert.ToInt32(abn[0]);\n int b = Convert.ToInt32(abn[1]);\n int n = Convert.ToInt32(abn[2]);\n \n int count = 1;\n while (n > 0)\n {\n if (count % 2 == 0)\n {\n n -= gcd(n, b);\n }\n else \n {\n n -= gcd(n, a);\n }\n \n count++;\n }\n\n int answer = (--count % 2 == 0) ? 1 : 0;\n\n Console.WriteLine(answer);\n }\n\n public static int gcd(int a, int b)\n {\n if (b == 0)\n {\n return a;\n }\n\n return gcd(b, a % b);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "6a60d6d83e3952c4b35a843843a78548", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "068a1a3a0c9c18ced3ce8954d592d52e", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9987623762376238, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace HeidiLearnsHashingEasy\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input;\n long r;\n long x, y;\n\n while (true)\n {\n input = Console.ReadLine();\n\n if (string.IsNullOrEmpty(input)) break;\n\n r = long.Parse(input);\n\n if (r % 2 == 0)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n x = 1;\n y = (r - 3) / 2;\n\n if (y == 0)\n Console.WriteLine(\"NO\");\n else\n Console.WriteLine(\"{0} {1}\", x, y);\n }\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "6a436b35d9489d6c5182f711b57f31b4", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "apr_id": "3f589c0a9c45c05c0ee10fa320458eda", "difficulty": 1200, "tags": ["math", "brute force", "number theory"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7161904761904762, "equal_cnt": 16, "replace_cnt": 3, "delete_cnt": 10, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "using test;\n\nnamespace test\n{\n class Program\n {\n static void \n Main(string[] args)\n {\n int w;\n \n w = int.Parse(Console.ReadLine());\n\n if (w>1 && w<100)\n {\n if (w%2==0)\n {\n Console.WriteLine(\"Yes\");\n }\n else\n {\n Console.WriteLine(\"No\");\n }\n \n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "72b145a9e8adce77097c5e4c07eab946", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d2a3f37c0b1a0cf5a2f561f00583cbfa", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9864341085271318, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication3\n{\n class Program\n {\n static void Main(string[] args)\n {\n long massa;\n massa = Convert.ToInt62(Console.ReadLine());\n if (massa % 2 == 0)\n {\n Console.WriteLine(\"Yes\");\n }\n else\n {\n Console.WriteLine(\"No\");\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "e013b2c53b2e32e6891a16d790c7b312", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "40f3b224075a72406ff04760133abba5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6171328671328671, "equal_cnt": 21, "replace_cnt": 9, "delete_cnt": 2, "insert_cnt": 9, "fix_ops_cnt": 20, "bug_source_code": "using System;\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte watermelon = 1;\n Console.Write(\"What is the weight of the watermelon : \");\n watermelon = byte.Parse(Console.ReadLine());\n if (watermelon <= 100)\n {\n if (watermelon % 2 == 0)\n Console.WriteLine(\"Yes\");\n else\n Console.WriteLine(\"No\");\n }\n Console.ReadKey();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "0dc95a7cb75d302825be455835cfa503", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "e595643280d578f3768c79f175cbf3ce", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9761606022584692, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int n = int.Parse(Console.ReadLine());\n if ((n % 2 ==0) && (n/2)%2 == 0)) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "13d9e7b8a62af54c096d86c481f91c6a", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "df023ccde1f559b0d6cfdc08afa286a4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9976905311778291, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\npublic class Test\n{\n\tpublic static void Main()\n\t{\n\t\tint input = Int32.Parse(Console.ReadLine());\n\n\t\tif(input <= 2) || input % 2 != 0)\n\t\t\tConsole.WriteLine(\"NO\");\n\t\telse\n\t\t\tConsole.WriteLine(\"YES\");\n\t}\n}", "lang": "MS C#", "bug_code_uid": "358f452e6a17535a71c5afff6bfff606", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d0f42c01796be561dc3023ee14b98e0a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.5890052356020943, "equal_cnt": 17, "replace_cnt": 3, "delete_cnt": 9, "insert_cnt": 5, "fix_ops_cnt": 17, "bug_source_code": "\nnamespace AdhocProblems\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(\"Enter a watermelon weight:\");\n double w = Convert.ToDouble(Console.ReadLine()); //watermelon in kilograms\n if (w < 1 && w > 100)\n {\n Console.WriteLine(\"NO\");\n Console.ReadLine();\n }\n\n if (w <= 2)\n {\n Console.WriteLine(\"NO\");\n Console.ReadLine();\n }\n\n if (w <= 2)\n {\n Console.WriteLine(\"NO\");\n Console.ReadLine();\n }\n if (w % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n Console.ReadLine();\n }\n else\n {\n Console.WriteLine(\"NO\");\n Console.ReadLine();\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "195736b6a13eaef0812b224409a309cd", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b9cc3c15356d71edb6292e60e5bc6dca", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9945945945945946, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nclass Solution{\n\n\tstatic void Main(string [] args){\n\t\tin n = int.Parse(Console.ReadLine());\n\t\t\n\t\tif(n > 3 && n % 2 == 0)\n\t\t\tConsole.WriteLine(\"YES\");\n\t\telse\n\t\t\tConsole.WriteLine(\"NO\");\n\t}\n}\n\n", "lang": "MS C#", "bug_code_uid": "2deeffbcb3fc5334a62094805a6c0023", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "3e7d23efe564b1cdc8254ef1cccc1f87", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.42479018721755973, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace A_Hongcow_Learns_the_Cyclic_Shift\n{\n class Program\n {\n static void Main(string[] args)\n {\n string str = Console.ReadLine();\n String answer = new String(str.Distinct().ToArray());\n Console.WriteLine(answer.Length);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "62e6574ebf3546fa02ac23e436bef57e", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "78d56b96b1ffe4b47565af05d93749a4", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9963768115942029, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication6\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n\n string s2 = s.Last() + s.Remove(s.Length - 1, 1);\n int res = 0;\n\n while (s2 != s)\n {\n s2 = s2.Last() + s2.Remove(s.Length - 1, 1);\n res++;\n }\n Console.WriteLine(res);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "6a4776d18277182df7766559af767d58", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "0bc0367483b9429d06487cc0b148a497", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9464351680827484, "equal_cnt": 46, "replace_cnt": 22, "delete_cnt": 15, "insert_cnt": 8, "fix_ops_cnt": 45, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\n\nnamespace ReadWriteTemplate\n{\n public static class Solver\n {\n private static void SolveCase()\n {\n const long MOD = 998244353;\n\n int n = ReadInt();\n int k = ReadInt();\n long l = ReadInt();\n\n int N = 2 * n + 2;\n long[,,] a = new long[N, N, 2];\n long[,,] b = new long[N, N, 2];\n a[0, 0, 0] = 1;\n b[0, 0, 0] = 1;\n\n for (int i = 0; i < 2 * n + 1; i++)\n {\n for (int j = 0; j <= i; j++)\n {\n for (int e = 0; e < 2; e++)\n {\n if (e == 0)\n {\n if (j >= k)\n {\n a[i + 1, j, 1] += a[i, j, e];\n Fix(ref a[i + 1, j, 1], MOD);\n }\n b[i + 1, j, 1] += b[i, j, e];\n Fix(ref b[i + 1, j, 1], MOD);\n }\n if (j > 0)\n {\n a[i + 1, j - 1, e] = (a[i + 1, j - 1, e] + j * a[i, j, e]) % MOD;\n b[i + 1, j - 1, e] = (b[i + 1, j - 1, e] + j * b[i, j, e]) % MOD;\n }\n if (i + j - e <= 2 * n - 2)\n {\n a[i + 1, j + 1, e] += a[i, j, e];\n Fix(ref a[i + 1, j + 1, e], MOD);\n b[i + 1, j + 1, e] += b[i, j, e];\n Fix(ref b[i + 1, j + 1, e], MOD);\n }\n }\n }\n }\n\n long ans = a[2 * n + 1, 0, 1] * Inv(b[2 * n + 1, 0, 1], MOD) % MOD;\n ans = ans * l % MOD;\n\n Writer.WriteLine(ans);\n }\n\n public static void Fix(ref long x, long mod)\n {\n if (x >= mod)\n {\n x -= mod;\n }\n }\n\n public static long Inv(long a, long mod)\n {\n return BinPower(a, mod - 2, mod);\n }\n\n public static long BinPower(long a, long n, long mod)\n {\n long result = 1;\n\n while (n > 0)\n {\n if ((n & 1) != 0)\n {\n result = (result * a) % mod;\n }\n\n a = (a * a) % mod;\n n >>= 1;\n }\n\n return result;\n }\n\n public static void Solve()\n {\n#if DEBUG\n var sw = Stopwatch.StartNew();\n#endif\n\n SolveCase();\n\n /*int T = ReadInt();\n for (int i = 0; i < T; i++)\n {\n Writer.Write(\"Case #{0}: \", i + 1);\n SolveCase();\n }*/\n\n#if DEBUG\n sw.Stop();\n Console.WriteLine($\"{sw.ElapsedMilliseconds} ms\");\n#endif\n }\n\n public static void Main()\n {\n Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;\n\n#if DEBUG\n // Reader = Console.In; Writer = Console.Out;\n Reader = File.OpenText(\"input.txt\"); Writer = File.CreateText(\"output.txt\");\n#else\n Reader = Console.In; Writer = Console.Out;\n#endif\n\n // Solve();\n Thread thread = new Thread(Solve, 64 * 1024 * 1024);\n thread.CurrentCulture = CultureInfo.InvariantCulture;\n thread.Start();\n thread.Join();\n\n Reader.Close();\n Writer.Close();\n }\n\n public static IOrderedEnumerable OrderByWithShuffle(this IEnumerable source, Func keySelector)\n {\n return source.Shuffle().OrderBy(keySelector);\n }\n\n public static T[] Shuffle(this IEnumerable source)\n {\n T[] result = source.ToArray();\n Shuffle(result);\n return result;\n }\n\n private static void Shuffle(IList array)\n {\n Random rnd = new Random();\n for (int i = array.Count - 1; i >= 1; i--)\n {\n int k = rnd.Next(i + 1);\n T tmp = array[k];\n array[k] = array[i];\n array[i] = tmp;\n }\n }\n\n #region Read/Write\n\n private static TextReader Reader;\n\n private static TextWriter Writer;\n\n private static Queue CurrentLineTokens = new Queue();\n\n private static string[] ReadAndSplitLine()\n {\n return Reader.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public static string ReadToken()\n {\n while (CurrentLineTokens.Count == 0)\n CurrentLineTokens = new Queue(ReadAndSplitLine());\n return CurrentLineTokens.Dequeue();\n }\n\n public static string ReadLine()\n {\n return Reader.ReadLine();\n }\n\n public static int ReadInt()\n {\n return int.Parse(ReadToken());\n }\n\n public static long ReadLong()\n {\n return long.Parse(ReadToken());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(ReadToken(), CultureInfo.InvariantCulture);\n }\n\n public static int[] ReadIntArray()\n {\n return ReadAndSplitLine().Select(int.Parse).ToArray();\n }\n\n public static long[] ReadLongArray()\n {\n return ReadAndSplitLine().Select(long.Parse).ToArray();\n }\n\n public static double[] ReadDoubleArray()\n {\n return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();\n }\n\n public static int[][] ReadIntMatrix(int numberOfRows)\n {\n int[][] matrix = new int[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++)\n matrix[i] = ReadIntArray();\n return matrix;\n }\n\n public static string[] ReadLines(int quantity)\n {\n string[] lines = new string[quantity];\n for (int i = 0; i < quantity; i++)\n lines[i] = Reader.ReadLine().Trim();\n return lines;\n }\n\n public static void WriteArray(IEnumerable array)\n {\n Writer.WriteLine(string.Join(\" \", array));\n }\n\n #endregion\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "971e055bdbb04028d21c44d373b7fc7a", "src_uid": "c9e79e83928d5d034123ebc3b2f5e064", "apr_id": "54af8479f24beaf10fb1897b0a6ed0c8", "difficulty": 2600, "tags": ["dp", "math", "combinatorics", "probabilities"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.593521421107628, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Hongcow\n{\n class Program\n {\n static void Main(string[] args)\n {\n string word = Console.ReadLine();\n\n var count = word.Distinct().Count();\n\n Console.WriteLine(count);\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5dd9c139ab25d52dfd56da6977e31199", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "9c601cfd26149aed454f42b88656ee90", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9610983981693364, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Linq;\n\nclass ProblemSolving {\n\n public static void Main() {\n var str = Console.ReadLine();\n HashSet S = new HashSet();\n S.Add(str);\n int n = str.Length;\n for (int i = 0; i < n; i++) {\n str = str.Substring(1) + str[0];\n S.Add(str);\n }\n Console.WriteLine(S.Count);\n }\n}\n", "lang": "MS C#", "bug_code_uid": "996127e396ef05d2e21746e5030c13eb", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "ff2282f53e663b0b81bd42df412e379a", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6836483155299918, "equal_cnt": 5, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace _100853_Codeforce\n{\n class Program\n {\n\n\n static void Main(string[] args)\n {\n\n /*int[] arr2 = s1.Split(' ').\n Where(x => !string.IsNullOrWhiteSpace(x)).\n Select(x => int.Parse(x)).ToArray();*/\n\n string s = Console.ReadLine();\n\n int count = s.Select(char.ToLower).Distinct().Count(char.IsLetter);\n\n Console.WriteLine(count);\n\n // Console.ReadKey();\n\n\n\n\n }\n\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "53ab0cf0007c1e198b34350977886656", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "637650044d1201d14ce93a157a251893", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8383685800604229, "equal_cnt": 8, "replace_cnt": 5, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace _100853_Codeforce\n{\n class Program\n {\n\n\n static void Main(string[] args)\n {\n\n /*int[] arr2 = s1.Split(' ').\n Where(x => !string.IsNullOrWhiteSpace(x)).\n Select(x => int.Parse(x)).ToArray();*/\n\n string s = Console.ReadLine();\n\n s += s;\n string[] letters = new string[s.Length];\n for (int i = 0; i < s.Length; i++)\n {\n letters[i] = s.Substring(i, s.Length);\n }\n Console.WriteLine(letters.Distinct().Count());\n\n\n }\n\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "f13d567ba405989bb01d2720e7f5b4c1", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "637650044d1201d14ce93a157a251893", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7279102384291725, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace codeforces\n{\n class Program\n {\n static void Main(string[] args)\n {\n var input = Console.ReadLine();\n var result = solve(input);\n Console.WriteLine(result);\n Console.ReadLine();\n }\n static int solve(string input)\n {\n var inputArr = input.ToCharArray();\n return inputArr.Distinct().Count();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "13374b2a843cd8e8df82cc3e598293d3", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "ce00441f6fe4384a4810d4dd1b33ca77", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.43994263176765863, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n\n\n class Program\n {\n \n\n public int HongcowLearnsTheCyclicShift(string word)\n {\n int count = 0;\n int len = word.Length;\n string temp1 = \"\", temp2 = word;\n do\n {\n temp1 += temp2[len - 1];\n for (int i = 0; i < len - 1; ++i)\n {\n temp1 += temp2[i];\n }\n temp2 = temp1;\n temp1 = \"\";\n count++;\n }\n while(temp2 != word);\n \n return count;\n }\n\n static void Main(string[] args)\n {\n Program p = new Program();\n Console.WriteLine(p.HongcowLearnsTheCyclicShift(\"yzyz\"));\n /*int t = 0;\n t = int.Parse(Console.ReadLine());\n for (int i = 0; i < t; ++i) \n {\n string word = Console.ReadLine();\n Console.WriteLine(p.WayTooLongWords(word));\n }*/\n //Console.WriteLine(p.GetSpaces(\"am you mo el \",0));\n }\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d09b9ac78f95dfdc7d4ab9ba709ad1f7", "src_uid": "8909ac99ed4ab2ee4d681ec864c7831e", "apr_id": "e6eacea647173315b2881d03607344f5", "difficulty": 900, "tags": ["strings", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9436201780415431, "equal_cnt": 9, "replace_cnt": 2, "delete_cnt": 7, "insert_cnt": 0, "fix_ops_cnt": 9, "bug_source_code": "using System; using System.Linq; using System.Collections.Generic;\n\nclass P {\n static void Main() {\n var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();\n var res = GetPrices(s[0], s[1]).Last();\n Console.Write(res);\n }\n\n static IEnumerable GetPrices(long p, long d) {\n yield return p;\n var min = p - d;\n var mult = 10;\n while (true) {\n p -= (1 + p%mult) % mult;\n if (p < min) yield break;\n yield return p;\n mult *= 10;\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "4a2d60103ce264540ff15efe7c56aa03", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "775bf7f4de6e8a9611c0b9371db6d146", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9989909182643795, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System; using System.Linq; using System.Collections.Generic;\n\nclass P {\n static void Main() {\n var s = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();\n var res = GetPrices(s[0], s[1]).Last();\n Console.Write(res);\n }\n\n static IEnumerable GetPrices(long p, long d) {\n yield return p;\n var min = p - d;\n var mult = 10;\n while (true) {\n p -= (1 + p%mult) % mult;\n if (p < min) yield break;\n yield return p;\n mult *= 10;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "db26ac9496677c0ba7356aaf8576cb29", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "775bf7f4de6e8a9611c0b9371db6d146", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.4564586357039187, "equal_cnt": 21, "replace_cnt": 12, "delete_cnt": 1, "insert_cnt": 8, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace B.Special_Offer__Super_Price_999_Bourles_\n{\n class Program\n {\n static void Main(string[] args)\n {\n string inp = Console.ReadLine();\n \n\n\n long x = -1;\n int nines = 0;\n // Console.WriteLine(long.MaxValue);\n long p = long.Parse(inp.Split()[0]);\n long d = long.Parse(inp.Split()[1]);\n for (long i = p; i >= p-d ; i--)\n {///1000000000000000000 \n\n string tem = i.ToString();\n long ss = NumOfNines(tem);\n if (ss>x)\n {\n x = ss;\n inp = i.ToString();\n }\n if (tem.Length-x <5)\n {\n break;\n }\n }\n Console.WriteLine(inp);\n\n }\n static long NumOfNines(string s)\n {\n long x = 0;\n for (int i = s.Length-1 ; i >= 0 ; i--)\n {\n if (s[i]!='9')\n {\n break;\n }\n\n x++;\n\n }\n\n return x;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "221b97df15e73dcfd8f03320e8f0dab6", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "cc99a5bf92617e0ba681cbfaaf0a55f1", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4330862270776434, "equal_cnt": 23, "replace_cnt": 14, "delete_cnt": 1, "insert_cnt": 8, "fix_ops_cnt": 23, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace B.Special_Offer__Super_Price_999_Bourles_\n{\n class Program\n {\n static void Main(string[] args)\n {\n string inp = Console.ReadLine();\n long x = -1;\n int nines = 0;\n int p = int.Parse(inp.Split()[0]);\n int d = int.Parse(inp.Split()[1]);\n for (int i = p; i >= p-d ; i--)\n {\n\n string tem = i.ToString();\n long ss = NumOfNines(tem);\n if (ss>x)\n {\n x = ss;\n inp = i.ToString();\n }\n }\n Console.WriteLine(inp);\n\n }\n static long NumOfNines(string s)\n {\n long x = 0;\n for (int i = s.Length-1 ; i >= 0 ; i--)\n {\n if (s[i]!='9')\n {\n break;\n }\n x++;\n }\n\n return x;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "5446f7dfe6ea050f3c64305a30da81fe", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "cc99a5bf92617e0ba681cbfaaf0a55f1", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9972881355932204, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace B.Special_Offer__Super_Price_999_Bourles_\n{\n class Program\n {\n static void Main(string[] args)\n {\n string inp = Console.ReadLine();\n \n\n\n long x = -1;\n int nines = 0;\n // Console.WriteLine(long.MaxValue);\n long p = long.Parse(inp.Split()[0]);\n long gp=p;\n long d = long.Parse(inp.Split()[1]);\n int digits=d.ToString().Length;\n while (digits>0)\n {\n long rem=p%10;\n int xxx = nines;\n long xxxx = p;\n while (p % 10 != 9)\n {\n p--;\n }\n p=p/10;\n nines ++ ;\n long ptem=p;\n for (int i = 0; i < nines; i++)\n {\n ptem*=10;\n ptem+=9;\n }\n if (ptem < gp - d)\n {\n nines = xxx;\n p = xxxx;\n break;\n }\n\n digits--;\n\t \n }\n for (int i = 0; i < nines; i++)\n {\n p*=10;\n p+=9;\n }\n Console.WriteLine(p);\n\t \n \n }\n \n\n }\n \n }\n\n", "lang": "MS C#", "bug_code_uid": "6a57a3b9c5e543a96b7685cc3693416f", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "cc99a5bf92617e0ba681cbfaaf0a55f1", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.5990180032733224, "equal_cnt": 12, "replace_cnt": 5, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Z219B {\n class Program {\n static void Main(string[] args) {\n long start, diver;\n string[] buf = Console.ReadLine().Split();\n start = long.Parse(buf[0]);\n diver = long.Parse(buf[1]);\n\n long good = start;\n\n for (int i = 10; start - ((start % i) - 1) >= start - diver; i *= 10) {\n good = start - (start % i) - 1;\n }\n\n Console.WriteLine(good);\n // Console.ReadKey();\n \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "da13dfc7110b7be6b08f912d8c66218c", "src_uid": "c706cfcd4c37fbc1b1631aeeb2c02b6a", "apr_id": "486809170a19b4512130d2772380dbc6", "difficulty": 1400, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.039727582292849034, "equal_cnt": 17, "replace_cnt": 14, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 17, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26730.16\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp10\", \"ConsoleApp10\\ConsoleApp10.csproj\", \"{892D3637-102B-45A3-BCEA-60A9F01CE1C1}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{892D3637-102B-45A3-BCEA-60A9F01CE1C1}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {E31B0511-87CC-4B41-8654-8DF6F2D9E161}\n\tEndGlobalSection\nEndGlobal\n", "lang": "MS C#", "bug_code_uid": "4edff573e9202b4aa0799f0a5b931f8e", "src_uid": "ab8a2070ea758d118b3c09ee165d9517", "apr_id": "4b247df9f95170efc420f78fe8a83f9d", "difficulty": 800, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9988671306036575, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "/*\nThere are n integers a1, a2, ..., an. Each of those integers can be either 0 or 1. We are allowed to do exactly one move: We must choose two indices i and j (1 <= i <= j <= n) and flip all values ak for which their positions are in range [i, j] (that is i <= k <= j). Flip the value of x means to apply operation x = 1 - x.\n\nThe goal is - After exactly one move to obtain the maximum number of ones. \n\nInput:-\n\nThe first line of the input contains an integer n (1 <= n <= 10^6). In the second line of the input there are n integers: a1, a2, ..., an. It is guaranteed that each of those n values is either 0 or 1\n\nOutput:-\nPrint an integer - the maximal number of 1s that can be obtained after exactly one move.\n\nSample test(s)\ninput\n5\n1 0 0 1 0\noutput\n4\n\ninput\n4\n1 0 0 1\noutput\n4\n\nNote:-\nIn the first case, flip the segment from 2 to 5 (i=2, j=5). That flip changes the sequence, it becomes: [1 1 1 0 1]. So, it contains four ones. There is no way to make the whole sequence equal to [1 1 1 1 1].\n\nIn the second case, flipping only the second and the third element (i=2, j=3) will turn all numbers into 1.\n\n\nSource: http://codeforces.ru/problemset/problem/327/A\n*/\n\nusing System;\n\nnamespace FlippingGame327A\n{\n class Program\n {\n int kkMax(int a, int b)\n {\n return (a < b) ? b : a;\n }\n\n static void Main(string[] args)\n {\n string str = Console.ReadLine();\n int n = Convert.ToInt32(str);\n str = Console.ReadLine();\n string[] strArray = str.Split(' ');\n int[] input = new int[n + 3];\n int sum = 0;\n for (int i = 0; i < n; i++)\n {\n input[i] = Convert.ToInt32(strArray[i]);\n if (input[i] == 1)\n {\n sum++;\n }\n }\n\n // main logic\n // O(n) solution... it is a version of 'maximum subarray problem' which can be solved using Kadane's Algorithm\n int ans = (input[0] == 1) ? -1 : 1;\n int ends = ans;\n for (int i = 1; i < n; i++)\n {\n int temp = 1;\n if (input[i] == 1)\n {\n temp = -1;\n }\n\n ends = kkMax(temp, ends + temp);\n ans = kkMax(ans, ends);\n }\n Console.WriteLine(sum + ans);\n /*\n // O(n^2) solution\n int[,] res = new int[n, n];\n int ans = Int32.MinValue;\n for (int i = 0; i < n; i++)\n {\n int zeros = 0;\n for (int j = i; j < n; j++)\n {\n if (input[j] == 0)\n {\n zeros++;\n res[i, j] = zeros;\n }\n int temp = sum - (j - i + 1 - res[i, j]) + res[i, j];\n ans = (temp > ans) ? temp : ans;\n }\n }\n Console.WriteLine(ans);\n Console.ReadLine();\n */\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "2373a2f179d6b2c8b68cafe5a7fb0797", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "ddd61cdf897736d4eb33392ce5a7286c", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7819264069264069, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace CodeForces.Solutions.c318_188_2\n{\n\tpublic class Program1\n {\n public static long[] ReadLongs(int n)\n {\n var s = Console.ReadLine() + \" \";\n var result = new long[n];\n var i = 0;\n var acc = 0L;\n var i2 = 0;\n while (i < n)\n {\n if (s[i2] == ' ')\n {\n result[i++] = acc;\n i2++;\n acc = 0;\n }\n else\n acc = acc * 10 + (s[i2++] - '0');\n }\n return result;\n }\n\n public static void ReadLongs(out long l1, out long l2)\n {\n var ls = ReadLongs(2);\n l1 = ls[0];\n l2 = ls[1];\n }\n\n public static void ReadLongs(out long l1, out long l2, out long l3)\n {\n var ls = ReadLongs(3);\n l1 = ls[0];\n l2 = ls[1];\n l3 = ls[2];\n }\n\n public static void ReadLongs(out long l1, out long l2, out long l3, out long l4)\n {\n var ls = ReadLongs(4);\n l1 = ls[0];\n l2 = ls[1];\n l3 = ls[2];\n l4 = ls[3];\n }\n\n public static void Main()\n {\n\t checked\n\t {\n\n\t long n, k;\n\t ReadLongs(out n, out k);\n\t var f = (n + 1)/2;\n if (k <= f)\n {\n Console.Write(k*2 - 1);\n }\n else\n {\n k -= f;\n Console.Write(k*2);\n }\n\n\t }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "52b9c49d0eb3a0692b3cc408d045e387", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "081ddae41fd93c0608153ef125e532ef", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9993569131832798, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Practise_7\n{\n class Program\n {\n static void Main(string[] args)\n {\n string Input = Console.ReadLine();\n //string Input = \"pnnepelqomhhheollvlo\";\n IEnumerable AllowedChar = new[] { 'h', 'e', 'l', 'o', ' ' };\n string NewString = new String(Input.Select(x => !AllowedChar.Contains(x) ? ' ' : x).ToArray());\n int index = 0;\n for (var i = 0; i < NewString.Length; i++)\n {\n if (NewString[i] == \"hello\"[index])\n {\n index += 1;\n }\n }\n Console.WriteLine(index == 5 ? \"YES\" : \"NO\");\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "125626b4ed8223a300d12daa542de2a8", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "ab2c9af974be31669b36dde91a4b3255", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.905852417302799, "equal_cnt": 16, "replace_cnt": 1, "delete_cnt": 15, "insert_cnt": 0, "fix_ops_cnt": 16, "bug_source_code": " public class Program\n {\n private static void Main(string[] args)\n {\n var input = Console.ReadLine();\n\n var list = new List\n {\n 'h',\n 'e',\n 'l',\n 'l',\n 'o'\n };\n\n for (int i = 0; i < input.Length; i++)\n {\n if (list.Count >= 1 && input[i] == list[0])\n {\n list.RemoveAt(0);\n }\n }\n\n Console.WriteLine(list.Count == 0 ? \"YES\" : \"NO\");\n }\n }", "lang": "Mono C#", "bug_code_uid": "1ce309c4f3e1eb2693b03f4b3855ce8d", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "4e6dd9c338179eb01addeac6f0641794", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.3837837837837838, "equal_cnt": 16, "replace_cnt": 10, "delete_cnt": 4, "insert_cnt": 2, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Linq;\n\npublic class Program\n{\n private static void Main()\n {\n while (true)\n {\n var str = Console.ReadLine();\n if (\"hello\".All(c => str.Contains(c))\n && str.IndexOf(\"h\") < str.IndexOf(\"e\")\n && str.IndexOf(\"e\") < str.IndexOf(\"l\")\n && str.IndexOf(\"l\") < str.LastIndexOf(\"l\")\n && str.LastIndexOf(\"l\") < str.IndexOf(\"o\")) Console.WriteLine(\"YES\");\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "01d4688fe4cc49b49ce151fdab765060", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "5f6c25551984d7e5e7e084276d574fd5", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.4019081693500298, "equal_cnt": 21, "replace_cnt": 15, "delete_cnt": 5, "insert_cnt": 0, "fix_ops_cnt": 20, "bug_source_code": "using System;\nusing System.Linq;\n\npublic class Program\n{\n private static void Main()\n {//hlelo\n var str = new string(Console.ReadLine().Where(c => \"helo\".Contains(c)).ToArray());\n str = str.Remove(0, str.IndexOf('h'));\n if (str.IndexOf(\"h\") < str.IndexOf(\"e\") && str.All(c => \"helo\".Contains(c)) && str.Count(c => c == 'l') > 1)\n {\n str = str.Remove(0, str.IndexOf('e'));\n if (str.IndexOf(\"e\") < str.IndexOf(\"l\"))\n {\n str = str.Remove(0, str.IndexOf('l')+);\n if (str.IndexOf(\"l\") < str.IndexOf(\"o\"))\n {\n Console.WriteLine(\"YES\");\n return;\n }\n }\n }\n\n Console.WriteLine(\"NO\");\n }\n}", "lang": "Mono C#", "bug_code_uid": "c0d200af4d6f62468864582e8d0a851c", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "5f6c25551984d7e5e7e084276d574fd5", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9447236180904522, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace _58A\n{\n class Program\n {\n static void Main(string[] args)\n {\n List checkList = new List { };\n char[] cArr = new char[5];\n string hello = \"hello\";\n\n string input = Console.ReadLine();\n\n int j = 0;\n\n for (int i = 0; i < input.Length; i++)\n {\n if (input[i] == hello[j])\n {\n cArr[j] = input[i];\n j++;\n }\n\n }\n\n if (new string(cArr) == hello)\n {\n Console.Write(\"YES\");\n }\n\n else\n {\n Console.Write(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "13e686d7884d2442e896df4f076d9829", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "f712a0f9fe623338c18c5705eee2311d", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6120434353405726, "equal_cnt": 6, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace W0lf\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n int z = 0;\n for(int i = 0; i < s.Length; i++)\n {\n if(z == 0 && s[i] == 'h') z++;\n if(z == 1)\n {\n if(s[i] == 'e') z++;\n else if(s[i] != 'h') z = 0;\n }\n if(z == 2)\n {\n if(s[i] == 'l') z++;\n else if(s[i] != 'e') z = 0;\n }\n if(z == 3)\n {\n if(s[i] == 'l') z++;\n else z = 0;\n }\n if(z == 4)\n {\n if(s[i] == 'o')\n {\n Console.WriteLine(\"YES\");\n return;\n }\n else if(s[i] != 'l') z = 0;\n }\n }\n Console.WriteLine(\"NO\");\n Console.ReadLine();\n }\n }", "lang": "Mono C#", "bug_code_uid": "3481fe1faa871806d9bcb839e7dd436b", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "e49e4605bdcc62003b5c02d09ea41d63", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.954248366013072, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\n\nnamespace Codeforces__20_Aug\n{\n class Program\n {\n \n static void Main(string[] args)\n {\n String s = Console.ReadLine();\n\n Dictionary dict = new Dictionary();\n\n for (int i = 0; i < s.Length; i++)\n {\n if (!dict.ContainsKey(s[i]))\n {\n dict.Add(s[i], 1);\n \n }\n else\n {\n dict[s[i]] = dict[s[i]] + 1;\n }\n \n }\n //foreach (var item in dict)\n //{\n // Console.WriteLine(item);\n //}\n int flag = 0;\n if (dict.ContainsKey('h') && \n dict.ContainsKey('e') &&\n dict.ContainsKey('l') &&\n dict.ContainsKey('o') && dict['l'] >1 && s.Length > 5)\n {\n flag = 1;\n }\n else\n {\n flag = 0;\n }\n if (flag == 1)\n {\n string st = \"hello\";\n int j = 0;\n for (int i = 0; i < s.Length; i++)\n {\n if (!s[i].Equals(st[j]))\n {\n flag = 0;\n \n }\n else\n {\n j += 1;\n }\n }\n }\n\n if (flag == 1 )\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "4e665fb920cf46522b02ba98f3caeacc", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "d9f7718c11af022cc88ed3ed64574295", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9301634472511144, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace codeforces58A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input_string = Console.ReadLine();\n string hello = \"hello\";\n int hello_index = 0;\n\n for (int i = 0; i < input_string.Length; i++)\n {\n if (input_string[i] == hello[hello_index])\n hello_index += 1;\n\n }\n\n if (hello_index == 5){\n Console.WriteLine(\"YES\");\n }\n else{\n Console.WriteLine(\"NO\");\n }\n }\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "81fcda387bdebb2ce406d498dac4a5eb", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "7523561c38e5ec6fd0be13364d96bf0a", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9351230425055929, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace codeforces58A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input_string = Console.ReadLine();\n string hello = \"hello\";\n int hello_index = 0;\n\n for (int i = 0; i < input_string.Length; i++)\n {\n if (input_string[i] == hello[hello_index])\n hello_index += 1;\n\n }\n\n if (hello_index == 5){\n Console.WriteLine(\"YES\");\n }\n else{\n Console.WriteLine(\"NO\");\n }\n }\n\n }\n\n}\n", "lang": "Mono C#", "bug_code_uid": "7b338c090eef6a8354c2253851bab2d6", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "7523561c38e5ec6fd0be13364d96bf0a", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7272727272727273, "equal_cnt": 19, "replace_cnt": 11, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 18, "bug_source_code": "using System; \n\n class Exercise11 \n\n{ \n \n static void Main() \n \n {\n \n int n=Convert.ToInt32(Console.ReadLine()); \n int num=new int[n];\n \n for (int i = 0; i < n; i++) {\n num[i]=Convert.ToInt32(Console.ReadLine());\n }\n if (num[0] % 2 == 1 && num[n - 1] % 2 == 1 && n % 2 == 1) {\n Console.WriteLine(\"YES\");\n }\n else {\n Console.WriteLine(\"NO\");\n }\n }\n\n}", "lang": "Mono C#", "bug_code_uid": "088209b0cf16167da6b978b55b78dec7", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "bf8fcc6447bf25bbf2cf16abadeeb272", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7539267015706806, "equal_cnt": 19, "replace_cnt": 11, "delete_cnt": 5, "insert_cnt": 2, "fix_ops_cnt": 18, "bug_source_code": "using System; \n\n class Exercise11 \n\n{ \n \n static void Main() \n \n {\n \n int n=Convert.ToInt32(Console.ReadLine()); \n int[] num=new int[n];\n \n for (int i = 0; i < n; i++) {\n num[i]=Convert.ToInt32(Console.Read());\n }\n if (num[0] % 2 == 1 && num[n - 1] % 2 == 1 && n % 2 == 1) {\n Console.WriteLine(\"YES\");\n }\n else {\n Console.WriteLine(\"NO\");\n }\n }\n\n}", "lang": "Mono C#", "bug_code_uid": "e20b973d0218723f2403c5613c137f5a", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "bf8fcc6447bf25bbf2cf16abadeeb272", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7276422764227642, "equal_cnt": 21, "replace_cnt": 12, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 20, "bug_source_code": "using System; \n\n class Exercise11 \n\n{ \n \n static void Main() \n \n {\n \n int n=Convert.ToInt32(Console.ReadLine()); \n int[] num=new int[n];\n \n for (int i = 0; i < n; ++i) {\n num[i]=Convert.ToInt32(Console.ReadLine());\n }\n if (num[0] % 2 == 1 && num[n - 1] % 2 == 1 && (n % 2) == 1) {\n Console.WriteLine(\"YES\");\n }\n else {\n Console.WriteLine(\"NO\");\n }\n }\n \n \n }", "lang": "Mono C#", "bug_code_uid": "15c800f253a2a3c7c00aaca3312a4cbb", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "bf8fcc6447bf25bbf2cf16abadeeb272", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9853137516688919, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace CSharp\n{\n public class _849A\n {\n public static void Main()\n {\n int n = int.Parse(Console.ReadLine());\n int[] a = Console.ReadLine().Split().Select(token => int.Parse(token)).ToArray();\n\n Console.WriteLine((a.First() * a.Last()) % 2 == 1 ? \"Yes\" : \"No\");\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "db9f02ffcbbad00d842b1c7cee84d14a", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "5809370ee1c8ccae5d9fe61f613a94d7", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7955752212389381, "equal_cnt": 7, "replace_cnt": 1, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Contest1UnimodalArrayA00817810\n{\n class Program\n {\n static void Main(string[] args)\n {\n string stringInput = Console.ReadLine();\n int arrayLength = int.Parse(stringInput);\n\n stringInput = Console.ReadLine();\n string[] inputs = stringInput.Split(' ');\n int[] array = new int[arrayLength];\n for (int i = 0; i < arrayLength; i++)\n {\n array[i] = int.Parse(inputs[i]);\n }\n\n int numberOfOddSplits = 0;\n if (array[0] % 2 == 0 || array[arrayLength-1] % 2 == 0)\n {\n Console.WriteLine(\"No\");\n }\n else\n {\n for (int i = 1; i < arrayLength; i++)\n {\n if (array[i] % 2 != 0 && array[i - 1] % 2 != 0)\n {\n numberOfOddSplits++;\n }\n }\n if(numberOfOddSplits % 2 == 0)\n {\n Console.WriteLine(\"Yes\");\n }\n else\n {\n Console.WriteLine(\"No\");\n }\n }\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f189e7ad6fe9aae052ab700c9d88aa32", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "7deb8ba2bfde33595f20501381adb93d", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9964912280701754, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\n class Program\n {\n static void Main(string[] args)\n {\n int[] vls, dls;\n {\n string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\\t'}, StringSplitOptions.RemoveEmptyEntries);\n vls = new int[3] {int.Parse(input[0]), int.Parse(input[1]), int.Parse(input[2])};\n }\n dls = new int [3] { 1, 2, 3 };\n Array.Sort(vls, dls);\n int a = vls[0] + vls[1];\n if (a < vls[2] || (a + vls[2]) % 2 == 1) Console.WriteLine(\"Impossible\");\n else\n {\n a -= vls[2];\n a /= 2;\n vls[0] -= a;\n vls[1] -= a;\n if (dls[2] == 3)\n Console.WriteLine(dls[0] == 1 ? String.Format(\"{0} {1} {2}\", a, vls[1], vls[0]) : String.Format(\"{0} {1} {2}\", a, vls[0], vls[1]));\n else if (dls[2] == 2)\n Console.WriteLine(dls[0] == 1 ? String.Format(\"{0} {1} {2}\", vls[0], vls[1], a) : String.Format(\"{0} {1} {2}\", vls[1], vls[0], a));\n else\n Console.WriteLine(dls[0] == 2 ? String.Format(\"{0} {1} {2}\", vls[0], a, vls[1]) : String.Format(\"{0} {1} {2}\", vls[1], a, vls[0]));\n }\n }", "lang": "Mono C#", "bug_code_uid": "7272f368fb5100ad9245fbfcd0af4865", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "c31b50e00917cec8582123376a7e23ad", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.3699889665318132, "equal_cnt": 17, "replace_cnt": 15, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.Remoting.Messaging;\n\nnamespace CodeforcesTasks\n{\n internal class Program\n {\n public static void Main(string[] args)\n {\n var valences = Console.ReadLine().Split().Select(int.Parse).ToArray();\n var possibles = new List();\n CalculateConnections(new[] {0, 0, 0}, valences, possibles);\n var permutationFound = false;\n foreach (var permutation in possibles)\n {\n var isOk = true;\n for (int i = 0; i < valences.Length; i++)\n {\n if (permutation[i] + permutation[i - 1 < 0 ? permutation.Length - 1 : i - 1] != valences[i])\n {\n isOk = false;\n break;\n }\n }\n\n if (isOk)\n {\n Console.WriteLine(string.Join(\" \", permutation));\n permutationFound = true;\n break;\n }\n }\n\n if (!permutationFound)\n {\n Console.WriteLine(\"Impossible\");\n }\n }\n\n public static void CalculateConnections(int[] connections, IEnumerable valences, List possibles)\n {\n if (!valences.Any())\n {\n possibles.Add(connections);\n return;\n }\n var nextValence = valences.First();\n\n var currentAtom = 3 - valences.Count();\n for (int i = 0; i <= nextValence; i++)\n {\n var copyConnections = new int[3];\n connections.CopyTo(copyConnections, 0);\n copyConnections[currentAtom] = i;\n CalculateConnections(copyConnections, valences.Skip(1), possibles);\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "7fb5cc53d4f556dd34d793d9c3b90669", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "9209cf2aac46cf21447c8093c30db73f", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9102462271644162, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nclass test\n{\n static void Main()\n {\n bool check = false;\n string[] d = Console.ReadLine().Split();\n int d0 = int.Parse(d[0]);\n int d1 = int.Parse(d[1]);\n int d2 = int.Parse(d[2]);\n if ((d0 + d1 - d2) % 2 != 0) check = true;\n int a = (d0+d1-d2)/2;\n int b = d1 - a;\n int c = d2 - b;\n if (check) Console.Write(\"Impossible\");\n else if ((a == 0 || a == 1 || a == 2 || a == 3) && (b == 0 || b == 1 || b == 2 || b == 3) && (c ==0 || c == 1 || c == 2 || c == 3)) Console.Write(\"{0} {1} {2}\\n\", a, b, c);\n else { Console.Write(\"Impossible\"); }\n //Console.ReadLine();\n }\n\n}", "lang": "Mono C#", "bug_code_uid": "8f72b94b52745ec9c53ebb43b0a5b6a9", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "47e0a942be58980cf7cdf94b6566d015", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.952006294256491, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing static System.Linq.Enumerable;\nclass Solution {\n\n static void Main(string [] args) {\n var A = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n if (A.Sum() % 2 > 0) {\n Console.WriteLine(\"Impossible\");\n }\n else {\n int[] ans = {0, 0, 0};\n while (A.Sum() > 0) {\n int argMin = A.ToList().IndexOf(A.Min());\n int i = (argMin + 1) % 3, j = (i + 1) % 3;\n --A[i]; --A[j];\n ++ans[i];\n }\n for (int i = 0; i < 3; ++i) {\n Console.Write(ans[i].ToString() + \" \\n\"[i == 2 ? 1 : 0]);\n }\n }\n }\n};\n", "lang": "Mono C#", "bug_code_uid": "f62b7524a0a8bd1f8c08c59cd0f41199", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "830f8449132abadeb847a036a22c3f25", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.007905138339920948, "equal_cnt": 6, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 9.00\n# Visual C# Express 2005\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Contest\", \"Contest\\Contest.csproj\", \"{D52529B4-C89C-4B07-A089-373AD7796792}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{D52529B4-C89C-4B07-A089-373AD7796792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{D52529B4-C89C-4B07-A089-373AD7796792}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{D52529B4-C89C-4B07-A089-373AD7796792}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{D52529B4-C89C-4B07-A089-373AD7796792}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang": "Mono C#", "bug_code_uid": "20d3270552305d433611aebe1daf243e", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "242d02aad81d1da6302a819d9f91609a", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9980430528375733, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApp5\n{\n public class Program\n {\n static void Main()\n {\n var s = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n var res = Min(s[1] * s[2] / s[0], s[3] * s[4], s[5] / s[7]) / s[0];\n Console.WriteLine(res);\n }\n static int Min(int a, int b, int c)\n {\n return Math.Min(Math.Min(a, b), c);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "fb59e83d1d818f917caa811b2f55b57c", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "1332e232f8079a10c29a9296dfce7f5a", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9982316534040672, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace A.Газировкопитие\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] s = Console.ReadLine().Split(' ');\n int n = Convert.ToInt32(s[0]);\n int k = Convert.ToInt32(s[1]);\n int l = Convert.ToInt32(s[2]);\n int c = Convert.ToInt32(s[3]);\n int d = Convert.ToInt32(s[4]);\n int p = Convert.ToInt32(s[5]);\n int nl = Convert.ToInt32(s[6]);\n int np = Convert.ToInt32(s[7]);\n int gaz = (k * l) / nl;\n int lime = c * d;\n int salt = p / np;\n Tosti(gaz,lime,salt,n);\n }\n\n static void Tosti(int gaz, int lime, int salt, int chelov)\n {\n int min1=100;\n int[] min = new int[3];\n min[0] = gaz;\n min[1] = lime;\n min[2] = salt;\n for (int i = 0; i < 3; i++)\n if (min[i] < min1)\n min1 = min[i];\n Console.WriteLine(min1/chelov);\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "fe6d35642ef0430f8fda2aafb59c1961", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "ef261e2a4b19cd5d3dd9c6f97a9b9920", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8117595436594998, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace A.Газировкопитие\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] s = Console.ReadLine().Split(' ');\n int n = Convert.ToInt32(s[0]);\n int k = Convert.ToInt32(s[1]);\n int l = Convert.ToInt32(s[2]);\n int c = Convert.ToInt32(s[3]);\n int d = Convert.ToInt32(s[4]);\n int p = Convert.ToInt32(s[5]);\n int nl = Convert.ToInt32(s[6]);\n int np = Convert.ToInt32(s[7]);\n int gaz = (k * l) / nl;\n int lime = c * d;\n int salt = p / np;\n Tosti(gaz,lime,salt,n);\n }\n\n static void Tosti(int gaz, int lime, int salt, int chelov)\n {\n int min1=999;\n int[] min = new int[3];\n min[0]= gaz/chelov;\n min[1] = lime / chelov;\n min[2] = salt / chelov;\n for (int i = 0; i < 4; i++)\n if (min[i] < min1)\n min1 = min[i];\n Console.WriteLine(min1);\n }\n\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "44c38f98b699e4093b743bd36db388ea", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "ef261e2a4b19cd5d3dd9c6f97a9b9920", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.017699115044247787, "equal_cnt": 13, "replace_cnt": 11, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 14, "bug_source_code": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.29728.190\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"TestWaterMelonCodeForces\", \"TestWaterMelonCodeForces\\TestWaterMelonCodeForces.csproj\", \"{D17EDBBB-C72E-48B6-A6DD-230748852E77}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{D17EDBBB-C72E-48B6-A6DD-230748852E77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{D17EDBBB-C72E-48B6-A6DD-230748852E77}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{D17EDBBB-C72E-48B6-A6DD-230748852E77}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{D17EDBBB-C72E-48B6-A6DD-230748852E77}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {B9FE3301-E39D-4657-B34F-DBB3C6ACD0DB}\n\tEndGlobalSection\nEndGlobal\n", "lang": "Mono C#", "bug_code_uid": "3837488e37bdbfec5255d2a7f33ca476", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d325c056b874936ac81dd7142d6d7f92", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.3980016652789342, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 10, "bug_source_code": "namespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n List EvenNumbers = new List();\n for (int i = 1; i <= 100; i++)\n {\n if (i % 2 == 0)\n {\n EvenNumbers.Add(i);\n }\n }\n Console.WriteLine(\"please enter the weight of the watermelon : \");\n int w =Convert.ToInt32(Console.ReadLine());\n if (EvenNumbers.Contains(w/2))\n Console.WriteLine(\"Yes\");\n else\n Console.WriteLine(\"No\");\n\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "8a8a91a3ecc18d26e00c9dfb292e78a8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c526155d882c083afbaae980fe0bf079", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9138431752178122, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w = int.Parse(Console.ReadLine());\n while (w > 0)\n {\n if (w % 2 == 0 && w < 2) \n {\n Console.Write(\"YES\");\n }\n else\n Console.Write(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "1af1b9444eed39ad40dc3a7b8c0a85b9", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "438e1f73a0fcdf8dc5b6beb71e2a3d28", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8674351585014409, "equal_cnt": 11, "replace_cnt": 0, "delete_cnt": 6, "insert_cnt": 5, "fix_ops_cnt": 11, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\n \nclass Solution {\n\n static void Main(String[] args) {\n \n int userInput=Convert.ToInt32(Console.ReadLine());\n if (userInput<=100 && userInput>= 0){\n if (userInput%2 ==0){ \n Console.Write(\"YES\");\n } else {\n Console.Write(\"NO\");\n }\n }\n }\n", "lang": "Mono C#", "bug_code_uid": "5cb6349022a513ee0ef36309f01222e1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "99ac835046055dc62b36aa12bd834758", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.5406032482598608, "equal_cnt": 20, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 15, "fix_ops_cnt": 21, "bug_source_code": "Console.Write(\"enter the weight ArgumentOutOfRangeException the watermelon; \");\n int w = int.Parse(Console.ReadLine());\n if(w%2==0&&w>2)\n {\n Console.WriteLine(\"it can be divided\");\n }\n else\n {\n Console.WriteLine(\"no\");\n }", "lang": "Mono C#", "bug_code_uid": "15b5dd587c2f7eaa3fdadea9f60f6b4f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "739f1fd518a4f05d9f9dd88c25e6bbda", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.6721504112808461, "equal_cnt": 8, "replace_cnt": 3, "delete_cnt": 3, "insert_cnt": 3, "fix_ops_cnt": 9, "bug_source_code": "static void Main(string[] args)\n {\n int x = 8;\n bool even;\n if (x % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n \n }\n\n else {\n Console.WriteLine(\"NO\");\n }\n\n Console.ReadLine();\n }\n }\n}\n ", "lang": "Mono C#", "bug_code_uid": "3f897f9b6f3087174f89a446a0fd405e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8f88bf5c2791b8d22c5ec4dcdfe2c304", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7961904761904762, "equal_cnt": 6, "replace_cnt": 3, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\nclass A{\n static void Main(){\n int N = int.Parse(Console.ReadLine());\n string ans = \"No\";\n for (int i = 2; i < N/2; i+2){\n if (N / i % 2 == 0) ans = \"Yes\";\n }\n Console.WriteLine(ans);\n }\n}", "lang": "Mono C#", "bug_code_uid": "0298d6698fcf1fc36e86eab4e5e6b278", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "b2bc2b4f99198e66d7000701d37062d0", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9735744089012517, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System.Linq;\nusing System;\n\nnamespace cs\n{\n class Program\n {\n static void Main(string[] args)\n {\n double n = Convert.ToDouble(Console.ReadLine());\n if((n - 2.0) % 2.0) {\n Console.WriteLine(\"YES\");\n } else {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "5cb85044132371b4b1a68aea78838da1", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "4f7a35504081f7fdde93c0715f8c0c92", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9255490091055169, "equal_cnt": 13, "replace_cnt": 2, "delete_cnt": 12, "insert_cnt": 0, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A4_Watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n /*=================================================\n * first step : receive input\n * ==============================================*/\n int W = Convert.ToInt32(Console.ReadLine());\n /*==================================================\n * second step : ensure the Number is even and bigger than 2\n * ================================================*/\n int Remainder = W % 2;\n if (Remainder == 0 && W > 2)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n Console.ReadKey();\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "31e6c337f294e2fe4ad622517b8bdd9c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "2a3b7ed782d8afe83b22e949f27c3ab5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.2902912621359223, "equal_cnt": 18, "replace_cnt": 6, "delete_cnt": 5, "insert_cnt": 7, "fix_ops_cnt": 18, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace ConsoleApplication18\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int[] A = new int[n];\n\n String vvodCherezProbel = Console.ReadLine();\n char razdelitel = ' ';\n String[] podstroki = new String[n];\n podstroki = vvodCherezProbel.Split(razdelitel);\n\n\n for (int i = 0; i < podstroki.Length; i++)\n {\n A[i] = int.Parse(podstroki[i]);\n }\n\n int min = A[0];\n int sum = 0;\n\n for (int i = 0; i < n; i++)\n {\n sum = sum + A[i];\n \n if (min > A[i])\n {\n min = A[i];\n }\n }\n int sum1 = sum - min;\n \n\n \n Console.WriteLine(sum1);\n \n\n \n\n }\n }\n\n public class SomeMagic\n {\n \n \n\n public static void InputVector(int[] A)\n {\n \n \n \n\n }\n\n \n }\n}\n", "lang": "MS C#", "bug_code_uid": "c21eb34f4dcdf9393ee55125ebeed492", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "56cb9a46222ad6ce9d7bd1cb129841d5", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8373333333333334, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": " class Program\n {\n static void Main(string[] args)\n {\n bool can =canBeDividet(98);\n if (can) {\n Console.WriteLine(\"YES\");\n }\n else{\n Console.WriteLine(\"NO\");\n }\n Console.WriteLine(can);\n Console.ReadKey();\n }\n\n public static bool canBeDividet(int number) {\n bool flag = false;\n \n \n for (int i = 2; i < number; i +=2) {\n if (((number - i) % 2) == 0) {\n flag = true;\n break;\n }\n }\n\n return flag;\n }\n }", "lang": "MS C#", "bug_code_uid": "4f730daa44cabc46036bac72640b3d3c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "0ae618ab91e8da94304942fb20101865", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9769335142469471, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nnamespace HelloWorld\n{\n class Hello \n {\n static void Main() \n {\n int mass = Convert.ToInt32(Console.ReadLine());\n if (mass % 2 == 0)\n {\n Console.Writeline(\"YES\");\n }\n else\n {\n Console.Writeline(\"NO\");\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "f63ffd3fb39f60eb9d3d11d4362be1fa", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "8734e137a70f485a6f25e91dd75cf69f", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.44911690496215306, "equal_cnt": 16, "replace_cnt": 8, "delete_cnt": 4, "insert_cnt": 4, "fix_ops_cnt": 16, "bug_source_code": "//#define __debug\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace _TestData\n{\n public static class ListExtensions\n {\n public static string ToStringa(this IEnumerable l)\n {\n return l.Aggregate(\"\", (current, n) => current + (n.ToString() + \",\"));\n }\n }\n class Program\n {\n static void Main(string[] args)\n {\n#if __debug\n var n = Convert.ToInt32(\"3\");\n var numbers = \"1 2 3 4 5 7 2 1\".Split(' ').Select(nn => Convert.ToInt32(nn)).ToList();\n#else\n var n = Console.ReadLine();\n var numbers = Console.ReadLine().Split(' ').Select(nn => Convert.ToInt32(nn)).ToList();\n#endif\n Console.WriteLine(Check(numbers));\n }\n\n static string Check(List numbers)\n {\n //смотрим первую и последнюю цифру, если там четные, то не сможем\n if (numbers[0] % 2 == 0) return \"NO\";\n if (numbers[numbers.Count - 1] % 2 == 0) return \"NO\";\n\n //бьём на отрезки НЕ четной дилнны и считаем их кол-во\n int count = 0;\n int curLen = 0;\n int prI = -1;\n for (var index = 0; index < numbers.Count; index++)\n {\n int n = numbers[index];\n curLen++;\n\n bool nextOdd = false;\n if (index+1 < numbers.Count)\n {\n nextOdd = numbers[index + 1] != 0 && numbers[index + 1] % 2 == 0;\n }\n\n if (!nextOdd && n != 0 && n % 2 != 0 && curLen % 2 != 0)\n {\n#if __debug\n List l = new List();\n for (int i = prI +1; i <= index; i++)\n {\n l.Add(numbers[i]);\n }\n\n Console.WriteLine($\"выделили отрезок позиция={index} длинна={curLen} отрезков уже={count} отрезок={l.ToStringa()}\");\n#endif\n count++;\n curLen = 0;\n\n prI = index;\n }\n }\n\n#if __debug\n Console.WriteLine($\"последний отрезок длинна={curLen} отрезков уже={count}\");\n#endif\n if (curLen != 0 && curLen % 2 == 0) return \"NO\";\n if (count < 2) return \"NO\";\n if (count %2 == 0) return \"NO\";\n\n\n return \"YES\";\n }\n\n }\n}", "lang": "MS C#", "bug_code_uid": "b7577d9ae0b453c5b365d78045bc5f01", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "787717076b3cb8836ba72a125be46943", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9669369931378665, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\nnamespace odds\n{\n class Program\n {\n static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n byte[] array = new byte[n];\n string s = Console.ReadLine();\n bool flag = true;\n OddOrEven(array, s);\n foreach(var item in array){\n Console.WriteLine(item.ToString());\n }\n if (array.Length % 2 == 0) {\n flag = false;\n }\n else if (array[0] == 1 || array[array.Length - 1] == 1) {\n flag = false;\n }\n else {\n int i = 1; \n int j = 0;\n while (i < array.Length - 1){\n if (array[i] == 1 || array[i + 1] == 1){\n i += 2;\n }\n else{\n j++;\n i++;\n }\n }\n if (j % 2 == 0) flag = true;\n }\n if (flag){\n Console.WriteLine(\"YES\");\n } else{\n Console.WriteLine(\"NO\");\n }\n }\n private static void OddOrEven(byte[] array, string s)\n {\n int counter = 0;\n int i;\n foreach (string k in s.Split(' '))\n {\n i = int.Parse(k);\n if (i % 2 == 0)\n {\n array[counter] = 1;\n }\n else\n {\n array[counter] = 0;\n }\n counter++;\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c9d8837eed3b5471c912ca68c3ccba20", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "978490bbeb193c7ef1e18b6a4c59e553", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.580289193302892, "equal_cnt": 15, "replace_cnt": 7, "delete_cnt": 4, "insert_cnt": 3, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.IO;\nusing System.Text;\n\nnamespace Odds_and_Ends\n{\n internal class Program\n {\n private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);\n private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);\n\n private static void Main(string[] args)\n {\n int n = Next();\n\n var nn = new int[n];\n for (int i = 0; i < n; i++)\n {\n nn[i] = Next()%2;\n }\n\n if (nn[0] == 0)\n {\n writer.WriteLine(\"No\");\n writer.Flush();\n return;\n }\n\n int cross = 0;\n int g = 0;\n for (int i = 0; i < n; i++)\n {\n if (nn[i] == 0)\n {\n for (int j = i + 1; j < n; j++)\n {\n if (nn[j] == 1 && nn[j - 1] == 1)\n {\n g++;\n cross += j - i + 1;\n i = j;\n break;\n }\n }\n if (nn[i] == 0)\n {\n if (nn[n - 1] == 1)\n {\n g++;\n cross += n - i + 1;\n i = n;\n }\n else\n {\n writer.WriteLine(\"No\");\n writer.Flush();\n return;\n }\n }\n }\n }\n\n writer.WriteLine((n - cross + g)%2 == 0 ? \"No\" : \"Yes\");\n writer.Flush();\n }\n\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c < '0' || c > '9');\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res;\n res *= 10;\n res += c - '0';\n }\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "b7ef46506659d2fb8963864138e342c5", "src_uid": "2b8c2deb5d7e49e8e3ededabfd4427db", "apr_id": "2a7d4072bb7c8282e5e029dda916cdb7", "difficulty": 1000, "tags": ["implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9594124468496328, "equal_cnt": 16, "replace_cnt": 15, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 15, "bug_source_code": "using System;\nusing System.IO;\nusing System.Collections.Generic;\nusing System.Numerics;\n\nnamespace cf420\n{\n class Program\n {\n static void Main(string[] args)\n {\n //Console.SetIn(new StreamReader(\"input.txt\"));\n solve_cf420B();\n }\n\n public static void solve_cf420B()\n {\n int[] mb = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n\n int m = mb[0];\n int b = mb[1];\n\n List> xy = new List>();\n\n for (int x = 0; x < (m * b) + 1; x++)\n {\n int xm = x / m;\n if (x % m == 0)\n {\n xy.Add(new KeyValuePair(x, -xm + b));\n }\n }\n\n long max = -1;\n for (int i = 0; i < xy.Count; i++)\n {\n int l = Math.Min(xy[i].Key, xy[i].Value);\n int n = Math.Max(xy[i].Key, xy[i].Value);\n\n long sum = 0;\n\n for (int j = 0; j <= l; j++)\n {\n sum += ((n + 1) * (j + n + j)) / 2;\n }\n max = Math.Max(max, sum);\n }\n\n Console.WriteLine(max);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "41f061a6cd76d4fcec29d288fcf74c80", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "99f4b45d492d70a104244ee3c59a135d", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9465893178635727, "equal_cnt": 6, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Linq;\nusing System.IO;\nusing System.Collections.Generic;\n// Powered by caide (code generator, tester, and library code inliner)\n\nclass Solution {\n public void solve(TextReader input, TextWriter output) {\n\n var inp = input.ReadLine().Split(' ').Select(s => long.Parse(s)).ToArray();\n\n long m = inp[0];\n long b = inp[1];\n\n long A, B, C;\n A = 1;\n B = m;\n C = -b * m;\n\n var st = ex_gcd(A, B);\n\n var x = st.os * -C / st.gcd;\n var y = st.ot * -C / st.gcd;\n\n long max = long.MinValue;\n do\n {\n var bananas = sum(x, y);\n if (max < bananas)\n max = bananas;\n\n x += st.s;\n y += st.t;\n }\n while (x >= 0 && y >= 0);\n\n output.WriteLine(max);\n }\n\n long sum(long x, long y)\n {\n long s1 = (x / 2) * (x + 1);\n long ys = (x + 1) * y + s1;\n\n long res = ((s1 + ys) * (y + 1)) / 2;\n return res; \n }\n\n st ex_gcd(long a, long b)\n {\n long s = 0, t = 1, r = b;\n long old_s = 1, old_t = 0, old_r = a;\n while (r != 0)\n {\n var quotient = old_r / r;\n qq(quotient, ref old_r, ref r);\n qq(quotient, ref old_s, ref s);\n qq(quotient, ref old_t, ref t);\n }\n\n return new st\n {\n gcd = old_r,\n os = old_s,\n ot = old_t,\n s = s,\n t = t\n };\n }\n\n public void qq(long quotient, ref long p1, ref long p2)\n {\n long temp = p2;\n p2 = p1 - quotient * temp;\n p1 = temp;\n }\n\n struct st\n {\n public long s;\n public long t;\n public long ot;\n public long os;\n public long gcd;\n }\n}\n\nclass CaideConstants {\n public const string InputFile = null;\n public const string OutputFile = null;\n}\npublic class Program {\n public static void Main(string[] args) {\n Solution solution = new Solution();\n using (System.IO.TextReader input =\n CaideConstants.InputFile == null ? System.Console.In :\n new System.IO.StreamReader(CaideConstants.InputFile))\n using (System.IO.TextWriter output =\n CaideConstants.OutputFile == null ? System.Console.Out:\n new System.IO.StreamWriter(CaideConstants.OutputFile))\n\n solution.solve(input, output);\n }\n}\n\n", "lang": "Mono C#", "bug_code_uid": "d4649a76d24fac1e0f97e3075cdf5f5d", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "39f28df8605017678e52ab1df95a56e0", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.0057306590257879654, "equal_cnt": 1, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "bla", "lang": "Mono C#", "bug_code_uid": "27c8992c83cf40d003e946b6c3e694d9", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "c74e5791d86b4d91a8987c5221d4d996", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6501950585175552, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Text.RegularExpressions;\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\n\t\t\n\t\t string searchingWord= Console.ReadLine();\n\t\t string testingWord= Console.ReadLine();\n\t\tstring searchingRegex=\".*\"+searchingWord[0];\n\t\tforeach(char elm in searchingWord.Substring(1))\n\t\t{\n\t\t\tsearchingRegex+=\"[.^\"+elm+\"]*\"+elm;\n\t\t}\n\t\tsearchingRegex+=\".*\";\n\t\tRegex rgx = new Regex(searchingRegex);\n\t\tConsole.WriteLine(rgx.IsMatch(testingWord)?\"YES\":\"NO\");\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "969c5ee99ff9d2f3658a790882b0e091", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "02e9233f6a889d0305e0542d0ff88e77", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9190404797601199, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\nnamespace AChatRoom\n{\n class Program\n {\n static void Main(string[] args)\n {\n string word = \"hello\";\n int inx = 0;\n string VasyaText = Console.ReadLine();\n for (int i = 0; i < VasyaText.Length; i++)\n {\n if (VasyaText[i] == word[inx])\n {\n inx++;\n }\n }\n if (inx==5)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "efe4d36f893382e4cf35be86a42c3fc9", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "aa014409e00840c7367aa8390eb57270", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.11438585311454516, "equal_cnt": 46, "replace_cnt": 23, "delete_cnt": 3, "insert_cnt": 20, "fix_ops_cnt": 46, "bug_source_code": "using System;\nnamespace test{\n class Program{\n static void Main(string [] args){\n string text=Console.ReadLine();\n if(text.Length > 100 || text.Length < 1 ) return;\n \n char word =new char[]{'h','e','l','l','o'};\n int index=0,counter=0;\n foreach(char c in text.ToLower()){\n if(c == word[index]){\n index++;\n counter++;\n }\n }\n if(counter == word.Length) Console.WriteLine(\"YES\");\n else Console.WriteLine(\"NO\");\n \n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "0cb2ad0c1dd746fb6f3d32e257dc95dc", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "c039c3cab26584e15d03cb4993860d37", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9298484435974226, "equal_cnt": 22, "replace_cnt": 13, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 21, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\n\nnamespace Implemetation\n{\n class Program\n {\n static void Main(string[] args)\n {\n //string input = Console.ReadLine();\n //Console.WriteLine(Football(input));\n //int result=Petya_and_Strings(Console.ReadLine(), Console.ReadLine());\n //Console.WriteLine(result);\n //Helpful_Maths(Console.ReadLine());\n //Word_Capitalization(Console.ReadLine());\n //Taxi(int.Parse(Console.ReadLine()));\n //Console.WriteLine(Math.Ceiling((double)13/5));\n\n //Console.WriteLine(Regex.IsMatch(Console.ReadLine(), @\"[1-4]((\\s[1-4])+)?\"));\n\n string text = Console.ReadLine();\n if (text.Length > 100 || text.Length < 1) return;\n if (!Regex.IsMatch(text, @\"^[a-z]+$\")) return;\n\n string Result = \"\";\n char[] word = { 'h', 'e', 'l', 'l', 'o' };\n int position = 0;\n foreach (char c in text)\n {\n \n if (word[position] == c)\n {\n Result += word[position];\n position++; \n }\n else\n {\n if(Result != \"\")\n {\n var res=word.Select(car => car).Where(car => word.Contains(c));\n if (res == null) return;\n }\n }\n \n }\n\n //Console.WriteLine(Result.Contains(\"hello\")?\"YES\":\"NO\");\n Console.WriteLine(Result.Equals(\"hello\")?\"YES\":\"NO\");\n }\n static void Taxi(int input)\n {\n if (input < 1 || input > Math.Pow(10, 5)) return;\n string strnumbers = Console.ReadLine(); \n if (!Regex.IsMatch(strnumbers, @\"[1-4](\\s[1-4])+\")) return;\n\n\n int[] nums=strnumbers.Split(' ').Select(num=>int.Parse(num)).ToArray();\n if (nums.Length != input) return;\n\n Console.WriteLine(Math.Ceiling((double)nums.Sum() / 4));\n \n }\n static void Word_Capitalization(string input)\n {\n if (input.Length > Math.Pow(10, 3)) return;\n\n string result;\n\n if (input[0] >= 97)\n {\n char c = input[0];\n int cint = c - 32;\n char res = (char)cint;\n result = res + input.Substring(1, input.Length - 1);\n Console.WriteLine(result);\n }\n else\n {\n Console.WriteLine(input);\n }\n }\n static void Helpful_Maths(string input)\n {\n string pattern = @\"[1-3]{1,100}\\+?\";\n if (!Regex.IsMatch(input, pattern)) return;\n\n\n List numbers = input.Split('+').Select(item => int.Parse(item)).ToList();\n numbers.Sort();\n string Result = \"\";\n\n foreach (int i in numbers)\n Result += i + \"+\";\n\n Console.WriteLine(Result.Substring(0, Result.Length - 1));\n }\n static int Petya_and_Strings(params string[] inputs)\n {\n if (inputs[0].Length != inputs[1].Length) return -1;\n\n return inputs[0].ToLower().CompareTo(inputs[1].ToLower());\n }\n static string Football(string input)\n {\n //string Pattern = @\"^[0-1]{1,100}$\";\n if (!Regex.IsMatch(input, @\"^[0-1]{1,100}$\")) return \"NO\";\n\n return input.Contains(\"0000000\") || input.Contains(\"1111111\") ? \"YES\" : \"NO\";\n }\n static bool Match(string text)\n {\n return Regex.IsMatch(text, @\"^[0-1] [0-1] [0-1]$\", RegexOptions.Singleline);\n }\n static int Team(int Problems)\n {\n string temp;\n int count = 0;\n string[] t = { \"1 1 1\", \"1 1 0\", \"1 0 1\", \"0 1 1\" };\n for (int i = 0; i < Problems; i++)\n {\n temp = Console.ReadLine();\n if (!Match(temp)) return 0;\n if (t.Contains(temp))\n {\n count++;\n }\n }\n return count;\n }\n\n static int BitPlusPlus(int Operations)\n {\n\n int Result = 0;\n string temp;\n if (Operations >= 1 && Operations <= 150)\n {\n for (int i = 0; i < Operations; i++)\n {\n temp = Console.ReadLine();\n if (!Regex.IsMatch(temp, @\"^([\\+-]{2})?[a-zA-Z]([\\+-]{2})?$\")) return 0;\n\n int index = temp.IndexOfAny(new char[] { '-', '+' });\n if (index != -1 && index > 2)\n {\n if (temp[index] == '+')\n Result++;\n else\n Result--;\n }\n else if (index != -1 && index < 2)\n {\n if (temp[index] == '+')\n ++Result;\n else\n --Result;\n }\n\n }\n }\n return Result;\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "ab56cf950e8c6ca8c871b62607e04a2a", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "c039c3cab26584e15d03cb4993860d37", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.3686054660126139, "equal_cnt": 12, "replace_cnt": 7, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": "using System;\nclass Codeforce\n{ \n static void Main()\n { \n string s= Console.ReadLine();\n string ans=\"\";\n string hello=\"hello\";\n int i=0;\n int j;\n int check;\n int end=0;\n while (i=2)\n ans+=\"ll\";\n else\n ans+=s[i];\n \n i++;\n }\n \n \n for( i =0; i0)\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n }\n\n \n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "a297418492c9367a4708c8e53b5e2e93", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "674299ac4c9c86f4e11407bbec6e0982", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9890171782596452, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\n\nnamespace Codeforces\n{\n class Program : IDisposable\n {\n private static readonly TextReader textReader = new StreamReader(Console.OpenStandardInput());\n private static readonly TextWriter textWriter = new StreamWriter(Console.OpenStandardOutput());\n \n void Solve()\n {\n var n = ReadInt();\n var list = Console.ReadLine().Split(' ').Select(int.Parse).ToList();\n list.Sort();\n var sum = list[n-1];\n var prev = list[n-1];\n for (int i = n- 2; i >= 0; i--)\n {\n if (list[i] >= prev)\n list[i] = prev-1;\n if (list[i] > 0)\n {\n sum += list[i];\n prev = list[i];\n }\n else\n {\n break;\n }\n }\n Console.WriteLine(sum);\n // Console.ReadLine();\n }\n\n static void Main(string[] args)\n {\n var p = new Program();\n p.Solve();\n p.Dispose();\n }\n\n #region Helpers\n\n private static int ReadInt()\n {\n return int.Parse(textReader.ReadLine());\n }\n\n private static long ReadLong()\n {\n return long.Parse(textReader.ReadLine());\n }\n\n private static int[] ReadIntArray()\n {\n return textReader.ReadLine().Split(' ').Select(int.Parse).ToArray();\n }\n #endregion\n\n public void Dispose()\n {\n textReader.Close();\n textWriter.Close();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "ac2a00ea06c6b415dada4e9b523d32ec", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "7d594ec31ce5f035addf6f8a86dbc999", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9981447124304267, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\n\nnamespace Contest\n{\n class Program\n {\n static void SetInput()\n {\n var textReader = new StreamReader(\"input.txt\");\n Console.SetIn(textReader);\n }\n\n static IEnumerable Parse(string line, Func converter)\n {\n return line.Split(' ').Select(converter);\n }\n\n static IEnumerable ReadInts()\n {\n return ReadLine(x => int.Parse(x));\n }\n\n static IEnumerable ReadLongs()\n {\n return ReadLine(x => long.Parse(x));\n }\n\n static IEnumerable ReadDoubles()\n {\n return ReadLine(x => double.Parse(x));\n }\n\n static IEnumerable ReadLine(Func converter)\n {\n var line = Console.ReadLine();\n\n return Parse(line, converter);\n }\n\n static void Print(IEnumerable values)\n {\n Console.WriteLine(string.Join(\" \", values));\n }\n\n static int[] Copy(int[] array)\n {\n if (array == null) return null;\n\n var newArray = new int[array.Length];\n Array.Copy(array, newArray, array.Length);\n return newArray;\n }\n\n static void Main(string[] args)\n {\n //SetInput();\n\n var n = ReadInts().ToArray()[0];\n var a = ReadInts().ToList();\n\n a.Sort();\n\n var currentMax = int.MaxValue;\n var sum = 0;\n\n for (int i = a.Count - 1; i >= 0; i--)\n {\n var value = Math.Min(currentMax, a[i]);\n currentMax = Math.Max(0, value - 1);\n\n sum += value;\n }\n\n Console.WriteLine(sum);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "8a22c8a144f1921812752fa1bf63235b", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "3640204a7c7f1c191d5145bc17accdaf", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9922308546059934, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Codeforces\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n int n = int.Parse(Console.ReadLine());\n int[] arr = ReadIntArray();\n\n HashSet items = new HashSet();\n\n foreach (var x in arr)\n {\n int xM = x;\n while (xM > 0 && items.Contains(xM))\n {\n xM--;\n }\n\n if (x != 0)\n items.Add(xM);\n }\n\n Console.WriteLine(items.Sum());\n }\n\n private static int[] ReadIntArray()\n {\n return Console.ReadLine()\n .Split(new[] {\" \"}, StringSplitOptions.RemoveEmptyEntries)\n .Select(int.Parse)\n .ToArray();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "d74ac58633f2610a02e98b501a5989ef", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "8c4cd05b012fb52f6490db1fa1c05048", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9507323568575233, "equal_cnt": 8, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "using System;\n\n\nnamespace ConsoleApplication18\n{\n class Program\n {\n static void Main(string[] args)\n {\n uint n = uint.Parse(Console.ReadLine());\n uint answer = 0;\n uint[] Board = new uint[n];\n string[] input = Console.ReadLine().Split(' ');\n for (uint i = 0; i < n; i++)\n {\n Board[i] = uint.Parse(input[i]);\n }\n Array.Sort(Board);\n answer += Board[n - 1];\n for (uint i = n - 2; i >= 0; i--)\n {\n if (Board[i] >= Board[i + 1] && Board[i] >= 1) { Board[i]--; i++; continue; }\n\n answer += Board[i];\n }\n Console.WriteLine(answer);\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "b5192ab0330d566a60479ff997cd3227", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "a258e376046e4fc06443980fdcd69f57", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9530761209593326, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.ReadLine();\n string[] inputStringSplit = Console.ReadLine().Split(new char[] { ' ' });\n long[] frequencyArray = new long[inputStringSplit.Length];\n for (int i = 0; i < inputStringSplit.Length; i++)\n frequencyArray[i] = long.Parse(inputStringSplit[i]);\n Array.Sort(frequencyArray);\n long maxSumm = 0;\n for (int i = frequencyArray.Length - 1; i > -1; i--)\n {\n maxSumm += frequencyArray[i];\n if (i != 0 && frequencyArray[i - 1] == frequencyArray[i])\n frequencyArray[i - 1]--;\n }\n Console.WriteLine(maxSumm);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "77c75c19023943d3793366038a663a25", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "ca08587216abadb8ce20ad51486ef4d8", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.992552471225457, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 4, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nnamespace er\n{\n class Program\n {\n\n static void Main(string[] args)\n {\n\n int n = int.Parse(Console.ReadLine());\n\n var s = Console.ReadLine().Split(' ');\n int ans = 0;\n int t = -1;\n int[] a = new int[n];\n\n for (int i = 0; i < n; i++)\n a[i] = int.Parse(s[i]);\n\n Array.Sort(a);\n\n for (int i = n-1; i >0; i--)\n {\n if (a[i] <= a[i - 1]) a[i - 1] = a[i] - 1;\n }\n\n for (int i = 0; i < n; i++)\n {\n if (a[i] > 0) ans += a[i];\n }\n Console.WriteLine(ans);\n\n }\n\n\n\n\n\n }\n}", "lang": "MS C#", "bug_code_uid": "ba15ee6bd0248bd0b3bbba7019c979ed", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "439b3af63491e653160186ba76b14422", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7319804058782365, "equal_cnt": 10, "replace_cnt": 8, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\n\nnamespace ConsoleApplication5\n{\n public class Program\n {\n public static void Main()\n {\n int n = int.Parse(Console.ReadLine());\n string index = \"abcdefghijklmnopqrstuvwxyz\";\n int[] data = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();\n SortedSet cache = new SortedSet();\n for (int i = 0; i < n; ++i)\n {\n while (cache.Contains(data[i]))\n --data[i];\n cache.Add(data[i]);\n }\n Console.WriteLine(data.Sum());\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "202ca8c9d1cd2288cfca9c66b333ad2c", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "apr_id": "4d90832a3dda802ffeb1904e5b7f6e9c", "difficulty": 1100, "tags": ["greedy", "sortings"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.45261984392419174, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nclass Program\n{\n\tstatic void Main ()\n\t{\n\t\tstring[] s = Console.ReadLine().Split(' ');\n\t\tint r1 = int.Parse(s[0]);\n\t\tint c1 = int.Parse(s[1]);\n\t\tint r2 = int.Parse(s[2]);\n\t\tint c2 = int.Parse(s[3]);\n\n\t\tif ((r1 == r2) || (c1 == c2)) Console.Write(\"1 \");\n\t\telse Console.Write(\"2 \");\n\t\t\n\t\tint sdr = r1 - r2;\n\t\tint sdc = c1 - c2;\n\t\tif (((r1 + c1) % 2) != ((r2 + c2) % 2)) Console.Write(\"0 \");\n\t\telse {\n\t\t\tbool f = false;\n\t\t\tint i = r1, j = c1;\n\t\t\tif ((sdr <= 0) && (sdc <= 0))\n\t\t\t\tfor ( ; (i <= 8) || (j <= 8); i++, j++)\n\t\t\t\t\tif ((r2 == i) && (c2 == j)) { f = true; break; }\n\t\t\tif ((!f) && (sdr <= 0) && (sdc >= 0))\n\t\t\t\tfor (i = r1, j = c1; (i >= 1) || (j <= 8); i--, j++)\n\t\t\t\t\tif ((r2 == i) && (c2 == j)) { f = true; break; }\n\t\t\tif ((!f) && (sdr >= 0) && (sdc >= 0))\n\t\t\t\tfor (i = r1, j = c1; (i >= 1) || (j >= 1); i--, j--)\n\t\t\t\t\tif ((r2 == i) && (c2 == j)) { f = true; break; }\n\t\t\tif ((!f) && (sdr >= 0) && (sdc <= 0))\n\t\t\t\tfor (i = r1, j = c1; (i <= 8) || (j >= 1); i++, j--)\n\t\t\t\t\tif ((r2 == i) && (c2 == j)) { f = true; break; }\n\t\t\tif (f) Console.Write(\"1 \");\n\t\t\telse Console.Write(\"2 \");\n\t\t}\n\n\t\tint dr = Math.Abs(sdr);\n\t\tint dc = Math.Abs(sdc);\n\t\t\n\t\tif (dr > dc) Console.Write(dr);\n\t\telse Console.Write(dc);\n\t}\n}", "lang": "MS C#", "bug_code_uid": "b1e8bd169a11bd261606b4caf3065503", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "c2eac5fa0cbdc452e1140337d998ffcf", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9637352674524026, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces370Chess\n{\n class Program\n {\n static void Main(string[] args)\n {\n int r1 = int.Parse(args[0]);\n int c1 = int.Parse(args[1]);\n int r2 = int.Parse(args[2]);\n int c2 = int.Parse(args[3]);\n\n r2 -= r1;\n c2 -= c1;\n r1 = 0;\n c1 = 0;\n\n r2 = Math.Abs(r2);\n c2 = Math.Abs(c2);\n\n if (r2 == 0 || c2 == 0)\n Console.Write(\"1\");\n else\n Console.Write(\"2\");\n\n Console.Write(\" \");\n\n\n\n if ((r2 + c2) % 2 == 0)\n if ( r2 == c2)\n Console.Write(\"1\");\n else\n Console.Write(\"2\");\n else\n Console.Write(\"0\");\n\n Console.Write(\" \");\n\n int dig = Math.Min(r2,c2);\n\n Console.Write(\"{0}\", r2 + c2 - dig);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "64b026e9e9d7c8bfd75dc5e933e74ff8", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "7580d1a84006eedda7acb8d55709c5ee", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.987758945386064, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace _217A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] strings = Console.ReadLine().Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);\n int x1 = int.Parse(strings[0]), y1 = int.Parse(strings[1]), x2 = int.Parse(strings[2]), y2 = int.Parse(strings[3]);\n if(Math.Abs(x1 - x2) == 0 || Math.Abs(y1 - y2) == 0)\n Console.Write( \"1 \");\n else\n {\n Console.Write( \"2 \");\n }\n if (Math.Abs(x1 - x2) == Math.Abs(y1 - y2))\n Console.Write(\"1 \");\n else\n {\n if(Math.Abs(x1 - x2) % 2 == 0 && Math.Abs(y1 - y2) % 2 == 0)\n Console.Write( \"2 \");\n else\n {\n Console.Write( \"0 \");\n }\n }\n Console.WriteLine( Math.Max(Math.Abs(x1 - x2), Math.Abs(y1 - y2)));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c5e54bb7afa8544026606b69613df4e0", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "2492345e1461ccfa4ae24b23f6c7d70f", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9891304347826086, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace cf370a\n{\n\tclass XOI\n\t{\n\t\tpublic static int r32()\n\t\t{\n\t\t\tint n, c;\n\t\t\tdo { c = Console.Read(); } while (c < '0');\n\t\t\tfor (n = 0; c >= '0'; c = Console.Read())\n\t\t\t\tn = n * 10 + (c - '0');\n\t\t\treturn n;\n\t\t}\n\n\t\tpublic static void r32x2(out int a, out int b)\n\t\t{\n\t\t\ta = XOI.r32();\n\t\t\tb = XOI.r32();\n\t\t}\n\n\t\tpublic static void r32x3(out int a, out int b, out int c)\n\t\t{\n\t\t\tXOI.r32x2(out a, out b);\n\t\t\tc = XOI.r32();\n\t\t}\n\n\t}\n\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tint r1, c1, r2, c2;\n\n\t\t\tXOI.r32x2(out r1, out c1);\n\t\t\tXOI.r32x2(out r2, out c2);\n\n\t\t\tConsole.Write(\"{0} \", (r1 == r2 || c1 == c2) ? 1 : 2);\n\n\t\t\tif ((((r1 - 1) % 2) ^ ((c1 - 1) % 2)) == (((r2 - 1) % 2) ^ ((c2 - 1) % 2)))\n\t\t\t\tConsole.Write(\"{0} \", (Math.Abs(r1 - r2) == Math.Abs(c1 - c2)) ? 1 : 2);\n\t\t\telse\n\t\t\t\tConsole.Write(\"{0} \", 0);\n\n\t\t\tint r = Math.Abs(r1 - r2 + 1);\n\t\t\tint c = Math.Abs(c1 - c2 + 1);\n\t\t\tif (c > r) { int t = r; r = c; c = t; }\n\n\t\t\tConsole.WriteLine((r - c - 1) + (r - c));\n\t\t}\n\t}\n}\n", "lang": "MS C#", "bug_code_uid": "098de6afec5d0f6a6acb18935909877c", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "ebb155551c498e7892915751668946c7", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9934723481414325, "equal_cnt": 7, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 4, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace CodeForces\n{\n class Rook__Bishop_and_King\n {\n static void Main()\n {\n Run();\n Console.ReadLine();\n }\n static void Run()\n {\n string[] str = Console.ReadLine().Split();\n int r1 = int.Parse(str[0]);\n int c1 = int.Parse(str[1]);\n int r2 = int.Parse(str[2]);\n int c2 = int.Parse(str[3]);\n StringBuilder sb = new StringBuilder();\n if (r1 == r2 || c1 == c2)\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n if (r1 % 2 == 1)\n {\n if (c1 % 2 == 1)\n {\n if (r2 % 2 == 0 && c2 % 2 == 0)\n {\n //reachable\n //reachable\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else if (r2 % 2 == 1 && c2 % 2 == 1)\n {\n //reachable\n //reachable\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else\n sb.Append(\"0 \");\n }\n else\n {\n if (r2 % 2 == 0 && c2 % 2 == 1)\n {\n //reachable\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else if (r2 % 2 == 1 && c2 % 2 == 0)\n {\n //reachable\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else\n {\n sb.Append(\"0 \");\n }\n\n }\n }\n if (r1 % 2 == 0)\n {\n if (c1 % 2 == 1)\n {\n if (r2 % 2 == 0 && c2 % 2 == 1)\n {\n //reachable\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else if (r2 % 2 == 1 && c2 % 2 == 0)\n {\n //reachable\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else\n sb.Append(\"0 \");\n }\n else\n {\n if (r2 % 2 == 0 && c2 % 2 == 0)\n {\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else if (r2 % 2 == 1 && c2 % 2 == 1)\n {\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.Append(\"1 \");\n }\n else\n {\n sb.Append(\"2 \");\n }\n }\n else\n {\n sb.Append(\"0 \");\n }\n\n }\n }\n if (r1 == r2)\n {\n sb.AppendFormat(\"{0} \", Math.Abs(c1 - c2));\n }\n else if (c1 == c2)\n {\n sb.AppendFormat(\"{0} \", Math.Abs(r1 - r2));\n }\n else\n {\n if (Math.Abs(r1 - r2) == Math.Abs(c1 - c2))\n {\n sb.AppendFormat(\"{0} \", Math.Abs(c1 - c2));\n }\n else\n {\n sb.AppendFormat(\"{0} \", Math.Abs(c1 - c2));\n }\n }\n Console.WriteLine(sb.ToString().Trim());\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "7f1d431bcbac21ba123c97a65a7d8326", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "64f2f4a237bf2ecab6c9ed848c1e29e8", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9991503823279524, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "\n\n\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text.RegularExpressions;\nnamespace ConsoleApplication1\n{\n class Program\n {\n\n\n\n public static void Main(string[] args)\n {\n string[] s = Console.ReadLine().Split(' ');\n int sx, sy, ax, ay;\n sx = int.Parse(s[0]);\n sy = int.Parse(s[1]);\n ax = int.Parse(s[2]);\n ay = int.Parse(s[3]);\n int ris1 = 0, ris2 = 0, ris3 = 0;\n double pendenza;\n \n \n try\n {\n pendenza = Math.Abs((double)(ay - sy) / (double)(ax - sx));\n }\n catch\n {\n pendenza = 0;\n }\n if (pendenza == 1)\n {\n ris2 = 1;\n }\n if (ax == sx || ay == sy)\n {\n ris1 = 1;\n }\n else\n {\n ris1 = 2;\n }\n ris3 = Math.Max(Math.Abs(sx - ax), Math.Abs(sy - ay));\n if (ris2 == 0)\n {\n if (sy % 2 == 0)\n {\n if (sx % 2 == 0)\n {\n if ((ax % 2 == 0 && ay % 2 == 0) || (ax % 2 == 1 && ay % 2 == 1))\n {\n ris2 = 2;\n }\n }\n else\n {\n if ((ax % 2 == 1 && ay % 2 == 0) || (ax % 2 == 0 && ay % 2 == 1))\n {\n ris2 = 2;\n }\n }\n }\n else\n {\n if (sx % 2 == 0)\n {\n if ((ax % 2 == 0 && ay % 2 == 1) || (ax % 2 == 0 && ay % 2 == 1))\n {\n ris2 = 2;\n }\n }\n else\n {\n if ((ax % 2 == 0 && ay % 2 == 0) || (ax % 2 == 1 && ay % 2 == 1))\n {\n ris2 = 2;\n }\n }\n }\n }\n Console.WriteLine(ris1 + \" \" + ris2 + \" \" + ris3);\n }\n }\n}\n ", "lang": "MS C#", "bug_code_uid": "a3b4c4a54d5afba2b1184cf6a209d166", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "fd6a821ce5bb2f004223e0825491b8c2", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.994811320754717, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n public void Solve()\n {\n var a = ReadIntArray();\n var ans = new int[3];\n ans[0] = (a[0] == a[2] ? 0 : 1) + (a[1] == a[3] ? 0 : 1);\n if ((a[0] + a[1]) % 2 == (a[2] + a[3]) % 2)\n ans[1] = a[0] + a[1] == a[2] + a[3] ? 1 : 2;\n ans[2] = Math.Max(Math.Abs(a[0] - a[2]), Math.Abs(a[1] - a[3]));\n WriteArray(ans);\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"cycle.in\");\n //writer = new StreamWriter(\"cycle.out\");\n#endif\n try\n {\n // var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);\n // thread.Start();\n // thread.Join();\n new Solver().Solve();\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n Console.WriteLine(ex);\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n\n private static Queue currentLineTokens = new Queue();\n\n private static string[] ReadAndSplitLine()\n {\n return reader.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n\n public static int ReadInt()\n {\n return int.Parse(ReadToken());\n }\n\n public static long ReadLong()\n {\n return long.Parse(ReadToken());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(ReadToken(), CultureInfo.InvariantCulture);\n }\n\n public static int[] ReadIntArray()\n {\n return ReadAndSplitLine().Select(int.Parse).ToArray();\n }\n\n public static long[] ReadLongArray()\n {\n return ReadAndSplitLine().Select(long.Parse).ToArray();\n }\n\n public static double[] ReadDoubleArray()\n {\n return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();\n }\n\n public static int[][] ReadIntMatrix(int numberOfRows)\n {\n int[][] matrix = new int[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++)\n matrix[i] = ReadIntArray();\n return matrix;\n }\n\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows);\n int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++)\n {\n ret[i] = new int[numberOfRows];\n for (int j = 0; j < numberOfRows; j++)\n ret[i][j] = matrix[j][i];\n }\n return ret;\n }\n\n public static string[] ReadLines(int quantity)\n {\n string[] lines = new string[quantity];\n for (int i = 0; i < quantity; i++)\n lines[i] = reader.ReadLine().Trim();\n return lines;\n }\n\n public static void WriteArray(IEnumerable array)\n {\n writer.WriteLine(string.Join(\" \", array));\n }\n\n public static void Write(params object[] array)\n {\n WriteArray(array);\n }\n\n public static void WriteLines(IEnumerable array)\n {\n foreach (var a in array)\n writer.WriteLine(a);\n }\n\n class SDictionary : Dictionary\n {\n public new TValue this[TKey key]\n {\n get { return ContainsKey(key) ? base[key] : default(TValue); }\n set { base[key] = value; }\n }\n }\n\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "6d416b676589dee60f4bf2e2dfd666a1", "src_uid": "7dbf58806db185f0fe70c00b60973f4b", "apr_id": "e1dc75e3837fac82141c048ed7618ba6", "difficulty": 1100, "tags": ["graphs", "math", "shortest paths"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9956355701036552, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 6, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Solver.Ex;\nusing Watch = System.Diagnostics.Stopwatch;\nusing StringBuilder = System.Text.StringBuilder;\nnamespace Solver\n{\n\n public class Solver\n {\n public void Solve()\n {\n var n = sc.Integer();\n var k = sc.Integer();\n var t = sc.Integer();\n var l = new List>();\n for (int i = 0; i < n; i++)\n {\n var v=sc.Integer();\n if (l.Count == 0)\n l.Add(new Pair(v,1));\n else\n {\n var end = l[l.Count - 1];\n if (end.L == v)\n l[l.Count - 1] = new Pair(v, end.R + 1);\n else l.Add(new Pair(v, 1));\n }\n }\n var ret = 1;\n for (int u = 0; u < l.Count; u++)\n {\n var st = new Stack>();\n var count=0;\n for (int i = 0; i < u; i++)\n st.Push(l[i]);\n st.Push(new Pair(t, 1));\n for (int i = u; i < l.Count; i++)\n {\n var last = st.Peek();\n var next = l[i];\n if (last.L == next.L && last.R + next.R >= 3)\n {\n st.Pop();\n count += last.R + next.R;\n continue;\n }\n break;\n }\n ret = Math.Max(ret, count);\n\n }\n IO.Printer.Out.PrintLine(ret-1);\n\n }\n internal IO.StreamScanner sc;\n }\n\n #region Main and Settings\n static class Program\n {\n static void Main(string[] arg)\n {\n#if DEBUG\n var errStream = new System.IO.FileStream(@\"..\\..\\dbg.out\", System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);\n System.Diagnostics.Debug.Listeners.Add(new System.Diagnostics.TextWriterTraceListener(errStream, \"debugStream\"));\n System.Diagnostics.Debug.AutoFlush = false;\n var sw = new Watch();\n sw.Start();\n try\n {\n#endif\n var solver = new Solver();\n solver.sc = new IO.StreamScanner(Console.OpenStandardInput());\n IO.Printer.Out = new IO.Printer(new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });\n solver.Solve();\n IO.Printer.Out.Flush();\n#if DEBUG\n }\n catch (Exception ex)\n {\n Console.Error.WriteLine(ex.Message);\n Console.Error.WriteLine(ex.StackTrace);\n }\n finally\n {\n sw.Stop();\n Console.ForegroundColor = ConsoleColor.Green;\n Console.Error.WriteLine(\"Time:{0}ms\", sw.ElapsedMilliseconds);\n System.Diagnostics.Debug.Close();\n System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);\n }\n#endif\n }\n\n\n }\n #endregion\n}\n#region IO Helper\nnamespace Solver.IO\n{\n public class Printer\n {\n static Printer()\n {\n Out = new Printer(Console.Out);\n }\n public static Printer Out { get; set; }\n private readonly System.IO.TextWriter writer;\n private readonly System.Globalization.CultureInfo info;\n public string Separator { get; set; }\n public string NewLine { get { return writer.NewLine; } set { writer.NewLine = value ?? \"\\n\"; } }\n public Printer(System.IO.TextWriter tw = null, System.Globalization.CultureInfo ci = null, string separator = null, string newLine = null)\n {\n writer = tw ?? System.IO.TextWriter.Null;\n info = ci ?? System.Globalization.CultureInfo.InvariantCulture;\n NewLine = newLine;\n Separator = separator ?? \" \";\n }\n public void Print(int num) { writer.Write(num.ToString(info)); }\n public void Print(int num, string format) { writer.Write(num.ToString(format, info)); }\n public void Print(long num) { writer.Write(num.ToString(info)); }\n public void Print(long num, string format) { writer.Write(num.ToString(format, info)); }\n public void Print(double num) { writer.Write(num.ToString(\"F12\", info)); }\n public void Print(double num, string format) { writer.Write(num.ToString(format, info)); }\n public void Print(string str) { writer.Write(str); }\n public void Print(string format, params object[] arg) { writer.Write(string.Format(info, format, arg)); }\n public void Print(string format, IEnumerable sources) { writer.Write(format, sources.OfType().ToArray()); }\n public void Print(IEnumerable sources) { writer.Write(sources.AsString()); }\n public void Print(IEnumerable sources)\n {\n var res = new System.Text.StringBuilder();\n foreach (var x in sources)\n {\n res.AppendFormat(info, \"{0}\", x);\n if (string.IsNullOrEmpty(Separator))\n res.Append(Separator);\n }\n writer.Write(res.ToString(0, res.Length - Separator.Length));\n }\n public void PrintLine() { writer.WriteLine(); }\n public void PrintLine(int num) { writer.WriteLine(num.ToString(info)); }\n public void PrintLine(int num, string format) { writer.WriteLine(num.ToString(format, info)); }\n public void PrintLine(long num) { writer.WriteLine(num.ToString(info)); }\n public void PrintLine(long num, string format) { writer.WriteLine(num.ToString(format, info)); }\n public void PrintLine(double num) { writer.WriteLine(num.ToString(\"F12\", info)); }\n public void PrintLine(double num, string format) { writer.WriteLine(num.ToString(format, info)); }\n public void PrintLine(string str) { writer.WriteLine(str); }\n public void PrintLine(string format, params object[] arg) { writer.WriteLine(string.Format(info, format, arg)); }\n public void PrintLine(string format, IEnumerable sources) { writer.WriteLine(format, sources.OfType().ToArray()); }\n public void PrintLine(IEnumerable sources)\n {\n var res = new StringBuilder();\n foreach (var x in sources)\n {\n res.AppendFormat(info, \"{0}\", x);\n if (!string.IsNullOrEmpty(Separator))\n res.Append(Separator);\n }\n writer.WriteLine(res.ToString(0, res.Length - Separator.Length));\n }\n public void Flush() { writer.Flush(); }\n }\n public class StreamScanner\n {\n public StreamScanner(System.IO.Stream stream)\n {\n iStream = stream;\n }\n private readonly System.IO.Stream iStream;\n private readonly byte[] buf = new byte[1024];\n private int len, ptr;\n private bool eof = false;\n public bool EndOfStream { get { return eof; } }\n private byte readByte()\n {\n if (eof) throw new System.IO.EndOfStreamException();\n if (ptr >= len)\n {\n ptr = 0;\n len = iStream.Read(buf, 0, 1024);\n if (len <= 0)\n {\n eof = true;\n return 0;\n }\n }\n return buf[ptr++];\n }\n private bool inSpan(byte c)\n {\n const byte lb = 33, ub = 126;\n return !(c >= lb && c <= ub);\n }\n private byte skip()\n {\n byte b = 0;\n do b = readByte();\n while (!eof && inSpan(b));\n return b;\n }\n public char Char()\n {\n return (char)skip();\n }\n public char[] Char(int n)\n {\n var a = new char[n];\n for (int i = 0; i < n; i++)\n a[i] = (char)skip();\n return a;\n }\n public char[][] Char(int n, int m)\n {\n var a = new char[n][];\n for (int i = 0; i < n; i++)\n a[i] = Char(m);\n return a;\n }\n public string Scan()\n {\n\n const byte lb = 33, ub = 126;\n if (eof) throw new System.IO.EndOfStreamException();\n\n do\n {\n while (ptr < len && (buf[ptr] < lb || ub < buf[ptr]))\n {\n ptr++;\n }\n if (ptr < len)\n break;\n ptr = 0;\n len = iStream.Read(buf, 0, 1024);\n if (len <= 0)\n {\n eof = true;\n return null;\n }\n continue;\n } while (true);\n\n StringBuilder sb = null;\n do\n {\n var i = ptr;\n while (i < len)\n {\n if (buf[i] < lb || ub < buf[i])\n {\n string s;\n if (sb != null)\n {\n sb.Append(System.Text.UTF8Encoding.Default.GetChars(buf, ptr, i - ptr));\n s = sb.ToString();\n }\n else s = new string(System.Text.UTF8Encoding.Default.GetChars(buf, ptr, i - ptr));\n ptr = i + 1;\n return s;\n }\n i++;\n }\n i = len - ptr;\n if (sb == null) sb = new StringBuilder(i + 32);\n sb.Append(System.Text.UTF8Encoding.Default.GetChars(buf, ptr, i));\n ptr = 0;\n } while ((len = iStream.Read(buf, 0, 1024)) > 0);\n eof = true;\n return sb.ToString();\n }\n public string[] Scan(int n)\n {\n var a = new string[n];\n for (int i = 0; i < n; i++)\n a[i] = Scan();\n return a;\n }\n public string ScanLine()\n {\n const byte el = 10, cr = 13;\n if (eof) throw new System.IO.EndOfStreamException();\n StringBuilder sb = null;\n do\n {\n var i = ptr;\n while (i < len)\n {\n if (buf[i] == cr || buf[i] == el)\n {\n string s;\n if (sb != null)\n {\n sb.Append(System.Text.UTF8Encoding.Default.GetChars(buf, ptr, i - ptr));\n s = sb.ToString();\n }\n else s = new string(System.Text.UTF8Encoding.Default.GetChars(buf, ptr, i - ptr));\n if (buf[i] == cr) i++;\n if (buf[i] == el) i++;\n ptr = i;\n return s;\n }\n i++;\n }\n i = len - ptr;\n if (sb == null) sb = new StringBuilder(i + 32);\n sb.Append(System.Text.UTF8Encoding.Default.GetChars(buf, ptr, i));\n ptr = 0;\n } while ((len = iStream.Read(buf, 0, 1024)) > 0);\n eof = true;\n return sb.ToString();\n }\n public double Double()\n {\n return double.Parse(Scan(), System.Globalization.CultureInfo.InvariantCulture);\n }\n public double[] Double(int n)\n {\n var a = new double[n];\n for (int i = 0; i < n; i++)\n a[i] = Double();\n return a;\n }\n public int Integer()\n {\n var ret = 0;\n byte b = 0;\n bool isMynus = false;\n const byte zero = 48, nine = 57, mynus = 45;\n do b = readByte();\n while (!eof && !((b >= zero && b <= nine) || b == mynus));\n\n if (b == mynus)\n {\n isMynus = true;\n b = readByte();\n }\n while (true)\n {\n if (b >= zero && b <= nine)\n {\n ret = ret * 10 + b - zero;\n }\n else return isMynus ? -ret : ret;\n b = readByte();\n }\n\n }\n public int[] Integer(int n)\n {\n var a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = Integer();\n return a;\n }\n public long Long()\n {\n long ret = 0;\n byte b = 0;\n bool isMynus = false;\n const byte zero = 48, nine = 57, mynus = 45;\n do b = readByte();\n while (!eof && !((b >= zero && b <= nine) || b == mynus));\n if (b == '-')\n {\n isMynus = true;\n b = readByte();\n }\n while (true)\n {\n if (b >= zero && b <= nine)\n ret = ret * 10 + (b - zero);\n else return isMynus ? -ret : ret;\n b = readByte();\n }\n\n }\n public long[] Long(int n)\n {\n var a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = Long();\n return a;\n }\n public void Flush()\n {\n iStream.Flush();\n }\n\n }\n\n}\n#endregion\n#region Extension\nnamespace Solver.Ex\n{\n static public partial class EnumerableEx\n {\n static public string AsString(this IEnumerable source)\n {\n return new string(source.ToArray());\n }\n static public string AsJoinedString(this IEnumerable source, string separator = \" \")\n {\n return string.Join(separator, source);\n }\n static public T[] Enumerate(this int n, Func selector)\n {\n var res = new T[n];\n for (int i = 0; i < n; i++)\n res[i] = selector(i);\n return res;\n }\n }\n}\n#endregion\n#region Pair\n\npublic struct Pair\n{\n public T L;\n public T R;\n public Pair(T l, T r)\n : this()\n {\n L = l;\n R = r;\n }\n public Pair(params T[] arg)\n : this(arg[0], arg[1])\n {\n }\n public override string ToString()\n {\n return string.Format(\"{0} {1}\", L, R);\n }\n}\n#endregion", "lang": "MS C#", "bug_code_uid": "dd9ab4cd3883921e77defa03098abcad", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "bf3f94b02723379016d499677c12959e", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9938870909744696, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "// Submitted by Silithus @ Macau\nusing System;\nusing System.IO;\nusing System.Collections.Generic;\nusing CCF_XOI;\n\nnamespace CodeForces\n{\n\tclass CF430B\n\t{\n\t\tstruct one_char\n\t\t{\n\t\t\tpublic int color, cnt;\n\t\t}\n\n\t\tpublic void Solve(XOI xoi)\n\t\t{\n\t\t\tint N, K, X, pc, cnt, i, j, k, ans;\n\t\t\t\n\t\t\tList ch = new List();\n\n\t\t\tN = xoi.ReadInt();\n\t\t\tK = xoi.ReadInt();\n\t\t\tX = xoi.ReadInt();\n\n\t\t\tcnt = 1;\n\t\t\tpc = xoi.ReadInt();\n\t\t\tfor(i=1; i= 2)\n\t\t\t\t{\n\t\t\t\t\tcnt = ch[i].cnt;\n\t\t\t\t\tj = i - 1; k = i + 1;\n\t\t\t\t\twhile (j >= 0 && k < ch.Count && ch[j].color == ch[k].color)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (ch[j].cnt + ch[k].cnt >= 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcnt += ch[j].cnt + ch[k].cnt;\n\t\t\t\t\t\t\tj--; k++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tans = Math.Max(ans, cnt);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txoi.o.WriteLine(ans);\n\t\t}\n\t}\n\n\tclass CodeForcesMain\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\t(new CF430B()).Solve(new XOI());\n\t\t}\n\t}\n}\n\nnamespace CCF_XOI\n{\t// version 2014.02.07\n\tclass XOI\n\t{\n\t\tprotected StreamReader sr;\n\t\tpublic StreamWriter o;\n\t\tprotected Queue buf = new Queue();\n\t\tpublic bool EOF = false;\n\n\t\tpublic XOI()\n\t\t{\n\t\t\tthis.sr = new StreamReader(Console.OpenStandardInput());\n\t\t\tthis.o = new StreamWriter(Console.OpenStandardOutput());\n\t\t\tthis.o.AutoFlush = true;\n\t\t}\n\n\t\tpublic XOI(string in_path, string out_path)\n\t\t{\n\t\t\tthis.sr = new StreamReader(in_path);\n\t\t\tthis.o = new StreamWriter(out_path);\n\t\t\tthis.o.AutoFlush = true;\n\t\t}\n\n\t\tpublic int ReadInt()\n\t\t{\n\t\t\tstring s = this.GetNext();\n\t\t\tif (s == null) return -1;\n\t\t\telse return Int32.Parse(s);\n\t\t}\n\n\t\tpublic long ReadLong()\n\t\t{\n\t\t\tstring s = this.GetNext();\n\t\t\tif (s == null) return -1;\n\t\t\telse return Int64.Parse(s);\n\t\t}\n\n\t\tpublic double ReadDouble()\n\t\t{\n\t\t\tstring s = this.GetNext();\n\t\t\tif (s == null) return -1;\n\t\t\telse return Double.Parse(s);\n\t\t}\n\n\t\tpublic string ReadString()\n\t\t{\n\t\t\tstring s = this.GetNext();\n\t\t\treturn (s == null ? null : s);\n\t\t}\n\n\t\tpublic string ReadLine()\n\t\t{\t// I will ignore current buffer and read a new line\n\t\t\tstring s = \"\";\n\t\t\twhile (s == \"\" && !this.EOF)\n\t\t\t{\n\t\t\t\ts = sr.ReadLine();\n\t\t\t\tthis.EOF = (s == null);\n\t\t\t}\n\t\t\treturn (this.EOF ? null : s);\n\t\t}\n\n\t\tprotected string GetNext()\n\t\t{\n\t\t\tif (buf.Count == 0)\n\t\t\t{\n\t\t\t\twhile (buf.Count == 0 && !this.EOF)\n\t\t\t\t{\n\t\t\t\t\tstring s = sr.ReadLine();\n\t\t\t\t\tif (s == null)\n\t\t\t\t\t\tthis.EOF = true;\n\t\t\t\t\telse\n\t\t\t\t\t\tforeach (string ss in s.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries))\n\t\t\t\t\t\t\tbuf.Enqueue(ss);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn (this.EOF ? null : buf.Dequeue());\n\t\t}\n\t}\n}\n", "lang": "MS C#", "bug_code_uid": "87fafef58d79595131dac822c8f9be9c", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "3f678d4004119a4b4ac3cabc71891f35", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9997822773786197, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Globalization;\n\nnamespace CodeForce\n{\n class Program\n { \n static void Main(string[] args)\n {\n\n string[] input = Console.ReadLine().Split();\n int n = int.Parse(input[0]),\n k = int.Parse(input[1]),\n x = int.Parse(input[2]);\n\n int[] colors = new int[n];\n string[] inp = Console.ReadLine().Split();\n for (int l = 0; l < n; l++)\n colors[l] = int.Parse(inp[l]);\n\n int max = 0,\n position = 0,\n left = 0,\n right = 0,\n c = 0;\n\n\n for (int i = 0; i < n - 1; i++)\n {\n if (colors[i] == x && colors[i + 1] == x)\n {\n left = i;\n right = i + 1;\n i++;\n position = 2;\n c = 0;\n while (i+1 < n && colors[i + 1] == x)\n {\n position++;\n right++;\n i++;\n }\n\n while (left - 1 >= 0 && right + 1 < n && colors[left - 1] == colors[right + 1])\n {\n left--;\n right++;\n c += 2;\n\n while (left - 1 >= 0 && colors[left - 1] == colors[right])\n {\n c++;\n left--;\n }\n\n while (right + 1 < n && colors[right + 1] == colors[left])\n {\n c++;\n right++;\n }\n\n if (c > 2)\n position += c;\n else\n break;\n \n }\n\n if (position > max)\n max = position;\n \n }\n else\n continue;\n }\n\n\n\n Console.WriteLine(max);\n\n\n }\n\n \n\n }\n\n}", "lang": "MS C#", "bug_code_uid": "83fbe9f40552fe63257538df1412978a", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "7b9ee16189aa0d9bbda12d675cdcf15f", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9639851901716594, "equal_cnt": 7, "replace_cnt": 2, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\n#region ioh\n\nclass Scanner\n{\n private readonly StreamReader reader;\n private string[] buffer;\n private int bufferPos;\n\n public Scanner()\n : this(null)\n { }\n\n public Scanner(StreamReader reader)\n {\n this.reader = reader ?? new StreamReader(Console.OpenStandardInput(1024 * 10), Encoding.ASCII, false, 1024 * 10);\n buffer = new string[0];\n }\n\n public string NextTerm()\n {\n if (bufferPos >= buffer.Length)\n {\n buffer = reader.ReadLine().Split(' ');\n bufferPos = 0;\n }\n\n return buffer[bufferPos++];\n }\n\n public int NextInt()\n {\n return int.Parse(NextTerm());\n }\n\n public int[] NextIntArray()\n {\n return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n }\n\n public int[][] NextIntMatrix(int rowCount)\n {\n var matrix = new int[rowCount][];\n\n for (int i = 0; i < matrix.Length; i++)\n {\n matrix[i] = NextIntArray();\n }\n\n return matrix;\n }\n}\n\n#endregion\n\nclass Program\n{\n private static readonly Scanner s = new Scanner();\n // 6 2 2\n // 1 1 2 2 1 1\n static void Main(string[] args)\n {\n s.NextTerm();\n s.NextTerm();\n var x = s.NextInt();\n \n var arr = s.NextIntArray();\n\n var res = 0;\n\n var i = 0;\n while (i 1)\n {\n i = r + 1;\n lres += diff;\n l--;\n\n while (l >= 0 && r < arr.Length && arr[l] == arr[r])\n {\n var cu = arr[l];\n var lc = 0;\n var rc = 0;\n\n while (l >= 0 && arr[l] == cu)\n {\n lc++;\n l--;\n }\n\n while (r < arr.Length && arr[r] == cu)\n {\n rc++;\n r++;\n }\n\n var lrc = lc + rc;\n if (lrc > 2)\n {\n lres += lrc;\n }\n }\n\n res = Math.Max(lres, res);\n }\n else\n {\n i++;\n }\n }\n else\n {\n i++;\n }\n }\n\n Console.WriteLine(res);\n }\n}", "lang": "MS C#", "bug_code_uid": "b92778dc6f226f887a7db0d02659ccec", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "ac2fa26e268a740ae5656d1a9a143a6e", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9802047781569966, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\n#region ioh\n\nclass Scanner\n{\n private readonly TextReader reader;\n private string[] buffer;\n private int bufferPos;\n\n public Scanner()\n : this(null)\n { }\n\n public Scanner(TextReader reader)\n {\n this.reader = reader ?? Console.In;\n buffer = new string[0];\n }\n\n public string NextTerm()\n {\n if (bufferPos >= buffer.Length)\n {\n buffer = reader.ReadLine().Split(' ');\n bufferPos = 0;\n }\n\n return buffer[bufferPos++];\n }\n\n public int NextInt()\n {\n return int.Parse(NextTerm());\n }\n\n public int[] NextIntArray()\n {\n return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n }\n\n public int[][] NextIntMatrix(int rowCount)\n {\n var matrix = new int[rowCount][];\n\n for (int i = 0; i < matrix.Length; i++)\n {\n matrix[i] = NextIntArray();\n }\n\n return matrix;\n }\n}\n\n#endregion\n\nclass Program\n{\n private static readonly Scanner s = new Scanner();\n // 6 2 2\n // 1 1 2 2 1 1\n static void Main(string[] args)\n {\n s.NextTerm();\n s.NextTerm();\n var x = s.NextInt();\n \n var arr = s.NextIntArray();\n\n var res = 0;\n\n var i = 0;\n while (i 1)\n {\n i = r + 1;\n lres += diff;\n l--;\n\n while (l >= 0 && r < arr.Length && arr[l] == arr[r])\n {\n var cu = arr[l];\n var lc = 0;\n var rc = 0;\n\n while (l >= 0 && arr[l] == cu)\n {\n lc++;\n l--;\n }\n\n while (r < arr.Length && arr[r] == cu)\n {\n rc++;\n r++;\n }\n\n var lrc = lc + rc;\n if (lrc > 2)\n {\n lres += lrc;\n }\n }\n\n res = Math.Max(lres, res);\n }\n else\n {\n i++;\n }\n }\n else\n {\n i++;\n }\n }\n\n Console.WriteLine(res);\n }\n}", "lang": "MS C#", "bug_code_uid": "3a43ca0f4f49b617db4b3599b107f8ce", "src_uid": "d73d9610e3800817a3109314b1e6f88c", "apr_id": "ac2fa26e268a740ae5656d1a9a143a6e", "difficulty": 1400, "tags": ["brute force", "two pointers"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.7267552182163188, "equal_cnt": 5, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\nnamespace watermelon\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w = 0;\n int.TryParse(Console.ReadLine(), out w);\n if (w < 1 || w > 100 {\n System.Console.WriteLine(\"NO\");\n } else {\n if (w % 2 == 0)\n {\n System.Console.WriteLine(\"YES\");\n } else {\n System.Console.WriteLine(\"NO\");\n } \n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "967817d47268bcddaec7f84e5de6435e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c7b4f0f216131774d6e709e9304b3862", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.37218045112781956, "equal_cnt": 10, "replace_cnt": 5, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 11, "bug_source_code": " int w = int.Parse(Console.ReadLine());\n if (w%2 == 1)\n {\n Console.WriteLine(\"NO\");\n }\n else\n {\n Console.WriteLine(\"YES\");\n }", "lang": "Mono C#", "bug_code_uid": "38ca4eec268abf080d3d3e80c3448325", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "100aedf200058b72fd78f8f636e9bc24", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7600767754318618, "equal_cnt": 13, "replace_cnt": 7, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 13, "bug_source_code": "using System;\nclass Program {\n static void Main() \n {\n int n;\n Console.Read (n);\n if (n % 4 == 0) {\n Console.WriteLine (\"YES\");\n }\n else\n {\n Console.WriteLine (\"NO\");\n }\n }\n\n}", "lang": "Mono C#", "bug_code_uid": "12e341aef98938abe80848c3eb322c2c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "eda343f8ea9fed23c4ec4c70e0486bba", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9930624380574826, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace MyApp\n{\n class Program\n {\n static void Main()\n {\n int x = 3;\n \n x = Convert.ToInt32(Console.ReadLine());\n if (x != 2) And ( x%2 == 0)\n {\n Console.WriteLine(\"YES\");\n\n }else\n {\n Console.WriteLine(\"NO\");\n }\n \n\n\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "eb20e7dea9d2020351805bdcdbb9b1c3", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "02f08fdbc674b274011d4bf70f91b70a", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9166666666666666, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int i = int.Parse(Console.ReadLine())\n \n if (i % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n \n else\n {\n Console.WriteLine(\"NO\")\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "d9cfbbfcc66796242347a76dc284d858", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ff903ad1b0fc6f7e58bba70c09a4e55e", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8238636363636364, "equal_cnt": 13, "replace_cnt": 4, "delete_cnt": 6, "insert_cnt": 3, "fix_ops_cnt": 13, "bug_source_code": "using System;\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n\n int w = 0;\n sa:\n \n w = int.Parse(Console.ReadLine());\n if (w > 1 && w < 100)\n {\n\n if (w % 2 == 0 && (w / 2) % 2 == 0)\n Console.WriteLine(\"yes\");\n else\n Console.WriteLine(\"no\");\n }\n else\n {\n goto sa;\n }\n\n\n\n\n\n\n\n\n }\n \n }\n}\n", "lang": "Mono C#", "bug_code_uid": "f99f8992e0cf76c5e811df894ec605ee", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "d211de96b10209aeec1cd72fda2695c4", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.6752136752136753, "equal_cnt": 8, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 9, "bug_source_code": "string a = Console.ReadLine();\n if (Convert.ToInt32(a) <= 100)\n {\n if (Convert.ToInt32(a) >= 1)\n {\n int b = Convert.ToInt32(a) % 2;\n if (b == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else Console.WriteLine(\"NO\");\n }\n else Console.WriteLine(\"NO\");\n }\n else Console.WriteLine(\"NO\");", "lang": "Mono C#", "bug_code_uid": "9adb19ca814ff8dca4ddd6619b3daa53", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "fd660ab9b84aede94fd1998425592f73", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9678341672623302, "equal_cnt": 6, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace Achill\n{\n class Program\n {\n static void Main()\n {\n int[] abc = Console.ReadLine().Split().Select(item=>int.Parse(item)).ToArray();\n int max = abc[0], pos = 0;\n for(int i = 1; i < 3; ++i)\n {\n if(max < abc[i])\n {\n max = abc[i];\n pos = i;\n }\n }\n int res = 0;\n for(int i = 0; i < 3; ++i)\n {\n if(i != pos)\n {\n res += max - abc[i];\n }\n }\n Console.WriteLine(res < 0 ? 0 : res + 1);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "869c78fe3b7f88645d245d5510c1077c", "src_uid": "3dc56bc08606a39dd9ca40a43c452f09", "apr_id": "0a0e47c7643c93a60f06d7d588ba8aef", "difficulty": 800, "tags": ["geometry", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8306709265175719, "equal_cnt": 4, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 3, "bug_source_code": "using System;\n\nnamespace trafficelights\n{\n\tclass MainClass\n\t{\n\t\tpublic static void Main (string[] args)\n\t\t{\n string wkstr = Console.ReadLine();\n string[] a = wkstr.Split(' ');\n\t\t\tdouble l = Int32.Parse(a[0]);\n\t\t\tdouble d = Int32.Parse(a[1]);\n\t\t\tdouble v = Int32.Parse(a[2]);\n\t\t\tdouble g = Int32.Parse(a[3]);\n\t\t\tdouble r = Int32.Parse(a[4]);\n\t\t\tdouble ret = l/v;\n\t\t\tdouble t1 = d/v;\n\t\t\tint wk = Math.Floor(t1 / (g+r));\n\t\t\tdouble amari = t1 - wk*(g+r);\n//\t\t\tdouble amari = (d/v) % (g+r);\n\t\t\tif (amari >= g) {\n\t\t\t\tret += (g+r-amari);\n\t\t\t}\n\t\t\tConsole.WriteLine (ret.ToString(\"F8\"));\n\t\t}\n\t}\n}\n\n", "lang": "Mono C#", "bug_code_uid": "36fa1ce35fd0fe841c44f8dc2580894a", "src_uid": "e4a4affb439365c843c9f9828d81b42c", "apr_id": "08e9eef929768677b36920fec4fc41e2", "difficulty": 1500, "tags": ["implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.21700654097729896, "equal_cnt": 24, "replace_cnt": 14, "delete_cnt": 5, "insert_cnt": 5, "fix_ops_cnt": 24, "bug_source_code": "using System;\n\nnamespace Pipeline\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n long n = long.Parse(input.Split(' ')[0]),\n k = long.Parse(input.Split(' ')[1]);\n if (k > n)\n {\n k = n;\n }\n long pipe = 0,\n iteration = 0;\n while (k > 1)\n {\n iteration++;\n if (pipe == 0)\n pipe = k;\n else\n pipe = (pipe-1)+k;\n\n k--;\n\n if(pipe == n)\n {\n break;\n }\n \n }\n if(pipe == n || n == 1)\n {\n Console.WriteLine(iteration);\n }\n else\n {\n Console.WriteLine(-1);\n }\n \n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "322c4e553d69ed318e2206546b395e4d", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "a247ccebad410dfeea57df31ec5d93d6", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.41194029850746267, "equal_cnt": 17, "replace_cnt": 9, "delete_cnt": 4, "insert_cnt": 4, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\nnamespace CodeForces\n{ \n class B\n {\n public long BinSe(int l, int r)\n {\n while (l < r)\n {\n mid = (l + r) / 2;\n if (k * (k - 1) / 2 - (k - mid) * (k - mid - 1) / 2 + 1 < n)\n l = mid + 1;\n else\n r = mid;\n }\n return r;\n }\n \n public void Run()\n {\n long[] nk = (from str in Console.ReadLine().Split(' ', '\\t') select long.Parse(str)).ToArray(); \n long n = long.Parse(ar[0]);\n long k = long.Parse(ar[1]);\n \n Console.WriteLine((k * (k + 1) / 2) - k + 1 < n : -1 ? BinSe(0, k - 1)); \n }\n }\n \n class Programm\n { \n static void Main(string[] args)\n { \n B c = new B();\n c.Run();\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "2c9acae1eb2f89bbe24eb6b8f6f643b7", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "0b7c3123eb21fcf6d42da8f366971be1", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9360406091370559, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ProblemB\n{\n class Program\n {\n static void Main(string[] args)\n {\n //Console.SetIn(System.IO.File.OpenText(\"input.txt\"));\n\n string[] ar = Console.ReadLine().Split();\n\n long n = long.Parse(ar[0]);\n long k = long.Parse(ar[1]);\n\n long max = ((k - 1) * (k) / 2) + 1;\n if (n > max)\n {\n Console.WriteLine(\"-1\");\n return;\n }\n\n decimal term = (2m * k - 1) * (2m * k - 1) - 4m * (2m * n - 2m);\n decimal sqrt = (decimal)Math.Sqrt((double)term);\n \n double ans = ((2.0 * k - 1) - Math.Sqrt((double)term)) / 2.0;\n\n if (Math.Abs(sqrt * sqrt - term) > 0.00000001m)\n ans++;\n\n if (Math.Abs(ans - (long)ans) > 0.000000001)\n ans++;\n\n Console.WriteLine((long)ans);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "dc0b170d6b43a557e0d96623398f8522", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "29fdbf5b51f477638338d0dbc793034a", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9999089336126036, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Linq;\nusing System.IO;\nusing System.Globalization;\nusing System.Collections;\nusing System.Text.RegularExpressions;\n\nnamespace Task\n{\n\n #region MyIo\n\n internal class MyIo : IDisposable\n {\n#if LOCAL_TEST\n private readonly TextReader inputStream = new StreamReader(\"input.txt\");\n#else\n private readonly TextReader inputStream = Console.In;\n#endif\n#if FBHC_TEST\n private readonly TextWriter outputStream = new StreamWriter(\"output.txt\");\n#else\n private readonly TextWriter outputStream = Console.Out;\n#endif \n\n private string[] tokens;\n private int pointer;\n\n public char NextChar()\n {\n try\n {\n return (char)inputStream.Read();\n }\n catch (IOException)\n {\n return '\\0';\n }\n }\n\n public string NextLine()\n {\n try\n {\n return inputStream.ReadLine();\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public string NextString()\n {\n try\n {\n while (tokens == null || pointer >= tokens.Length)\n {\n tokens = (NextLine() + string.Empty).Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n pointer = 0;\n }\n return tokens[pointer++];\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public int NextInt()\n {\n return Next();\n }\n\n public long NextLong()\n {\n return Next();\n }\n\n public T Next()\n {\n var t = typeof(T);\n\n if (t == typeof(char))\n return (T)(object)NextChar();\n\n object s = NextString();\n\n if (t == typeof(string))\n return (T)s;\n\n return (T)Convert.ChangeType(s, typeof(T));\n }\n\n\n public IEnumerable NextWhile(Predicate pred)\n {\n if (pred == null)\n yield break;\n\n var res = Next();\n\n while (pred(res))\n {\n yield return res;\n\n res = Next();\n }\n }\n\n public IEnumerable NextSeq(long n)\n {\n for (var i = 0; i < n; i++)\n yield return Next();\n }\n\n public void Print(string format, params object[] args)\n {\n outputStream.Write(string.Format(CultureInfo.InvariantCulture, format, args));\n }\n\n public void PrintLine(string format, params object[] args)\n {\n Print(format, args);\n\n outputStream.WriteLine();\n }\n\n public void Print(bool o)\n {\n Print(o ? \"YES\" : \"NO\");\n }\n\n public void PrintLine(bool o)\n {\n Print(o);\n\n outputStream.WriteLine();\n }\n\n public void Print(T o)\n {\n outputStream.Write(Convert.ToString(o, CultureInfo.InvariantCulture));\n }\n\n\n public void PrintLine(T o)\n {\n Print(o);\n\n outputStream.WriteLine();\n }\n\n public void Close()\n {\n inputStream.Close();\n outputStream.Close();\n }\n\n void IDisposable.Dispose()\n {\n Close();\n\n#if LOCAL_TEST\n Console.ReadLine();\n#endif\n }\n }\n\n\n public static class ListExtensions\n {\n public static void Each(this IEnumerable self, Action action)\n {\n foreach (var v in self)\n action(v);\n }\n\n public static IEnumerable ToCycleEnumerable(this IEnumerable self)\n {\n if (self != null)\n {\n for (; ; )\n {\n foreach (var x in self)\n yield return x;\n }\n }\n }\n\n public static T CycleGet(this IList self, int index)\n {\n var c = self.Count;\n return self[(index % c + c) % c];\n }\n\n\n public static IList Shuffle(this IList self)\n {\n var rnd = new Random(DateTime.Now.Millisecond);\n\n var n = self.Count;\n\n while (n > 1)\n {\n n--;\n var k = rnd.Next(n + 1);\n var value = self[k];\n self[k] = self[n];\n self[n] = value;\n }\n\n return self;\n }\n\n public static IList> UseForNew2D(this T def, int fd, int sd)\n {\n var fdim = new T[fd][];\n\n for (int i = 0; i < fd; i++)\n {\n fdim[i] = new T[sd];\n Fill(fdim[i], def);\n }\n\n return fdim;\n }\n\n public static IList Fill(this IList self, Func fval)\n {\n for (var i = 0; i < self.Count; i++)\n self[i] = fval();\n\n\n return self;\n }\n\n\n public static IList Fill(this IList self, T val)\n {\n return self.Fill(() => val);\n }\n\n public static long Hash(this IList self, Func val = null)\n {\n return val != null ? self.Hash((t, current) => unchecked(current * 19L + val(t))) : self.Hash(HashOne);\n }\n\n public static long Hash(this IList self, Func val)\n {\n return self.Aggregate(0L, (current, t) => unchecked(val(t, current)));\n }\n\n\n public static long HashOne(this T self, long current)\n {\n return unchecked(current * 19L + (Equals(self, default(T)) ? 0 : self.GetHashCode()));\n }\n\n\n public static IList BuildSegTree(this IList a, Func combine, Func convert)\n {\n var t = new T1[a.Count << 2];\n\n a.BuildSegTree(t, 1, 0, a.Count - 1, combine, convert);\n\n return t;\n }\n\n private static void BuildSegTree(this IList a, IList t, int v, int tl, int tr, Func combine, Func convert)\n {\n if (tl == tr)\n {\n t[v] = convert(a[tl]);\n }\n else\n {\n int tm = (tl + tr) >> 1;\n\n BuildSegTree(a, t, v << 1, tl, tm, combine, convert);\n BuildSegTree(a, t, (v << 1) + 1, tm + 1, tr, combine, convert);\n\n t[v] = combine(t[v << 1], t[(v << 1) + 1]);\n }\n }\n }\n\n public static class P\n {\n public static P Create(T1 key, T2 val)\n {\n return new P(key, val);\n }\n }\n\n public class P\n {\n private class PComparer : IComparer>\n {\n private readonly bool? byKey;\n\n public PComparer(bool? byKey)\n {\n this.byKey = byKey;\n }\n\n\n public int Compare(P x, P y)\n {\n x = x ?? new P();\n y = y ?? new P();\n\n\n if (byKey == true)\n return Comparer.Default.Compare(x.Key, y.Key);\n else if (byKey == false)\n return Comparer.Default.Compare(x.Value, y.Value);\n else\n {\n var tr = Comparer.Default.Compare(x.Key, y.Key);\n\n if (tr != 0)\n tr = Comparer.Default.Compare(x.Value, y.Value);\n\n return tr;\n }\n }\n }\n\n\n public P()\n {\n }\n\n public P(T1 key, T2 val)\n {\n this.Key = key;\n this.Value = val;\n }\n\n\n public T1 Key\n {\n get;\n set;\n }\n\n public T2 Value\n {\n get;\n set;\n }\n\n public P Clone()\n {\n return new P(Key, Value);\n }\n\n public static IComparer> KeyComparer\n {\n get { return new PComparer(true); }\n }\n\n public static IComparer> ValueComparer\n {\n get { return new PComparer(false); }\n }\n\n public static implicit operator T1(P obj)\n {\n return obj.Key;\n }\n\n public static implicit operator T2(P obj)\n {\n return obj.Value;\n }\n\n public P SetKey(T1 key)\n {\n Key = key;\n return this;\n }\n\n public P SetValue(T2 value)\n {\n Value = value;\n return this;\n }\n\n public override string ToString()\n {\n return string.Format(\"Key: {0}, Value: {1}\", Key, Value);\n }\n\n public override bool Equals(object obj)\n {\n var co = obj as P;\n\n return co != null && co.GetHashCode() == GetHashCode();\n }\n\n public override int GetHashCode()\n {\n int hash = 17;\n hash = hash * 31 + ((Equals(Key, default(T1))) ? 0 : Key.GetHashCode());\n hash = hash * 31 + ((Equals(Value, default(T1))) ? 0 : Value.GetHashCode());\n return hash;\n\n }\n }\n\n #endregion\n\n\n\n internal class Program\n {\n #region Program\n\n private readonly MyIo io;\n\n public Program(MyIo io)\n {\n this.io = io;\n }\n\n public static void Main(string[] args)\n {\n using (MyIo io = new MyIo())\n {\n new Program(io)\n .Solve();\n }\n }\n\n\n\n #endregion\n\n public const long MOD = 1000000007;\n public const double EPS = 1e-14;\n\n\n\n\n private void Solve()\n {\n var n = io.NextLong();\n var k = io.NextLong();\n\n var ttl = k*(k-1L)/2L+1L;\n\n if (ttl < n)\n { \n io.PrintLine(-1);\n return;\n }\n\n long s = 2;\n long e = k;\n long ans = 0;\n\n while(s<=e)\n {\n var mid = (s+e) /2L;\n\n var y = mid * (mid + 1L) / 2L;\n\n if (ttl - y >= n)\n {\n ans = (k - mid);\n s = mid + 1;\n }\n else\n {\n e = mid - 1;\n }\n }\n\n \n\n io.PrintLine(ans - 1);\n }\n }\n\n}\n\n", "lang": "Mono C#", "bug_code_uid": "972cfc43e10942d24747c82b7e9e0f2d", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "bedc738ebf2aa3287c09738c98fdd99d", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9459368703828073, "equal_cnt": 16, "replace_cnt": 6, "delete_cnt": 4, "insert_cnt": 5, "fix_ops_cnt": 15, "bug_source_code": "#define Online\n\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Diagnostics;\nusing System.Threading;\n\ndelegate double F(double x);\ndelegate decimal Fdec(decimal x);\n\nclass Program\n{\n static void Main(string[] args)\n {\n\n Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;\n\n#if FileIO\n StreamReader sr = new StreamReader(\"forest.in\");\n StreamWriter sw = new StreamWriter(\"forest.out\");\n Console.SetIn(sr);\n Console.SetOut(sw);\n#endif\n\n long n, k;\n string[] input = ReadArray();\n n = long.Parse(input[0]);\n k = long.Parse(input[1]);\n\n if (n == 1)\n {\n Console.WriteLine(\"0\");\n return;\n }\n\n if (k >= n)\n {\n Console.WriteLine(\"1\");\n return;\n }\n\n if (k * (k + 1) / 2 - (k - 1) < n)\n {\n Console.WriteLine(\"-1\");\n return;\n }\n\n long l, r;\n l = 2;\n r = k;\n long mid;\n long sum;\n while (l < r)\n {\n mid = l + ((r - l) >> 1);\n if ((k - mid + 1) % 2 == 0)\n {\n sum = ((k - mid + 1) * (mid + k)) / 2 - (k - mid - 1);\n }\n else\n {\n sum = ((k - mid) * (k + mid - 1) + k) / 2 - (k - mid - 1);\n }\n if (sum <= n)\n {\n r = mid;\n }\n else\n {\n l = mid + 1;\n }\n }\n if ((k - l + 1) % 2 == 0)\n {\n sum = ((k - l + 1) * (l + k)) / 2 - (k - l - 1);\n if (sum - n < 0)\n {\n Console.WriteLine(k - l + 2);\n }\n else\n {\n Console.WriteLine(k - l + 1);\n }\n }\n else\n {\n sum = ((k - l) * (k + l - 1) + k) / 2 - (k - l - 1);\n if (sum - n < 0)\n {\n Console.WriteLine(k - l + 2);\n }\n else\n {\n Console.WriteLine(k - l + 1);\n }\n }\n\n#if Online\n Console.ReadLine();\n#endif\n\n#if FileIO\n sr.Close();\n sw.Close();\n#endif\n }\n\n static string[] ReadArray()\n {\n return Console.ReadLine().Split(' ');\n }\n\n static int ReadInt()\n {\n return int.Parse(Console.ReadLine());\n }\n\n static decimal Sqrt(decimal x)\n {\n decimal mid;\n decimal right = (x <= 1 ? 1 : x);\n decimal left = 0;\n decimal eps = 0.00000000000000000001m;\n while (right - left > eps)\n {\n mid = left + ((right - left) / 2m);\n if (Math.Sign(mid * mid - x) != Math.Sign(left * left - x))\n right = mid;\n else\n left = mid;\n }\n return (left + right) / 2m;\n }\n\n}\n\nstatic class ArrayUtils\n{\n public static int BinarySearch(int[] a, int val)\n {\n int left = 0;\n int right = a.Length - 1;\n int mid;\n\n while (left < right)\n {\n mid = left + ((right - left) >> 1);\n if (val <= a[mid])\n {\n right = mid;\n }\n else\n {\n left = mid + 1;\n }\n }\n\n if (a[left] == val)\n return left;\n else\n return -1;\n }\n\n public static double Bisection(F f, double left, double right, double eps)\n {\n double mid;\n while (right - left > eps)\n {\n mid = left + ((right - left) / 2d);\n if (Math.Sign(f(mid)) != Math.Sign(f(left)))\n right = mid;\n else\n left = mid;\n }\n return (left + right) / 2d;\n }\n\n\n public static decimal TernarySearchDec(Fdec f, decimal eps, decimal l, decimal r, bool isMax)\n {\n decimal m1, m2;\n while (r - l > eps)\n {\n m1 = l + (r - l) / 3m;\n m2 = r - (r - l) / 3m;\n if (f(m1) < f(m2))\n if (isMax)\n l = m1;\n else\n r = m2;\n else\n if (isMax)\n r = m2;\n else\n l = m1;\n }\n return r;\n }\n\n public static double TernarySearch(F f, double eps, double l, double r, bool isMax)\n {\n double m1, m2;\n while (r - l > eps)\n {\n m1 = l + (r - l) / 3d;\n m2 = r - (r - l) / 3d;\n if (f(m1) < f(m2))\n if (isMax)\n l = m1;\n else\n r = m2;\n else\n if (isMax)\n r = m2;\n else\n l = m1;\n }\n return r;\n }\n\n public static void Merge(int[] A, int p, int q, int r, int[] L, int[] R)\n {\n for (int i = p; i <= q; i++)\n L[i] = A[i];\n for (int i = q + 1; i <= r; i++)\n R[i] = A[i];\n\n for (int k = p, i = p, j = q + 1; k <= r; k++)\n {\n if (i > q)\n {\n for (; k <= r; k++, j++)\n A[k] = R[j];\n return;\n }\n if (j > r)\n {\n for (; k <= r; k++, i++)\n A[k] = L[i];\n return;\n }\n if (L[i] <= R[j])\n {\n A[k] = L[i];\n i++;\n }\n else\n {\n A[k] = R[j];\n j++;\n }\n }\n }\n\n public static void Merge_Sort(int[] A, int p, int r, int[] L, int[] R)\n {\n if (!(p < r)) return;\n int q = p + ((r - p) >> 1);\n Merge_Sort(A, p, q, L, R);\n Merge_Sort(A, q + 1, r, L, R);\n Merge(A, p, q, r, L, R);\n }\n}", "lang": "Mono C#", "bug_code_uid": "b615d235198f93ab8ff8a72470f0d58d", "src_uid": "83bcfe32db302fbae18e8a95d89cf411", "apr_id": "81fa9c6cac9417635f1f86d13ec596e2", "difficulty": 1700, "tags": ["math", "binary search"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9540740740740741, "equal_cnt": 11, "replace_cnt": 6, "delete_cnt": 4, "insert_cnt": 0, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\nnamespace CSharp_Contests\n{\n public class Program\n {\n public static void Main() {\n int[] rc = Console.ReadLine().Split(new char[1] { ' ' }).Select(a => int.Parse(a)).ToArray();\n int t1, t2;\n int dif = (int)Math.Ceiling(Math.Sqrt(( ( t1 = Math.Abs(rc[1] - rc[3]) ) * t1 ) + ( ( t2 = Math.Abs(rc[2] - rc[4]) ) * t2 )));\n rc[0] += rc[0];\n int md = dif % rc[0];\n Console.WriteLine(( dif - md ) / rc[0] + ( ( md != 0 ) ? 1 : 0 ));\n#if DEBUG\n Console.ReadLine();\n#endif\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "1d25370d26f8cfaaf40d632c5fb1edf8", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "e94c0d3bbec7684044614ee22321dc6a", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9762931034482759, "equal_cnt": 9, "replace_cnt": 7, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.IO;\n\nnamespace CF287\n{\n class Program\n {\n static void Main(string[] args)\n {\n Solution(Console.In, Console.Out);\n }\n\n static void Solution(TextReader sr, TextWriter sw)\n {\n var input = sr.ReadLine().Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);\n var r = Int32.Parse(input[0]);\n var x = Int32.Parse(input[1]);\n var y = Int32.Parse(input[2]);\n var xd = Int32.Parse(input[3]);\n var yd = Int32.Parse(input[4]);\n var d = Math.Sqrt((xd - x)*(xd - x) + (yd - y)*(yd - y));\n var ost = d/(2 * r);\n if (ost - Math.Floor(ost) <= 0.00000001)\n {\n sw.WriteLine((int) Math.Floor(ost));\n return; \n }\n sw.WriteLine((int) Math.Floor(ost) + 1); \n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "0657b0f52599426f595a4614404bca0b", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "88e0add5567051881d98258049aa39ea", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9423264907135875, "equal_cnt": 13, "replace_cnt": 12, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n \n\nnamespace CheckCable\n{\n class Program\n {\n \n\n static void Main(string[] args)\n {\n Question2_AmrPins();\n }\n \n public static void Question2_AmrPins()\n {\n // 1. Init\n string[] firstline = Console.ReadLine().Split();\n int r = Convert.ToInt32(firstline[0]);\n int x = Convert.ToInt32(firstline[1]);\n int y = Convert.ToInt32(firstline[2]);\n int x_ = Convert.ToInt32(firstline[3]);\n int y_ = Convert.ToInt32(firstline[4]);\n\n // 2. calculate L\n //Math.Sqrt(area.Item2)\n int delta_x = x_ - x;\n int delta_y = y_ - y;\n\n double L = (double)Math.Sqrt(delta_x * delta_x + delta_y * delta_y) - (double)2*r;\n double L_roundUp = Math.Ceiling(L / (2 * r));\n Console.WriteLine(L_roundUp+1);\n\n \n }\n }\n}", "lang": "MS C#", "bug_code_uid": "715df99106a8c9485e4bd8d44369f7c6", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "22fc0cdc696c9a7cf870330ba1458e92", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8978374347501864, "equal_cnt": 6, "replace_cnt": 4, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 5, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace AmrandPins\n{\n class Program\n {\n static void Main(string[] args)\n {\n Solve();\n }\n\n private static void Solve()\n {\n var inp = Console.ReadLine().Split(' ').ToList().Select(int.Parse).ToArray();\n\n int r = inp[0];\n int x1 = inp[1];\n int y1 = inp[2];\n int x2 = inp[3];\n int y2 = inp[4];\n\n double dis = Math.Sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\n\n double x = dis / (double)(r * 2);\n\n Console.WriteLine(Math.Ceiling(x));\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "bf9241461bcdca5f6500074028450443", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "8773f56ebf078313d9b7d3d543d41692", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9985089463220675, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\n\n// (づ°ω°)づミ★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜\npublic class Solver\n{\n public void Solve()\n {\n long r = ReadInt() * 2;\n long x1 = ReadInt();\n long y1 = ReadInt();\n long x2 = ReadInt();\n long y2 = ReadInt();\n\n double d = Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + 1e-9);\n long ans = (long) (d / r);\n if (d % r > 1e-9)\n ans++;\n\n Write(ans);\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n\n static void Main()\n {\n#if DEBUG\n reader = new StreamReader(\"..\\\\..\\\\input.txt\");\n writer = Console.Out;\n //writer = new StreamWriter(\"..\\\\..\\\\output.txt\");\n#else\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n //reader = new StreamReader(\"game.in\");\n //writer = new StreamWriter(\"game.out\");\n#endif\n try\n {\n var thread = new Thread(new Solver().Solve, 1024 * 1024 * 256);\n thread.Start();\n thread.Join();\n// object result = new Solver().Solve();\n// if (result != null)\n// writer.WriteLine(result);\n }\n catch (Exception ex)\n {\n#if DEBUG\n Console.WriteLine(ex);\n#else\n Console.WriteLine(ex);\n throw;\n#endif\n }\n reader.Close();\n writer.Close();\n }\n\n #endregion\n\n #region Read / Write\n\n private static Queue currentLineTokens = new Queue();\n\n private static string[] ReadAndSplitLine()\n {\n return reader.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n\n public static int ReadInt()\n {\n return int.Parse(ReadToken());\n }\n\n public static long ReadLong()\n {\n return long.Parse(ReadToken());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(ReadToken(), CultureInfo.InvariantCulture);\n }\n\n public static int[] ReadIntArray()\n {\n return ReadAndSplitLine().Select(int.Parse).ToArray();\n }\n\n public static long[] ReadLongArray()\n {\n return ReadAndSplitLine().Select(long.Parse).ToArray();\n }\n\n public static double[] ReadDoubleArray()\n {\n return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();\n }\n\n public static int[][] ReadIntMatrix(int numberOfRows)\n {\n int[][] matrix = new int[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++)\n matrix[i] = ReadIntArray();\n return matrix;\n }\n\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows);\n int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++)\n {\n ret[i] = new int[numberOfRows];\n for (int j = 0; j < numberOfRows; j++)\n ret[i][j] = matrix[j][i];\n }\n return ret;\n }\n\n public static string[] ReadLines(int quantity)\n {\n string[] lines = new string[quantity];\n for (int i = 0; i < quantity; i++)\n lines[i] = reader.ReadLine().Trim();\n return lines;\n }\n\n public static void WriteArray(IEnumerable array)\n {\n writer.WriteLine(string.Join(\" \", array));\n }\n\n public static void Write(params object[] array)\n {\n WriteArray(array);\n }\n\n public static void WriteLines(IEnumerable array)\n {\n foreach (var a in array)\n writer.WriteLine(a);\n }\n\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "53d774eac42de7c8eca1ae0a127317f9", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "cedd2b1ab40206fb3c681cdaeb66d67c", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9744931327665141, "equal_cnt": 11, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\npublic class Codeforces\n{\n #region Main\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n reader = new StreamReader(Console.OpenStandardInput(1024 * 10), System.Text.Encoding.ASCII, false, 1024 * 10);\n writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), System.Text.Encoding.ASCII, 1024 * 10);\n var r = Next();\n var x = Next();\n var y = Next();\n var x1 = Next();\n var y1 = Next();\n double d = Math.Sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n var ans = (long)Math.Ceiling(d / (2 * r));\n writer.WriteLine(ans);\n reader.Close();\n writer.Close();\n }\n #endregion\n #region Read / Write\n\n private static Queue currentLineTokens = new Queue();\n\n private static string[] ReadAndSplitLine()\n {\n return reader.ReadLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n }\n\n public static string ReadToken()\n {\n while (currentLineTokens.Count == 0)\n currentLineTokens = new Queue(ReadAndSplitLine());\n return currentLineTokens.Dequeue();\n }\n\n public static int ReadInt()\n {\n return int.Parse(ReadToken());\n }\n\n public static long ReadLong()\n {\n return long.Parse(ReadToken());\n }\n\n public static double ReadDouble()\n {\n return double.Parse(ReadToken(), CultureInfo.InvariantCulture);\n }\n\n public static int[] ReadIntArray()\n {\n return ReadAndSplitLine().Select(int.Parse).ToArray();\n }\n\n public static long[] ReadLongArray()\n {\n return ReadAndSplitLine().Select(long.Parse).ToArray();\n }\n\n public static double[] ReadDoubleArray()\n {\n return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray();\n }\n public static int[][] ReadIntMatrix(int numberOfRows)\n {\n int[][] matrix = new int[numberOfRows][];\n for (int i = 0; i < numberOfRows; i++)\n matrix[i] = ReadIntArray();\n return matrix;\n }\n public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)\n {\n int[][] matrix = ReadIntMatrix(numberOfRows);\n int[][] ret = new int[matrix[0].Length][];\n for (int i = 0; i < ret.Length; i++)\n {\n ret[i] = new int[numberOfRows];\n for (int j = 0; j < numberOfRows; j++)\n ret[i][j] = matrix[j][i];\n }\n return ret;\n }\n\n public static string[] ReadLines(int quantity)\n {\n string[] lines = new string[quantity];\n for (int i = 0; i < quantity; i++)\n lines[i] = reader.ReadLine().Trim();\n return lines;\n }\n public static void WriteArray(IEnumerable array)\n {\n writer.WriteLine(string.Join(\" \", array));\n }\n\n public static void Write(params T[] array)\n {\n WriteArray(array);\n }\n\n public static void WriteLines(IEnumerable array)\n {\n foreach (var a in array)\n writer.WriteLine(a);\n }\n private static int Next()\n {\n int c;\n int res = 0;\n do\n {\n c = reader.Read();\n if (c == -1)\n return res;\n } while (c != '-' && (c < '0' || c > '9'));\n int sign = 1;\n if (c == '-')\n {\n sign = -1;\n c = reader.Read();\n }\n res = c - '0';\n while (true)\n {\n c = reader.Read();\n if (c < '0' || c > '9')\n return res * sign;\n res *= 10;\n res += c - '0';\n }\n }\n #endregion\n}", "lang": "MS C#", "bug_code_uid": "c8ea49fb6fcf2b9f49cf086f939d7bf4", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "ded3f535570d19f8891b41c4a7189664", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9989584883201904, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "#region imports\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Numerics;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Threading;\n\n#endregion\n\nnamespace CodeForces\n{\n class Problem\n {\n const bool IsContest = false;\n\n private const double Eps = 1e-15;\n private void Solve()\n {\n var r = (double)_.NextLong();\n var x1 = _.NextLong();\n var y1 = _.NextLong();\n var x2 = _.NextLong();\n var y2 = _.NextLong();\n var d = Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));\n _.WriteLine(Answer(r, d));\n Thread.Sleep(100);\n }\n\n private int Answer(double r, double d)\n {\n return ((int)Math.Ceiling(d / r - Eps) + 1) / 2;\n }\n\n\n\n #region shit\n private readonly InOut _ = new InOut(IsContest);\n static void Main(string[] args)\n {\n var p = new Problem();\n p.Solve();\n p._.Close();\n }\n }\n class InOut\n {\n private const string InputFile = \"input.txt\";\n private const string OutputFile = \"output.txt\";\n public StreamWriter Cout { get; private set; }\n public StreamReader Cin { get; private set; }\n private void SetConsoleIo()\n {\n Cin = new StreamReader(new BufferedStream(Console.OpenStandardInput()));\n Cout = new StreamWriter(new BufferedStream(Console.OpenStandardOutput()));\n }\n private void SetFileIo(string inputFile, string outputFile) { Cin = new StreamReader(inputFile); Cout = new StreamWriter(outputFile); }\n public InOut() { SetConsoleIo(); }\n public InOut(string inputFile, string outputFile) { SetFileIo(inputFile, outputFile); }\n public InOut(bool isContest) { if (isContest) SetConsoleIo(); else SetFileIo(InputFile, OutputFile); }\n public void WriteLine(object x) { Cout.WriteLine(x); }\n public void Close() { Cin.Close(); Cout.Close(); }\n public void WriteLine(string format, params object[] args) { Cout.WriteLine(format, args); }\n private int _pos;\n private string[] _tokens;\n\n private string[] NextStringArray() { return Cin.ReadLine().Split(\" \\t\".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); }\n public string NextToken()\n {\n while (_tokens == null || _pos == _tokens.Length)\n {\n // ReSharper disable once PossibleNullReferenceException\n _tokens = NextStringArray();\n _pos = 0;\n }\n return _tokens[_pos++];\n }\n public int NextInt() { return int.Parse(NextToken()); }\n public long NextLong() { return long.Parse(NextToken()); }\n public double NextDouble() { return double.Parse(NextToken(), CultureInfo.InvariantCulture); }\n public int[] NextIntArray() { return NextStringArray().Select(int.Parse).ToArray(); }\n public byte[] NextByteArray() { return NextStringArray().Select(byte.Parse).ToArray(); }\n public long[] NextLongArray() { return NextStringArray().Select(long.Parse).ToArray(); }\n #endregion\n }\n}", "lang": "MS C#", "bug_code_uid": "bfde16e455e7f4e2a1426306b8443aff", "src_uid": "698da80c7d24252b57cca4e4f0ca7031", "apr_id": "b7dfee09bafa0e0471c47eb77ffb0e19", "difficulty": 1400, "tags": ["geometry", "math"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9661705006765899, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Text;\nusing System.Collections.Generic;\n\n// OLYASHAA_FOREVER\n\nclass MainClass\n{\n\tpublic static void Main(string[] args)\n\t{\n\t\tstring s = Console.ReadLine();\n\t\tstring h = \"hello\";\n\t\tint a = 0;\n\t\tfor (int i = 0; i < s.Length; ++i)\n\t\t{\n\t\t\tif (s[i] == h[a])\n\t\t\t\ta++;\n\t\t}\n\t\tConsole.WriteLine(a == h.Length ? \"YES\" : \"NO\");\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "6cc809f8d672e317ff947cabb3f89a08", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "fb9307eb0022fcae760c7f37ec06fc57", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9332298136645962, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " internal class Program\n {\n private static void Main(string[] args)\n {\n var word = \"hello\";\n var s = Console.ReadLine();\n var t = 0;\n var result = false;\n for (var i = 0; i < s.Length; i++)\n {\n if (s[i] == word[t + 1])\n {\n if (++t == word.Length - 1)\n {\n result = true;\n break;\n }\n }\n else if (s[i] != word[t])\n t = 0;\n }\n\n Console.WriteLine(result ? \"YES\" : \"NO\");\n }\n }", "lang": "Mono C#", "bug_code_uid": "179b505635d1440e96fa8e9e7f8731fc", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "apr_id": "bc7344cd22ba57e0b72a6e42d87ac3ea", "difficulty": 1000, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9999680276241327, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing System.Text;\n\nnamespace Codeforces\n{\n class Program\n {\n private static string readString() => Console.ReadLine();\n private static T readValue() => (T)Convert.ChangeType(readString(), typeof(T));\n private static string[] readStrings(char delimiter = ' ') => readString().Split(delimiter);\n private static List readValues(char delimiter = ' ') => readStrings(delimiter: delimiter).Select(x => (T)Convert.ChangeType(x, typeof(T))).ToList();\n private static void write(T s) => Console.WriteLine(s);\n\n private static int binarySearch(List list, T target) where T : IComparable\n {\n int l = 0, r = list.Count - 1;\n while (l <= r)\n {\n var m = (int)Math.Floor((double)(l + r) / 2);\n if (list[m].CompareTo(target) <= 0)\n if (m == r || list[m + 1].CompareTo(target) > 0)\n return m;\n else\n l = m + 1;\n else\n r = m - 1;\n }\n return -1;\n }\n\n private static int quickSortPartition(List a, int lo, int hi) where T : IComparable\n {\n var pivot = a[lo];\n int i = lo - 1, j = hi + 1;\n while (true)\n {\n do { i++; } while (a[i].CompareTo(pivot) < 0);\n do { j--; } while (a[j].CompareTo(pivot) > 0);\n if (i >= j)\n return j;\n var temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }\n }\n private static void quickSort(List a, int lo, int hi) where T : IComparable\n {\n if (lo < hi)\n {\n int q = quickSortPartition(a, lo, hi);\n quickSort(a, lo, q);\n quickSort(a, q + 1, hi);\n }\n }\n private static void quickSort(List a) where T : IComparable => quickSort(a, 0, a.Count - 1);\n\n private static void watermelon()\n {\n var w = readValue();\n write(w >= 4 && w % 2 == 0 ? \"YES\" : \"NO\");\n }\n private static void wayTooLongWords()\n {\n var words = new List();\n\n var n = readValue();\n for (int i = 0; i < n; ++i)\n words.Add(readString());\n\n foreach (var word in words)\n write(word.Length <= 10 ? word : $\"{word.First()}{word.Length - 2}{word.Last()}\");\n }\n private static void team()\n {\n int solve = 0;\n\n var n = readValue();\n for (int i = 0; i < n; ++i)\n if (readValues().Where(x => x == 1).Count() > 1)\n ++solve;\n\n write(solve);\n }\n private static void football()\n {\n var positions = readString();\n for (int i = 6; i < positions.Length; ++i)\n if (positions.Substring(i - 6, 6) == (positions[i] == '0' ? \"000000\" : \"111111\"))\n {\n write(\"YES\");\n return;\n }\n write(\"NO\");\n }\n private static void theatreSquare()\n {\n var sizes = readValues();\n write((long)Math.Ceiling((double)sizes[0] / (double)sizes[2]) * (long)Math.Ceiling((double)sizes[1] / (double)sizes[2]));\n }\n private static void stringTask()\n {\n var Vowels = new HashSet { 'a', 'o', 'y', 'e', 'u', 'i' };\n var sb = new StringBuilder();\n var s = readString().ToLower();\n foreach (var c in s)\n if (!Vowels.Contains(c))\n {\n sb.Append('.');\n sb.Append(c);\n }\n\n write(sb.ToString());\n }\n private static void taxi()\n {\n int taxis = 0;\n var groups = new Dictionary { { 1, 0 }, { 2, 0 }, { 3, 0 } };\n\n readValue();\n var groupSizes = readValues();\n foreach (var size in groupSizes)\n if (size == 4)\n ++taxis;\n else\n groups[size] = groups[size] + 1;\n\n taxis += groups[3];\n groups[1] = groups[1] - Math.Min(groups[1], groups[3]);\n\n taxis += groups[2] / 2;\n if (groups[2] % 2 == 1)\n {\n ++taxis;\n groups[1] = groups[1] - 2;\n }\n\n if (groups[1] > 0)\n taxis += (int)Math.Ceiling((double)groups[1] / 4.0);\n\n write(taxis);\n }\n private static void fancyFence()\n {\n var a = readValue();\n for (double i = 3.0; ; i += 1.0)\n {\n var x = (double)(i - 2.0) * 180.0 / i;\n if (a <= x)\n {\n write(a < x ? \"NO\" : \"YES\");\n break;\n }\n }\n }\n private static void interestingDrink()\n {\n readString();\n var prices = readValues().OrderBy(x => x).ToList();\n var days = readValue();\n for (int i = 0; i < days; ++i)\n write(binarySearch(prices, readValue()) + 1);\n }\n private static void compilationErrors()\n {\n readString();\n Dictionary errors = readValues().GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count()), errors1 = new Dictionary();\n foreach (var error in readValues())\n {\n if (errors[error] > 1)\n errors[error] = errors[error] - 1;\n else\n errors.Remove(error);\n\n if (errors1.TryGetValue(error, out var count))\n errors1[error] = count + 1;\n else\n errors1.Add(error, 1);\n }\n write(errors.First().Key);\n\n foreach (var error in readValues())\n if (errors1[error] > 1)\n errors1[error] = errors1[error] - 1;\n else\n errors1.Remove(error);\n write(errors1.First().Key);\n }\n private static void doubleCola()\n {\n var idToName = new Dictionary { { 0, \"Sheldon\" }, { 1, \"Leonard\" }, { 2, \"Penny\" }, { 3, \"Rajesh\" }, { 4, \"Howard\" } };\n int n = readValue(), i = 1;\n for (; n > i * 5; i *= 2)\n n -= i * 5;\n write(idToName[(n - 1) / i]);\n }\n private static void ilyaAndQueries()\n {\n var dic = new Dictionary();\n var list = new List>();\n\n var s = readString();\n int start = 0, dicStart = 0;\n for (int j = 0; j < s.Length - 1; ++j)\n if (s[j] != s[j + 1])\n {\n if (start < j)\n {\n list.Add(new Tuple(start + 1, j + 1));\n for (; dicStart < j + 1; ++dicStart)\n dic.Add(dicStart, list.Count - 1);\n }\n start = j + 1;\n }\n if (start < s.Length - 1)\n {\n list.Add(new Tuple(start + 1, s.Length));\n for (; dicStart < s.Length; ++dicStart)\n dic.Add(dicStart, list.Count - 1);\n }\n\n var m = readValue();\n for (int j = 0; j < m; ++j)\n {\n var q = readValues();\n int l = q[0], r = q[1], result = 0;\n if (dic.TryGetValue(l, out var i))\n for (; i < list.Count && r >= list[i].Item1; ++i)\n if (l < list[i].Item2)\n result += Math.Min(r, list[i].Item2) - Math.Max(l, list[i].Item1);\n write(result);\n }\n }\n private static void twoTeamsComposing()\n {\n var n = readValue();\n var skills = readValues().GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count());\n }\n #region Laptop\n private class Laptop\n {\n internal int Price { get; private set; }\n internal int Quality { get; private set; }\n internal Laptop(List values)\n {\n Price = values[0];\n Quality = values[1];\n }\n }\n private class Laptop_Comparer_Price : Comparer\n {\n public override int Compare([AllowNull] Laptop x, [AllowNull] Laptop y) => x.Price - y.Price;\n }\n private class Laptop_Comparer_Quality : Comparer\n {\n public override int Compare([AllowNull] Laptop x, [AllowNull] Laptop y) => x.Quality - y.Quality;\n }\n private static void laptops()\n {\n List prices = new List(), qualities = new List();\n var n = readValue();\n for (int i = 0; i < n; ++i)\n {\n var laptop = new Laptop(readValues());\n prices.Add(laptop);\n qualities.Add(laptop);\n }\n\n for (int i = 0; i < n; ++i)\n if (prices[i] != qualities[i])\n {\n write(\"Happy Alex\");\n return;\n }\n write(\"Poor Alex\");\n }\n #endregion\n private static void fence()\n {\n int k = readValues()[1], minI = 0, currentH = 0;\n var h = readValues();\n\n for (int i = 0; i < k; ++i)\n currentH += h[i];\n var minH = currentH;\n\n for (int i = 1; i < h.Count - k + 1; ++i)\n {\n currentH = currentH - h[i - 1] + h[i + k - 1];\n if (minH > currentH)\n {\n minH = currentH;\n minI = i;\n }\n }\n\n write(minI + 1);\n }\n #region serejaAndSuffixes\n private class SerejaL : IComparable\n {\n internal int L { get; private set; }\n internal int Result;\n internal SerejaL(int l)\n {\n L = l;\n }\n\n public int CompareTo(object obj) => L - ((SerejaL)obj).L;\n }\n private static void serejaGetLs(int m, out List listDistinct, out List listOrdered)\n {\n listDistinct = new List();\n listOrdered = new List();\n var dic = new Dictionary();\n for (int i = 0; i < m; ++i)\n {\n var l = readValue() - 1;\n if (!dic.TryGetValue(l, out var item))\n {\n item = new SerejaL(l);\n dic.Add(l, item);\n listDistinct.Add(item);\n }\n listOrdered.Add(item);\n }\n quickSort(listDistinct);\n }\n private static void serejaAndSuffixes()\n {\n var m = readValues()[1];\n var a = readValues();\n serejaGetLs(m, out var listDistinct, out var listOrdered);\n\n var distinct = new HashSet();\n for (int i = listDistinct.Count - 1, j = a.Count - 1; i >= 0; --i)\n {\n for (; j >= listDistinct[i].L; --j)\n if (!distinct.Contains(a[j]))\n distinct.Add(a[j]);\n\n listDistinct[i].Result = distinct.Count;\n }\n\n foreach (var item in listOrdered)\n write(item.Result);\n }\n #endregion\n private static void bowWowTimetable()\n {\n string s = readString(), r = \"1\";\n int i = 1;\n for (; r.Length < s.Length; ++i, r = r + \"00\") ;\n if (r.Length > s.Length || !s.Substring(1).Contains('1'))\n write(i - 1);\n else\n write(i);\n }\n private static void digits()\n {\n readString();\n var numbers = readValues().GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count());\n if (!numbers.ContainsKey(0))\n {\n write(-1);\n return;\n }\n }\n private static void lifeWithoutZeros()\n {\n long a = readValue(), b = readValue(), c = a + b;\n write(Convert.ToInt64(a.ToString().Replace(\"0\", \"\")) + Convert.ToInt64(b.ToString().Replace(\"0\", \"\")) == Convert.ToInt64(c.ToString().Replace(\"0\", \"\")) ? \"YES\" : \"NO\");\n }\n private static void permutation()\n {\n var n = readValue();\n var a = readValues();\n write(n - a.Where(x => x <= n).Distinct().Count());\n }\n private static void hamsterFarm()\n {\n var n = readValues()[0];\n var k = readValues();\n int bestI = 0;\n for (int i = 1; i < k.Count; ++i)\n if (n % k[i] < n % k[bestI])\n bestI = i;\n write($\"{bestI + 1} {n / k[bestI]}\");\n }\n private static void shellGame()\n {\n int n = readValue(), x = readValue();\n if (x == 1)\n {\n if (n % 2 == 1)\n x = 0;\n else\n x = 2;\n --n;\n }\n for (int i = n % 6; i > 0; --i)\n if (i % 2 == 1)\n {\n if (x == 0)\n x = 1;\n else if (x == 1)\n x = 0;\n }\n else if (x == 1)\n x = 2;\n else if (x == 2)\n x = 1;\n write(x);\n }\n private static void ACM_ICPC()\n {\n var a = readValues();\n int[] score = new int[2], members = new int[2];\n for (int i1 = 0; i1 < 2; ++i1)\n {\n score[i1] = a[0];\n members[i1] = 1;\n for (int i2 = 0; i2 < 2; ++i2)\n {\n score[i2] += a[1];\n members[i2] += 1;\n for (int i3 = 0; i3 < 2; ++i3)\n {\n score[i3] += a[2];\n members[i3] += 1;\n for (int i4 = 0; i4 < 2; ++i4)\n if (members[i4] < 3)\n {\n score[i4] += a[3];\n members[i4] += 1;\n for (int i5 = 0; i5 < 2; ++i5)\n if (members[i5] < 3)\n {\n score[i5] += a[4];\n members[i5] += 1;\n for (int i6 = 0; i6 < 2; ++i6)\n if (members[i6] < 3)\n {\n score[i6] += a[5];\n members[i6] += 1;\n if (score[0] == score[1])\n {\n write(\"YES\");\n return;\n }\n score[i6] -= a[5];\n members[i6] -= 1;\n }\n score[i5] -= a[4];\n members[i5] -= 1;\n }\n score[i4] -= a[3];\n members[i4] -= 1;\n }\n score[i3] -= a[2];\n members[i3] -= 1;\n }\n score[i2] -= a[1];\n members[i2] -= 1;\n }\n score[i1] = 0;\n members[i1] = 0;\n }\n write(\"NO\");\n }\n private static void mex()\n {\n var x = readValues()[1];\n var n = readValues();\n write(x - n.Count(y => y < x) + (n.Contains(x) ? 1 : 0));\n }\n private static void minimumProduct()\n {\n var input = readValues();\n int a = input[0], b = input[1], x = input[2], y = input[3], n = input[4], minA = Math.Min(a - x, n), minB = Math.Min(b - y, n);\n if (a - minA <= b - minB)\n {\n a -= minA;\n n -= minA;\n }\n else\n {\n b -= minB;\n n -= minB;\n }\n\n if (n > 0)\n if (a > x)\n a -= Math.Min(a - x, n);\n else if (b > y)\n b -= Math.Min(b - y, n);\n\n write((long)a * (long)b);\n }\n private static void shovelsAndSwords()\n {\n var input = readValues();\n int a = input[0], b = input[1], result = 0;\n if (a > b)\n {\n var min = Math.Min(a - b, b);\n a -= min * 2;\n b -= min;\n result += min;\n }\n else if (b > a)\n {\n var min = Math.Min(b - a, a);\n a -= min;\n b -= min * 2;\n result += min;\n }\n int d = Math.Min(a / 3, b / 3);\n a -= d * 3;\n b -= d * 3;\n result += d * 2;\n if (a > 0 && b > 0 && (a > 1 || b > 1))\n ++result;\n write(result);\n }\n private static void matrixGame()\n {\n var input = readValues();\n int n = input[0], m = input[1];\n HashSet claimedRows = new HashSet(), claimedColumns = new HashSet();\n for (int i = 0; i < n; ++i)\n {\n input = readValues();\n for (int j = 0; j < m; ++j)\n if (input[j] == 1)\n {\n if (!claimedRows.Contains(i))\n claimedRows.Add(i);\n if (!claimedColumns.Contains(j))\n claimedColumns.Add(j);\n }\n }\n write(Math.Min(n - claimedRows.Count, m - claimedColumns.Count) % 2 == 0 ? \"Vivek\" : \"Ashish\");\n }\n private static void cinemaLine()\n {\n readString();\n var clerk = new Dictionary { { 25, 0 }, { 50, 0 } };\n foreach (var a in readValues())\n switch (a)\n {\n case 25:\n clerk[25] += 1;\n break;\n case 50:\n if (clerk[25] > 0)\n {\n clerk[25] -= 1;\n clerk[50] += 1;\n }\n else\n {\n write(\"NO\");\n return;\n }\n break;\n default: // 100\n if (clerk[50] > 0 && clerk[25] > 0)\n {\n clerk[25] -= 1;\n clerk[50] -= 1;\n }\n else if (clerk[25] > 2)\n clerk[25] -= 3;\n else\n {\n write(\"NO\");\n return;\n }\n break;\n }\n write(\"YES\");\n }\n private static void kindAnton()\n {\n readString();\n List a = readValues(), b = readValues();\n bool positive1 = false, negative1 = false;\n HashSet positive = new HashSet(), negative = new HashSet();\n for (int i = 0; i < a.Count; ++i)\n {\n int diff = b[i] - a[i];\n if (((diff > 0 && !positive1) || (diff < 0 && !negative1)) && !(diff > 0 ? positive : negative).Any(x => diff % x == 0))\n {\n write(\"NO\");\n return;\n }\n if (a[i] > 0)\n {\n if (!positive1)\n if (a[i] == 1)\n {\n positive1 = true;\n if (negative1)\n {\n write(\"YES\");\n return;\n }\n }\n else if (!positive.Contains(a[i]))\n positive.Add(a[i]);\n }\n else if (a[i] < 0 && !negative1)\n if (a[i] == -1)\n {\n negative1 = true;\n if (positive1)\n {\n write(\"YES\");\n return;\n }\n }\n else if (!negative.Contains(a[i]))\n negative.Add(a[i]);\n }\n write(\"YES\");\n }\n private static void staircases()\n {\n var input = readValues();\n int n = input[0], mn = input[1];\n if (mn == 0)\n {\n write(\"YES\");\n return;\n }\n var m = readValues().OrderBy(x => x).ToList();\n if (m[0] == 1 || m[m.Count - 1] == n)\n {\n write(\"NO\");\n return;\n }\n for (int i = 0; i < m.Count - 2; ++i)\n if (m[i] == m[i + 1] - 1 && m[i] == m[i + 2] - 2)\n {\n write(\"NO\");\n return;\n }\n write(\"YES\");\n }\n private static void blownGarland()\n {\n var colors = new Dictionary { { 'R', 0 }, { 'Y', 0 }, { 'B', 0 }, { 'G', 0 } };\n var s = readString();\n\n var colorPerPosition = new char[4];\n foreach (var color in colors)\n colorPerPosition[s.IndexOf(color.Key) % 4] = color.Key;\n\n for (int i = 0; i < s.Length; ++i)\n if (s[i] == '!')\n colors[colorPerPosition[i % 4]] += 1;\n\n write($\"{colors['R']} {colors['B']} {colors['Y']} {colors['G']}\");\n }\n private static void mikeAndFax()\n {\n var s = readString();\n int k = readValue();\n\n if (s.Length % k != 0)\n {\n write(\"NO\");\n return;\n }\n\n int size = s.Length / k;\n for (int i = 0; i < s.Length; i += size)\n for (int j1 = i + size / 2 - 1, j2 = i + size / 2 + size % 2; j1 >= i; --j1, ++j2)\n if (s[j1] != s[j2])\n {\n write(\"NO\");\n return;\n }\n\n write(\"YES\");\n }\n #region weirdRounding\n private static bool weirdRounding_Recursion(string ns, int kp, int d)\n {\n if (d > 0)\n for (int i = ns[1] == '0' && ns.Length > 2 ? 1 : 0; i < ns.Length; ++i)\n {\n string nsNew = ns.Remove(i, 1);\n int n = Convert.ToInt32(nsNew);\n if (n % kp == 0 || weirdRounding_Recursion(nsNew, kp, d - 1))\n return true;\n }\n return false;\n }\n private static void weirdRounding()\n {\n var input = readStrings();\n string ns = input[0];\n int n = Convert.ToInt32(ns), k = Convert.ToInt32(input[1]), kp = (int)Math.Pow(10, k);\n\n if (n < kp)\n write(ns.Length - 1);\n else if (n % kp == 0)\n write(0);\n else\n for (int d = 1; d < ns.Length; ++d)\n if (weirdRounding_Recursion(ns, kp, d))\n {\n write(d);\n return;\n }\n }\n #endregion\n private static void wilburArray()\n {\n readString();\n var b = readValues();\n long result = Math.Abs(b[0]);\n for (int i = 1; i < b.Count; ++i)\n result += Math.Abs(b[i] - b[i - 1]);\n write(result);\n }\n private static void zuhairStrings()\n {\n int k = readValues()[1];\n var s = readString();\n var result = new Dictionary();\n\n for (int i = 0; i < s.Length - k + 1;)\n {\n int j = i + 1;\n for (; j < i + k && s[i] == s[j]; ++j) ;\n if (j == i + k)\n if (!result.ContainsKey(s[i]))\n result.Add(s[i], 1);\n else\n result[s[i]] += 1;\n i = j;\n }\n\n write(result.Count > 0 ? result.Max(x => x.Value) : 0);\n }\n private static void artfulExpedient()\n {\n var n = readValue();\n List x = readValues(), y = readValues();\n var numbers = x.Union(y).ToHashSet();\n var resultEven = true;\n\n for (int i = 0; i < n; ++i)\n for (int j = 0; j < n; ++j)\n if (numbers.Contains(x[i] ^ y[j]))\n resultEven = !resultEven;\n\n write(resultEven ? \"Karen\" : \"Koyomi\");\n }\n private static void ebonyIvory()\n {\n var input = readValues();\n int a = input[0], b = input[1], c = input[2];\n if (a < b)\n {\n var t = a;\n a = b;\n b = t;\n }\n for (; c >= 0; c -= a)\n if (c % b == 0)\n {\n write(\"Yes\");\n return;\n }\n write(\"No\");\n }\n #region Lala Land Apple Trees\n private class LalaLand_AppleTree : IComparable\n {\n private int coordinate;\n internal int Apples { get; private set; }\n internal LalaLand_AppleTree(int coordinate, int apples)\n {\n this.coordinate = coordinate;\n Apples = apples;\n }\n public int CompareTo(object obj) => coordinate - ((LalaLand_AppleTree)obj).coordinate;\n }\n private static void lalaLandAppleTrees()\n {\n var n = readValue();\n List right = new List(), left = new List();\n for (int i = 0; i < n; ++i)\n {\n var input = readValues();\n if (input[0] > 0)\n right.Add(new LalaLand_AppleTree(input[0], input[1]));\n else\n left.Add(new LalaLand_AppleTree(-input[0], input[1]));\n }\n\n if (Math.Abs(right.Count - left.Count) < 2)\n write(right.Sum(x => x.Apples) + left.Sum(x => x.Apples));\n else\n {\n quickSort(right);\n quickSort(left);\n if (right.Count > left.Count)\n write(right.GetRange(0, left.Count + 1).Sum(x => x.Apples) + (left.Count > 0 ? left.Sum(x => x.Apples) : 0));\n else\n write((right.Count > 0 ? right.Sum(x => x.Apples) : 0) + left.GetRange(0, right.Count + 1).Sum(x => x.Apples));\n }\n }\n #endregion\n private static void lanterns()\n {\n int l = readValues()[1], d = 0;\n var a = readValues().Distinct().ToList();\n quickSort(a);\n for (int i = 0; i < a.Count - 1; ++i)\n {\n var diff = a[i + 1] - a[i];\n if (diff > d)\n d = diff;\n }\n if (a[0] > 0 && a[a.Count - 1] < l)\n write(Math.Max(Math.Max(a[0] - 0, l - a[a.Count - 1]), d / 2.0));\n else if (a[0] > 0)\n write(Math.Max(a[0] - 0, d / 2.0));\n else if (a[a.Count - 1] < l)\n write(Math.Max(l - a[a.Count - 1], d / 2.0));\n else\n write((double)d / 2.0);\n }\n private static void cheapTravel()\n {\n var input = readValues();\n int n = input[0], m = input[1], a = input[2], b = input[3];\n if (b >= a * m)\n write(n * a);\n else\n write((n / m) * b + ((n % m) * a < b ? (n % m) * a : b));\n }\n private static void berSUBall()\n {\n readString();\n var a = readValues();\n readString();\n var b = readValues();\n quickSort(a);\n quickSort(b);\n int result = 0;\n for (int i = 0, j = 0; i < a.Count && j < b.Count;)\n if (Math.Abs(a[i] - b[j]) < 2)\n {\n ++result;\n ++i;\n ++j;\n }\n else if (a[i] < b[j])\n ++i;\n else\n ++j;\n write(result);\n }\n private static void flippingGame()\n {\n readString();\n var a = readValues();\n int max = 0;\n for (int i = 0, previousOnes = 0, total = a.Sum(); i < a.Count; previousOnes += a[i], ++i)\n for (int j = i, remainingOnes = total - previousOnes; j < a.Count; , ++j)\n {\n remainingOnes -= a[j];\n var ones = previousOnes + (j - i + 1 - (total - previousOnes - remainingOnes)) + remainingOnes;\n if (ones > max)\n max = ones;\n }\n write(max);\n }\n\n static void Main(string[] args)\n {\n //var t = readValue();\n //for (int i = 0; i < t; ++i)\n flippingGame();\n }\n }\n}\n", "lang": ".NET Core C#", "bug_code_uid": "817918b2fc03c85ad1efb870a3e55786", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "0c18d63da3ebcb8275506a4865de7cfa", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9933333333333333, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\n class Program\n {\n static void Main(string[] args)\n {\n \n int max = 0;\n {\n string input = Console.ReadLine().Split(new char[] { '\\r', '\\n' }, StringSplitOptions.RemoveEmptyEntries)[1];\n int crr = 0, ones=0;\n for (int i = 0; i < input.Length; i+=2)\n {\n if (input[i] == '0') crr++; \n else\n {\n ones++;\n if (crr > 0)\n {\n if (crr > max) max = crr;\n crr--;\n }\n }\n }\n if (crr > max) max = crr;\n else if (max == 0) max--;\n max += ones;\n }\n Console.WriteLine(max);\n }\n }", "lang": "Mono C#", "bug_code_uid": "524a073f9ff3dbd0f7988891cb735b3a", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "267d18b5b5d3bd5d078b2ed230c69bd8", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9915309446254071, "equal_cnt": 3, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": " using System;\n class Program\n {\n static void Main(string[] args)\n {\n int max = 0;\n {\n string input = Console.ReadLine().Split(new char[] { '\\r', '\\n' }, StringSplitOptions.RemoveEmptyEntries)[1];\n int crr = 0, ones=0;\n for (int i = 0; i < input.Length;)\n {\n while (i < input.Length && input[i] == '0') { crr++; i += 2; }\n if (max < crr) max = crr;\n while (i < input.Length && input[i]=='1') { crr--; ones++; i += 2; }\n if (crr < 0) crr = 0;\n }\n if (max == 0) max--;\n max += ones;\n }\n Console.WriteLine(max);\n }\n }", "lang": "Mono C#", "bug_code_uid": "58d52baccf3e8d02a3797962454861c5", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "267d18b5b5d3bd5d078b2ed230c69bd8", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8498789346246973, "equal_cnt": 30, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 24, "fix_ops_cnt": 30, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nclass Program\n {\nstatic int Main()\n {\n string l1 = Console.ReadLine();\n int n = int.Parse(l1);\n int[] inputs = new int[n];\n\n string l2 = Console.ReadLine();\n string[] inpS = l2.Split(' ');\n\n int OrigTotal1s = 0;\n for (int i = 0; i < n; i++)\n {\n inputs[i] = int.Parse(inpS[i]);\n if (inputs[i] == 1)\n {\n OrigTotal1s++;\n }\n }\n\n int delta = -1;\n int maxdelta = -1;\n int nums0 = 0;\n int nums1 = 0;\n\n for (int i = 0; i < n - 1; i++)\n {\n nums0 = 0; nums1 = 0;\n if (inputs[i] == 0)\n {\n nums0++;\n for (int j = i + 1; j < n; j++)\n {\n if (inputs[j] == 1)\n {\n nums1++;\n }\n else nums0++;\n\n delta = nums0 - nums1;\n\n if (delta > maxdelta)\n {\n maxdelta = delta;\n }\n\n }\n }\n }\n\n return OrigTotal1s + maxdelta;\n }\n}", "lang": "Mono C#", "bug_code_uid": "f4c1f74290aae368353ebdcff0b830e8", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "2d32e2d835ef2df0cb6efd353519f163", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8672727272727273, "equal_cnt": 30, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 27, "fix_ops_cnt": 30, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nclass Program\n {\nstatic int Main()\n {\n string l1 = Console.ReadLine();\n int n = int.Parse(l1);\n int[] inputs = new int[n];\n\n string l2 = Console.ReadLine();\n string[] inpS = l2.Split(' ');\n\n int OrigTotal1s = 0;\n for (int i = 0; i < n; i++)\n {\n inputs[i] = int.Parse(inpS[i]);\n if (inputs[i] == 1)\n {\n OrigTotal1s++;\n }\n }\n\n int delta = -1;\n int maxdelta = -1;\n int nums0 = 0;\n int nums1 = 0;\n\n for (int i = 0; i < n - 1; i++)\n {\n nums0 = 0; nums1 = 0;\n if (inputs[i] == 0)\n {\n nums0++;\n for (int j = i + 1; j < n; j++)\n {\n if (inputs[j] == 1)\n {\n nums1++;\n }\n else nums0++;\n\n delta = nums0 - nums1;\n\n if (delta > maxdelta)\n {\n maxdelta = delta;\n }\n\n }\n }\n }\n\n Console.Write(OrigTotal1s + maxdelta);\n }\n}", "lang": "Mono C#", "bug_code_uid": "c33c0933b5b1f94a9f76c4b643be35e4", "src_uid": "9b543e07e805fe1dd8fa869d5d7c8b99", "apr_id": "2d32e2d835ef2df0cb6efd353519f163", "difficulty": 1200, "tags": ["dp", "brute force", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8746594005449592, "equal_cnt": 14, "replace_cnt": 5, "delete_cnt": 1, "insert_cnt": 7, "fix_ops_cnt": 13, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace E\n{\n class Program\n {\n static int n;\n static int t;\n static int ti;\n\n static void Main(string[] args)\n {\n //Console.SetIn(File.OpenText(\"in.txt\"));\n var data = Console.ReadLine().Split().Select(d => int.Parse(d)).ToArray();\n n = data[0];\n t = data[1];\n ti = 2 * t - 1;\n\n var variants = 0;\n for (int i = 1; i < 4; i++)\n {\n variants += req(-1, 1, i);\n }\n Console.WriteLine(variants);\n }\n\n\n static int req(int tCurrent, int x, int y)\n {\n if (x == n)\n {\n if (tCurrent == ti)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n }\n\n if (x == 1)\n {\n var upPath = 0;\n for (int j = y + 1; j <= 4; j++)\n {\n upPath += req(0, x + 1, j);\n }\n \n\n return upPath;\n }\n\n if (tCurrent % 2 == 0 || x == 2)\n {\n // нечетное, горб\n var downPath = 0;\n for (int i = y - 1; i >= 1; i--)\n {\n downPath += req(tCurrent + 1, x + 1, i);\n }\n\n var upPath = 0;\n for (int i = y + 1; i <= 4; i++)\n {\n upPath += req(tCurrent, x + 1, i);\n }\n\n return downPath + upPath;\n\n \n }\n else\n {\n // Четное, мы на впадине\n var downPath = 0;\n for (int i = y - 1; i >= 1; i--)\n {\n downPath += req(tCurrent, x + 1, i);\n }\n\n var upPath = 0;\n for (int i = y + 1; i <= 4; i++)\n {\n upPath += req(tCurrent + 1, x + 1, i);\n }\n\n return downPath + upPath;\n }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "a09c84e823bc57bbe99740f8b3855196", "src_uid": "6d67559744583229455c5eafe68f7952", "apr_id": "bbb88d93b7da529a1d3a58360a2993bc", "difficulty": 1900, "tags": ["dp"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8229842446709916, "equal_cnt": 1, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 2, "bug_source_code": " static void Main(string[] args)\n {\n \n int z = 0;\n int a = int.Parse(Console.ReadLine()),\n b = int.Parse(Console.ReadLine()),\n c = int.Parse(Console.ReadLine());\n while (a!=0 && b>=2 && c>=4)\n {\n a--;\n b = b - 2;\n c = c - 4;\n z += 7;\n }\n Console.WriteLine(z);\n }", "lang": "MS C#", "bug_code_uid": "b2a01b3226b88d0839f700e0f2f458fb", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "31c3a838d7b0784e8f01f3f35ecc0e36", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.01168152474638795, "equal_cnt": 12, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "\n\n \n \n Debug\n AnyCPU\n {D67C2C54-E222-444F-8EA6-3B39D4121572}\n Exe\n Properties\n TaskB\n TaskB\n v4.5\n 512\n \n \n AnyCPU\n true\n full\n false\n bin\\Debug\\\n DEBUG;TRACE\n prompt\n 4\n \n \n AnyCPU\n pdbonly\n true\n bin\\Release\\\n TRACE\n prompt\n 4\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", "lang": "MS C#", "bug_code_uid": "f01be32eac4c592d5183f13b4e1b3665", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "2d24d381ad6b74447f196c6de8bc1354", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8198183845786203, "equal_cnt": 26, "replace_cnt": 18, "delete_cnt": 0, "insert_cnt": 8, "fix_ops_cnt": 26, "bug_source_code": "using System;\n\nnamespace _420B\n{\n class Program\n {\n static void Main(string[] args)\n {\n MyIo myIo = new MyIo();\n myIo.Read();\n Solver solver = new Solver(myIo);\n int answer = solver.brute();\n Console.WriteLine(answer);\n }\n }\n\n class MyIo\n {\n public int m,b;\n public void Read()\n {\n string[] input = Console.ReadLine().Split();\n m = Int32.Parse(input[0]);\n b = Int32.Parse(input[1]);\n }\n\n\n }\n\n class Solver\n {\n private MyIo myIo;\n public Solver(MyIo myIo)\n {\n this.myIo = myIo;\n }\n private double xLineFormula(int x)\n {\n return (myIo.b - ((double)x / (double)myIo.m));\n }\n private double yLineFormula(int y)\n {\n return ((myIo.b - y) * myIo.m);\n }\n public int brute()\n {\n int maxBanana = 0;\n\n int xDim, yDim;\n yDim =(int)xLineFormula(0);\n xDim = (int)yLineFormula(0);\n\n int[,] matrix = new int[xDim+1,yDim+1];\n matrix[0, 0] = 0;\n for (int i = 1; i <= xDim; ++i)\n {\n matrix[i, 0] =matrix[i-1,0]+ i;\n if (matrix[i, 0] > maxBanana) maxBanana = matrix[i, 0];\n }\n \n for (int i = 1; i <= yDim; ++i)\n {\n matrix[0, i] =matrix[0,i-1]+ i;\n if (matrix[0,i] > maxBanana) maxBanana = matrix[0,i];\n }\n \n\n // Console.WriteLine(\"{0} {1} \", xDim, yDim);\n\n for(int i=1; i<=xDim; ++i)\n {\n int j = 1;\n while( j<=xLineFormula(i) && j<=yDim )\n {\n // Console.WriteLine(\"{0} {1}\", i, j);\n //matrix[i, j] = j * (j + 1) / 2 * (i) - lineDiff + (i + j) * (i + j + 1) / 2;\n matrix[i, j] = matrix[i - 1, j] + matrix[i, j - 1] + i + j - matrix[i-1,j-1];\n // if (i > 1 && j > 1)\n // {\n // matrix[i, j] -= matrix[i - 1, j - 1];\n // }\n \n if (matrix[i, j] > maxBanana) maxBanana = matrix[i, j];\n j++;\n }\n }\n\n\n /* for(int i=0; i<=xDim; ++i)\n {\n for (int j = 0; j <= yDim; ++j)\n Console.Write(matrix[i, j] + \" \");\n Console.WriteLine();\n }*/\n\n return maxBanana;\n }\n }\n\n}", "lang": "MS C#", "bug_code_uid": "50a7eba40f9f267062e61ae303286b5a", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "349a4c1f10fb9ae6f455d3ba6d72e06a", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8714307763543757, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 5, "bug_source_code": "using System;\n\nnamespace _420B\n{\n class Program\n {\n static void Main(string[] args)\n {\n MyIo myIo = new MyIo();\n myIo.Read();\n Solver solver = new Solver(myIo);\n long answer = solver.brute();\n Console.WriteLine(answer);\n }\n }\n\n class MyIo\n {\n public int m,b;\n public void Read()\n {\n string[] input = Console.ReadLine().Split();\n m = Int32.Parse(input[0]);\n b = Int32.Parse(input[1]);\n }\n\n\n }\n\n class Solver\n {\n private MyIo myIo;\n public Solver(MyIo myIo)\n {\n this.myIo = myIo;\n }\n private double xLineFormula(int x)\n {\n return (myIo.b - ((double)x / (double)myIo.m));\n }\n private double yLineFormula(int y)\n {\n return ((myIo.b - y) * myIo.m);\n }\n public long brute()\n {\n long maxBanana = 0;\n\n int xDim, yDim;\n yDim =(int)xLineFormula(0);\n xDim = (int)yLineFormula(0);\n\n long[,] matrix = new long[3,yDim+1];\n matrix[0, 0] = 0;\n /* for (int i = 1; i <= xDim; ++i)\n {\n matrix[i, 0] =matrix[i-1,0]+ i;\n if (matrix[i, 0] > maxBanana) maxBanana = matrix[i, 0];\n }*/\n \n for (int i = 1; i <= yDim; ++i)\n {\n matrix[0, i] =matrix[0,i-1]+ i;\n if (matrix[0,i] > maxBanana) maxBanana = matrix[0,i];\n }\n\n\n // Console.WriteLine(\"{0} {1} \", xDim, yDim);\n int line = 1;\n for(int i=1; i<=xDim; ++i)\n {\n matrix[line, 0] = matrix[1-line, 0] + i;\n if (matrix[line, 0] > maxBanana) maxBanana = matrix[line, 0];\n int j = 1;\n while( j<=xLineFormula(i) && j<=yDim )\n {\n // Console.WriteLine(\"{0} {1}\", i, j);\n //matrix[i, j] = j * (j + 1) / 2 * (i) - lineDiff + (i + j) * (i + j + 1) / 2;\n matrix[line, j] = matrix[1- line, j] + matrix[line, j - 1] + i + j - matrix[1- line, j-1];\n // if (i > 1 && j > 1)\n // {\n // matrix[i, j] -= matrix[i - 1, j - 1];\n // }\n \n if (matrix[line, j] > maxBanana) maxBanana = matrix[line, j];\n j++;\n }\n line = 1 - line;\n }\n\n\n /* for(int i=0; i<=xDim; ++i)\n {\n for (int j = 0; j <= yDim; ++j)\n Console.Write(matrix[i, j] + \" \");\n Console.WriteLine();\n }*/\n\n return maxBanana;\n }\n }\n\n}", "lang": "MS C#", "bug_code_uid": "a335c87f3a690604e0042f622cb1b7a1", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "349a4c1f10fb9ae6f455d3ba6d72e06a", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5774705164701098, "equal_cnt": 16, "replace_cnt": 10, "delete_cnt": 0, "insert_cnt": 5, "fix_ops_cnt": 15, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace zzadacha_B\n{\n class Program\n {\n \n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n string[] s1 = s.Split(' ');\n int m =int.Parse(s1[0]);\n int b = int.Parse(s1[1]);\n int n = 0;\n\n //int y = b/2;\n //int x = (m * b)/2;\n ////int xo = (m * b) % 2;\n ////int yo = b % 2;\n ////if (xo == 1 && yo == 1)\n //// y++;\n ////else\n ////{\n //// if (xo == 1 && yo == 0)\n //// y++;\n //// else\n //// {\n //// if (xo == 0 && yo == 1)\n //// x++;\n //// }\n ////}\n int max = 0;\n for (int y = 0; y <= b; y++)\n {\n int a = 0;\n int aa = 0;\n int x = (b-y)*m;\n a = x * (x + 1) / 2;\n aa = y * (y + 1) / 2;\n //for (int i = 0; i <= x; i++)\n // a += i;\n //for (int i = 0; i <= y; i++)\n // aa += i;\n n = a * (y + 1) + aa * (x + 1);\n if (n > max || max == 0)\n max = n;\n } \n Console.WriteLine(max);\n Console.Read();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "2a8103c67b079a18b629d1489f6eee62", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "5753507929921a4e383cfed55c7ec248", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.5723905723905723, "equal_cnt": 15, "replace_cnt": 12, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace zzadacha_B\n{\n class Program\n {\n \n static void Main(string[] args)\n {\n string s = Console.ReadLine();\n string[] s1 = s.Split(' ');\n int m =int.Parse(s1[0]);\n int b = int.Parse(s1[1]);\n int n = 0;\n\n //int y = b/2;\n //int x = (m * b)/2;\n ////int xo = (m * b) % 2;\n ////int yo = b % 2;\n ////if (xo == 1 && yo == 1)\n //// y++;\n ////else\n ////{\n //// if (xo == 1 && yo == 0)\n //// y++;\n //// else\n //// {\n //// if (xo == 0 && yo == 1)\n //// x++;\n //// }\n ////}\n int max = 0;\n for (int y = 0; y <= b; y++)\n {\n int a = 0;\n int aa = 0;\n int x = (b-y)*m;\n for (int i = 0; i <= x; i++)\n a += i;\n for (int i = 0; i <= y; i++)\n aa += i;\n n = a * (y + 1) + aa * (x + 1);\n if (n > max || max == 0)\n max = n;\n } \n Console.WriteLine(max);\n Console.Read();\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "6324a0ff0c0a65b480a416e8ed3b59be", "src_uid": "9300f1c07dd36e0cf7e6cb7911df4cf2", "apr_id": "5753507929921a4e383cfed55c7ec248", "difficulty": 1300, "tags": ["math", "brute force"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9840255591054313, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace c1cs\n{\n class Program\n {\n static void Main()\n {\n int ans = 0;\n string[] ss = Console.ReadLine().Split();\n int n = int.Parse(ss[0]);\n int m = int.Parse(ss[1]);\n if (n > m)\n {\n int a = n;\n n = m;\n m = a;\n }\n if (n == 1) ans = ((m - 1) / 3 + 1);\n if (n == 2) ans = m / 2 + 1;\n if (n == 3)\n {\n if (m < 5) ans = m;\n else\n {\n int mo = (m - 5) / 4 + 1;\n ans = m - mo;\n }\n }\n if (n == 4)\n {\n if (m % 2 == 0) ans = m;\n else ans = m + 1;\n if (m == 6) ans = 7;\n }\n if (n == 5)\n {\n if (m == 5) ans = 7;\n if (m == 6) ans = 8;\n if (m == 7) ans = 9;\n if (m == 8) ans = 11;\n }\n if (n == 6) ans = (10);\n Console.WriteLine(n * m - ans);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "9f833b63d82eea71708b38ae1bcf2203", "src_uid": "097674b4dd696b30e102938f71dd39b9", "apr_id": "ed7179ea8168eda9d4a7ce7dd3fa5089", "difficulty": 2100, "tags": ["dp", "bitmasks", "dsu"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9503990302050712, "equal_cnt": 15, "replace_cnt": 7, "delete_cnt": 5, "insert_cnt": 4, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.IO;\n\nnamespace Task\n{\n class MyIo\n {\n char[] separators = new char[] { ' ', '\\t' };\n\n#if TEST\n TextReader inputStream = new StreamReader(\"..\\\\..\\\\input.txt\");\n#else\n TextReader inputStream = System.Console.In;\n#endif\n TextWriter outputStream = Console.Out;\n\n string[] tokens;\n int pointer;\n\n public string NextLine()\n {\n try\n {\n return inputStream.ReadLine();\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public string NextString()\n {\n try\n {\n while (tokens == null || pointer >= tokens.Length)\n {\n tokens = NextLine().Split(separators, StringSplitOptions.RemoveEmptyEntries);\n pointer = 0;\n }\n return tokens[pointer++];\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public int NextInt()\n {\n return int.Parse(NextString());\n }\n\n public long NextLong()\n {\n return long.Parse(NextString());\n }\n\n public void Print(string format, params object[] args)\n {\n outputStream.Write(format, args);\n }\n\n public void PrintLine(string format, params object[] args)\n {\n outputStream.WriteLine(format, args);\n }\n\n public void Print(T o)\n {\n outputStream.Write(o);\n }\n\n public void PrintLine(T o)\n {\n outputStream.WriteLine(o);\n }\n\n public void Close()\n {\n inputStream.Close();\n outputStream.Close();\n }\n }\n\n\n\n class Program\n {\n MyIo io = new MyIo();\n\n enum State\n {\n Empty = 0,\n OwnerOnly = 1,\n WithGuest = 2\n }\n\n int R, C;\n\n State[,] map;\n\n Dictionary memo = new Dictionary();\n\n long makeConfig(int r, int c)\n {\n long cfg = (r << 6) | c;\n int lowR = Math.Max(0, r - 1);\n int highR = Math.Min(R - 1, r + 1);\n\n int abs = r * C + c;\n\n int lowAbs = Math.Max(0, abs - C);\n int highAbs = Math.Min(R * C - 1, abs + C);\n\n for (int curAbs = lowAbs; curAbs <= highAbs; curAbs++)\n {\n int curR = curAbs / C;\n int curC = curAbs % C;\n\n cfg <<= 2;\n cfg |= (uint)map[curR, curC];\n }\n\n return cfg;\n }\n\n int[][] dirs = new int[][]\n {\n new int[] {0, -1},\n new int[] {0, 1},\n new int[] {1, 0},\n new int[] {-1, 0}\n };\n\n int xfx(int r, int c)\n {\n if (r == R)\n {\n return 0;\n }\n if (c == C)\n {\n return xfx(r + 1, 0);\n }\n long cfg = makeConfig(r, c);\n if (memo.ContainsKey(cfg))\n {\n return memo[cfg];\n }\n\n if (map[r, c] == State.Empty)\n {\n return xfx(r, c + 1);\n }\n\n if (map[r, c] == State.WithGuest)\n {\n return xfx(r, c + 1);\n }\n\n int ans = xfx(r, c + 1); // no move\n\n map[r, c] = State.Empty;\n\n foreach (int[] d in dirs)\n {\n int nR = r + d[0];\n int nC = c + d[1];\n\n if (nR >= 0 && nR < R && nC >= 0 && nC < C)\n {\n var oldState = map[nR, nC];\n int curAns = oldState == State.Empty ? 0 : 1;\n\n map[nR, nC] = State.WithGuest;\n \n curAns += xfx(r, c + 1);\n map[nR, nC] = oldState;\n\n ans = Math.Max(ans, curAns);\n }\n }\n\n map[r, c] = State.OwnerOnly;\n\n memo[cfg] = ans;\n return ans;\n\n\n }\n\n void Solve()\n {\n R = io.NextInt();\n C = io.NextInt();\n\n if (C > R)\n {\n R += C;\n C = R - C;\n R = R - C;\n }\n\n map = new State[R, C];\n\n for (int r = 0; r < R; r++)\n {\n for (int c = 0; c < C; c++)\n {\n map[r, c] = State.OwnerOnly;\n }\n }\n\n int ans = xfx(0, 0);\n io.Print(ans);\n }\n\n static void Main(string[] args)\n {\n var p = new Program();\n p.Solve();\n p.io.Close();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "e314e7b43068a56f4a0314200564581e", "src_uid": "097674b4dd696b30e102938f71dd39b9", "apr_id": "1884329cd018a6c09007156b12e2478f", "difficulty": 2100, "tags": ["dp", "bitmasks", "dsu"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9876444798724592, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Web;\nusing System.Net;\nusing System.Collections;\nusing System.Threading;\n\nnamespace ConsoleApplication1 {\n class Program {\n static void Main( string[] args ) {\n int a = ReadInt();\n int b = ReadInt();\n int c = ReadInt();\n int x = (a + b - c) /2;\n int y = (-a + b + c)/2;\n int z = (a - b + c) /2;\n if ( x < 0 || y < 0 || z < 0 ) {\n Console.WriteLine(\"Impossible\");\n return;\n } else {\n Console.WriteLine(\"{0} {1} {2}\", x, y, z);\n }\n }\n\n static int _current = -1;\n static string[] _words = null;\n static int ReadInt() {\n if ( _current == -1 ) {\n _words = Console.ReadLine().Split(new char[] { ' ', '\\r', '\\n' }, StringSplitOptions.RemoveEmptyEntries);\n _current = 0;\n }\n\n int value = int.Parse(_words[_current]);\n if ( _current == _words.Length - 1 )\n _current = -1;\n else\n _current++;\n\n return value;\n }\n }\n}", "lang": "MS C#", "bug_code_uid": "86ec584f700266faf821f4b98b749ae0", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "010d9aac7bbb8680d038d6c31e415d5c", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9995951417004049, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static atom[] limits = new atom[3];\n static bool notValid = false;\n static void Main(string[] args)\n {\n string[] s;\n\n s = Console.ReadLine().Split(' ');\n\n int a = int.Parse(s[0]);\n int b = int.Parse(s[1]);\n int c = int.Parse(s[2]);\n int count = 0;\n for (int i = 0; i < 3; i++)\n {\n limits[i] = new atom();\n limits[i].pos = i;\n limits[i].value = int.Parse(s[i]);\n }\n Array.Sort(limits, compare);\n int[] ris = new int[3];\n while (!finish())\n {\n if (limits[0].pos != 0 && limits[1].pos != 0) \n {\n ris[1]++;\n limits[0].value--;\n limits[1].value--;\n }\n if (limits[0].pos != 1 && limits[1].pos != 1)\n {\n ris[2]++;\n limits[0].value--;\n limits[1].value--;\n }\n if (limits[0].pos != 2 && limits[1].pos != 2)\n {\n ris[0]++;\n limits[0].value--;\n limits[1].value--;\n }\n Array.Sort(limits, compare);\n }\n for (int i = 0; i < 3; i++) \n {\n if (ris[i] == 0) { count++; }\n }\n if (notValid||count>1)\n {\n Console.WriteLine(\"impossible\");\n return;\n }\n Console.WriteLine(ris[0]+\" \"+ris[1]+\" \"+ris[2]);\n \n\n }\n static public bool finish() \n {\n if (limits[0].value < 0 || limits[1].value < 0 || limits[2].value < 0) \n {\n notValid = true;\n return true;\n \n }\n return !(limits[0].value > 0||limits[1].value > 0 || limits[2].value > 0);\n }\n public static int compare(atom a, atom b)\n {\n return -a.value.CompareTo(b.value);\n }\n\n }\n struct atom\n {\n \n public int pos;\n public int value;\n }\n}\n\n", "lang": "MS C#", "bug_code_uid": "7a5d64b86a0a2451445664dec9b139e6", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "7cd0c2390c232c3be35e8c348e1bca58", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6051571313456889, "equal_cnt": 16, "replace_cnt": 8, "delete_cnt": 5, "insert_cnt": 3, "fix_ops_cnt": 16, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\nclass Program\n{\n static TextReader reader = new StreamReader(Console.OpenStandardInput(1024 * 10), System.Text.Encoding.ASCII, false, 1024 * 10);\n static TextWriter writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), System.Text.Encoding.ASCII, 1024 * 10);\n static void Main()\n {\n var _1 = reader.ReadLine().Split().Select(int.Parse).ToArray();\n int a = _1[0], b = _1[1], c = _1[2];\n if (a > b + c || b > a + c || c > a + b || (a + b + c) % 2 != 0)\n {\n writer.WriteLine(\"Impossible\");\n writer.Flush();\n reader.Close();\n writer.Close();\n return;\n }\n if (a == b && b == c)\n {\n writer.WriteLine(\"{0} {0} {0}\", a);\n }\n for (int i = 0; i < _1.Sum() / 2; i++)\n {\n for (int j = 0; j < _1.Sum() / 2; j++)\n {\n for (int k = 0; k < _1.Sum() / 2; k++)\n {\n if (i + j + k == _1.Sum() / 2)\n {\n writer.WriteLine(\"{0} {1} {2}\", i,j,k);\n goto end;\n }\n }\n }\n }\n end:\n reader.Close();\n writer.Close();\n }\n}", "lang": "MS C#", "bug_code_uid": "6480f9d32a45ad632c187c1fa1503396", "src_uid": "b3b986fddc3770fed64b878fa42ab1bc", "apr_id": "3418056c86f7733b1c1f8c55f2269c6e", "difficulty": 1200, "tags": ["graphs", "math", "brute force"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7830233667143538, "equal_cnt": 15, "replace_cnt": 3, "delete_cnt": 2, "insert_cnt": 9, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace CodeForcesTest.Round278\n{\n class FightTheMonster\n {\n public static void Main(string[] args)\n {\n Run();\n //Console.ReadLine();\n }\n\n private static void Run()\n {\n string input = Console.ReadLine();\n var inputArray = input.Split(new[] {' '}).Select(x => Convert.ToInt32(x)).ToArray();\n int hpY = inputArray[0];\n int atkY = inputArray[1];\n int defY = inputArray[2];\n input = Console.ReadLine();\n\n inputArray = input.Split(new[] { ' ' }).Select(x => Convert.ToInt32(x)).ToArray();\n int hpM = inputArray[0];\n int atkM = inputArray[1];\n int defM = inputArray[2];\n\n input = Console.ReadLine();\n inputArray = input.Split(new[] { ' ' }).Select(x => Convert.ToInt32(x)).ToArray();\n int h = inputArray[0];\n int a = inputArray[1];\n int d = inputArray[2];\n\n int cost = Int32.MaxValue;\n for (int atk = atkY; atk <= 200; atk++)\n {\n for (int def = defY; def <= 100; def++)\n {\n int hp = hpY;\n double dayM = atk - defM > 0 ? (double)hpM / (atk - defM) : Int32.MaxValue;\n double dayY = atkM - def > 0 ? (double)hp / (atkM - def) : Int32.MaxValue;\n while (dayM >= dayY)\n {\n hp++;\n dayM = atk - defM > 0 ? (double)hpM / (atk - defM) : Int32.MaxValue;\n dayY = atkM - def > 0 ? (double)hp / (atkM - def) : Int32.MaxValue;\n }\n int tmp = a*(atk-atkY) + d*(def-defY) + h*(hp-hpY);\n if (tmp < cost)\n cost = tmp;\n }\n }\n\n Console.WriteLine(cost);\n }\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "14f74b0a5d17cd9a10f11868074c6606", "src_uid": "bf8a133154745e64a547de6f31ddc884", "apr_id": "bf21e42f50c7f4149ed067ffbf3594aa", "difficulty": 1800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.8659565024411895, "equal_cnt": 10, "replace_cnt": 1, "delete_cnt": 3, "insert_cnt": 5, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Linq;\n\nnamespace CodeForcesTest.Round278\n{\n class FightTheMonster\n {\n public static void Main(string[] args)\n {\n Run();\n //Console.ReadLine();\n }\n\n private static void Run()\n {\n string input = Console.ReadLine();\n var inputArray = input.Split(new[] {' '}).Select(x => Convert.ToInt32(x)).ToArray();\n int hpY = inputArray[0];\n int atkY = inputArray[1];\n int defY = inputArray[2];\n input = Console.ReadLine();\n\n inputArray = input.Split(new[] { ' ' }).Select(x => Convert.ToInt32(x)).ToArray();\n int hpM = inputArray[0];\n int atkM = inputArray[1];\n int defM = inputArray[2];\n\n input = Console.ReadLine();\n inputArray = input.Split(new[] { ' ' }).Select(x => Convert.ToInt32(x)).ToArray();\n int h = inputArray[0];\n int a = inputArray[1];\n int d = inputArray[2];\n\n int cost = Int32.MaxValue;\n int testA = 0;\n int testD = 0;\n int testH = 0;\n for (int atk = atkY; atk <= 200; atk++)\n {\n for (int def = defY; def <= 100; def++)\n {\n int hp = hpY;\n double dayM = Math.Ceiling(atk - defM > 0 ? (double)hpM / (atk - defM) : Int32.MaxValue);\n double dayY = Math.Ceiling(atkM - def > 0 ? (double)hp / (atkM - def) : Int32.MaxValue);\n while (dayM >= dayY)\n {\n hp++;\n dayM = Math.Ceiling(atk - defM > 0 ? (double)hpM / (atk - defM) : Int32.MaxValue);\n dayY = Math.Ceiling(atkM - def > 0 ? (double)hp / (atkM - def) : Int32.MaxValue);\n }\n int tmp = a*(atk-atkY) + d*(def-defY) + h*(hp-hpY);\n if (tmp < cost)\n {\n\n cost = tmp;\n testA = atk - atkY;\n testD = def - defY;\n testH = hp - hpY;\n }\n }\n }\n\n Console.WriteLine(cost);\n }\n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "139a2d59d3b191b1907cc53c8e6df22f", "src_uid": "bf8a133154745e64a547de6f31ddc884", "apr_id": "bf21e42f50c7f4149ed067ffbf3594aa", "difficulty": 1800, "tags": ["brute force", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9954337899543378, "equal_cnt": 3, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\n\t\tsolve_822A();\n\t}\n\n\tpublic static void solve_822A()\n\t{\n\t\tstring[] tests = Console.ReadLine().Split(' ');\n\t\t\n\t\tint a = Convert.ToInt32(tests[0]);\n\t\tint b = Convert.ToInt32(tests[b]);\n\t\t\n\t\tint min = Math.Min(a, b);\n\t\t\n\t\tlong facNum1 = factorial(min);\n\t\tlong facNum2 = factorial(b + 1);\n\t\t\n\t\tlong result = gcd(facNum1, facNum2);\n\t\t\n\t\tConsole.WriteLine(result);\n\t}\n\t\n\tpublic static long factorial(int n)\n\t{\n\t\tif (n <= 1)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\treturn n * factorial(n - 1);\n\t}\n\t\n\tpublic static long gcd(long a, long b)\n\t{\n\t\tif (b == 0)\n\t\t{\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\t\n}", "lang": "Mono C#", "bug_code_uid": "faa3880e827e6c9f60676ff0247197c2", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "a0956a9879a6590febd30443085e7507", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9969558599695586, "equal_cnt": 2, "replace_cnt": 1, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 1, "bug_source_code": "using System;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\n\t\tsolve_822A();\n\t}\n\n\tpublic static void solve_822A()\n\t{\n\t\tstring[] tests = Console.ReadLine().Split(' ');\n\t\t\n\t\tint a = Convert.ToInt32(tests[0]);\n\t\tint b = Convert.ToInt32(tests[1]);\n\t\t\n\t\tint min = Math.Min(a, b);\n\t\t\n\t\tlong facNum1 = factorial(min);\n\t\tlong facNum2 = factorial(b + 1);\n\t\t\n\t\tlong result = gcd(facNum1, facNum2);\n\t\t\n\t\tConsole.WriteLine(result);\n\t}\n\t\n\tpublic static long factorial(int n)\n\t{\n\t\tif (n <= 1)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\treturn n * factorial(n - 1);\n\t}\n\t\n\tpublic static long gcd(long a, long b)\n\t{\n\t\tif (b == 0)\n\t\t{\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\t\n}", "lang": "Mono C#", "bug_code_uid": "7f255b6296db58e7b12181bdebe049f1", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "a0956a9879a6590febd30443085e7507", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7281579659183122, "equal_cnt": 17, "replace_cnt": 5, "delete_cnt": 0, "insert_cnt": 11, "fix_ops_cnt": 16, "bug_source_code": "using System;\n\nstatic class Program\n{\n static void Main()\n {\n var numbers = GetAllNumbers(Console.ReadLine());\n var firstNumber = int.Parse(numbers[0].ToString());\n var secondNumber = int.Parse(numbers[1].ToString());\n\n if(firstNumber > 1 && secondNumber < Math.Pow(10, 9) && Math.Min(firstNumber, secondNumber) <= 12)\n {\n var firstFact = GetFact(firstNumber);\n var secondFact = GetFact(secondNumber);\n\n var dilnik = GetDilnik(firstFact, secondFact);\n\n Console.WriteLine(dilnik);\n }\n\n }\n\n static int GetDilnik(int a, int b)\n {\n var lowerNumber = a > b ? b : a;\n\n if(a % lowerNumber == 0 && b%lowerNumber == 0)\n {\n return lowerNumber;\n }\n \n for(int i = 1; i b)\n a %= b;\n else\n b %= a;\n }\n return a == 0 ? b : a;\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "feae786315c89a907ab1a0618c285ed6", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "06894409f2ac01a2f103d9d9bc8745d9", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.7228915662650602, "equal_cnt": 9, "replace_cnt": 4, "delete_cnt": 3, "insert_cnt": 2, "fix_ops_cnt": 9, "bug_source_code": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\nusing System.Collections;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\t\t\n\t\tvar arr=Array.ConvertAll(Console.ReadLine().Split(), int.Parse);\n\t\tint a=1, b=1;\n\t\t\n\t\tfor(int i=1; i<=arr[0]; i++)\n\t\t\ta*=i;\n\t\tfor(int i=1; i<=arr[1]; i++)\n\t\t\tb*=i;\n\t\twhile (a!=b)\n\t\t{\n\t\t\tif (a>b)\n\t\t\t\ta = a - b;\n\n\t\t\tif (b > a)\n\t\t\t\tb = b- a;\n\t\t}\n\t\tConsole.WriteLine(a);\n\t}\n}", "lang": "Mono C#", "bug_code_uid": "df9f0c193432a3ab91272df3d9308ec9", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "7b4f17f14311af5f6d64d768761cfb8a", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6146341463414634, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int[] arr = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);\n int a = arr[0];\n int b = arr[1];\n\n Console.WriteLine(Gcd(Fac(a), Fac(b)));\n }\n\n static long Fac(int n)\n {\n if (n == 0)\n return 1;\n long result = 1;\n for (int i = 2; i <= n; i++)\n result *= i;\n return result;\n }\n\n static long Gcd(long a, long b)\n {\n while (b != 0)\n {\n long t = b;\n b = a % b;\n a = t;\n }\n\n return a;\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "0905c43bd7720d00673fbd119eff9867", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "2f87a11a44d4bddf72694f9782d8fd88", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.8115044247787611, "equal_cnt": 11, "replace_cnt": 7, "delete_cnt": 2, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForces\n{\n class A\n {\n static void Main(string[] args)\n {\n string[] token = Console.ReadLine().Split();\n int A = int.Parse(token[0]);\n int B = int.Parse(token[1]);\n \n int fA = 1,fB = 1;\n for(int i=1;i num2)\n {\n var temp = num1;\n num1 = num2;\n num2 = temp;\n }\n long min = num1;\n\n for (long i = num1 - 1; i > 1; i--)\n {\n num1 = num1 * i;\n }\n\n for (long i = num2 - 1; i > 1; i--)\n {\n num2 = num2 * i;\n }\n\n for (long i = 1; i < min; i++)\n {\n if (num2 % (num1 / i) == 0)\n {\n Console.WriteLine((num1 / i));\n return;\n }\n }\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "03637d3a3e83f38ce126c81556eb43c8", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6", "apr_id": "c60b2a46db8493bc907fb9ff47ad80d6", "difficulty": 800, "tags": ["number theory", "math", "implementation"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9943963321446765, "equal_cnt": 5, "replace_cnt": 1, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nclass MyBuild\n{\n static void Main()\n { \n string input = Console.ReadLine();\n string[] strnum = input.Split(' ');\n int[] numsin = Array.ConvertAll(strnum, int.Parse);\n\n int milliliters = numsin[1] * numsin[2];\n int totalslices = numsin[3] * numsin[4];\n int salt = numsin[5];\n \n int toastchecker = 3;\n int toastcounter = -1;\n\n while (toastchecker ==3)\n {\n toastchecker = 0;\n\n milliliters -= numsin[0] * numsin[6];\n totalslices -= numsin[0];\n salt -= numsin[0] * numsin[7];\n\n if (milliliters >= 0)\n {\n toastchecker++;\n }\n if (totalslices > 0)\n {\n toastchecker++;\n }\n if (salt > 0)\n {\n toastchecker++;\n }\n\n toastcounter++;\n }\n\n Console.WriteLine(toastcounter);\n \n\n }\n}\n", "lang": "MS C#", "bug_code_uid": "e876f46f67a95bd11dfc44796117697b", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "b9cf9315fe860104a83296561b02b70b", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9819277108433735, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System; using System.Linq;\n\nclass Program {\n static void Main() {\n var s = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n var n = s[0]; var k = s[1]; var l = s[2]; var c = s[3]; var d = s[4];\n var p = s[5]; var nl = s[6]; var np = s[7];\n Console.WriteLine(new [] {}.Min(k*l/nl, c*d, p/np) / n);\n }\n}", "lang": "MS C#", "bug_code_uid": "bd3ce177b8e68f04128563552be717e0", "src_uid": "67410b7d36b9d2e6a97ca5c7cff317c1", "apr_id": "478dc313b46fa09ffbd071c5af254070", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9639871382636656, "equal_cnt": 13, "replace_cnt": 9, "delete_cnt": 1, "insert_cnt": 2, "fix_ops_cnt": 12, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Collections;\nusing System.Text.RegularExpressions;\nusing System.IO;\n\nnamespace App2 {\n class Program\n {\n Regex regex;\n void Solve()\n {\n //StreamReader textFile = new StreamReader(\"c:\\\\in.txt\");\n\n regex = new Regex(\"[^\\\\d\\\\-]{1,}\");\n\n //string []s = regex.Split(\"0, 9, 12, 232, 5 3 -1\");\n string[] s = regex.Split(Console.In.ReadToEnd());\n //string[] s = regex.Split(textFile.ReadToEnd());\n\n int L = Int32.Parse(s[0]);\n int R = Int32.Parse(s[1]);\n\n if (len(L) < len(R))\n {\n L = (int)Math.Round(Math.Pow(10, len(R)-1));\n }\n int ll = len(L);\n int powN = (int)Math.Round(Math.Pow(10, ll - 1));\n int nines = (int)Math.Round(Math.Pow(10, ll) - 1);\n\n Int64 answer = 1L * L * (nines - L);\n answer = Math.Max(answer, 1L * R * (nines - R));\n if (L <= 5 * powN && 5 * powN <= R)\n {\n answer = Math.Max(answer, 5 * powN * (nines - 5 * powN));\n }\n\n Console.WriteLine(answer);\n }\n\n int len(int n)\n {\n int res = 0;\n while (n > 0)\n {\n ++res;\n n /= 10;\n }\n return res;\n }\n\n\n static void Main()\n {\n new Program().Solve();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "b8e9e1f35656bb767b9e55abaaba2a42", "src_uid": "2c4b2a162563242cb2f43f6209b59d5e", "apr_id": "9dfec2417661786d7342a0633bc43bf0", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9920296411184353, "equal_cnt": 18, "replace_cnt": 8, "delete_cnt": 3, "insert_cnt": 6, "fix_ops_cnt": 17, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Text;\nusing System.IO;\nusing System.Linq;\nusing System.Threading;\n\n\n\n\nclass Program\n{\n long[] a = new long[] { 249999500000, 15999992000000, 20999993000000, 23999994000000, 24999995000000, 24999995000000, 23999994000000, 20999993000000, 15999992000000, 8999991000000, 978999911000000, 1055999912000000, 1130999913000000, 1203999914000000, 1274999915000000, 1343999916000000, 1410999917000000, 1475999918000000, 1538999919000000, 1599999920000000, 1658999921000000, 1715999922000000, 1770999923000000, 1823999924000000, 1874999925000000, 1923999926000000, 1970999927000000, 2015999928000000, 2058999929000000, 2099999930000000, 2138999931000000, 2175999932000000, 2210999933000000, 2243999934000000, 2274999935000000, 2303999936000000, 2330999937000000, 2355999938000000, 2378999939000000, 2399999940000000, 2418999941000000, 2435999942000000, 2450999943000000, 2463999944000000, 2474999945000000, 2483999946000000, 2490999947000000, 2495999948000000, 2498999949000000, 2499999950000000, 2499999950000000, 2498999949000000, 2495999948000000, 2490999947000000, 2483999946000000, 2474999945000000, 2463999944000000, 2450999943000000, 2435999942000000, 2418999941000000, 2399999940000000, 2378999939000000, 2355999938000000, 2330999937000000, 2303999936000000, 2274999935000000, 2243999934000000, 2210999933000000, 2175999932000000, 2138999931000000, 2099999930000000, 2058999929000000, 2015999928000000, 1970999927000000, 1923999926000000, 1874999925000000, 1823999924000000, 1770999923000000, 1715999922000000, 1658999921000000, 1599999920000000, 1538999919000000, 1475999918000000, 1410999917000000, 1343999916000000, 1274999915000000, 1203999914000000, 1130999913000000, 1055999912000000, 978999911000000, 899999910000000, 818999909000000, 735999908000000, 650999907000000, 563999906000000, 474999905000000, 383999904000000, 290999903000000, 195999902000000, 98999901000000, 90798999101000000, 91595999102000000, 92390999103000000, 93183999104000000, 93974999105000000, 94763999106000000, 95550999107000000, 96335999108000000, 97118999109000000, 97899999110000000, 98678999111000000, 99455999112000000, 100230999113000000, 101003999114000000, 101774999115000000, 102543999116000000, 103310999117000000, 104075999118000000, 104838999119000000, 105599999120000000, 106358999121000000, 107115999122000000, 107870999123000000, 108623999124000000, 109374999125000000, 110123999126000000, 110870999127000000, 111615999128000000, 112358999129000000, 113099999130000000, 113838999131000000, 114575999132000000, 115310999133000000, 116043999134000000, 116774999135000000, 117503999136000000, 118230999137000000, 118955999138000000, 119678999139000000, 120399999140000000, 121118999141000000, 121835999142000000, 122550999143000000, 123263999144000000, 123974999145000000, 124683999146000000, 125390999147000000, 126095999148000000, 126798999149000000, 127499999150000000, 128198999151000000, 128895999152000000, 129590999153000000, 130283999154000000, 130974999155000000, 131663999156000000, 132350999157000000, 133035999158000000, 133718999159000000, 134399999160000000, 135078999161000000, 135755999162000000, 136430999163000000, 137103999164000000, 137774999165000000, 138443999166000000, 139110999167000000, 139775999168000000, 140438999169000000, 141099999170000000, 141758999171000000, 142415999172000000, 143070999173000000, 143723999174000000, 144374999175000000, 145023999176000000, 145670999177000000, 146315999178000000, 146958999179000000, 147599999180000000, 148238999181000000, 148875999182000000, 149510999183000000, 150143999184000000, 150774999185000000, 151403999186000000, 152030999187000000, 152655999188000000, 153278999189000000, 153899999190000000, 154518999191000000, 155135999192000000, 155750999193000000, 156363999194000000, 156974999195000000, 157583999196000000, 158190999197000000, 158795999198000000, 159398999199000000, 159999999200000000, 160598999201000000, 161195999202000000, 161790999203000000, 162383999204000000, 162974999205000000, 163563999206000000, 164150999207000000, 164735999208000000, 165318999209000000, 165899999210000000, 166478999211000000, 167055999212000000, 167630999213000000, 168203999214000000, 168774999215000000, 169343999216000000, 169910999217000000, 170475999218000000, 171038999219000000, 171599999220000000, 172158999221000000, 172715999222000000, 173270999223000000, 173823999224000000, 174374999225000000, 174923999226000000, 175470999227000000, 176015999228000000, 176558999229000000, 177099999230000000, 177638999231000000, 178175999232000000, 178710999233000000, 179243999234000000, 179774999235000000, 180303999236000000, 180830999237000000, 181355999238000000, 181878999239000000, 182399999240000000, 182918999241000000, 183435999242000000, 183950999243000000, 184463999244000000, 184974999245000000, 185483999246000000, 185990999247000000, 186495999248000000, 186998999249000000, 187499999250000000, 187998999251000000, 188495999252000000, 188990999253000000, 189483999254000000, 189974999255000000, 190463999256000000, 190950999257000000, 191435999258000000, 191918999259000000, 192399999260000000, 192878999261000000, 193355999262000000, 193830999263000000, 194303999264000000, 194774999265000000, 195243999266000000, 195710999267000000, 196175999268000000, 196638999269000000, 197099999270000000, 197558999271000000, 198015999272000000, 198470999273000000, 198923999274000000, 199374999275000000, 199823999276000000, 200270999277000000, 200715999278000000, 201158999279000000, 201599999280000000, 202038999281000000, 202475999282000000, 202910999283000000, 203343999284000000, 203774999285000000, 204203999286000000, 204630999287000000, 205055999288000000, 205478999289000000, 205899999290000000, 206318999291000000, 206735999292000000, 207150999293000000, 207563999294000000, 207974999295000000, 208383999296000000, 208790999297000000, 209195999298000000, 209598999299000000, 209999999300000000, 210398999301000000, 210795999302000000, 211190999303000000, 211583999304000000, 211974999305000000, 212363999306000000, 212750999307000000, 213135999308000000, 213518999309000000, 213899999310000000, 214278999311000000, 214655999312000000, 215030999313000000, 215403999314000000, 215774999315000000, 216143999316000000, 216510999317000000, 216875999318000000, 217238999319000000, 217599999320000000, 217958999321000000, 218315999322000000, 218670999323000000, 219023999324000000, 219374999325000000, 219723999326000000, 220070999327000000, 220415999328000000, 220758999329000000, 221099999330000000, 221438999331000000, 221775999332000000, 222110999333000000, 222443999334000000, 222774999335000000, 223103999336000000, 223430999337000000, 223755999338000000, 224078999339000000, 224399999340000000, 224718999341000000, 225035999342000000, 225350999343000000, 225663999344000000, 225974999345000000, 226283999346000000, 226590999347000000, 226895999348000000, 227198999349000000, 227499999350000000, 227798999351000000, 228095999352000000, 228390999353000000, 228683999354000000, 228974999355000000, 229263999356000000, 229550999357000000, 229835999358000000, 230118999359000000, 230399999360000000, 230678999361000000, 230955999362000000, 231230999363000000, 231503999364000000, 231774999365000000, 232043999366000000, 232310999367000000, 232575999368000000, 232838999369000000, 233099999370000000, 233358999371000000, 233615999372000000, 233870999373000000, 234123999374000000, 234374999375000000, 234623999376000000, 234870999377000000, 235115999378000000, 235358999379000000, 235599999380000000, 235838999381000000, 236075999382000000, 236310999383000000, 236543999384000000, 236774999385000000, 237003999386000000, 237230999387000000, 237455999388000000, 237678999389000000, 237899999390000000, 238118999391000000, 238335999392000000, 238550999393000000, 238763999394000000, 238974999395000000, 239183999396000000, 239390999397000000, 239595999398000000, 239798999399000000, 239999999400000000, 240198999401000000, 240395999402000000, 240590999403000000, 240783999404000000, 240974999405000000, 241163999406000000, 241350999407000000, 241535999408000000, 241718999409000000, 241899999410000000, 242078999411000000, 242255999412000000, 242430999413000000, 242603999414000000, 242774999415000000, 242943999416000000, 243110999417000000, 243275999418000000, 243438999419000000, 243599999420000000, 243758999421000000, 243915999422000000, 244070999423000000, 244223999424000000, 244374999425000000, 244523999426000000, 244670999427000000, 244815999428000000, 244958999429000000, 245099999430000000, 245238999431000000, 245375999432000000, 245510999433000000, 245643999434000000, 245774999435000000, 245903999436000000, 246030999437000000, 246155999438000000, 246278999439000000, 246399999440000000, 246518999441000000, 246635999442000000, 246750999443000000, 246863999444000000, 246974999445000000, 247083999446000000, 247190999447000000, 247295999448000000, 247398999449000000, 247499999450000000, 247598999451000000, 247695999452000000, 247790999453000000, 247883999454000000, 247974999455000000, 248063999456000000, 248150999457000000, 248235999458000000, 248318999459000000, 248399999460000000, 248478999461000000, 248555999462000000, 248630999463000000, 248703999464000000, 248774999465000000, 248843999466000000, 248910999467000000, 248975999468000000, 249038999469000000, 249099999470000000, 249158999471000000, 249215999472000000, 249270999473000000, 249323999474000000, 249374999475000000, 249423999476000000, 249470999477000000, 249515999478000000, 249558999479000000, 249599999480000000, 249638999481000000, 249675999482000000, 249710999483000000, 249743999484000000, 249774999485000000, 249803999486000000, 249830999487000000, 249855999488000000, 249878999489000000, 249899999490000000, 249918999491000000, 249935999492000000, 249950999493000000, 249963999494000000, 249974999495000000, 249983999496000000, 249990999497000000, 249995999498000000, 249998999499000000, 249999999500000000, 249999999500000000, 249998999499000000, 249995999498000000, 249990999497000000, 249983999496000000, 249974999495000000, 249963999494000000, 249950999493000000, 249935999492000000, 249918999491000000, 249899999490000000, 249878999489000000, 249855999488000000, 249830999487000000, 249803999486000000, 249774999485000000, 249743999484000000, 249710999483000000, 249675999482000000, 249638999481000000, 249599999480000000, 249558999479000000, 249515999478000000, 249470999477000000, 249423999476000000, 249374999475000000, 249323999474000000, 249270999473000000, 249215999472000000, 249158999471000000, 249099999470000000, 249038999469000000, 248975999468000000, 248910999467000000, 248843999466000000, 248774999465000000, 248703999464000000, 248630999463000000, 248555999462000000, 248478999461000000, 248399999460000000, 248318999459000000, 248235999458000000, 248150999457000000, 248063999456000000, 247974999455000000, 247883999454000000, 247790999453000000, 247695999452000000, 247598999451000000, 247499999450000000, 247398999449000000, 247295999448000000, 247190999447000000, 247083999446000000, 246974999445000000, 246863999444000000, 246750999443000000, 246635999442000000, 246518999441000000, 246399999440000000, 246278999439000000, 246155999438000000, 246030999437000000, 245903999436000000, 245774999435000000, 245643999434000000, 245510999433000000, 245375999432000000, 245238999431000000, 245099999430000000, 244958999429000000, 244815999428000000, 244670999427000000, 244523999426000000, 244374999425000000, 244223999424000000, 244070999423000000, 243915999422000000, 243758999421000000, 243599999420000000, 243438999419000000, 243275999418000000, 243110999417000000, 242943999416000000, 242774999415000000, 242603999414000000, 242430999413000000, 242255999412000000, 242078999411000000, 241899999410000000, 241718999409000000, 241535999408000000, 241350999407000000, 241163999406000000, 240974999405000000, 240783999404000000, 240590999403000000, 240395999402000000, 240198999401000000, 239999999400000000, 239798999399000000, 239595999398000000, 239390999397000000, 239183999396000000, 238974999395000000, 238763999394000000, 238550999393000000, 238335999392000000, 238118999391000000, 237899999390000000, 237678999389000000, 237455999388000000, 237230999387000000, 237003999386000000, 236774999385000000, 236543999384000000, 236310999383000000, 236075999382000000, 235838999381000000, 235599999380000000, 235358999379000000, 235115999378000000, 234870999377000000, 234623999376000000, 234374999375000000, 234123999374000000, 233870999373000000, 233615999372000000, 233358999371000000, 233099999370000000, 232838999369000000, 232575999368000000, 232310999367000000, 232043999366000000, 231774999365000000, 231503999364000000, 231230999363000000, 230955999362000000, 230678999361000000, 230399999360000000, 230118999359000000, 229835999358000000, 229550999357000000, 229263999356000000, 228974999355000000, 228683999354000000, 228390999353000000, 228095999352000000, 227798999351000000, 227499999350000000, 227198999349000000, 226895999348000000, 226590999347000000, 226283999346000000, 225974999345000000, 225663999344000000, 225350999343000000, 225035999342000000, 224718999341000000, 224399999340000000, 224078999339000000, 223755999338000000, 223430999337000000, 223103999336000000, 222774999335000000, 222443999334000000, 222110999333000000, 221775999332000000, 221438999331000000, 221099999330000000, 220758999329000000, 220415999328000000, 220070999327000000, 219723999326000000, 219374999325000000, 219023999324000000, 218670999323000000, 218315999322000000, 217958999321000000, 217599999320000000, 217238999319000000, 216875999318000000, 216510999317000000, 216143999316000000, 215774999315000000, 215403999314000000, 215030999313000000, 214655999312000000, 214278999311000000, 213899999310000000, 213518999309000000, 213135999308000000, 212750999307000000, 212363999306000000, 211974999305000000, 211583999304000000, 211190999303000000, 210795999302000000, 210398999301000000, 209999999300000000, 209598999299000000, 209195999298000000, 208790999297000000, 208383999296000000, 207974999295000000, 207563999294000000, 207150999293000000, 206735999292000000, 206318999291000000, 205899999290000000, 205478999289000000, 205055999288000000, 204630999287000000, 204203999286000000, 203774999285000000, 203343999284000000, 202910999283000000, 202475999282000000, 202038999281000000, 201599999280000000, 201158999279000000, 200715999278000000, 200270999277000000, 199823999276000000, 199374999275000000, 198923999274000000, 198470999273000000, 198015999272000000, 197558999271000000, 197099999270000000, 196638999269000000, 196175999268000000, 195710999267000000, 195243999266000000, 194774999265000000, 194303999264000000, 193830999263000000, 193355999262000000, 192878999261000000, 192399999260000000, 191918999259000000, 191435999258000000, 190950999257000000, 190463999256000000, 189974999255000000, 189483999254000000, 188990999253000000, 188495999252000000, 187998999251000000, 187499999250000000, 186998999249000000, 186495999248000000, 185990999247000000, 185483999246000000, 184974999245000000, 184463999244000000, 183950999243000000, 183435999242000000, 182918999241000000, 182399999240000000, 181878999239000000, 181355999238000000, 180830999237000000, 180303999236000000, 179774999235000000, 179243999234000000, 178710999233000000, 178175999232000000, 177638999231000000, 177099999230000000, 176558999229000000, 176015999228000000, 175470999227000000, 174923999226000000, 174374999225000000, 173823999224000000, 173270999223000000, 172715999222000000, 172158999221000000, 171599999220000000, 171038999219000000, 170475999218000000, 169910999217000000, 169343999216000000, 168774999215000000, 168203999214000000, 167630999213000000, 167055999212000000, 166478999211000000, 165899999210000000, 165318999209000000, 164735999208000000, 164150999207000000, 163563999206000000, 162974999205000000, 162383999204000000, 161790999203000000, 161195999202000000, 160598999201000000, 159999999200000000, 159398999199000000, 158795999198000000, 158190999197000000, 157583999196000000, 156974999195000000, 156363999194000000, 155750999193000000, 155135999192000000, 154518999191000000, 153899999190000000, 153278999189000000, 152655999188000000, 152030999187000000, 151403999186000000, 150774999185000000, 150143999184000000, 149510999183000000, 148875999182000000, 148238999181000000, 147599999180000000, 146958999179000000, 146315999178000000, 145670999177000000, 145023999176000000, 144374999175000000, 143723999174000000, 143070999173000000, 142415999172000000, 141758999171000000, 141099999170000000, 140438999169000000, 139775999168000000, 139110999167000000, 138443999166000000, 137774999165000000, 137103999164000000, 136430999163000000, 135755999162000000, 135078999161000000, 134399999160000000, 133718999159000000, 133035999158000000, 132350999157000000, 131663999156000000, 130974999155000000, 130283999154000000, 129590999153000000, 128895999152000000, 128198999151000000, 127499999150000000, 126798999149000000, 126095999148000000, 125390999147000000, 124683999146000000, 123974999145000000, 123263999144000000, 122550999143000000, 121835999142000000, 121118999141000000, 120399999140000000, 119678999139000000, 118955999138000000, 118230999137000000, 117503999136000000, 116774999135000000, 116043999134000000, 115310999133000000, 114575999132000000, 113838999131000000, 113099999130000000, 112358999129000000, 111615999128000000, 110870999127000000, 110123999126000000, 109374999125000000, 108623999124000000, 107870999123000000, 107115999122000000, 106358999121000000, 105599999120000000, 104838999119000000, 104075999118000000, 103310999117000000, 102543999116000000, 101774999115000000, 101003999114000000, 100230999113000000, 99455999112000000, 98678999111000000, 97899999110000000, 97118999109000000, 96335999108000000, 95550999107000000, 94763999106000000, 93974999105000000, 93183999104000000, 92390999103000000, 91595999102000000, 90798999101000000, 89999999100000000, 89198999099000000, 88395999098000000, 87590999097000000, 86783999096000000, 85974999095000000, 85163999094000000, 84350999093000000, 83535999092000000, 82718999091000000, 81899999090000000, 81078999089000000, 80255999088000000, 79430999087000000, 78603999086000000, 77774999085000000, 76943999084000000, 76110999083000000, 75275999082000000, 74438999081000000, 73599999080000000, 72758999079000000, 71915999078000000, 71070999077000000, 70223999076000000, 69374999075000000, 68523999074000000, 67670999073000000, 66815999072000000, 65958999071000000, 65099999070000000, 64238999069000000, 63375999068000000, 62510999067000000, 61643999066000000, 60774999065000000, 59903999064000000, 59030999063000000, 58155999062000000, 57278999061000000, 56399999060000000, 55518999059000000, 54635999058000000, 53750999057000000, 52863999056000000, 51974999055000000, 51083999054000000, 50190999053000000, 49295999052000000, 48398999051000000, 47499999050000000, 46598999049000000, 45695999048000000, 44790999047000000, 43883999046000000, 42974999045000000, 42063999044000000, 41150999043000000, 40235999042000000, 39318999041000000, 38399999040000000, 37478999039000000, 36555999038000000, 35630999037000000, 34703999036000000, 33774999035000000, 32843999034000000, 31910999033000000, 30975999032000000, 30038999031000000, 29099999030000000, 28158999029000000, 27215999028000000, 26270999027000000, 25323999026000000, 24374999025000000, 23423999024000000, 22470999023000000, 21515999022000000, 20558999021000000, 19599999020000000, 18638999019000000, 17675999018000000, 16710999017000000, 15743999016000000, 14774999015000000, 13803999014000000, 12830999013000000, 11855999012000000, 10878999011000000, 9899999010000000, 8918999009000000, 7935999008000000, 6950999007000000, 5963999006000000, 4974999005000000, 3983999004000000, 2990999003000000, 1995999002000000, 998999001000000, 8999999999000000000, 0 };\n int num = 1000000;\n void solve()\n {\n int l = nextInt();\n int r = nextInt();\n \n long res = 0;\n res = Math.Max(res, get(l));\n res = Math.Max(res, get(r));\n while (l < r && l % num != 0)\n {\n res = Math.Max(res, get(l));\n l++;\n }\n while (r > l && r % num != 0)\n res = Math.Max(res, get(r--));\n if (l < r)\n {\n int start = l / num;\n int end = r / num;\n for (; start <= end; start++)\n res = Math.Max(res, a[start]);\n }\n if (l > 0)\n res = Math.Max(res, get(l));\n if (r > 0)\n res = Math.Max(res, get(r));\n println(res);\n\n\n }\n long get(int x)\n {\n long y = 0;\n long p = 1;\n long temp = x;\n while (x > 0)\n {\n y += p * (9 - x % 10);\n x /= 10;\n p *= 10;\n }\n return temp * y;\n }\n \n\n ////////////\n private void println(int[] ar)\n {\n for (int i = 0; i < ar.Length; i++)\n {\n if (i == ar.Length - 1)\n println(ar[i]);\n else\n print(ar[i] + \" \");\n }\n }\n private void println(int[] ar, bool add)\n {\n int A = 0;\n if (add)\n A++;\n for (int i = 0; i < ar.Length; i++)\n {\n if (i == ar.Length - 1)\n println(ar[i] + A);\n else\n print((ar[i] + A) + \" \");\n }\n }\n\n private void println(string Stringst)\n {\n Console.WriteLine(Stringst);\n }\n private void println(char charnum)\n {\n Console.WriteLine(charnum);\n }\n private void println(int Intnum)\n {\n Console.WriteLine(Intnum);\n }\n private void println(long Longnum)\n {\n Console.WriteLine(Longnum);\n }\n private void println(double Doublenum)\n {\n string s = Doublenum.ToString(CultureInfo.InvariantCulture);\n Console.WriteLine(s);\n }\n\n private void print(string Stringst)\n {\n Console.Write(Stringst);\n }\n private void print(int Intnum)\n {\n Console.Write(Intnum);\n }\n private void print(char charnum)\n {\n Console.Write(charnum);\n }\n private void print(long Longnum)\n {\n Console.Write(Longnum);\n }\n private void print(double Doublenum)\n {\n Console.Write(Doublenum);\n }\n\n\n string[] inputLine = new string[0];\n int inputInd = 0;\n string nextLine()\n {\n return Console.ReadLine();\n }\n void readInput()\n {\n if (inputInd != inputLine.Length)\n throw new Exception();\n inputInd = 0;\n inputLine = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n if (inputLine.Length == 0)\n readInput();\n }\n int nextInt()\n {\n return int.Parse(nextString());\n }\n long nextLong()\n {\n return long.Parse(nextString());\n }\n double nextDouble()\n {\n return double.Parse(nextString());\n }\n string nextString()\n {\n if (inputInd == inputLine.Length)\n readInput();\n return inputLine[inputInd++];\n }\n static void Main(string[] args)\n {\n Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;\n new Program().solve();\n }\n}", "lang": "Mono C#", "bug_code_uid": "65283ee5139aa69218704627e0965e8a", "src_uid": "2c4b2a162563242cb2f43f6209b59d5e", "apr_id": "b2e7e5c5b96d265931da502b25683401", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9951158422041327, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Diagnostics;\n\nclass Solver\n{\n public void Solve()\n {\n /*\n long max = 0;\n for (int i = 0; ; i++)\n {\n long a = _search(i, i);\n if (a > max)\n {\n Debug.WriteLine(i + \"\\t\" + a+\"\\tmax\");\n max = a;\n }\n else\n Debug.WriteLine(i + \"\\t\" + a);\n\n }\n */\n\n var ss = CF.ReadLine().Split(' ');\n int l = int.Parse(ss[0]);\n int r = int.Parse(ss[1]);\n\n int d = _d(r);\n int dmax = 0;\n {\n for (int i = 0; i < d ; i++)\n {\n dmax *= 10;\n if( i==0)\n dmax += 4;\n else\n dmax += 9;\n }\n }\n\n int n;\n if (r < dmax)\n n = r;\n else if (l > dmax)\n n = l;\n else\n n = dmax;\n\n CF.WriteLine(_search(n, n));\n }\n\n int _d(int n)\n {\n int d = 0;\n {\n int tmp = n;\n for (; ; )\n {\n if (tmp == 0)\n break;\n d += 1;\n tmp /= 10;\n }\n }\n return d;\n }\n\n long _search(int l,int r)\n {\n long max = 0;\n for (int i = l; i <= r; i++)\n {\n int tmp = i;\n Stack ds = new Stack();\n for (; ; )\n {\n if (tmp == 0)\n break;\n ds.Push(tmp % 10);\n tmp/= 10;\n }\n\n int o=0;\n foreach (var d in ds)\n {\n o *= 10;\n o += (9-d);\n }\n\n long p = (long)o * i;\n max = Math.Max(p, max);\n }\n return max;\n }\n\n // test\n static Utils CF = new Utils(new[]{\n@\"\n1 999\n\",\n\n@\"\n500000000 999999999\n\",\n@\"\n3 7\n\",\n @\"\n1 1\n\",\n @\"\n8 10\n\"\n\n\n });\n #region test\n\n static void Main(string[] args)\n {\n#if DEBUG\n for (int t=0;t();\n string[] ss = _test_input[t].Replace(\"\\n\", \"\").Split('\\r');\n for (int i = 0; i < ss.Length; i++)\n {\n if (\n (i == 0 || i == ss.Length - 1) &&\n ss[i].Length == 0\n )\n continue;\n\n _lines.Add(ss[i]);\n }\n }\n\n public int TestCount\n {\n get\n {\n return _test_input.Length;\n }\n }\n\n public string ReadLine()\n {\n#if DEBUG\n string s = null;\n if (_lines.Count > 0)\n {\n s = _lines[0];\n _lines.RemoveAt(0);\n }\n return s;\n\n#else\n //return _sr.ReadLine();\n return Console.In.ReadLine();\n#endif\n }\n\n public void WriteLine(object o)\n {\n#if DEBUG\n System.Diagnostics.Trace.WriteLine(o);\n#else\n //_sw.WriteLine(o);\n Console.WriteLine(o);\n#endif\n }\n\n public void Write(object o)\n {\n#if DEBUG\n System.Diagnostics.Trace.Write(o);\n#else\n //_sw.Write(o);\n Console.Write(o);\n#endif\n }\n\n string[] _test_input;\n\n List _lines;\n\n#if DEBUG\n public Utils(string[] test_input)\n {\n _test_input = test_input;\n }\n#else\n\n public Utils(string[] dummy)\n {\n //_sr = new System.IO.StreamReader(\"input.txt\");\n //_sw = new System.IO.StreamWriter(\"output.txt\");\n }\n#endif\n\n }\n\n #endregion\n}\n\n", "lang": "Mono C#", "bug_code_uid": "1e2675748d9fe0c0d88201857abf08f4", "src_uid": "2c4b2a162563242cb2f43f6209b59d5e", "apr_id": "82abe7b2b05049081643ac3e961372fa", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9631517960602549, "equal_cnt": 15, "replace_cnt": 11, "delete_cnt": 0, "insert_cnt": 3, "fix_ops_cnt": 14, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace _86A\n{\n class Program\n {\n static void Main(string[] args)\n {\n int l = 0, r = 0;\n string input = Console.ReadLine();\n l = Convert.ToInt32(input.Split(' ')[0]);\n r = Convert.ToInt32(input.Split(' ')[1]);\n\n string sl = l.ToString();\n string sr = r.ToString();\n\n int num = 0;\n\n if (sr.Length > sl.Length)\n {\n if (Convert.ToInt16(sr[0]) - 48 >= 5)\n {\n string biggest = \"5\";\n for (int i = 0; i < sr.Length - 1; i++)\n {\n biggest += \"0\";\n }\n num = Convert.ToInt32(biggest);\n }\n else\n {\n num = r;\n }\n }\n else if (sr.Length == sl.Length)\n {\n if (r == l)\n {\n num = r;\n }\n\n else if (Convert.ToInt16(sr[0]) - 48 >= 5 && Convert.ToInt16(sl[0]) - 48 >= 5)\n {\n num = l;\n }\n else if (Convert.ToInt16(sr[0]) - 48 <= 4 && Convert.ToInt16(sl[0]) - 48 <= 4)\n {\n num = r;\n }\n else\n {\n string biggest = \"5\";\n for (int i = 0; i < sr.Length-1; i++)\n {\n biggest += \"0\";\n }\n num = Convert.ToInt32(biggest);\n\n }\n\n }\n\n Console.WriteLine(refl(num) * num);\n Console.ReadLine();\n\n }\n\n static public int refl(int num)\n {\n string sr = num.ToString();\n string nine = \"\";\n for (int i = 0; i < sr.Length; i++)\n {\n nine += \"9\";\n }\n\n return( Convert.ToInt32(nine) - num);\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "1380305d447045f269b9cc78c81d01bc", "src_uid": "2c4b2a162563242cb2f43f6209b59d5e", "apr_id": "bdb536f6f9aa9ad03cfaa00c04b5184a", "difficulty": 1600, "tags": ["math"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9764309764309764, "equal_cnt": 4, "replace_cnt": 0, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n int number = int.Parse(Console.ReadLine());\n if (number > 2 && number % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n\n }", "lang": "MS C#", "bug_code_uid": "065bf2853d20cde1046b0d97cb047766", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "c754d4c53ec9467e527d7f99aa2f3bee", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9422850412249706, "equal_cnt": 5, "replace_cnt": 2, "delete_cnt": 2, "insert_cnt": 0, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CFtest\n{\n class Program\n {\n static void Main(string[] args)\n {\n int w; \n if (1 <= w && w <= 100 && w % 2 == 0)\n {\n Console.WriteLine(\"YES\");\n }\n else { Console.WriteLine(\"NO\"); }\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "9e38880048c1dd87c5d5bdbf3d01e18e", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "apr_id": "ea13125f7eea718e666f2d6b3e8c7961", "difficulty": 800, "tags": ["math", "brute force"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.8927720413026211, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 2, "insert_cnt": 2, "fix_ops_cnt": 4, "bug_source_code": "class Program\n {\n static void Main(string[] args)\n {\n int numberOfChars = Convert.ToInt32(Console.ReadLine());\n string inputString = Console.ReadLine();\n int toRemove = 0;\n \n Console.WriteLine(inputString);\n for(int i = 0; i < inputString.Length-2; i++)\n {\n string currentString = inputString.Substring(i, 3);\n Console.WriteLine(currentString);\n if(currentString.Contains(\"xxx\"))\n {\n toRemove++;\n }\n }\n Console.WriteLine(toRemove);\n }\n }", "lang": "Mono C#", "bug_code_uid": "08013a7e3e6ce40aaa78946a5339d0ab", "src_uid": "8de14db41d0acee116bd5d8079cb2b02", "apr_id": "31fcd0a2c82171a90ced9a7a22a40032", "difficulty": 800, "tags": ["strings", "greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9041912798874824, "equal_cnt": 40, "replace_cnt": 19, "delete_cnt": 8, "insert_cnt": 12, "fix_ops_cnt": 39, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Linq;\nusing System.IO;\nusing System.Globalization;\nusing System.Collections;\n\nnamespace Task\n{\n\n #region MyIo\n\n internal class MyIo : IDisposable\n {\n private readonly TextReader inputStream;\n private readonly TextWriter outputStream = Console.Out;\n\n private string[] tokens;\n private int pointer;\n\n public MyIo()\n#if LOCAL_TEST\n : this(new StreamReader(\"input.txt\"))\n#else\n : this(System.Console.In)\n#endif\n {\n\n }\n\n public MyIo(TextReader inputStream)\n {\n this.inputStream = inputStream;\n }\n\n public string NextLine()\n {\n try\n {\n return inputStream.ReadLine();\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public string NextString()\n {\n try\n {\n while (tokens == null || pointer >= tokens.Length)\n {\n tokens = NextLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n pointer = 0;\n }\n return tokens[pointer++];\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public int NextInt()\n {\n return Next();\n }\n\n public long NextLong()\n {\n return Next();\n }\n\n public T Next()\n {\n return (T)Convert.ChangeType(NextString(), typeof(T));\n }\n\n\n public IEnumerable NextSeq(int n)\n {\n for (int i = 0; i < n; i++)\n yield return Next();\n }\n\n public void Print(string format, params object[] args)\n {\n outputStream.Write(string.Format(CultureInfo.InvariantCulture, format, args));\n }\n\n public void PrintLine(string format, params object[] args)\n {\n Print(format, args);\n\n outputStream.WriteLine();\n }\n\n public void Print(bool o)\n {\n Print(o ? \"YES\" : \"NO\");\n }\n\n public void PrintLine(bool o)\n {\n PrintLine(o ? \"YES\" : \"NO\");\n }\n\n public void Print(T o)\n {\n outputStream.Write(o);\n }\n\n\n public void PrintLine(T o)\n {\n outputStream.WriteLine(o);\n }\n\n public void Close()\n {\n inputStream.Close();\n outputStream.Close();\n }\n\n void IDisposable.Dispose()\n {\n Close();\n\n#if LOCAL_TEST\n Console.ReadLine();\n#endif\n }\n }\n\n #endregion\n\n\n internal class Program\n {\n #region Program\n\n private readonly MyIo io;\n\n public Program(MyIo io)\n {\n this.io = io;\n }\n\n public static void Main(string[] args)\n {\n using (MyIo io = new MyIo())\n {\n new Program(io)\n .Solve();\n }\n }\n\n\n public static class P\n {\n public static P Create(T1 key, T2 val)\n {\n return new P(key, val);\n }\n }\n\n public class P\n {\n private class PComparer : IComparer>\n {\n private readonly bool? byKey;\n\n public PComparer(bool? byKey)\n {\n this.byKey = byKey;\n }\n\n\n public int Compare(P x, P y)\n {\n x = x ?? new P();\n y = y ?? new P();\n\n\n if (byKey == true)\n return Comparer.Default.Compare(x.Key, y.Key);\n else if (byKey == false)\n return Comparer.Default.Compare(x.Value, y.Value);\n else\n {\n var tr = Comparer.Default.Compare(x.Key, y.Key);\n\n if (tr != 0)\n tr = Comparer.Default.Compare(x.Value, y.Value);\n\n return tr;\n }\n }\n }\n\n\n public P()\n {\n }\n\n public P(T1 key, T2 val)\n {\n this.Key = key;\n this.Value = val;\n }\n\n\n public T1 Key\n {\n get;\n set;\n }\n\n public T2 Value\n {\n get;\n set;\n }\n\n public P Clone()\n {\n return new P(Key, Value);\n }\n\n public static IComparer> KeyComparer\n {\n get { return new PComparer(true); }\n }\n\n public static IComparer> ValueComparer\n {\n get { return new PComparer(false); }\n }\n\n public static implicit operator T1(P obj)\n {\n return obj.Key;\n }\n\n public static implicit operator T2(P obj)\n {\n return obj.Value;\n }\n\n public P SetKey(T1 key)\n {\n Key = key;\n return this;\n }\n\n public P SetValue(T2 value)\n {\n Value = value;\n return this;\n }\n\n public override string ToString()\n {\n return string.Format(\"Key: {0}, Value: {1}\", Key, Value);\n }\n\n public override int GetHashCode()\n {\n int hash = 17;\n hash = hash * 31 + ((Equals(Key, default(T1))) ? 0 : Key.GetHashCode());\n hash = hash * 31 + ((Equals(Value, default(T1))) ? 0 : Key.GetHashCode());\n return hash;\n\n }\n }\n\n\n #endregion\n public const long MOD = 1000000007;\n public const double EPS = 1e-14;\n\n private void Solve()\n {\n var n = io.NextInt();\n var m = io.NextInt();\n\n var fi = io.NextSeq(n).ToArray();\n\n var g = new int[n][];\n var c = new int[n];\n\n var g1 = new int[n][];\n var c1 = new int[n];\n\n for (int i = 0; i < m; i++)\n {\n var from = io.NextInt() - 1;\n var to = io.NextInt() - 1;\n\n if (g[from] == null)\n g[from] = new int[m];\n\n g[from][c[from]++] = to;\n\n\n if (g1[to] == null)\n g1[to] = new int[m];\n\n g1[to][c1[to]++] = from;\n }\n\n var used = new bool[n];\n\n for (int i = 0; i < n; i++)\n {\n if (fi[i] == 1)\n BFS(g, c, used, null, 0 , i);\n }\n\n var used1 = new bool[n];\n\n for (int i = 0; i < n; i++)\n {\n if (fi[i] == 2)\n BFS(g1, c1, used1, fi, 1, i);\n }\n\n\n for (int i = 0; i < n; i++)\n {\n io.PrintLine((used[i] && used1[i]) ? \"1\":\"0\");\n }\n }\n\n public void BFS(int[][] g, int[] c, bool[] used, int[] fi, int ifi, int s)\n {\n \n var n = g.Length;\n\n used = used ?? new bool[n];\n\n if (used[s])\n return;\n\n Queue q = new Queue();\n q.Enqueue(s);\n\n used[s] = true;\n\n while (q.Count > 0)\n {\n int v = q.Dequeue();\n for (var i = 0; i < c[v]; ++i)\n {\n var to = g[v][i];\n\n if ((used[to]) && (fi != null && fi[n] == ifi))\n continue;\n\n used[to] = true;\n q.Enqueue(to);\n }\n }\n }\n\n public static void Shuffle(IList list)\n {\n var rnd = new Random(DateTime.Now.Millisecond);\n\n var n = list.Count;\n\n while (n > 1)\n {\n n--;\n var k = rnd.Next(n + 1);\n var value = list[k];\n list[k] = list[n];\n list[n] = value;\n }\n }\n\n }\n\n}\n\n", "lang": "Mono C#", "bug_code_uid": "a642df6f705ed9b98068a8d8d8246970", "src_uid": "87d869a0fd4a510c5e7e310886b86a57", "apr_id": "40c3149720362bedfe64c01955b98534", "difficulty": 1700, "tags": ["graphs"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9055924383931585, "equal_cnt": 38, "replace_cnt": 19, "delete_cnt": 6, "insert_cnt": 12, "fix_ops_cnt": 37, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Linq;\nusing System.IO;\nusing System.Globalization;\nusing System.Collections;\n\nnamespace Task\n{\n\n #region MyIo\n\n internal class MyIo : IDisposable\n {\n private readonly TextReader inputStream;\n private readonly TextWriter outputStream = Console.Out;\n\n private string[] tokens;\n private int pointer;\n\n public MyIo()\n#if LOCAL_TEST\n : this(new StreamReader(\"input.txt\"))\n#else\n : this(System.Console.In)\n#endif\n {\n\n }\n\n public MyIo(TextReader inputStream)\n {\n this.inputStream = inputStream;\n }\n\n public string NextLine()\n {\n try\n {\n return inputStream.ReadLine();\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public string NextString()\n {\n try\n {\n while (tokens == null || pointer >= tokens.Length)\n {\n tokens = NextLine().Split(new[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n pointer = 0;\n }\n return tokens[pointer++];\n }\n catch (IOException)\n {\n return null;\n }\n }\n\n public int NextInt()\n {\n return Next();\n }\n\n public long NextLong()\n {\n return Next();\n }\n\n public T Next()\n {\n return (T)Convert.ChangeType(NextString(), typeof(T));\n }\n\n\n public IEnumerable NextSeq(int n)\n {\n for (int i = 0; i < n; i++)\n yield return Next();\n }\n\n public void Print(string format, params object[] args)\n {\n outputStream.Write(string.Format(CultureInfo.InvariantCulture, format, args));\n }\n\n public void PrintLine(string format, params object[] args)\n {\n Print(format, args);\n\n outputStream.WriteLine();\n }\n\n public void Print(bool o)\n {\n Print(o ? \"YES\" : \"NO\");\n }\n\n public void PrintLine(bool o)\n {\n PrintLine(o ? \"YES\" : \"NO\");\n }\n\n public void Print(T o)\n {\n outputStream.Write(o);\n }\n\n\n public void PrintLine(T o)\n {\n outputStream.WriteLine(o);\n }\n\n public void Close()\n {\n inputStream.Close();\n outputStream.Close();\n }\n\n void IDisposable.Dispose()\n {\n Close();\n\n#if LOCAL_TEST\n Console.ReadLine();\n#endif\n }\n }\n\n #endregion\n\n\n internal class Program\n {\n #region Program\n\n private readonly MyIo io;\n\n public Program(MyIo io)\n {\n this.io = io;\n }\n\n public static void Main(string[] args)\n {\n using (MyIo io = new MyIo())\n {\n new Program(io)\n .Solve();\n }\n }\n\n\n public static class P\n {\n public static P Create(T1 key, T2 val)\n {\n return new P(key, val);\n }\n }\n\n public class P\n {\n private class PComparer : IComparer>\n {\n private readonly bool? byKey;\n\n public PComparer(bool? byKey)\n {\n this.byKey = byKey;\n }\n\n\n public int Compare(P x, P y)\n {\n x = x ?? new P();\n y = y ?? new P();\n\n\n if (byKey == true)\n return Comparer.Default.Compare(x.Key, y.Key);\n else if (byKey == false)\n return Comparer.Default.Compare(x.Value, y.Value);\n else\n {\n var tr = Comparer.Default.Compare(x.Key, y.Key);\n\n if (tr != 0)\n tr = Comparer.Default.Compare(x.Value, y.Value);\n\n return tr;\n }\n }\n }\n\n\n public P()\n {\n }\n\n public P(T1 key, T2 val)\n {\n this.Key = key;\n this.Value = val;\n }\n\n\n public T1 Key\n {\n get;\n set;\n }\n\n public T2 Value\n {\n get;\n set;\n }\n\n public P Clone()\n {\n return new P(Key, Value);\n }\n\n public static IComparer> KeyComparer\n {\n get { return new PComparer(true); }\n }\n\n public static IComparer> ValueComparer\n {\n get { return new PComparer(false); }\n }\n\n public static implicit operator T1(P obj)\n {\n return obj.Key;\n }\n\n public static implicit operator T2(P obj)\n {\n return obj.Value;\n }\n\n public P SetKey(T1 key)\n {\n Key = key;\n return this;\n }\n\n public P SetValue(T2 value)\n {\n Value = value;\n return this;\n }\n\n public override string ToString()\n {\n return string.Format(\"Key: {0}, Value: {1}\", Key, Value);\n }\n\n public override int GetHashCode()\n {\n int hash = 17;\n hash = hash * 31 + ((Equals(Key, default(T1))) ? 0 : Key.GetHashCode());\n hash = hash * 31 + ((Equals(Value, default(T1))) ? 0 : Key.GetHashCode());\n return hash;\n\n }\n }\n\n\n #endregion\n public const long MOD = 1000000007;\n public const double EPS = 1e-14;\n\n private void Solve()\n {\n var n = io.NextInt();\n var m = io.NextInt();\n\n var fi = io.NextSeq(n).ToArray();\n\n var g = new int[n][];\n var c = new int[n];\n\n var g1 = new int[n][];\n var c1 = new int[n];\n\n for (int i = 0; i < m; i++)\n {\n var from = io.NextInt() - 1;\n var to = io.NextInt() - 1;\n\n if (g[from] == null)\n g[from] = new int[m];\n\n g[from][c[from]++] = to;\n\n\n if (g1[to] == null)\n g1[to] = new int[m];\n\n g1[to][c1[to]++] = from;\n }\n\n var used = new bool[n];\n\n for (int i = 0; i < n; i++)\n {\n if (fi[i] == 1)\n BFS(g, c, used, null, 0 , i);\n }\n\n var used1 = new bool[n];\n\n for (int i = 0; i < n; i++)\n {\n if (fi[i] == 2)\n BFS(g1, c1, used1, fi, 1, i);\n }\n\n\n for (int i = 0; i < n; i++)\n {\n io.PrintLine((used[i] && used1[i]) ? \"1\":\"0\");\n }\n }\n\n public void BFS(int[][] g, int[] c, bool[] used, int[] fi, int ifi, int s)\n {\n \n var n = g.Length;\n\n used = used ?? new bool[n];\n\n if (used[s])\n return;\n\n Queue q = new Queue();\n q.Enqueue(s);\n\n used[s] = true;\n\n while (q.Count > 0)\n {\n int v = q.Dequeue();\n for (var i = 0; i < c[v]; ++i)\n {\n var to = g[v][i];\n\n if ((used[to]) || (fi != null && fi[v] == ifi))\n continue;\n\n used[to] = true;\n q.Enqueue(to);\n }\n }\n }\n\n public static void Shuffle(IList list)\n {\n var rnd = new Random(DateTime.Now.Millisecond);\n\n var n = list.Count;\n\n while (n > 1)\n {\n n--;\n var k = rnd.Next(n + 1);\n var value = list[k];\n list[k] = list[n];\n list[n] = value;\n }\n }\n\n }\n\n}\n\n", "lang": "Mono C#", "bug_code_uid": "0d0ee9b5a2eeddb3a9f93d4762b9996a", "src_uid": "87d869a0fd4a510c5e7e310886b86a57", "apr_id": "40c3149720362bedfe64c01955b98534", "difficulty": 1700, "tags": ["graphs"], "bug_exec_outcome": "MEMORY_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9926567501412163, "equal_cnt": 3, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 1, "fix_ops_cnt": 2, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Diagnostics;\n\nnamespace ConsoleApplication1 {\n struct Pair {\n public int X, Y;\n public Pair(int x, int y) {\n X = x;\n Y = y;\n }\n public override string ToString() {\n return string.Format(\"{0} {1}\", X, Y);\n }\n }\n\n class Graph : List> {\n public Graph(int num) : base(num) {\n for (int i = 0; i < num; i++) {\n this.Add(new List());\n }\n }\n }\n\n class Program {\n static int n, m, k, t, ans;\n static TextReader input;\n static int[] f;\n static bool[] u1, u2;\n static Graph g, rg;\n static void Main(string[] args) {\n#if TESTS \n Stopwatch sw = new Stopwatch();\n sw.Start();\n input = new StreamReader(\"input.txt\"); \n#else\n input = Console.In;\n#endif \n Solve(); \n#if TESTS\n Console.WriteLine();\n Console.WriteLine(\"Milliseconds: {0}\", sw.ElapsedMilliseconds);\n Console.ReadLine();\n#endif\n }\n\n #region read helpers\n public static int[] ReadIntArray() {\n return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n }\n\n public static List ReadIntList() {\n return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();\n }\n\n public static int ReadInt() {\n return int.Parse(input.ReadLine());\n }\n \n #endregion\n\n static void Solve() {\n int[] a = ReadIntArray();\n n = a[0];\n m = a[1];\n g = new Graph(n);\n rg = new Graph(n);\n u1 = new bool[n];\n u2 = new bool[n];\n f = ReadIntArray();\n for (int i = 0; i < m; i++) {\n int[] b = ReadIntArray();\n g[--b[0]].Add(--b[1]);\n rg[b[1]].Add(b[0]);\n }\n for (int i = 0; i < n; i++) {\n if (f[i] == 1 && !u1[i]) {\n Bfs1(i);\n }\n }\n for (int i = 0; i < n; i++) {\n if (f[i] == 2 && !u2[i]) {\n Bfs2(i);\n }\n }\n for (int i = 0; i < n; i++) {\n if (u1[i] && u2[i])\n Console.WriteLine(1);\n else\n Console.WriteLine(0);\n }\n }\n\n static void Bfs1(int v) {\n u1[v] = true;\n Queue q = new Queue();\n q.Enqueue(v);\n while (q.Count > 0) {\n int u = q.Dequeue();\n foreach (int i in g[u]) {\n if (!u1[i]) {\n u1[i] = true;\n q.Enqueue(i);\n }\n }\n }\n }\n\n static void Bfs2(int v) {\n u2[v] = true;\n if (f[v] == 1) return;\n Queue q = new Queue();\n q.Enqueue(v);\n while (q.Count > 0) {\n int u = q.Dequeue();\n foreach (int i in rg[u]) {\n if (!u2[i]) {\n u2[i] = true;\n q.Enqueue(i);\n }\n }\n }\n }\n\n static void Dfs1(int v) {\n u1[v] = true;\n foreach (int i in g[v]) {\n if (!u1[i]) Dfs1(i);\n }\n }\n\n static void Dfs2(int v) {\n u2[v] = true;\n if (f[v] == 1) return;\n foreach (int i in rg[v]) {\n if (!u2[i]) Dfs2(i);\n }\n }\n\n static int[] Count_Sort(int[] a, int k) {\n int n = a.Length;\n int[] b = new int[n];\n int[] c = new int[k];\n for (int i = 0; i < n; ++i)\n ++c[a[i]];\n for (int i = 1; i < k; ++i)\n c[i] += c[i - 1];\n for (int i = n - 1; i >= 0; --i) {\n b[c[a[i]] - 1] = a[i];\n --c[a[i]];\n }\n return b;\n }\n\n static void Radix_Sort(int[] a, int k) {\n int n = a.Length;\n int repeats = 32 / k;\n int size = 1 << k;\n int mask = size - 1;\n for (int i = 0; i < repeats; ++i) {\n int[] c = new int[size];\n int[] b = new int[n];\n for (int j = 0; j < n; ++j) {\n int r = (a[j] & (mask << (i * k))) >> (i * k);\n ++c[r];\n }\n for (int j = 1; j < size; ++j)\n c[j] += c[j - 1];\n for (int j = n - 1; j >= 0; --j) {\n int r = (a[j] & (mask << (i * k))) >> (i * k);\n b[c[r] - 1] = a[j];\n --c[r];\n }\n Array.Copy(b, a, n);\n }\n }\n }\n\n public static class Extensions {\n public static void Print(this IEnumerable e) {\n foreach (T item in e) {\n Console.Write(\"{0} \", item);\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "10cb985682c6693ea323b6e24cdbef7f", "src_uid": "87d869a0fd4a510c5e7e310886b86a57", "apr_id": "0756aaacbac4610973b5aa2da2e0359d", "difficulty": 1700, "tags": ["graphs"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9021783806000822, "equal_cnt": 5, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\nusing System.Diagnostics;\n\nnamespace ConsoleApplication1 {\n struct Pair {\n public int X, Y;\n public Pair(int x, int y) {\n X = x;\n Y = y;\n }\n public override string ToString() {\n return string.Format(\"{0} {1}\", X, Y);\n }\n }\n\n class Graph : List> {\n public Graph(int num) : base(num) {\n for (int i = 0; i < num; i++) {\n this.Add(new List());\n }\n }\n }\n\n class Program {\n static int n, m, k, t, ans;\n static TextReader input;\n static int[] f;\n static bool[] u1, u2;\n static Graph g, rg;\n static void Main(string[] args) {\n#if TESTS \n Stopwatch sw = new Stopwatch();\n sw.Start();\n input = new StreamReader(\"input.txt\"); \n#else\n input = Console.In;\n#endif \n Solve(); \n#if TESTS\n Console.WriteLine();\n Console.WriteLine(\"Milliseconds: {0}\", sw.ElapsedMilliseconds);\n Console.ReadLine();\n#endif\n }\n\n #region read helpers\n public static int[] ReadIntArray() {\n return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();\n }\n\n public static List ReadIntList() {\n return input.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();\n }\n\n public static int ReadInt() {\n return int.Parse(input.ReadLine());\n }\n \n #endregion\n\n static void Solve() {\n int[] a = ReadIntArray();\n n = a[0];\n m = a[1];\n g = new Graph(n);\n rg = new Graph(n);\n u1 = new bool[n];\n u2 = new bool[n];\n f = ReadIntArray();\n for (int i = 0; i < m; i++) {\n int[] b = ReadIntArray();\n g[--b[0]].Add(--b[1]);\n rg[b[1]].Add(b[0]);\n }\n for (int i = 0; i < n; i++) {\n if (f[i] == 1 && !u1[i]) {\n Dfs1(i);\n }\n }\n for (int i = 0; i < n; i++) {\n if (f[i] == 2 && !u2[i])\n Dfs2(i);\n }\n for (int i = 0; i < n; i++) {\n if (u1[i] && u2[i])\n Console.WriteLine(1);\n else\n Console.WriteLine(0);\n }\n } \n\n static void Dfs1(int v) {\n u1[v] = true;\n foreach (int i in g[v]) {\n if (!u1[i]) Dfs1(i);\n }\n }\n\n static void Dfs2(int v) {\n u2[v] = true;\n if (f[v] == 1) return;\n foreach (int i in rg[v]) {\n if (!u2[i]) Dfs2(i);\n }\n }\n\n static int[] Count_Sort(int[] a, int k) {\n int n = a.Length;\n int[] b = new int[n];\n int[] c = new int[k];\n for (int i = 0; i < n; ++i)\n ++c[a[i]];\n for (int i = 1; i < k; ++i)\n c[i] += c[i - 1];\n for (int i = n - 1; i >= 0; --i) {\n b[c[a[i]] - 1] = a[i];\n --c[a[i]];\n }\n return b;\n }\n\n static void Radix_Sort(int[] a, int k) {\n int n = a.Length;\n int repeats = 32 / k;\n int size = 1 << k;\n int mask = size - 1;\n for (int i = 0; i < repeats; ++i) {\n int[] c = new int[size];\n int[] b = new int[n];\n for (int j = 0; j < n; ++j) {\n int r = (a[j] & (mask << (i * k))) >> (i * k);\n ++c[r];\n }\n for (int j = 1; j < size; ++j)\n c[j] += c[j - 1];\n for (int j = n - 1; j >= 0; --j) {\n int r = (a[j] & (mask << (i * k))) >> (i * k);\n b[c[r] - 1] = a[j];\n --c[r];\n }\n Array.Copy(b, a, n);\n }\n }\n }\n\n public static class Extensions {\n public static void Print(this IEnumerable e) {\n foreach (T item in e) {\n Console.Write(\"{0} \", item);\n }\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "8878783ca19c4e0f31226d4f2501a274", "src_uid": "87d869a0fd4a510c5e7e310886b86a57", "apr_id": "0756aaacbac4610973b5aa2da2e0359d", "difficulty": 1700, "tags": ["graphs"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.3498190591073583, "equal_cnt": 10, "replace_cnt": 6, "delete_cnt": 3, "insert_cnt": 1, "fix_ops_cnt": 10, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Codeforces_249_2\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] d = Console.ReadLine().Split(' ');\n HashSet S = new HashSet();\n string max = d[0];\n S.Add(max);\n for (int k = int.Parse(d[1]); 0 < k; --k) {\n HashSet T = new HashSet(S);\n foreach (string s in T)\n for (int i = s.Length-1; 0 < i; --i)\n if (s[i - 1] < s[i]) {\n string t = s.Substring(0, i - 1) + s[i] + s[i - 1] + s.Substring(i + 1);\n if (!S.Contains(t)) {\n S.Add(t);\n if (string.Compare(max, t) < 0) max = t;\n }\n }\n }\n Console.WriteLine(max);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "4e26f500caa3bed27e7a851bb70548cc", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "c7104e672c5354bc3a45f858884700b4", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "TIME_LIMIT_EXCEEDED", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.3217299578059072, "equal_cnt": 8, "replace_cnt": 2, "delete_cnt": 5, "insert_cnt": 1, "fix_ops_cnt": 8, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Text;\n\nnamespace Codeforces_249_2\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] S = Console.ReadLine().Split(' ');\n long max = long.Parse(S[0]);\n SortedList ALL = new SortedList();\n List CUR = new List();\n ALL.Add(max, 0);\n CUR.Add(max);\n for (int k = int.Parse(S[1]); 0 < k; --k) {\n List NEW = new List();\n foreach (long L in CUR)\n for (long d = 1; d < L; d *= 10) {\n long c1 = L / d;\n long c2 = (c1 / 10) % 10;\n c1 %= 10;\n if (c2 < c1) {\n long T = L + d * 9 * (c1 - c2);\n if (!ALL.ContainsKey(T)) {\n ALL.Add(T, 0);\n NEW.Add(T);\n if (max < t) max = T;\n }\n }\n CUR = NEW;\n }\n Console.WriteLine(max);\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "3e4fca0ea7dc493dbc4e0f434ec5a075", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "c7104e672c5354bc3a45f858884700b4", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "COMPILATION_ERROR", "potential_dominant_fix_op": "delete", "lang_cluster": "C#"} {"similarity_score": 0.9875583203732504, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Collections;\nusing System.Text;\n\nnamespace Codeforces_249_2\n{\n class Program\n {\n static string solve(string s, int k)\n {\n if (k < 1) return s;\n int m = 0;\n for (int i = 1; i < s.Length && i <= k; ++i)\n if (s[m] < s[i]) m = i;\n return s[m] + solve(s.Substring(0, m) + s.Substring(m + 1), k - m);\n }\n static void Main(string[] args)\n {\n string[] S = Console.ReadLine().Split(' ');\n Console.WriteLine( solve( S[0], int.Parse(S[1]) ) );\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "bb08e054556841db97a0824d714673e9", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "c7104e672c5354bc3a45f858884700b4", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9701338825952626, "equal_cnt": 5, "replace_cnt": 0, "delete_cnt": 1, "insert_cnt": 3, "fix_ops_cnt": 4, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace PashaMax\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n #region Ввод\nlol:\n string input = Console.ReadLine();\n\n var data = input.Split(' ');\n\n int[] numbers = new int[data[0].Length];\n\n for (int index = 0; index < data[0].Length; index++)\n {\n numbers[index] = (int) Char.GetNumericValue(data[0][index]);\n }\n \n int k = Convert.ToInt32(data[1]);\n\n #endregion\n\n Tuple pos;\n int m = 0;\n int m2 = 0;\n while (k > 0)\n {\n ////if (k+1-m2 <=0) break;\n\n //if (k >= numbers.Length)\n //{\n // m = numbers.ToList().IndexOf(numbers.Max());\n\n // if (m == 0)\n // {\n // if (fi)\n // m2++;\n // continue;\n // }\n\n // numbers = DvigLeft(numbers, m + m2, m2);\n\n // k -= m;\n //}\n //else\n //{\n pos = FindToChange(numbers, k);\n\n if (pos.Item2 - pos.Item1 == 0) break;\n\n numbers = DvigLeft(numbers, pos.Item2, pos.Item1);\n\n k -= pos.Item2 - pos.Item1;\n //m = numbers.ToList().GetRange(m2, k+1-m2).IndexOf(numbers.ToList().GetRange(m2, k+1-m2).Max());\n //}\n }\n\n #region Вывод\n\n string res = numbers.Aggregate(\"\", (current, number) => current + number);\n\n Console.WriteLine(res);\n //Console.ReadKey();\n goto lol;\n\n #endregion\n\n }\n\n private static int FindToChange(int[] numbers)\n {\n for (int i = 1; i < numbers.Length; i++)\n {\n if (numbers[i - 1] < numbers[i]) return i;\n }\n return 0;\n }\n\n private static Tuple FindToChange(int[] numbers, int k)\n {\n int maxindex = 0;\n int maxvalue = 0;\n int minindex = 0;\n\n for (int i = 0; i < numbers.Length; i++)\n {\n int indx = k+1 + minindex;\n if (indx >= numbers.Length)\n indx = numbers.Length;\n \n for (int j = minindex; j < indx; j++)\n {\n if (maxvalue < numbers[j])\n {\n maxvalue = numbers[j];\n maxindex = j;\n }\n }\n\n if (maxindex != minindex && maxindex> minindex) \n return new Tuple(minindex, maxindex);\n\n minindex++;\n }\n \n return new Tuple(0,0);\n }\n\n static int[] DvigLeft(int[] old, int oldpos, int newpos)\n {\n int[] res = (int[]) old.Clone();\n\n res[newpos] = old[oldpos];\n\n for (int i = newpos; i < oldpos; i++)\n {\n res[i+1] = old[i];\n }\n\n return res;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "23b7c68860787ea7e4848df09930d954", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "apr_id": "9df6a603a21e9b1294d479d08fade945", "difficulty": 1400, "tags": ["greedy"], "bug_exec_outcome": "RUNTIME_ERROR", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9956709956709957, "equal_cnt": 4, "replace_cnt": 3, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Compote\n{\n class Program\n {\n static void Main(string[] args)\n {\n int l = Int32.Parse(Console.ReadLine());\n int a = Int32.Parse(Console.ReadLine());\n int p = Int32.Parse(Console.ReadLine());\n int min = 0;\n if (a >= 2 * l && p >= 4 * l)\n Console.WriteLine(a + 2 * a + 4 * a);\n else\n {\n min = Math.Min(a / 2, p / 4);\n Console.WriteLine(min + min * 2 + min * 4);\n }\n Console.ReadLine();\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "d02bd2c8f3db23c517aad724fecaa298", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "aae3b491faaa891ba7a80aa9f26ec98d", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9803350327749454, "equal_cnt": 4, "replace_cnt": 2, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 3, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Graph\n{\n \n class Program\n { \n static void Main(string[] args)\n {\n int lemonse= int.Parse(Console.ReadLine());\n int apple = int.Parse(Console.ReadLine());\n int pears = int.Parse(Console.ReadLine());\n int maxResult = 0; \n while(apple >= 2 && pears >= 4)\n {\n maxResult += 7;\n lemonse--;\n apple -= 2;\n pears -= 4;\n }\n Console.WriteLine(maxResult);\n\n }\n }\n}\n", "lang": "Mono C#", "bug_code_uid": "7079bf0d5d61a70f79a33485f7b15ab0", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "519f13d2376700d0b0e0fff22d5a4c3a", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.6643405443126309, "equal_cnt": 8, "replace_cnt": 6, "delete_cnt": 1, "insert_cnt": 0, "fix_ops_cnt": 7, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace problem1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int x = int.Parse(Console.ReadLine());\n int y = int.Parse(Console.ReadLine());\n int z = int.Parse(Console.ReadLine());\n int a = 0, b = 0;\n for (int i = 0; i < 100; i++)\n {\n a = x * 2;\n if (a > y)\n { x--; ; }\n else\n {\n b = a * 2;\n if (b > z)\n x--;\n\n }\n }\n Console.WriteLine(a + b + x);\n Console.ReadLine();\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "a842cfb33674dc229fe61f9e960962bf", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "9548106576241e8c62b998d4b58b28b8", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"} {"similarity_score": 0.9977528089887641, "equal_cnt": 2, "replace_cnt": 0, "delete_cnt": 0, "insert_cnt": 1, "fix_ops_cnt": 1, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.IO;\n\nnamespace ProjectContest\n{\n class Test\n {\n static void Main()\n {\n int kq = Convert.ToInt32(Console.ReadLine());\n kq = Math.Min(kq, Convert.ToInt32(Console.ReadLine()) / 2);\n kq = Math.Min(kq, Convert.ToInt32(Console.ReadLine()));\n Console.WriteLine(kq * 7);\n }\n }\n}", "lang": "Mono C#", "bug_code_uid": "81fa869b08b8fa9cdb49723bf525a217", "src_uid": "82a4a60eac90765fb62f2a77d2305c01", "apr_id": "febaf13cbaf86837eda7d7f9ef0d8d9d", "difficulty": 800, "tags": ["math", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "insert", "lang_cluster": "C#"} {"similarity_score": 0.9660377358490566, "equal_cnt": 7, "replace_cnt": 6, "delete_cnt": 0, "insert_cnt": 0, "fix_ops_cnt": 6, "bug_source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Security.Policy;\nusing System.Text;\n\nnamespace Console\n{\n class Program\n {\n static void Main(string[] args)\n {\n var arr = new List(System.Console.ReadLine().Split(' ').Select(int.Parse));\n var a = arr[0];\n var b = arr[1];\n var c = arr[2];\n var l = arr[3];\n\n var ans = (l + 1)*(l + 2)*(l + 3)/6;\n for (int i = 0; i <= l; ++i)\n {\n ans -= Fun(a + i, b, c, l - i);\n ans -= Fun(b + i, a, c, l - i);\n ans -= Fun(c + i, b, a, l - i);\n }\n System.Console.Write(ans);\n //System.Console.ReadLine();\n }\n\n static int Fun(int a, int b, int c, int x)\n {\n if (a < b + c)\n return 0;\n var min = Math.Min(a - b - c, x);\n return (min + 1)*(min + 2)/2;\n }\n }\n}\n", "lang": "MS C#", "bug_code_uid": "c460632c170668342ceffb19acec1e83", "src_uid": "185ff90a8b0ae0e2b75605f772589410", "apr_id": "6ed6af67e9accdd40f3f659b83c1931c", "difficulty": 2100, "tags": ["math", "combinatorics", "implementation"], "bug_exec_outcome": "WRONG_ANSWER", "potential_dominant_fix_op": "replace", "lang_cluster": "C#"}