\", string.Empty);\n string[] ar_Content = s_Content.Split(new string[] { \"\" }, StringSplitOptions.RemoveEmptyEntries);\n foreach(string each in ar_Content)\n {\n try\n {\n if (!string.IsNullOrWhiteSpace(each))\n {\n string[] ar_each = each.TrimEnd().Split(new string[] { \"/\\\">\" }, StringSplitOptions.RemoveEmptyEntries);\n if (ar_each.Length == 2)\n {\n string[] rawAr_each1 = ar_each[1].Split(new string[] { \" /\" }, StringSplitOptions.RemoveEmptyEntries);\n if (rawAr_each1.Length == 1)\n ar_each[1] = rawAr_each1[0];\n else if (rawAr_each1.Length > 2)\n ar_each[1] = string.Format(\"{0} / {1}\", rawAr_each1[0], rawAr_each1[1].Trim());\n\n int id = int.Parse(ar_each[0]);\n if (!string.IsNullOrWhiteSpace(ar_each[1]))\n Content.Add(id, ar_each[1]);\n }\n }\n }\n catch { continue; }\n }\n s_Content = null; ar_Content = null;\n \n Match m_Url = Regex.Match(Output, \"row\\\\.file = '(.*)' \\\\+ row\\\\.file;\", RegexOptions.Multiline);\n if (!m_Url.Success) return;\n UrlToDownload = m_Url.Value.Replace(\"row.file = '\", string.Empty).Replace(\"' + row.file;\", string.Empty);\n Console.WriteLine(UrlToDownload);\n\n Match m_Title = Regex.Match(Output, \"\\\\
(.*)\\\\<\\\\/title\\\\>\", RegexOptions.Multiline);\n if (!m_Title.Success) return;\n Title = m_Title.Value.Replace(\"\", string.Empty)\n .Replace(\"\", string.Empty)\n .Replace(\" - Player\", string.Empty);\n\n string[] rawTitle = Title.TrimEnd().Split(new string[] { \" /\" }, StringSplitOptions.RemoveEmptyEntries);\n if (rawTitle.Length == 1)\n Title = rawTitle[0];\n else if (rawTitle.Length > 2)\n {\n if (rawTitle[1].Contains(\";\"))\n Title = rawTitle[0];\n else\n Title = string.Format(\"{0} / {1}\", rawTitle[0], rawTitle[1].Trim());\n }\n rawTitle = null;\n Console.WriteLine(Title);\n\n Match m_Files = Regex.Match(Output, \"var episodes = \\\\[(.*)\\\\}\\\\];\");\n if (!m_Files.Success) return;\n string s_Files = m_Files.Value.Replace(\"\\\\/\", \"/\")\n .Replace(\"\\\"\", string.Empty)\n .Replace(\"provider:http,season:\", string.Empty)\n .Replace(\"episode:\", string.Empty)\n .Replace(\"var episodes = [{\", string.Empty)\n .Replace(\"}];\", string.Empty);\n s_Files = Regex.Replace(s_Files, \"id:([0-9]{0,9}),file:\", string.Empty);\n string[] as_Files = s_Files.Split(new string[] { \"},{\" }, StringSplitOptions.RemoveEmptyEntries);\n foreach (string each in as_Files)\n {\n string[] raw = each.Split(',');\n if (raw.Length == 3)\n {\n int Season, Episode;\n int.TryParse(raw[1], out Season); int.TryParse(raw[2], out Episode);\n if (Season != 0 && Episode != 0 && !string.IsNullOrWhiteSpace(raw[0]))\n {\n if (!Files.ContainsKey(Season))\n Files.Add(Season, new Dictionary());\n Files[Season].Add(Episode, raw[0]);\n }\n }\n }\n s_Files = null; as_Files = null; Output = null;\n Console.WriteLine(\"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u043d!\");\n foreach(var p_Season in Files)\n {\n foreach (var p_Episodes in p_Season.Value)\n {\n Console.WriteLine(string.Format(\"\u0421\u0435\u0437\u043e\u043d: {0}; \u042d\u043f\u0438\u0437\u043e\u0434: {1}; \u0421\u0441\u044b\u043b\u043a\u0430: {2}{3}\", p_Season.Key, p_Episodes.Key, UrlToDownload, p_Episodes.Value));\n }\n }\n }\n /*\n int tmp;\n Random randInt = new Random();\n int[] player = new int[10];\n for (int i = 0; i < 10; i++)\n {\n player[i] = randInt.Next(950, 3000);\n }\n //player[0] = 0; player[1] = 0; player[2] = 0; player[3] = 0;\n foreach(int each in player)\n {\n Console.Write(string.Format(\"{0} \", each));\n }\n Console.WriteLine();\n\n int Team1Zero = 0;\n int Team2Zero = 0;\n for (int i = 0; i < 10; i++)\n {\n if (player[i] == 0)\n {\n if (i < 5)\n Team1Zero++;\n else\n Team2Zero++;\n }\n }\n if (Team1Zero != Team2Zero)\n {\n int DiffZero = (Team1Zero - Team2Zero) / 2;\n for (int i = 0; i < Math.Abs(DiffZero); i++)\n {\n int pos1 = -1, pos2 = -1;\n if (DiffZero < 0)\n {\n for (int j = 0; j < 5; j++)\n {\n if (player[j] != 0)\n {\n pos1 = j; break;\n }\n }\n for (int j = 5; j < 10; j++)\n {\n if (player[j] == 0)\n {\n pos2 = j; break;\n }\n }\n }\n else if (DiffZero > 0)\n {\n for (int j = 0; j < 5; j++)\n {\n if (player[j] == 0)\n {\n pos1 = j; break;\n }\n }\n for (int j = 5; j < 10; j++)\n {\n if (player[j] != 0)\n {\n pos2 = j; break;\n }\n }\n }\n tmp = player[pos1];\n player[pos1] = player[pos2];\n player[pos2] = tmp;\n }\n }\n\n foreach (int each in player)\n {\n Console.Write(string.Format(\"{0} \", each));\n }\n Console.WriteLine();\n\n for (int k = 0; k < 7; k++)\n {\n int Team1Pts = 0;\n int Team2Pts = 0;\n for (int i = 0; i < 10; i++)\n {\n if (i >= 0 && i <= 4)\n Team1Pts += player[i];\n else\n Team2Pts += player[i];\n }\n Console.WriteLine(string.Format(\"Before {0} step. Team 1 PTS: {1}; Team 2 PTS: {2}; Diff: {3};\", k + 1, Team1Pts, Team2Pts, Math.Abs(Team1Pts - Team2Pts)));\n int NeedPts = (Team1Pts - Team2Pts) / 2;\n int MinDiff = int.MaxValue, pos1 = -1, pos2 = -1;\n for (int i = 0; i < 5; i++)\n {\n if (player[i] != 0)\n {\n for (int j = 5; j < 10; j++)\n {\n if (player[j] != 0 && player[i] != player[j])\n {\n if (NeedPts > 0)\n {\n int a = NeedPts - (player[i] - player[j]);\n if (a >= 0 && a < MinDiff && NeedPts > a)\n {\n MinDiff = a;\n pos1 = i;\n pos2 = j;\n }\n }\n else if (NeedPts < 0)\n {\n int a = Math.Abs(NeedPts) - (player[j] - player[i]);\n if (a >= 0 && a < MinDiff && Math.Abs(NeedPts) > a)\n {\n MinDiff = a;\n pos1 = i;\n pos2 = j;\n }\n }\n\n }\n }\n }\n }\n if (pos1 != -1 && pos2 != -1)\n {\n Console.WriteLine(\"({0}){1} <-> ({2}){3}\", pos1, player[pos1], pos2, player[pos2]);\n tmp = player[pos1];\n player[pos1] = player[pos2];\n player[pos2] = tmp;\n }\n else\n break;\n }\n\n foreach (int each in player)\n {\n Console.Write(string.Format(\"{0} \", each));\n }\n Console.WriteLine();\n int Team1PtsD = 0;\n int Team2PtsD = 0;\n for (int i = 0; i < 10; i++)\n {\n if (i >= 0 && i <= 4)\n Team1PtsD += player[i];\n else\n Team2PtsD += player[i];\n }\n Console.WriteLine(string.Format(\"Done. Team 1 PTS: {0}; Team 2 PTS: {1}; Diff: {2};\", Team1PtsD, Team2PtsD, Math.Abs(Team1PtsD - Team2PtsD)));\n\n //Test();\n //string[] asd = new string[5];\n //foreach (string each in asd)\n //{\n // asd[3] = \"asdasd\";\n // Console.WriteLine(each);\n //}\n /*\n Task tkTest = new Task(() =>\n {\n while (true)\n {\n Thread.Sleep(1000);\n }\n });\n Console.WriteLine(tkTest.Status.ToString());\n tkTest.Start();\n Console.WriteLine(tkTest.Status.ToString());*/\n\n //Console.WriteLine(\"OK!\");\n\n /*\n MySqlCommand asd = new MySqlCommand(\"INSERT INTO `barbars` (`id`) VALUES ('12')\", mysql);\n asd.ExecuteNonQuery();\n Console.ReadKey();*/\n /*\n string query = \"UPDATE `accounts` SET `name`='Changed!' WHERE (`id`='0')\";\n MySqlCommand mc = new MySqlCommand(query, mysql);\n mc.ExecuteNonQuery();\n * */\n\n /*\n string query = \"SELECT * FROM `accounts` WHERE (`name`='StonyX1')\";\n MySqlCommand mc = new MySqlCommand(query, mysql);\n mc.ExecuteNonQuery();\n Console.WriteLine(\"\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u0430!\");\n * /\n\n /*\n string query = \"SELECT * FROM `accounts` WHERE (`name`='StonyX')\";\n MySqlCommand mc = new MySqlCommand(query, mysql);\n MySqlDataReader mdr = mc.ExecuteReader();\n if (mdr.HasRows)\n {\n while (mdr.Read())\n {\n Console.WriteLine(mdr.GetString(\"pass\"));\n }\n //mdr.GetValues(okay);\n //Console.WriteLine(okay[2]);\n }\n else\n Console.WriteLine(\"\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430!\");\n /*\n string RegPath = @\"Software\\Valve\\Steam\\ActiveProcess\";\n Microsoft.Win32.RegistryKey RegKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(RegPath, true);\n RegKey.SetValue(\"SteamClientDll\", string.Format(\"{0}steamclient.dll\", AppDomain.CurrentDomain.BaseDirectory), Microsoft.Win32.RegistryValueKind.String);\n RegKey.Flush();\n RegKey.Close();*/\n\n //while (true)\n //{\n //Process[] csgo = Process.GetProcessesByName(\"csgo\");\n /*\n if(csgo.Length == 1)\n {\n Console.WriteLine(\"-=-=-=-=-=-=-=-=-\");\n Console.WriteLine(string.Format(\"NonpagedSystemMemorySize: {0}.\", csgo[0].NonpagedSystemMemorySize));\n Console.WriteLine(string.Format(\"PagedMemorySize: {0}.\", csgo[0].PagedMemorySize));\n Console.WriteLine(string.Format(\"PeakPagedMemorySize: {0}.\", csgo[0].PeakPagedMemorySize));\n Console.WriteLine(string.Format(\"PrivateMemorySize: {0}.\", csgo[0].PrivateMemorySize));\n }*/\n /*\n foreach (ProcessModule each in csgo[0].Modules)\n Console.WriteLine(each.FileName);*/\n //Thread.Sleep(1000);\n //}\n //Console.WriteLine(csgo[0].Modules);\n /*\n foreach (System.Diagnostics.Process each in processesByName)\n Console.WriteLine(string.Format(\"{0}\", each.ProcessName,));\n /*\n Test asd = new Test();\n asd.Moving += asd_Moving;\n asd.ASD(10);\n */\n\n //File.Move(\"asd.txt\", \"asd.txt.lzma\");\n\n /*\n Console.WriteLine(\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441\u043e \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c\u0438.\");\n sw = new StreamWriter(FileListName);\n DirRecursive(\".\");\n sw.Close();\n Console.Write(\"\u0413\u043e\u0442\u043e\u0432\u043e!\");*/\n\n\n\n /*\n StreamReader sr = new StreamReader(OutputFileName);\n while(!sr.EndOfStream)\n {\n string[] fields = sr.ReadLine().Split('*');\n Console.WriteLine(string.Format(\"{0} || {1} || {2}\", fields[0], fields[1], fields[2]));\n }\n */\n /*\n byte[] test = GetFileHash(\"mysql.data.dll\");\n Console.WriteLine(Encoding.Unicode.GetString(test));*/\n\n /*\n StreamReader sr = new StreamReader(\"out.txt\");\n int i = 0;\n while (!sr.EndOfStream)\n {\n try\n {\n WebClient client = new WebClient();\n client.Proxy = null;\n //client.DownloadProgressChanged +=\n // new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);\n client.DownloadFileCompleted +=\n new AsyncCompletedEventHandler(client_DownloadCompleted);\n string FileName = sr.ReadLine().Trim(\"http://mobius-geo.googlecode.com/svn/trunk/geodata/\".ToCharArray());\n //Console.WriteLine(FileName);\n Console.WriteLine(sr.ReadLine());\n client.DownloadFileAsync(new Uri(sr.ReadLine()), string.Format(@\"Geo\\{0}\", FileName));\n }\n catch\n {\n }\n finally\n {\n i++;\n }\n }*/\n\n //DirRecursive(\".\");\n /*\n TorrentManager torrentManager;\n\n EngineSettings engineSettings = new EngineSettings();\n\n engineSettings.SavePath = @\"D:\\Download\\Torrents\";\n\n engineSettings.GlobalMaxUploadSpeed = 5;\n\n TorrentSettings torrentSettings = new TorrentSettings();\n\n torrentSettings.MaxUploadSpeed = 5;\n\n torrentSettings.UploadSlots = 1;\n\n ClientEngine engine = new ClientEngine(engineSettings);//, torrentSettings\n\n Torrent TorFile = Torrent.Load(new Uri(@\"http://192.168.1.13/Ra2.torrent\"), @\"D:\\Download\\Torrents\\OkayFace.torrent\");\n torrentManager = new TorrentManager(TorFile, @\"D:\\Download\\Torrents\", torrentSettings, @\".\");\n\n engine.Register(torrentManager);\n engine.StartAll();\n\n torrentManager.PeerConnected += new EventHandler(PeerConnection);\n\n torrentManager.TorrentStateChanged += new EventHandler(torrentStateChanged);\n \n torrentManager.AddPeers(new Peer(\"\", new Uri(\"tcp://192.168.1.13:59398\")));\n\n while (torrentManager.State != TorrentState.Stopped && torrentManager.State != TorrentState.Paused)\n {\n Console.WriteLine(string.Format(\"{0:0.0}%\", torrentManager.Progress));\n System.Threading.Thread.Sleep(3000);\n\n if (torrentManager.Progress == 100.0)\n {\n Console.WriteLine(\"Done!\");\n return;\n }\n }\n\n /*\n byte[] AES_KEY = Encoding.ASCII.GetBytes(\"asdfghjklqwertyu\");\n byte[] AES_IV = Encoding.ASCII.GetBytes(\"asdfghjklqwertyu\");\n byte[] ENC = Encoding.UTF8.GetBytes(\"123\");\n\n Aes AES = Aes.Create();\n AES.KeySize = 128;\n AES.BlockSize = 128;\n AES.Padding = PaddingMode.Zeros;\n\n MemoryStream MS = new MemoryStream();\n CryptoStream CS = new CryptoStream(MS, AES.CreateEncryptor(AES_KEY, AES_IV), CryptoStreamMode.Write);\n\n CS.Write(ENC, 0, ENC.Length);\n CS.Close();\n\n Console.WriteLine(Encoding.UTF8.GetString(MS.ToArray()));\n\n byte[] encodingString = MS.ToArray();\n\n MemoryStream MSdec = new MemoryStream();\n CryptoStream CSdec = new CryptoStream(MSdec, AES.CreateDecryptor(AES_KEY, AES_IV), CryptoStreamMode.Write);\n\n CSdec.Write(encodingString, 0, encodingString.Length);\n CSdec.Close();\n\n Console.WriteLine(Encoding.UTF8.GetString(MSdec.ToArray()));\n \n /*\n byte[] test = Encoding.UTF8.GetBytes(\"MSG~*() StonyX: fq~/\");\n string asd = BitConverter.ToString(test).Replace(\"-\", string.Empty);\n Console.WriteLine(asd);*/\n /*\n byte[] output =\n StringToByteArray(\"00:09:00:09:00:02:00:00:10:00:00:01:cf:4a:6d:00:8a:dd:9a:c1:0a\".Replace(\":\", string.Empty));\n Console.WriteLine(Encoding.UTF8.GetString(output));\n * */\n\n /*\n string url = @\"\";\n WebClient client = new WebClient();\n client.DownloadProgressChanged +=\n new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);\n client.DownloadFileCompleted +=\n new AsyncCompletedEventHandler(client_DownloadCompleted);\n client.DownloadFileAsync(new Uri(url), \"asd.txt\");*/\n /*\n int uts = (int)(DateTime.Now - new DateTime(1970, 1, 1).ToLocalTime()).TotalSeconds;\n Console.WriteLine(string.Format(\"{0}\", uts));\n DateTime dt = new DateTime(1970, 1, 1).ToLocalTime();\n dt = dt.AddSeconds(uts);\n Console.WriteLine(string.Format(\"{0}\", dt));*/\n //Console.WriteLine(Encoding.UTF8.GetByteCount(\"Prived[.]\"));\n /*string fileName = \"http://games.turontelecom.uz/forum/uploads/monthly_08_2014/post-1-0-01748200-1408294941.jpg\";\n try\n {\n WebClient client = new WebClient();\n client.DownloadProgressChanged +=\n new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);\n client.DownloadFileCompleted +=\n new AsyncCompletedEventHandler(client_DownloadCompleted);\n client.DownloadFileAsync(new Uri(fileName), \"Counter-Strike_GO_Turon_Telecom.jpg\");\n }\n catch (Exception e)\n {\n Console.WriteLine(e.Message);\n }\n /*\n ManagementObjectSearcher searcher = new ManagementObjectSearcher(\"SELECT * FROM Win32_Processor\");\n foreach(ManagementObject mo in searcher.Get())\n {\n Console.WriteLine(mo[\"Name\"] + \" \" + mo[\"ProcessorId\"]);\n }\n /*\n string test = \"lol<:>olol<:>\";\n string[] test1 = test.Split(new string[] {\"<:>\"}, StringSplitOptions.RemoveEmptyEntries);\n foreach (string value in test1)\n {\n Console.WriteLine(value+\".\");\n }*/\n\n /*\n string conString = \"Database=d2ls;Data Source=127.0.0.1;Port=3306;User Id=root;Password=\";\n MySqlConnection mysql = new MySqlConnection(conString);\n try\n {\n mysql.Open();\n Console.WriteLine(\"\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e!\");\n }\n catch { }\n\n string query = \"SELECT * FROM `40000` WHERE `Name`='Meon'\";\n MySqlCommand mc = new MySqlCommand(query, mysql);\n MySqlDataReader mdr = mc.ExecuteReader();\n DataTable dt = new DataTable();\n dt.Load(mdr);\n float Out = float.Parse(dt.Rows[0][\"Pts\"].ToString());\n Console.WriteLine(string.Format(\"{0:0.00}\", Out + 1));\n\n string s_Points = string.Format(\"{0:0.00}\", Out + 10.11).Replace(',', '.');\n string query1 = string.Format(\"UPDATE `40000` SET `Pts`='{0}' WHERE (`Name`='Meon')\", s_Points);\n MySqlCommand mc1 = new MySqlCommand(query1, mysql);\n mc1.ExecuteNonQuery();\n */\n /*\n StringBuilder sb = new StringBuilder();\n sb.Append(\"1\");\n sb.Append(\"2\");\n sb.AppendLine(\"3\");\n sb.Append(\"4\");\n Console.WriteLine(sb.ToString());*/\n \n\n Console.WriteLine(\"OK!\");\n Console.ReadKey();\n /*\n string query = \"SELECT * FROM `accounts` WHERE (`name`='StonyX1')\";\n MySqlCommand mc = new MySqlCommand(query, mysql);\n mc.ExecuteNonQuery();\n Console.WriteLine(\"\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u0430!\");\n * /\n\n /*\n string query = \"SELECT * FROM `accounts` WHERE (`name`='StonyX')\";\n MySqlCommand mc = new MySqlCommand(query, mysql);\n MySqlDataReader mdr = mc.ExecuteReader();\n if (mdr.HasRows)\n {\n while (mdr.Read())\n {\n Console.WriteLine(mdr.GetString(\"pass\"));\n }\n //mdr.GetValues(okay);\n //Console.WriteLine(okay[2]);\n }\n else\n Console.WriteLine(\"\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430!\");\n * */\n\n /*}\n catch (MySqlException me)\n {\n Console.WriteLine(me.Message);\n }\n mysql.Close();*/\n\n \n }\n }\n\n class OkayFace\n {\n public string Text { get; set; }\n public OkayFace(string Text)\n {\n this.Text = Text;\n }\n }\n\n\n /*\n static void PeerConnection(object sender, PeerConnectionEventArgs e)\n {\n Console.WriteLine(e.PeerID.Uri.ToString());\n }\n\n static void PieceHashed(object sender, PieceHashedEventArgs e)\n {\n Console.WriteLine(e.PieceIndex.ToString());\n }\n\n static void torrentStateChanged(object sender, TorrentStateChangedEventArgs e)\n {\n Console.WriteLine(e.NewState.ToString());\n }\n * */\n\n /*\n static void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)\n {\n Console.SetCursorPosition(0, 0);\n Console.WriteLine(string.Format(\"{0}%\", e.ProgressPercentage));\n Console.WriteLine(string.Format(\"{0}/{1}\", e.BytesReceived, e.TotalBytesToReceive));\n }*/\n /*\n static void client_DownloadCompleted(object sender, AsyncCompletedEventArgs e)\n {\n if (e.Error == null)\n {\n Console.WriteLine(\"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e.\");\n }\n else\n {\n Console.WriteLine(\"\u0424\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.\");\n }\n }\n /*\n public static byte[] StringToByteArray(String hex)\n {\n int NumberChars = hex.Length;\n byte[] bytes = new byte[NumberChars / 2];\n for (int i = 0; i < NumberChars; i += 2)\n bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16);\n return bytes;\n }*/\n\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "7b5ee759bafbcc9933d71653afc2cd87", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\nclass theatresquare {\n\tpublic static void Main() {\n\t\tvar n = int.Parse(Console.Read());\n\t\tvar m = int.Parse(Console.Read());\n\t\tvar a = int.Parse(Console.Read());\n\t\tvar x = n % a ;\n\t\tvar y = m % a ;\n\t\tif (a > 0 && n > 0 && m > 0 && x*y != 0) {\n\t\t\tConsole.WriteLine((1 + (n - x) / a )* (1 +(m - y) / a)) ;\n\t\t} \n\t\telse if (a > 0 && n > 0 && m > 0 && x == 0 && y != 0) {\n\t\t Console.WriteLine(((n - x) / a )* (1 +(m - y) / a)) ;\n\t\t}\n\t\telse if (a > 0 && n > 0 && m > 0 && x != 0 && y == 0) {\n\t\t Console.WriteLine((1 + (n - x) / a )* ((m - y) / a)) ; \n\t\t}\n\t else if (a > 0 && n > 0 && m > 0 && x == 0 && y == 0) {\n\t\t Console.WriteLine(((n - x) / a )* ((m - y) / a)) ; \n\t\t}\n\t\t\n\t}\t\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2a8b18c18e786223b379e9d34c9fb5e5", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "namespace theatre_square\n{\n class Program\n {\n static void Main(string[] args)\n {\n long n, m, a;\n n = long.Parse(Console.ReadLine());\n m = long.Parse(Console.ReadLine());\n a = long.Parse(Console.ReadLine());\n long x = n / a;\n long y = m / a;\n if (n % a != 0)\n {\n x++;\n }\n if (m % a != 0)\n {\n y++;\n }\n Console.WriteLine(x * y);\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2dc416d1f795e5d88c667e1936f00b4d", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "public class Theatre{\n \n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "ff261da2fa41ad59f1ca5d875333c084", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\n\nclass MainClass {\n public static void Main (string[] args) {\n \n string text = Console.ReadLine();\n string[] numbers = text.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);\n \n int n = Convert.ToInt32(numbers[0]);\n int m = Convert.ToInt32(numbers[1]);\n int a = Convert.ToInt32(numbers[2]);\n \n int l = n / a;\n int c = m / a;\n\n if (n % a != 0 && (l==0 || l>=1)) ++l;\n if (m % a != 0 && (c==0 || c>=1)) ++c;\n\n int long = l * c;\n Console.WriteLine(result);\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "afd7de779c81afa2e1b24a8d6978610a", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\n\nnamespace ConsoleApplication2\n{\n class Program\n {\n static void Main(string[] args)\n {\n double a = double.Parse(Console.ReadLine());\n double b = double.Parse(Console.ReadLine());\n double d = double.Parse(Console.ReadLine());\n a = Math.Ceiling(a/d);\n b = Math.Ceiling(b / d;\n Console.WriteLine(a * b);\n Console.ReadLine();\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "dc2cbe5d875df9255fbd59ead9b5a3e9", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\nusing System.Data.Linq;\n\npublic class Solution{\n\tpublic static void Main(string[] args){\n\t\tstring arr = Console.ReadLine();\n\t\tstring[] str = arr.split(' ');\n\t\tlong n = long.Parse(str[0]);\n\t\tlong m = long.Parse(str[1]);\n\t\tlong a = long.Parse(str[2]);\n\t\t\n\t\tn = (long)Math.Ceiling((double)n/a);\n\t\tm = (long)Math.Ceiling((double)m/a);\n\t\t\n\t\tConsole.WriteLine(n*m);\n\t\t\n\t\t\n\t\n\t}\n\n}\n\n\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "eed679bddd3c3c87481b9319d1354a11", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "class ProblemD\n{\n static void Main(string[] args)\n {\n string [] input = Console.ReadLine().Split(' ');\n double n = Convert.ToDouble(input[0]);\n double m = Convert.ToDouble(input[1]);\n double a = Convert.ToDouble(input[2]);\n double na = Math.Ceiling(n / a);\n double ma = Math.Ceiling(m / a);\n Console.WriteLine((long) (na * ma));\n //Console.ReadLine();\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2d9555152c78ba1d09258987a1f636a7", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Numerics;\nusing System.Data.Linq;\n\npublic class Solution{\n\tpublic static void Main(string[] args){\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 = int.Parse(str[2]);\n\t n = Math.Ceiling((double)n/a);\n\t m = Math.Ceiling((double)m/a);\n\t\t\n\t\tConsole.WriteLine(n*m);\n\t\t\n\t\t\n\t\n\t}\n\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "e0fe242d59ccc153d13b652271c4d926", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\n \nnamespace TheatreSquare{\n \n class Program{\n \n static void Main(string[] args){\n \n string arrayToSplit = Console.ReadLine();\n \n string[] arraySplited = arrayToSplit.Split(' ');\n \n decimal[] arrayConverted = new decimal[arraySplited.Length];\n \n for(int i=0;i\n\n \n \n Debug\n AnyCPU\n {F19C4253-21E1-4F12-9D59-5ADEC4589460}\n Exe\n Properties\n ConsoleApplication3\n ConsoleApplication3\n v4.5.2\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 \n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "57e6443bf766997bfe7f05ae07e55f82", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.IO;\n\nclass TheatreSquare {\n\n static void Main() \n {\n\tvar length = int.Parse(Console.Read());\n\tvar breadth = int.Parse(Console.Read());\n\tvar side = int.Parse(Console.Read());\n\n\tConsole.WriteLine( ( ((length + 3)/4) * ((breadth + 3)/4) ).ToString());\n }\n\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "001e754f39ffa433805ab523a35cd1ec", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace ConsoleApp2\n{\n class Program\n {\n static void Main(string[] args)\n {\n int a = int.Parse(Console.ReadLine());\n int b = int.Parse(Console.ReadLine());\n int c = int.Parse(Console.ReadLine());\n int v = (a * b) / c;\n Console.WriteLine(Math.Ceiling(v));\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "641fa7ea68b1b3f2bad52ed2b4fb05e2", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int zlicz = 1;\n\n string s = Console.ReadLine();\n string[] tokens = s.Split(\" \");\n \n \n\n int m = int.Parse(tokens[0]);\n int n = int.Parse(tokens[1]);\n int a = int.Parse(tokens[2]);\n\n while ((a*a) <= m * n)\n {\n a = (zlicz*zlicz) * (a * a);\n zlicz++;\n }\n Console.WriteLine(zlicz * zlicz);\n \n \n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "945cd06406ba663144544615acf08ff7", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "\ufeff\n\n \n \n Debug\n AnyCPU\n {A6433F69-09B1-4B38-A53A-A42C4F36580F}\n Exe\n Properties\n \u041f\u043b\u0438\u0442\u044b\n \u041f\u043b\u0438\u0442\u044b\n v3.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", "lang_cluster": "C#", "compilation_error": true, "code_uid": "0f7a1b87a1040931a40fc71204be6b54", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\nclass Program\n{\n static void Main()\n {\n string[] s = Console.ReadLine().Split(' ');\n \n \n int m=int.Parse(s[0]);\n int n=int.Parse(s[1]);\n int a=int.Parse(s[2]);\n \n if(m%a==0)\n totalM=m/a;\n else\n totalM=(m/a)+1;\n \n if(n-a<=0)\n Console.Write(totalM);\n \n else\n {\n n=n-a;\n if(n%a==0)\n totalN=n/a;\n else\n totalN=n/a+1;\n Console.Write(totalM+totalN);\n }\n \n \n }\n \n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "0ece2c4850833fb50f56dc2ae6e5df73", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\n \nnamespace TheatreSquare{\n \n class Program{\n \n static void Main(string[] args){\n \n string arrayToSplit = Console.ReadLine();\n \n string[] arraySplited = arrayToSplit.Split(' ');\n \n int[] arrayConverted = new int[arraySplited.Length];\n \n for(int i=0;i int.Parse(e));\nint n=nma[0];\nint m=nma[1];\nint a=nma[2];\nConsole.WriteLine(Math.Floor(n/a)*Math.Floor(m/a));\n\n\n}\n\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "e11fa5c2c300e71b8c8daf3f74438be3", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace ConsoleApp7\n{\n class Program\n {\n private static void Main(string[] args)\n {\n int n = Console.ReadLine();\n int m = Console.ReadLine();\n int a = Console.ReadLine();\n decimal r1 = n/a;\n decimal r2 = m/a;\n if (n % a != 0) r1++;\n if (m % a != 0) r2++;\n\n Console.WriteLine(r1*r2);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "9738bf404f2e6e2935dcacf21241219c", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.IO;\n\nclass TheatreSquare {\n\n static void Main() \n {\n\tint length = int.Parse(Console.Read());\n\tint breadth = int.Parse(Console.Read());\n\tint side = int.Parse(Console.Read());\n\n\tConsole.WriteLine( ( ((length + 3)/4) * ((breadth + 3)/4) ).ToString());\n }\n\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "d0d9536306cabce5642cbf8d7c230454", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp4\n{\n class Program\n {\n static void Main(string[] args)\n {\n int pars;\n int[] sl1 = Console.ReadLine().Split(' ').Select(i => int.TryParse(i, out pars) ? pars : 0).ToArray();\n double ma, na, result;\n ma = Math.Ceiling((double)(sl1[0]) / sl1[2]);\n na = Math.Ceiling((double)(sl1[1]) / sl1[2]);\n result = ma + na;\n decimal dec = decimal.Parse(result, System.Globalization.NumberStyles.Any);\n Console.WriteLine(dec);\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "b2bb0270860713cce11231d0956407fb", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic; \nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nclass c {\nint main(){\nvar nma=Console.ReadLine()\n.Split().Select(e => int.Parse(e));\nint n=nma[0];\nint m=nma[1];\nint a=nma[2];\nConsole.WriteLine(Math.Floor(n/a)*Math.Floor(m/a));\n\n\n}\n\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "94249d3a7a76694f3962fd03458e68ba", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "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[] vars;\n int pars;\n vars = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(i => int.TryParse(i, out pars) ? pars : 0).ToArray();\n\n int a = vars[0];\n int b = vars[1];\n int c = vars[2];\n\n if (c == b && c == a)\n {\n Console.WriteLine(1);\n return;\n } else if(c == a || c == b)\n {\n Console.WrileLine(Math.Ceiling(a/c));\n return;\n } else {\n float lenth = a > b ? a : b;\n float width = a > b ? b : a;\n Console.WriteLine(Math.Ceiling(lenth / c) + Math.Ceiling(width / c));\n }\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "6e3fdb75c95e1087799c079723ca9bfd", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace ConsoleApplication12\n{\n internal class Program\n {\n static void Main(string[] args)\n { \n long k,x,y;\n string[] numbers = Console.ReadLine().Split(' ');\n long n = long.Parse(numbers[0]);\n long m = long.Parse(numbers[1]);\n long a = long.Parse(numbers[2]);\n if (n % a == 0) { x = n / a; }\n else { x = n / a;\n x++;\n }\n if (m % a == 0) { x = n / a; }\n else\n {\n y = m / a;\n y++;\n }\n Console.WriteLine(x * y);\n\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "d08b596f9ebd7d3d3b41e3f383770908", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\n\nnamespace TheatreSquare\n{\n\tclass MainClass\n\t{\n\t\tpublic static void Main (string[] args)\n\t\t{\n\t\t\tdouble bigOne = Math.Pow (10, 9);\n\t\t\tdouble flagstones = 0;\n\t\t\tint m, n, a;\n\t\t\tInt32.TryParse (Console.ReadLine (), out m) && (m >= 1) && (m <= bigOne);\n\t\t\tInt32.TryParse (Console.ReadLine (), out n) && (n >= 1) && (n <= bigOne);\n\t\t\tInt32.TryParse (Console.ReadLine (), out a) && (a >= 1) && (a <= bigOne);\n\t\t\tdouble flagstonesInARow = Math.Ceiling (m / (double) a);\n\t\t\tdouble flagstonesInAColumn = Math.Ceiling (n / (double) a);\n\t\t\tflagstones = flagstonesInARow * flagstonesInAColumn;\n\t\t\tConsole.WriteLine(flagstones);\n\t\t}\n\t}\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "0d09e49fb117ee1783b3aa7a4e358ab0", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication12\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n string x = Console.ReadLine();\n string[] s = x.Split(' ');\n int q = int.Parse(s[0]);\n int y = int.Parse(s[1]);\n int z = int.Parse(s[2]);\n Console.WriteLine(q%z + q%z);\n Console.ReadLine();\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "c1a940cd0e8aa169c229ee25bf2f8473", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\n\nusing System.Collections.Generic;\n\nusing System.Linq;\n\nusing System.Text;\n\n \n\nnamespace application1\n\n{\n\n class Program\n\n {\n\n static void Main(string[] args)\n\n {\n int n, m, a;\n\t\t n = Console.Read();\n\t\t m = Console.Read();\n\t\t a = Console.Read();\n\t\t double tempResult1 = Convert.ToDouble((n-1)/a);\n\t\t double tempResult2 = Convert.ToDouble((m-1)/a);\n\t\t double pCount = Math.Ceiling(tempResult) + Math.Ceiling(tempResult2);\n\n Console.WriteLine(pCount);\n\n }\n\n }\n\n} ", "lang_cluster": "C#", "compilation_error": true, "code_uid": "65c041e42cdcce99effa9ec57f2cefdb", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "\ufeffusing 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 double a = double.Parse(args[0]);\n double b = double.Parse(args[1]);\n double d = double.Parse(args[2]);\n a = Math.Ceiling(a/d);\n b = Math.Ceiling(b / d);\n Console.WriteLine(a * b);\n Console.ReadLine();\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "7ab4c232f9d253a1fa0fef551403420c", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "\ufeff/* \n* 1A - \u0422\u0435\u0430\u0442\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c\n* http://codeforces.com/problemset/problem/1/A\n*/\nusing System;\n\n\nnamespace RConsole\n{\n\tpublic class _1A\n\t{\n\t\tpublic static void Main ()\n\t\t{\n string [] input = Console.ReadLine().Split(' ');\n double n = Convert.ToDouble(input[0]);\n double m = Convert.ToDouble(input[1]);\n double a = Convert.ToDouble(input[2]);\n Console.WriteLine((long)Math.Ceiling((long)n / (long)a) * Math.Ceiling((long)m / (long)a));\n\t\t}\n\t}\n}\n\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "488b7ef1485cb051d269df05f58ec407", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "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 long height_of_rectangle ; //height of rectangle\n long width_of_rectangle; //width of rectangle\n long square; // square\n long constant_width_of_square; // constant\n long constant_height_of_square; // constant\n\n long num1 = 1; //number of squares for first row in rectangle\n long num2 = 1; // number of squares for first Horizontal in reactangle\n\n long result; // number of squares which need\n\n Console.WriteLine(\"please enter height of rectangle\");\n height_of_rectangle = Convert.ToInt64(Console.ReadLine()); //value of rectangle`s height\n Console.WriteLine(\"please enter width of rectangle\");\n width_of_rectangle = Convert.ToInt64(Console.ReadLine()); // value of rectangle`s width\n Console.WriteLine(\"please enter width or height of square\");\n square = Convert.ToInt64(Console.ReadLine()); // value of square`s height/width\n\n constant_width_of_square = square;\n constant_height_of_square = square;\n\n //number of squares in first row in rectangle\n\n while (square < width_of_rectangle)\n {\n num1 = num1 + 1;\n square = square + constant_width_of_square;\n }\n\n //number of squares in first Horizontal in reactangle\n\n while (constant_height_of_square < height_of_rectangle)\n {\n num2 = num2 + 1;\n constant_height_of_square = constant_height_of_square + c onstant_width_of_square;\n }\n // number of squres in rectangle\n result = num1 * num2;\n Console.WriteLine(\"number of squares are : \" + result);\n \n \n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "9933e41af7b71d945054ac919facea96", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "Console.WriteLine(\"hello world\");", "lang_cluster": "C#", "compilation_error": true, "code_uid": "da84b28d86ea48a7757dcb147bd4206a", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "\ufeff\n\n \n \n Debug\n AnyCPU\n {26742737-E232-401F-8B31-D5B4AE323617}\n Exe\n Properties\n OkayFace\n OkayFace\n v4.0\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", "lang_cluster": "C#", "compilation_error": true, "code_uid": "53ceb5599a8f8d0bd994a05a427a7f41", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\nnamespace ns{\n class Program{\n public static void Main(){\n string[] s = Console.ReadLine().Split(' ');\n int n = int.Parse(s[0]);\n int m = int.Parse(s[1]);\n int a = int.Parse(s[2]);\n int result;\n \n if(n%a== 0)result = n/a;\n else result = n/a+1;\n \n if(m/a == 0)result *= (m/a);\n else result*=(m/a + 1)\n \n Console.WriteLine(result);\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "f9cfc39101cdc94d9a9dce1f0e87b104", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n var input = Console.ReadLine().Split(' ');\n int n = int.Parse(input[0]);\n int m = int.Parse(input[1]);\n int a = int.Parse(input[2]);\n int length = n / a;\n int width = m / a;\n\n if (n % a != 0)\n {\n length += 1;\n }\n\n if (m % a != 0)\n {\n width += 1;\n }\n\n int count = length * width;\n Console.WriteLine(count);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "152abf5aa1fba599f176b2f6ef818adf", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\n\nusing System.Collections.Generic;\n\nusing System.Linq;\n\nusing System.Text;\n\n \n\nnamespace application1\n\n{\n\n class Program\n\n {\n\n static void Main(string[] args)\n\n {\n Int64 n, m, a;\n\t\t n = Console.Read();\n\t\t m = Console.Read();\n\t\t a = Console.Read();\n\n Console.WriteLine(Math.Ceiling((n-1)/a) + Math.Ceiling((m-1)/a));\n\n }\n\n }\n\n} ", "lang_cluster": "C#", "compilation_error": true, "code_uid": "c5f37203109db30bdc0ea5e1322749e8", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "Console.WriteLine(4);", "lang_cluster": "C#", "compilation_error": true, "code_uid": "1cdea2f3feb08199e23ff3ff59fc4afc", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "using System;\n\nusing System.Collections.Generic;\n\nusing System.Linq;\n\nusing System.Text;\n\n \n\nnamespace application1\n\n{\n\n class Program\n\n {\n\n static void Main(string[] args)\n\n {\n double n = 6, m = 6, a = 4;\n double sMain = n * m;\n\t\t double pCount;\n\t\t double pCount = Math.Ceiling(n/a) + Math.Ceiling(m/a);\n\n Console.WriteLine(pCount);\n\n }\n\n }\n\n} ", "lang_cluster": "C#", "compilation_error": true, "code_uid": "cfb7d681ee7aba412d9c740c910729f0", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": " int n = Convert.ToInt32(Console.ReadLine());\n List sequence = new List(n);\n string q = Console.ReadLine();\n if (n > q.Length)\n {\n Console.WriteLine(\"NO\");\n return;\n }\n if (n == 1)\n {\n Console.WriteLine(\"YES\");\n Console.WriteLine(q);\n return;\n }\n StringBuilder builder = new StringBuilder();\n int index = 1;\n builder.Append(q[0]);\n while (n > 0 && index < q.Length - 1)\n {\n if (builder.Length == 0 || q[index + 1] != builder[0])\n {\n if (n == 1)\n {\n builder.Append(q.Substring(index));\n sequence.Add(builder.ToString());\n n--;\n }\n else\n {\n builder.Append(q[index++]);\n sequence.Add(builder.ToString());\n builder.Clear();\n n--;\n }\n }\n else\n {\n builder.Append(q[index++]);\n }\n }\n\n if (n == 0)\n {\n Console.WriteLine(\"YES\");\n for (int i = 0; i < sequence.Count; i++)\n Console.WriteLine(sequence[i]);\n }\n else\n Console.WriteLine(\"NO\");", "lang_cluster": "C#", "compilation_error": true, "code_uid": "dc8184da252572d2f9b0ff72449cae9a", "src_uid": "c1b071f09ef375f19031ce99d10e90ab", "difficulty": 1100.0}
{"lang": "MS C#", "source_code": " string[] fline = Console.ReadLine().Split(' ');\n int x = int.Parse(fline[0]);\n if (x % 2 != 0)\n { x++; }\n if (int.Parse(fline[1]) <= x / 2)\n {\n Console.WriteLine(2 * int.Parse(fline[1]) - 1);\n }\n else { Console.WriteLine((2 * int.Parse(fline[1]) - x)); }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "121cc9d0d91511a6bed6f2850baa67d7", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "using System;\nclass Sample\n{\n public static voi Main()\n {\n String[] ip=Console.ReadLine().Split(' ');\n int ip1=int.Parse(ip[0]);\n int ip2=int.Parse(ip[1]);\n int[] arr=new int[ip1];\n int cnt=0;\n for(int i=1;i\n\n \n Debug\n x86\n 8.0.30703\n 2.0\n {5EA0CD21-7B4B-4B4C-BCD6-23884035146C}\n Exe\n Properties\n aasddsa\n aasddsa\n v4.0\n Client\n 512\n \n \n x86\n true\n full\n false\n bin\\Debug\\\n DEBUG;TRACE\n prompt\n 4\n \n \n x86\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", "lang_cluster": "C#", "compilation_error": true, "code_uid": "b2656016bcaedbe50fe4bcfeee35a24a", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\nusing System.Text;\n\n\n\nnamespace CodeForces\n{\n\tclass Program\n\t{\n\t\tpublic static void Main(string[] args)\n\t\t{\n\t\t\tEvenOdds();\n\t\t\n\t\t}\n\t\tpublic static void EvenOdds(){\n\t\t\tlong[] nk = Array.ConvertAll(Console.ReadLine().Split(), x => Convert.ToInt64(x));\n\t\t\tConsole.WriteLine(nk[1] > (nk[0]+1)/2 ? (nk[1]-(nk[0]+1)/2)*2:nk[1]*2-1);\n\t\t}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "c59f2a8d3208efdfb61993341a848ea8", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "using System;\n\npublic class Test\n{\n\tpublic static void Main()\n\t{\n\t\tlong[] dizi = Array.ConvertAll(Console.ReadLine().Split(' '), long.Parse);\n\t\t\tlong sonuc = 0;\n\t\t\tArrayList sayilar=new ArrayList();\n\t\t\t\n\t\t\t\tif (dizi[0] % 2 == 0)\n\t\t\t\t{\n\t\t\t\t\tif (dizi[1] < dizi[0] / 2)\n\t\t\t\t\t\tsonuc=( 1 + (2 * (dizi[1]-1)));\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tsonuc = ((dizi[1] )-(dizi[0] / 2))*2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (dizi[1] <= dizi[0] / 2)\n\t\t\t\t\tsonuc = (1 + (2 * (dizi[1] - 1)));\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsonuc = (dizi[1] )-(dizi[0] / 2)*2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tConsole.WriteLine(sonuc);\n\t}\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "6d97f2544cd1869621d21d5c1bafc185", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "using System;\nclass Sample\n{\n public static void Main()\n {\n String[] ip=Console.ReadLine().Split(' ');\n long n=int.Parse(ip[0]);\n long k=int.Parse(ip[1]);\n int limit=(n+1)/2;\n if(k<=limit)\n {\n Console.WriteLine(2 * k - 1);\n }\n else\n {\n Console.WriteLine(2 * (k-limit));\n \n }\n \n }\n}\n \n \n \n ", "lang_cluster": "C#", "compilation_error": true, "code_uid": "c2954ec5685a30b3bad4c67ff8ad390f", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace codeforces318A\n{\n class Program\n {\n static void Main(string[] args)\n {\n List nk = Console.ReadLine().Split(\" \").Select(x => Int32.Parse(x)).ToList();\n List odd_list = new List();\n List even_list = new List();\n for (int i = 1; i < nk[0]; i++)\n {\n if(i%2 == 0)\n {\n even_list.Add(i);\n }\n else\n {\n odd_list.Add(i);\n }\n }\n odd_list.AddRange(even_list);\n Console.WriteLine(odd_list[nk[1]]);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2fce952dcf545a32bb985b046e6c5b63", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n public class HeapSorter\n {\n private int[] _arr;\n private int _heapSize;\n\n public HeapSorter(int[] arr)\n {\n _arr = new int[2 * arr.Length];\n Array.Copy(arr, 0, _arr, 0, arr.Length);\n _heapSize = arr.Length;\n }\n\n private static void change(int[] arr, int idx1, int idx2)\n {\n int tmp = arr[idx2];\n arr[idx2] = arr[idx1];\n arr[idx1] = tmp;\n }\n\n private static int parent(int idx)\n {\n if (idx <= 2)\n return 0;\n\n return idx / 2;\n }\n\n private static int left(int idx)\n {\n if (idx == 0)\n return 1;\n\n return 2 * idx;\n }\n\n private static int right(int idx)\n {\n if (idx == 0)\n return 2;\n\n return 1 + 2 * idx;\n }\n\n private static void maxHeapify(int[] arr, int idx, int heapSize)\n {\n int largest = idx;\n int l = left(idx);\n int r = right(idx);\n\n if (l < heapSize && arr[l] > arr[largest])\n {\n largest = l;\n }\n if (r < heapSize && arr[r] > arr[largest])\n {\n largest = r;\n }\n if (largest != idx)\n {\n int tmp = arr[idx];\n arr[idx] = arr[largest];\n arr[largest] = tmp;\n maxHeapify(arr, largest, heapSize);\n }\n }\n\n private static bool IsMaxHeap(int[] arr, int idx)\n {\n if (arr.Length < idx)\n return true;\n\n int lIdx = left(idx);\n int rIdx = right(idx);\n\n bool gtLeft = true, gtRight = true;\n \n if (lIdx < arr.Length) {\n gtLeft = arr[idx] >= arr[lIdx] && IsMaxHeap(arr, lIdx);\n }\n\n if (rIdx < arr.Length) {\n gtRight = arr[idx] >= arr[rIdx] && IsMaxHeap(arr, rIdx);\n }\n\n return gtLeft && gtRight;\n }\n\n private static bool IsMaxHeap1(int[] arr)\n {\n for (int i = arr.Length - 1; i > 0; i--)\n if (arr[parent(i)] < arr[i])\n return false;\n\n return true;\n }\n\n private static void BuildMaxHeap(int[] arr)\n {\n int heapSize = arr.Length;\n for (int i = heapSize / 2; i >= 0; i--)\n {\n maxHeapify(arr, i, heapSize);\n }\n }\n\n private static void HeapSort(int[] arr)\n {\n BuildMaxHeap(arr);\n int heapSize = arr.Length;\n for (int i = arr.Length - 1; i > 0; i--)\n {\n int tmp = arr[0];\n arr[0] = arr[--heapSize];\n arr[heapSize] = tmp;\n maxHeapify(arr, 0, heapSize);\n }\n }\n\n public bool IsHeapSorted()\n {\n return IsMaxHeap1(_arr);\n }\n\n public void HeapSort()\n {\n HeapSort(_arr);\n }\n\n public int HeapMax()\n {\n return _arr[0];\n }\n\n public int HeapExtractMax()\n {\n int max = _arr[0];\n _heapSize--;\n change(_arr, 0, _heapSize - 1);\n maxHeapify(_arr, 0, _heapSize);\n return max;\n }\n\n public void IncreaseKey(int idx, int key)\n {\n if (_arr[idx] < key)\n return;\n _arr[idx] = key;\n for (int i = idx; i > 0; i = parent(i)) {\n if (_arr[i] > _arr[parent(i)])\n change(_arr, i, parent(i));\n }\n }\n\n public void MaxHeapInsert(int key)\n {\n IncreaseKey(_heapSize++, key);\n }\n }\n\n public class NonConfirmator\n {\n public static UInt34 getPosition(UInt64 n, UInt64 k)\n {\n if ((n+1)/2 >= k) {\n return 2 * k - 1;\n }\n return k * 2 - ((n + 1) / 2) * 2;\n }\n }\n\n static void Main(string[] args)\n {\n //int[] arr = new int [] { 23, 17, 14, 6, 13, 10, 1, 5, 7, 12 };\n //int[] arr1 = new int[] { 4, 1, 3, 2, 16, 9, 10, 14, 8, 7 };\n //Console.WriteLine(HeapSorter.IsMaxHeap1(arr1));\n //HeapSorter.BuildMaxHeap(arr1);\n //Console.WriteLine(HeapSorter.IsMaxHeap1(arr1));\n\n //int[] arr = new int[] { 23, 17, 14, 6, 13, 10, 1, 5, 7, 12 };\n //int[] arr = new int[] { 4, 1, 3, 2, 16, 9, 10, 14, 8, 7 };\n //HeapSorter sorter = new HeapSorter(arr);\n\n //foreach(int a in arr)\n // Console.Write(a + \" \");\n string str = Console.ReadLine();\n string[] nums = str.Split(new char[] { ' ' });\n\n Console.WriteLine(NonConfirmator.getPosition(UInt64.Parse(nums[0]), UInt64.Parse(nums[1])));\n Console.ReadLine();\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "dc7310c3ec6242245481376d4425a3dd", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "\ufeff\n\n \n \n Debug\n AnyCPU\n {F5D71BA1-5FAC-4BFE-BD55-85D7E7B93E19}\n Exe\n Properties\n z2\n z2\n v4.5.2\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 \n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "1d08ea20428b8acac0c929fd26db21eb", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "MS C#", "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 double n, k;\n string [] input = Console.ReadLine().Split(' ');\n n = Convert.ToInt32(input[0]);\n k = Convert.ToInt32(input[1]);\n\n //string[] answer = new string[n]; \n\n //for(int i=0; i<=n; i++)\n //{\n // if(i % 2 == 0)\n // {\n // answer[n / 2 + i] = i;\n // }\n // else\n // {\n\n // }\n //}\n\n\n List answer = new List();\n\n for(int i =1; i <= n; i++)\n {\n if(i % 2 != 0)\n {\n answer.Add(i.ToString());\n }\n }\n\n for (int i = 1; i <= n; i++)\n {\n if (i % 2 == 0)\n {\n answer.Add(i.ToString());\n }\n }\n\n Console.WriteLine(answer[k-1]);\n //Console.ReadLine();\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2d63207aa2302b05d05aaeaf0252c24e", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "using System;\n\t\t\t\t\t\npublic class Program\n{\n\tpublic static void Main()\n\t{\n\t\tvar numbers = Console.ReadLine().ToString().Split();\n\t\tvar quantity = Convert.ToInt32( numbers[0] );\n\t\tvar position = Convert.ToInt32( numbers[1] );\n\t\t\n\t\tint middle, foundNumber = 0;\n\t\t\n\t\tif( quantity % 2 == 0 ){\n\t\t middle = quantity / 2;\n\t\t if( positition <= middle ){\n\t\t foundNumber = 2 * position - 1;\n\t\t }else {\n\t\t foundNumber = (quantity - middle) * 2;\n\t\t }\n\t\t}else {\n\t\t middle = ( quantity + 1 ) / 2;\n\t\t if( positition <= middle ){\n\t\t foundNumber = 2 * position - 1;\n\t\t }else {\n\t\t foundNumber = (quantity - middle) * 2;\n\t\t }\n\t\t}\n\t\t\t\n\t}\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "0f127d7ae09493482c7ffb00327401d2", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "MS C#", "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 long long n = Convert.ToInt64(Console.ReadLine());\n long long k = Convert.ToInt64(Console.ReadLine());\n if(n%2==0)\n {\n if(k<=n/2)\n Console.WriteLine(k * 2 - 1);\n else\n Console.WriteLine((k-(n/2))*2);\n }\n else\n {\n if (k <= (n /2)+1)\n Console.WriteLine(k * 2 - 1);\n else\n Console.WriteLine((k - ((n /2)+1)) * 2);\n }\n Console.ReadKey();\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "beacb9f6833bcdbaddeb7a0c169d4855", "src_uid": "1f8056884db00ad8294a7cc0be75fe97", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "using System;\nclass Program\n {\n public static void Main(string[] args)\n {\n int a, b;\n {\n string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\\t' }, StringSplitOptions.RemoveEmptyEntries);\n a = int.Parse(input[0]);\n b = int.Parse(input[1]);\n }\n {\n int temp;\n List data = new List();\n data.Add(b);\n while (a < b)\n {\n if ((temp = b % 10) == 1)\n b = (b -= 1) / 10;\n else if (temp % 2 == 0)\n b /= 2;\n else break; \n data.Add(b);\n }\n if (a!=b) Console.WriteLine(\"NO\");\n else\n {\n Console.WriteLine(\"YES\\n{0}\", data.Count);\n for (int i = data.Count - 1; i > 0; --i)\n Console.Write(\"{0} \", data[i]);\n Console.WriteLine(data[0]);\n }\n }\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "c6147447933334734375f74533d098e9", "src_uid": "fc3adb1a9a7f1122b567b4d8afd7b3f3", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace cf727A\n{\n class Program\n {\n static void Main(string[] args)\n {\n int[] ab = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n\n int a = ab[0]; int b = ab[1];\n\n List operations = new List();\n\n while(b > a)\n {\n operations.Add(b);\n if ((b % 2) == 0)\n b /= 2;\n else if (b.ToString().EndsWith('1'))\n {\n b = (b - 1) / 10;\n }\n else\n {\n Console.WriteLine(\"NO\"); return;\n }\n }\n\n if (b == a)\n {\n Console.WriteLine(\"YES\");\n Console.WriteLine(operations.Count + 1);\n Console.Write(a); Console.Write(' ');\n for (int i = 1; i <= operations.Count; i++)\n {\n Console.Write(operations[operations.Count-i]); Console.Write(' ');\n }\n }\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "37176ca5cb0ab7a52b4802e8dbfb94b5", "src_uid": "fc3adb1a9a7f1122b567b4d8afd7b3f3", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": " int a, b;\n string Result = \"NO\";\n //int[] posled ;\n List posled = new List();\n Console.WriteLine(\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 a\");\n a =int.Parse(Console.ReadLine().ToString());\n Console.WriteLine(\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 b\");\n b = int.Parse(Console.ReadLine().ToString());\n int tempVar = b;\n while (tempVar > a) \n {\n posled.Add(tempVar);\n if (tempVar % 2 > 0)\n {\n tempVar = (tempVar - 1) / 10;\n }\n else\n {\n tempVar = tempVar / 2;\n }\n\n if (tempVar < 1)\n {\n Result = \"NO\";\n break;\n }\n }\n if (tempVar == a)\n {\n Result = \"YES\";\n };\n posled.Add(a);\n \n\n Console.WriteLine(Result);\n if (Result == \"YES\")\n {\n Console.WriteLine(posled.Count());\n for (int i = posled.Count() - 1; i >= 0; i--)\n {\n Console.Write(posled[i] + \" \");\n }\n\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "fbc7e57d8ab119f65078ae0ea165c371", "src_uid": "fc3adb1a9a7f1122b567b4d8afd7b3f3", "difficulty": 1000.0}
{"lang": "MS C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nnamespace ConsoleTesting\n{\n public static class RP\n {\n private static int ParseTime(string time)\n {\n string[] tmp = time.Split(':');\n int seconds = int.Parse(tmp[2]);\n int minutes = int.Parse(tmp[1]);\n int hours = int.Parse(tmp[0]);\n\n return ((hours * 60 + minutes) * 60) + seconds;\n }\n\n private static void Parse(string path)\n {\n string[] lines = System.IO.File.ReadAllLines(path);\n\n int lastInput = 0;\n int total = 0;\n string lastDate = \"\";\n Dictionary perDay = new Dictionary();\n\n foreach (string line in lines)\n {\n string[] tmp = line.Split('\\t');\n bool input = (tmp[2].Length == 24);\n bool output = (tmp[2].Length == 25);\n if (!input && !output) continue;\n\n int time = ParseTime(tmp[1]);\n\n if (input)\n {\n lastDate = tmp[0];\n lastInput = time;\n }\n\n if (output && lastInput > 0)\n {\n if(lastDate != tmp[0]) Console.WriteLine(\"QWE\");\n total += (time - lastInput);\n Console.WriteLine(tmp[0]);\n if (!perDay.ContainsKey(tmp[0])) perDay[tmp[0]] = 0;\n perDay[tmp[0]] += (time - lastInput);\n\n lastInput = 0;\n }\n }\n\n double hours = total;\n hours = hours / 3600;\n\n Console.WriteLine(hours);\n Console.WriteLine(\"-------------------------\");\n\n foreach (string day in perDay.Keys)\n {\n Console.WriteLine(day + \" = \" + (perDay[day] / 3600.0));\n }\n }\n\n public static void Process()\n {\n Parse(@\"d:\\Test\\Reports\\at_june.txt\");\n\n //Console.Write(\"Aleksey (Report > 114) Prism > \");\n //Parse(@\"d:\\v-sers\\chichagov2.txt\");\n\n //Console.Write(\"Victor (Report > ???) Prism > \");\n //Parse(@\"d:\\v-sers\\victor.txt\");\n }\n \n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "fad1e901103863fec6ab625dd61a5cd1", "src_uid": "bf65a25185e9ea5b71e853723b838b04", "difficulty": 1700.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nnamespace ConsoleApplication3\n{\n class Program\n {\n // FEDCBA9876543210\n // 0010211201010001\n // 543210\n\n static void Main(string[] args)\n {\n var n = int.Parse(Console.ReadLine());\n var result = 0;\n\n if (n == 3)\n {\n result = 27;\n }\n if (n == 2)\n {\n throw new Exception(n);\n }\n\n Console.WriteLine(result);\n\n //if (n == 0)\n //{\n // Console.WriteLine(\"1\");\n // return;\n //}\n //var r = 0;\n\n //while (n > 0)\n //{\n // switch (n % 16)\n // {\n // case 0:\n // case 4:\n // case 6:\n // case 9:\n // case 10:\n // case 13:\n // r++;\n // break;\n // case 8:\n // case 11:\n // r += 2;\n // break;\n // }\n\n // n /= 16;\n //}\n //Console.WriteLine(r);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "ea4323132f854a9618cd861dde92c1d5", "src_uid": "bf65a25185e9ea5b71e853723b838b04", "difficulty": 1700.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication1Bagaeva\n{\n class Program\n {\n static void Main(string[] args)\n {\n ulong a = ulong.Parse(Console.ReadLine());\n int c=24+a;\n Console.WriteLine(c);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "81e74c53100a47e669b70f7bed35fb60", "src_uid": "bf65a25185e9ea5b71e853723b838b04", "difficulty": 1700.0}
{"lang": "Mono C#", "source_code": "\ufeff using System;\n using System.Linq;\n\n namespace CodeWars\n {\n class _263A\n {\n static void Main()\n {\n var input = new int[5][];\n (int, int) position = (default(int),default(int));\n for (int i = 0; i < 5; i++)\n {\n input[i] = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n var index = Array.IndexOf(input[i],1);\n if (index != -1)\n position = (index, i);\n }\n Console.WriteLine(Math.Abs(2 - position.Item1) + Math.Abs(2 - position.Item2));\n }\n }\n }\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "d05f349d7f9b619166436fc755eaef69", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "for(var r=0;r<5;i++){var items = console.readline().split(' ');\nfor(var c=0;c<5;c++){ \n if(items[c]==\"1\"){print(Math.abs(2-c) + Math.abs(2-i))\n break;}\n}\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "34c446b00fb7d48189c354691f74dcdc", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": " using System;\n using System.Linq;\n\n namespace CodeWars\n {\n class _263A\n {\n static void Main()\n {\n var input = new int[5][];\n (int, int) position = (default(int),default(int));\n for (int i = 0; i < 5; i++)\n {\n input[i] = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();\n var index = Array.IndexOf(input[i],1);\n if (index != -1)\n position = (index, i);\n }\n Console.WriteLine(Math.Abs(2 - position.Item1) + Math.Abs(2 - position.Item2));\n }\n }\n }\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "3c1d9d1659ffc7e4d99dbd7d2169baed", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\npublic class Test {\n\n\tint[][] a = new int[5][5];\n\n\tpublic static void Main() {\n\t\tint x = 0, y = 0;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tstring[] l = Console.ReadLine().Split();\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\ta[i][j] = Convert.ToInt32(l[j]);\n\t\t\t\tif (a[i][j] == 1) {\n\t\t\t\t\tx = i;\n\t\t\t\t\ty = j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tConsole.WriteLine(Math.Abs(x - 2) + Math.Abs(y - 2));\n\t}\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "7cb911550fd1f1e376444e218e2e5118", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace App\n{\n class Program\n {\n static void Main()\n {\n var strs = new string[5];\n int row = 0, col = 0;\n for (int i = 0; i < 5; i++)\n {\n strs[i] = Console.ReadLine();\n if (strs[i].Contains('1'))\n {\n row = i+1;\n col = strs[i].Replace(\" \", \"\").IndexOf(\"1\")+1;\n }\n }\n Console.WriteLine(Math.Abs(3-row) + Math.Abs(3-col));\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "bb96265dac94d04f3352836035fb684c", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 //Your code goes here\n var matrix = new int[5,5];\n for(var index = 0; index < 5; index++)\n matrix[index] = Array.ConvertAll(Console.ReadLine().Split(' '), Int);\n int oneRow=0;\n int oneCol=0\n for(var row = 0; row < 5; row++)\n {\n for(var col = 0; col < 5; col++){\n if(matrix[row,col] == 1)\n {\n oneRow = row;\n oneCol = col;\n }\n }\n }\n \n ConsoleWriteLine(Math.Abs(2-oneRow) + Math.Abs(2-oneCol));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "68d5159fa9f1a3be3dfee52b3abed2c2", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\n\nnamespace HackerRank\n{\n class Program\n {\n static void Main(string[] args)\n {\n int x = 0, y = 0;\n for (int i = 0; i < 5; i++)\n {\n string line = Console.ReadLine();\n for (int j = 0; j < 10; j += 2)\n if (line[j] == '1')\n {\n x = j / 2;\n y = i;\n }\n }0\n Console.WriteLine(Math.Abs(x - 2) + Math.Abs(y - 2));\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "caf8626320ba0cdd367e0412b13156e3", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace _263A.BeautifulMatrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[][] matrix = new string[5][];\n int row = 0;\n int col = 0;\n\n for(int i = 0; i < 5;i++){\n matrix[i] = Console.ReadLine().Split(' ');\n\n if(matrix[i].Contains('1')){\n row = i;\n\n for(int j = 0; j < 5;j++){\n if(matrix[i][j] == '1'){\n col = j;\n }\n }\n }\n }\n\n Console.WriteLine(Math.Abs(row - 2) + Math.Abs(col - 2));\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "e7cc71cb97194e08af5c6270be2da862", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nclass Program\n{\n static void Main()\n {\n var row = 1;\n var moves = 0;\n while(true)\n {\n var input = Console.ReadLine().Replace(\" \", \"\");\n var col = input.IndexOf(\"1\");\n if (col >= 0)\n {\n return (3 - row) + (3 - col + 1);\n }\n row++;\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "54fb14d230ba3b3681abd846873e75dd", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 //Your code goes here\n var matrix = new string[5][];\n for(var index = 0; index < 5; index++)\n matrix[index] = Console.ReadLine().Split(' ');\n\n int oneRow=0;\n int oneCol=0;\n for(var row = 0; row < 5; row++)\n {\n if(matrix[row].IndexOf(\"1\") != -1){\n oneRow = row;\n oneCol = col; \n }\n }\n \n Console.WriteLine(Math.Abs(2-oneRow) + Math.Abs(2-oneCol));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "6ed30ded9e16a90613a0b29ae60ed008", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\n\nnamespace Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n int y = -2;\n int x = 10;\n bool set = false;\n\n for (int i = 0; i < 5; i++)\n {\n if (set)\n {\n Console.ReadLine();\n }\n else\n {\n\n string input = Console.ReadLine().Trim();\n if (input.Contains('1'))\n {\n\n x = input.IndexOf('1')-2;\n set = true;\n }\n else\n {\n y++;\n }\n\n }\n }\n\n Console.WriteLine(Math.Abs(x) + Math.Abs(y));\n Console.ReadLine();\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "8fc7571a9c7acb96a4165a8264334b6e", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": ".NET Core C#", "source_code": "using System;\n \nnamespace _263A_A_Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n for (int i=1; i<=5; i++)\n {\n string s1 = Console.ReadLine();\n string[] s1values = s1.Split(' ');\n \n for (int j=1; j<=5; j++)\n {\n int x = int.Parse(s1values[j-1]); [B]// System.FormatException: \"\u0412\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043c\u0435\u043b\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442.\"[/B]\n if (x==1)\n {\n Console.Write(Math.Abs(i-3)+ Math.Abs(j - 3));\n }\n }\n } \n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "23a0a30a77ed261b1de8a72a3e455e6d", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace CSharpEdu\n{\n class ClassCS\n {\n struct point\n {\n public int h;\n public int v;\n }\n static int abs (int x)\n {\n return x > 0 ? x : -x;\n }\n static void Main()\n {\n string s;\n int i, j, tmp;\n bool flag = false;\n point Imlookingfor1;\n for (i = 1; i <= 5; ++i)\n {\n s = Console.ReadLine();\n tmp = 0;\n for (j = 0; j 2)\n {\n matrix = swapRow(matrix, -1, rowIndex);\n rowIndex -= 1;\n count++;\n }\n else if (rowIndex < 2)\n {\n matrix = swapRow(matrix, 1, rowIndex);\n rowIndex += 1;\n count++;\n }\n\n if (columnIndex > 2)\n {\n matrix = swapColumn(matrix, -1,rowIndex,columnIndex);\n columnIndex += -1;\n count++;\n }\n else if (columnIndex < 2)\n {\n matrix = swapColumn(matrix, 1,rowIndex,columnIndex);\n columnIndex += 1;\n count++;\n }\n\n }\n Console.WriteLine(count);\n }\n public static int[][] swapRow(int[][] matrix, int index, int rowIndex)\n {\n int[] temp = matrix[rowIndex];\n matrix[rowIndex] = matrix[rowIndex + index];\n matrix[rowIndex + index] = temp;\n return matrix;\n }\n\n public static int[][] swapColumn(int[][] matrix, int index,int rowIndex ,int columnIndex)\n {\n matrix[rowIndex][columnIndex + index] = 1;\n matrix[rowIndex][columnIndex] = 0;\n return matrix;\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "581f16919d7922f372dce46d80acaa3c", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace A._Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte rows = 5, columns = 5;\n int[,] matrix = new int[rows, columns];\n int xIndex = 0, yIndex = 0;\n for (int i = 0; i < rows; i++)\n {\n string[] line = Console.ReadLine().Split(\" \");\n int[] numbers = line.Select(int.Parse).ToArray();\n\n for (int j = 0; j < columns; j++)\n {\n matrix[i, j] = numbers[j];\n if (numbers[j] == 1)\n {\n xIndex = i;\n yIndex = j;\n }\n }\n\n\n }\n\n int numberOfMoves = Math.Abs(2 - xIndex) + Math.Abs(2 - yIndex);\n\n Console.WriteLine(numberOfMoves);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "fed2e57d92687bfd47db810b5ac30143", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n internal class Program\n {\n private static void Main(string[] args)\n {\n var s = \"\";\n var y = 0;\n var x = 0;\n for (int i = 0; i < 5; i++)\n {\n s = Console.ReadLine();\n if (s.Contains('1'))\n {\n x = s.Replace(\" \", \"\").IndexOf('1') + 1;\n y = i + 1;\n }\n }\n Console.WriteLine(Math.Abs(3 - x) + Math.Abs(3 - y));\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "5b222cb6928e54853fc5a3566bc6e2ba", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace A._Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte rows = 5, columns = 5;\n int[,] matrix = new int[rows, columns];\n int xIndex = 0, yIndex = 0;\n for (int i = 0; i < rows; i++)\n {\n var line = Console.ReadLine().Split(\" \");\n int[] numbers = line.Select(i => Int32.Parse(i)).ToArray();\n\n for (int j = 0; j < columns; j++)\n {\n matrix[i, j] = numbers[j];\n if (numbers[j] == 1)\n {\n xIndex = i;\n yIndex = j;\n }\n }\n\n\n }\n\n int numberOfMoves = Math.Abs(2 - xIndex) + Math.Abs(2 - yIndex);\n\n Console.WriteLine(numberOfMoves);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "1d8efb2921e0766bbd6bcf9b4cad61f2", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 //Your code goes here\n var matrix = new string[5];\n for(var index = 0; index < 5; index++)\n matrix[index] = Console.ReadLine\n\n int oneRow=0;\n int oneCol=0;\n for(var row = 0; row < 5; row++)\n {\n if(matrix[row].IndexOf(\"1\") != -1){\n oneRow = row;\n oneCol = col; \n }\n }\n \n Console.WriteLine(Math.Abs(2-oneRow) + Math.Abs(2-oneCol));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "774f4e2c0065ffb8508fdcf55af516ef", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 int x = 0, y = 0;\n for(int i = 0; i < 5; i++)\n {\n string[] s = Console.ReadLine().Split(' ');\n for(int j = 0; j < 5; j++)\n {\n if(s[j] == '1') \n {\n x = int.Parse(s[j]);\n y = int.Parse(s[i]);\n f = Math.Abs(3-x)+Math.Abs(3-y);\n }\n }\n }\n Console.WriteLine(f);\n Console.ReadLine();\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "685db4ed1e1fbeb78638f3266ae6155f", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace BeautifulMatrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n char[,] Array = new char [5, 5];\n int count = 0;int rowindex = 0;\n int colindex = 0;\n\n for (int i=0;i<4;i++)\n {\n rowindex = i;\n string value = Console.ReadLine();\n if(value.Contains('1'))\n {\n colindex = value.IndexOf('1') / 2 + 1;\n\n }\n \n \n }\n\n // Console.WriteLine(2-rowindex/2+1+2-colindex);\n Console.WriteLine(rowindex-2+ colindex-2);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "5920a0a0aba685af256c05172c033523", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace BeautifulMatrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n char[,] Array = new char [5, 5];\n int count = 0;int rowindex = 0;\n int colindex = 0;\n\n for (int i=0;i<4;i++)\n {\n rowindex = i;\n string value = Console.ReadLine();\n if(value.Contains('1'))\n {\n colindex = value.IndexOf('1') / 2 + 1;\n\n }\n \n \n }\n\n // Console.WriteLine(2-rowindex/2+1+2-colindex);\n Console.WriteLine(rowindex/2+1-2+ colindex-2);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2075f7a0e8bb0e430100fe67ecff4291", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Globalization;\nusing System.Linq;\nusing System.Runtime.InteropServices;\n\nnamespace Codeforces\n{\n internal class Program\n {\n public static void Main(string[] args)\n {\n for (var i = 0; i < 5; i++)\n {\n var index = Console.ReadLine().Replace(' ', '').IndexOf('1');\n if (index <= 0) continue;\n \n Console.WriteLine(Math.Abs(3 - index) + Math.Abs(3 - i));\n return;\n } \n }\n } \n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "dd1b0f0530569c4c34078c5bd9f63a2d", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 //Your code goes here\n var matrix = new string[5][];\n for(var index = 0; index < 5; index++)\n matrix[index] = Console.ReadLine().Split(\" \");\n\n int oneRow=0;\n int oneCol=0;\n for(var row = 0; row < 5; row++)\n {\n if(matrix[row].indexOf(\"1\") != -1){\n oneRow = row;\n oneCol = col; \n }\n }\n \n Console.WriteLine(Math.Abs(2-oneRow) + Math.Abs(2-oneCol));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "07dbe980f274fbd04db4447bf4931925", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "MS C#", "source_code": "using System;\n\nnamespace ConsoleApplication1\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte[,] matr = new byte[5 , 5];\n int i = 0, j = 0;\n for (i=0;i<5;i++)\n {\n string[] temp = Console.ReadLine().Split(' ');\n for (j=0;j<5;j++)\n {\n matr[i,j] = Byte.Parse(temp[j]);\n }\n }\n for (i=0;i<5;i++)\n {\n for (j=0;j<5;j++)\n {\n if (matr[i,j]==1)\n {\n goto met;\n }\n }\n }\n met:\n Console.WriteLine(Math.Abs(i - 2)+Math.Abs(j-2));\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "894c719c57fd6f57656a726c62a230a3", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace A._Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte rows = 5, columns = 5;\n int[,] matrix = new int[rows, columns];\n int xIndex = 0, yIndex = 0;\n for (int i = 0; i < rows; i++)\n {\n int[] numbers = Console.ReadLine()\n .Split(' ', StringSplitOptions.RemoveEmptyEntries)\n .Select(int.Parse)\n .ToArray();\n\n for (int j = 0; j < columns; j++)\n {\n matrix[i, j] = numbers[j];\n if (numbers[j] == 1)\n {\n xIndex = i;\n yIndex = j;\n }\n }\n\n\n }\n\n int numberOfMoves = Math.Abs(2 - xIndex) + Math.Abs(2 - yIndex);\n\n Console.WriteLine(numberOfMoves);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "65ddfdd7024e3a5606f93abc201ba967", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net.Http.Headers;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n int[][] arr = new int[5][];\n for (int i = 0; i < 5; i++)\n arr[i] = new int[5];\n\n for (int i = 0; i < 5; i++)\n {\n for (int j = 0; j < 5; j++)\n {\n arr[i][j] = Convert.ToInt32(Console.ReadLine());\n }\n }\n\n Console.WriteLine(arr[1][2]);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "ae289760bc652de4a94910c215fa7739", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace A._Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte rows = 5, columns = 5;\n int[,] matrix = new int[rows, columns];\n int xIndex = 0, yIndex = 0;\n for (int i = 0; i < rows; i++)\n {\n var line = Console.ReadLine().Split(\" \");\n int[] numbers = line.Select(z => Int32.Parse(z)).ToArray();\n\n for (int j = 0; j < columns; j++)\n {\n matrix[i, j] = numbers[j];\n if (numbers[j] == 1)\n {\n xIndex = i;\n yIndex = j;\n }\n }\n\n\n }\n\n int numberOfMoves = Math.Abs(2 - xIndex) + Math.Abs(2 - yIndex);\n\n Console.WriteLine(numberOfMoves);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "4874900615075497f3dad9b43c571dc4", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": " using System;\n using System.Collections.Generic;\n using System.Linq;\n using System.Text;\n using System.Math;\n \n\n namespace ConsoleApplication1\n {\n class Program\n {\n static void Main(string[] args)\n {\n string NUmberOne;\n int Result;\n\n for (int i = 1; i <= 5; i++)\n {\n for (int j = 1; j <= 5; j++)\n {\n NUmberOne=Console.ReadLine();\n\n if (NUmberOne == \"1\")\n {\n Result = Math.Abs(i - 3) + Math.Abs(j - 3);\n Console.WriteLine(Result.ToString());\n break;\n \n }\n\n \n }\n }\n \n\n }\n }\n\n\n\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "91010d1f12542ebd356ba1236d61a181", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeff\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2012\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"beutiful matrix\", \"beutiful matrix\\beutiful matrix.csproj\", \"{C1C1A884-AD91-4664-A2F2-E829F26D75E0}\"\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{C1C1A884-AD91-4664-A2F2-E829F26D75E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{C1C1A884-AD91-4664-A2F2-E829F26D75E0}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{C1C1A884-AD91-4664-A2F2-E829F26D75E0}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{C1C1A884-AD91-4664-A2F2-E829F26D75E0}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "122a9e08e5a6b6236bd8e2fb8a3f7aa5", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace beutiful_matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n string[] s = new string[5];\n for (int i = 0; i < 5; i++)\n {\n s[i] = Console.ReadLine().Replace(\" \", \"\");\n }\n\n\n\n int x = 0, y = 0;\n for (int i = 0; i < 5; i++)\n for (int j = 0; j < 5; j++)\n if (s[i][j] == '1')\n {\n x = j; y = i;\n }\n\n Console.WriteLine(Math.Abs(x - 2) + Math.Abs(y - 2));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "a13e47f187c76c54c4e334e1e4419cc7", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "#include \n\nusing namespace std;\n\nint main()\n{\n int x,y,i,j,a[6][6],ans;\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n scanf(\"%d\",&a[i][j]);\n }\n }\n for(i=0;i<5;i++){\n for(j=0;j<5;j++){\n if(a[i][j]==1){\n x=i+1;\n y=j+1;\n }\n }\n }\n ans=abs(x-3)+abs(y-3);\n printf(\"%d\\n\",ans);\n return 0;\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "f415c9293a3f2780b61b9a0cd099eeaa", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": " {\n static void Main(string[] args)\n {\n int[,] mas = new int[5, 5];\n int k = 0;\n int b = -1;\n int c = -1;\n for (int i = 0; i < 5; i++)\n {\n string s = Console.ReadLine();\n string[] ss = s.Split(' ');\n\n for (int j = 0; j < 5; j++)\n {\n mas[i, j] = Convert.ToInt32(ss[j]);\n if (mas[i, j] == 1)\n {\n b = i;\n c = j;\n }\n }\n }\n\n Console.WriteLine(Math.Abs(2 - b) + Math.Abs(2 - c));\n\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "6c63deefd05b50d8bc89ee0f77f4e286", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "ing 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 int x = 0, y = 0;\n for(int i = 0; i < 5; i++)\n {\n string[] s = Console.ReadLine().Split(' ');\n for(int j = 0; j < 5; j++)\n {\n if(s[j] == '1') \n {\n x = int.Parse(s[j]);\n y = int.Parse(s[i]);\n f = Math.Abs(3-x)+Math.Abs(3-y);\n }\n }\n }\n Console.WriteLine(f);\n Console.ReadLine();\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "dff46ad2c59e21a05dd98f6d602c6010", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 //Your code goes here\n var matrix = new string[5][];\n for(var index = 0; index < 5; index++)\n matrix[index] = Console.ReadLine();\n\n int oneRow=0;\n int oneCol=0;\n for(var row = 0; row < 5; row++)\n {\n if(matrix[row].indexOf(\"1\") !== -1){\n oneRow = row;\n oneCol = col; \n }\n }\n \n Console.WriteLine(Math.Abs(2-oneRow) + Math.Abs(2-oneCol));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "a71f0a07be8db186d114ef7663deebd8", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace BeautifulMatrix\n{\n class Program\n {\n private static int SIZE_MATRIX = 5;\n private static int PERFECT_POSITION;\n private static int[,] Matrix;\n \n static void Main(string[] args)\n {\n Matrix = new int[SIZE_MATRIX, SIZE_MATRIX];\n int[] temp = new int[SIZE_MATRIX], OriginalPos = new int[2];\n PERFECT_POSITION = (SIZE_MATRIX / 2) - 1;\n int steps = 0;\n \n for (int i = 0; i < SIZE_MATRIX;i++)\n {\n temp = Array.ConvertAll(Console.ReadLine().Split(\" \"), x => int.Parse(x));\n \n for (int j = 0;j < SIZE_MATRIX;j++)\n {\n Matrix[i, j] = temp[j];\n \n if (temp[j] == 1)\n {\n OriginalPos[0] = i;\n OriginalPos[1] = j;\n }\n }\n }\n \n for (int i = 0; i < 2;i++)\n {\n while (OriginalPos[i] != 2)\n {\n if (OriginalPos[i] > 2)\n {\n OriginalPos[i]--;\n }\n else\n {\n OriginalPos[i]++;\n }\n steps++;\n }\n }\n\n Console.WriteLine(steps);\n \n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "d6d8a8d2205c80fa03cf74853c61ec93", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace _263A___Beautiful_Matrix\n{\n\tclass Program\n\t{\n\t\tstatic void Main(string[] args)\n\t\t{\n\t\t\tMatrixen();\n\t\t}\n\n\t\tprivate static void Matrixen()\n\t\t{\n\t\t\t(int, int) coords = GetCoords();\n\t\t\tint steps = Math.Abs(coords.Item1 - 3) + Math.Abs(coords.Item2 - 3);\n\n\t\t\tConsole.WriteLine(steps);\n\t\t}\n\n\t\tprivate static (int, int) GetCoords()\n\t\t{\n\t\t\tfor (int y = 0; y < 5; y++)\n\t\t\t{\n\t\t\t\tstring[] line = Console.ReadLine().Split(' ');\n\n\t\t\t\tfor (int x = 0; x < 5; x++)\n\t\t\t\t\tif (line[x] == \"1\")\n\t\t\t\t\t\treturn (x, y);\n\t\t\t}\n\n\t\t\treturn (0, 0);\n\t\t}\n\t}\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "7ac0703f5cf4979a9ac88fd4f72dccfb", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace CodeForcesNew\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n string[] inputs =\n {\n Console.ReadLine().Replace(\" \", \"\"),\n Console.ReadLine().Replace(\" \", \"\"),\n Console.ReadLine().Replace(\" \", \"\"),\n Console.ReadLine().Replace(\" \", \"\"),\n Console.ReadLine().Replace(\" \", \"\"), \n };\n int a = 1;\n for (int i = 0; i < 5; i++)\n {\n if (inputs[i].Contains(\"1\"))\n {\n int column = inputs[i].IndexOf(\"1\");\n a = a + i;\n Console.WriteLine(Math.Abs(3-a)+Math.Abs(2-column));\n i = 5;\n }\n\n\n }\n\n Console.ReadLine();\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "73790f163de2730451dd7bb9ee7cec1f", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeff\ufeff\ufeff\ufeffusing System;\n\ufeff\ufeff\ufeffusing System.Collections.Generic;\n\ufeff\ufeff\ufeffusing System.IO;\n\ufeff\ufeff\ufeffusing System.Linq;\n\ufeff\ufeff\ufeffusing 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 line1 = reader.ReadLine().Replace(\" \",\"\");\n var line2 = reader.ReadLine().Replace(\" \",\"\");\n var line3 = reader.ReadLine().Replace(\" \",\"\");\n var line4 = reader.ReadLine().Replace(\" \",\"\");\n var line5 = reader.ReadLine().Replace(\" \",\"\");\n\n int i = 0;\n int j = 0;\n int ii = 0;\n\n if ((ii = line1.IndexOf('1')) > 0) {\n i = ii;\n j = 1;\n i++;\n }\n if ((ii = line2.IndexOf('1')) > 0) {\n i = ii;\n j = 2;\n i++;\n }\n if ((ii = line3.IndexOf('1')) > 0) {\n i = ii;\n j = 3;\n i++;\n }\n if ((ii = line4.IndexOf('1')) > 0) {\n i = ii;\n j = 4;\n i++;\n }\n if ((ii = line5.IndexOf('1')) > 0) {\n i = ii;\n j = 5;\n i++;\n }\n\n Console.WriteLine((Math.Abs(i - 3) + Math.Abs(j - 3)));\n\nANSW:\n \n\n#if DEBUG\n Console.ReadKey();\n#endif\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}\n\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "5df19e1b5931d304f9d85820422d3824", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace BeautifulMatrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n int oneI = 0, oneJ = 0;\n for (int i = 0; i < 5; i++)\n {\n var line = Console.ReadLine().Split(\" \");\n for (int j = 0; j < line.Length; j++)\n { \n if(line[j] == \"1\")\n {\n oneI = i;\n oneJ = j;\n break;\n }\n }\n }\n\n Console.WriteLine(Math.Abs(2 - oneI) + Math.Abs(2 - oneJ));\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "24d036f39ad5f6aa04bd845200d13904", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n \nnamespace ConsoleApp73\n{\n class Program\n {\n static void Main(string[] args)\n {\n int[,] mas = new int[5, 5];\n int k = 0;\n int b = -1;\n int c = -1;\n for (int i = 0; i < 5; i++)\n {\n string s = Console.ReadLine();\n string[] ss = s.Split(' ');\n \n for (int j = 0; j < 5; j++)\n {\n mas[i, j] = Convert.ToInt32(ss[j]);\n if (mas[i, j] == 1)\n {\n b = i;\n c = j;\n }\n }\n }\n \n Console.WriteLine(Math.Abs(2 - b) + Math.Abs(2 - c));\n \n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "6a8061eabe20db542816ad0872db2885", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": ".NET Core C#", "source_code": " class Program_8\n {\n public static void Main()\n {\n string [] _arr = new string[5];\n\n for (int i = 0; i < 5; i++)\n {\n _arr[i] = ReadLine();\n } \n \n int[,] arr = new int[5,5];\n\n for (int i = 0; i < 5; i++)\n {\n for (int j = 0 , k=0 ; j < 5 && k < 5 ; k+=2 , j++)\n {\n arr[i, j] = ToInt32( (_arr[i][k]).ToString() );\n }\n } \n\n int index_rows = 0 , index_coulmn = 0;\n for (int i = 0; i < 5 ; i++)\n {\n for (int j = 0; j < 5 ; j++)\n {\n if(arr[i,j]==1)\n {\n index_coulmn = j ;\n index_rows = i ;\n break;\n }\n }\n } \n }\n static int count = 0;\n public static void Result(int i, int j)\n { \n\n if(i==2 && j==2)\n {\n Console.WriteLine(count);\n return;\n }\n\n else if(i>2||i<2)\n {\n i = (i > 2) ? i - 1 : i + 1;\n count++;\n Result(i,j);\n }\n\n else if(j>2||j<2)\n {\n j = (j > 2) ? j - 1 : j + 1;\n count++;\n Result(i,j);\n }\n\n }\n\n\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "516858687882fad16652431481ae3cc4", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "MS C#", "source_code": " class Program\n {\n static void Main(string[] args)\n {\n int row,column = 0;\n\n for (row = 1; row <= 5; row++)\n {\n var numbersArray = Console.ReadLine().Split(' ').Select(int.Parse).ToList();\n\n var index = numbersArray.IndexOf(1);\n\n if (index != -1)\n {\n column = index + 1;\n break;\n }\n\n }\n\n Console.WriteLine(Math.Abs(3-row) + Math.Abs(3-column));\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "3fe36319caf1af16b921813e81a96d76", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": " static void Main(string[] args)\n {\n int n = Convert.ToInt32(Console.ReadLine());\n\n string[] s = Console.ReadLine().Split(' ');\n\n int[] a = new int[n];\n\n\n for (int i = 0; i < n; i++)\n {\n a[i] = Convert.ToInt32(s[i]);\n }\n int max = a[0];\n int indexMax = 0;\n for (int i = 1; i < n; i++)\n {\n if (a[i] < max)\n {\n max = a[i];\n indexMax = i;\n }\n }\n Console.WriteLine(indexMax);\n\n for (int i = 0; i < n; i++)\n {\n Console.Write(a[i] - indexMax + \" \");\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "e7422b54c9973a64b327052e7bc0a899", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Linq;\n\nnamespace CodeForces\n{\n class Program\n {\n static void Main(string[] args)\n {\n int res;\n for (int i = 0; i < 5; i++)\n {\n int[] a = Console.ReadLine().Split(' ').Select(Int32.Parse).ToArray();\n for (int j = 0; j < 5; j++)\n {\n if (a[j] == 1)\n {\n res = Math.Abs(2 - i) + Math.Abs(2 - j);\n break;\n }\n }\n }\n Console.WriteLine(res);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "f34f0b7127f2ada3e32beff81f96b7b1", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": ".NET Core C#", "source_code": " using System;\n using System.Console;\n using System.Convert;\n \n class Program_8\n {\n public static void Main()\n {\n string [] _arr = new string[5];\n\n for (int i = 0; i < 5; i++)\n {\n _arr[i] = ReadLine();\n } \n \n int[,] arr = new int[5,5];\n\n for (int i = 0; i < 5; i++)\n {\n for (int j = 0 , k=0 ; j < 5 && k < 5 ; k+=2 , j++)\n {\n arr[i, j] = ToInt32( (_arr[i][k]).ToString() );\n }\n } \n\n int index_rows = 0 , index_coulmn = 0;\n for (int i = 0; i < 5 ; i++)\n {\n for (int j = 0; j < 5 ; j++)\n {\n if(arr[i,j]==1)\n {\n index_coulmn = j ;\n index_rows = i ;\n break;\n }\n }\n } \n }\n static int count = 0;\n public static void Result(int i, int j)\n { \n\n if(i==2 && j==2)\n {\n Console.WriteLine(count);\n return;\n }\n\n else if(i>2||i<2)\n {\n i = (i > 2) ? i - 1 : i + 1;\n count++;\n Result(i,j);\n }\n\n else if(j>2||j<2)\n {\n j = (j > 2) ? j - 1 : j + 1;\n count++;\n Result(i,j);\n }\n\n }\n\n\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "205192a49aa5b2fbeb7676b6226ae5a4", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Linq;\n\nnamespace A._Beautiful_Matrix\n{\n class Program\n {\n static void Main(string[] args)\n {\n byte rows = 5, columns = 5;\n int[,] matrix = new int[rows, columns];\n int xIndex = 0, yIndex = 0;\n for (int i = 0; i < rows; i++)\n {\n int[] numbers = Console.ReadLine()\n .Split(\" \", StringSplitOptions.RemoveEmptyEntries)\n .Select(int.Parse)\n .ToArray();\n\n for (int j = 0; j < columns; j++)\n {\n matrix[i, j] = numbers[j];\n if (numbers[j] == 1)\n {\n xIndex = i;\n yIndex = j;\n }\n }\n\n\n }\n\n int numberOfMoves = Math.Abs(2 - xIndex) + Math.Abs(2 - yIndex);\n\n Console.WriteLine(numberOfMoves);\n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "ba6e992f3b801845c5b8938114f85d41", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\n\nnamespace App\n{\n class Program\n {\n static void Main()\n {\n var strs = new string[5];\n int row = 0, col = 0;\n for (int i = 0; i < 5; i++)\n {\n strs[i] = Console.ReadLine();\n if (strs[i].Contains('1'))\n {\n row = i+1;\n col = strs[i].Replace(\" \", \"\").IndexOf('1')+1;\n }\n }\n Console.WriteLine(Math.Abs(3-row) + Math.Abs(3-col));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "85cda2a5d2f3e25af34f288a73fa500f", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "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 //Your code goes here\n var matrix = new char[5][];\n for(var index = 0; index < 5; index++)\n matrix[index] = Console.ReadLine().Split(' ');\n\n int oneRow=0;\n int oneCol=0;\n for(var row = 0; row < 5; row++)\n {\n for(var col = 0; col < 5; col++){\n if(matrix[row][col] == \"1\")\n {\n oneRow = row;\n oneCol = col;\n }\n }\n }\n \n Console.WriteLine(Math.Abs(2-oneRow) + Math.Abs(2-oneCol));\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "7737999bacfc18a6a7fe6076672ff138", "src_uid": "8ba7cedc3f6ae478a0bb3f902440c8e9", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\n\n\nint n = Convert.ToInt32(Console.ReadLine());\n\nstring[] s = Console.ReadLine().Split(' ');\n\nint[] a = new int[n];\n\n\nfor (int i = 0; i < n; i++)\n{ a[i] = Convert.ToInt32(s[i]);\n}\nint max = a[0];\nint indexMax = 0;\nfor (int i = 1; i < n; i++)\n{ if (a[i] < max)\n{ max=a[i];\nindexMax = i;\n} }\nConsole.WriteLine(indexMax);\n\nfor (int i=0; i j = r.ReadLine().Split().Select(x => int.Parse(x)).ToList();\n min = Math.Min(j[0], j[2]);min = Math.Min(j[3], min);\n d = Math.Min(j[1], j[0] - min);\n Console.WriteLine(256 * min + d * 32);\n }\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "37d9554eb3513be82c018b6d8f229765", "src_uid": "082b31cc156a7ba1e0a982f07ecc207e", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeff\n\n \n \n Debug\n AnyCPU\n {4FF9A221-BF93-4E52-87F2-DF2B3113D292}\n Exe\n Properties\n vsaya_i_noski\n vsaya i noski\n v4.6.1\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", "lang_cluster": "C#", "compilation_error": true, "code_uid": "8b3c0f7a38acad9a49bc3bf4f3068961", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "int howSocks(int n,int m)\n{\nint tmp=n/m;\nif(tmp System.Convert.ToInt32(x)).ToArray();\nSystem.Console.WriteLine(howSocks(a[0],a[1]));\nreturn 0;\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "a366286eecfe77a4527fc94187535437", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "public class Oleg\n{\n\tpublic static void Main()\n\t{\n\t\tvar input = System.Console.ReadLine().Split(null as char[]);\n\t\tlong a, b;\n\t\ta = int.Parse(input[0]);\n\t\tb = int.Parse(input[1]);\n\t\t\n\t\twhile(a != 0 && b != 0)\n\t\t{\n\t\t\tif (a >= 2*b)\n\t\t\t{\n\t\t\t\ta -= 2*b;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(b >= 2*a)\n\t\t\t{\n\t\t\t\tb -= 2*a;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tConsole.WriteLine(a + \" \" + b);\n\t}\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "3f513bd78567baa6218f36485cf80894", "src_uid": "1f505e430eb930ea2b495ab531274114", "difficulty": 1100.0}
{"lang": "MS C#", "source_code": "#include \nvoid main()\n{\n int n, m, moves;\n scanf(\"%d %d\", &n , &m);\n\n if(m <=n)\n {\n moves = (n % 2) + (n / 2);\n while(moves % m != 0)\n moves++;\n \n printf(\"%d\", moves);\n }\n else\n printf(\"-1\");\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "5b55cb53d1a39696b2eb95c7c8a7d773", "src_uid": "0fa526ebc0b4fa3a5866c7c5b3a4656f", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Collections;\n\nnamespace SolvingAlgorithms\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n string Input1;\n Input1 = Console.ReadLine();\n string[] split = Input1.Split(' ');\n int n, m, output=0;\n n = Convert.ToInt32(split[0]);\n m = Convert.ToInt32(split[1]);\n double x=0;\n \n if (m > n) {\n Console.WriteLine(\"-1\");\n }\n else\n {\n x= m*2;\n x=n/m;\n x=Math.Ceiling(x);\n Console.writeLine(x);\n }\n \n\n\n\n }\n\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "a1a486d1df488b9019bc27ec64147e04", "src_uid": "0fa526ebc0b4fa3a5866c7c5b3a4656f", "difficulty": 1000.0}
{"lang": "Mono C#", "source_code": "/*\n\n */\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Threading;\nusing System.Diagnostics;\n\npublic class Solver\n{\n public void Solve()\n {\n bool ismagic(string s)\n {\n int i = 0;\n while (i < s.Length)\n {\n if (s[i] != '1')\n return false;\n int j = i + 1;\n while (j < s.Length && s[j] == '4' && j - i <= 2)\n j++;\n i = j;\n }\n return true;\n }\n Write(ismagic(ReadToken()) ? \"YES\" : \"NO\");\n }\n\n #region Main\n\n protected static TextReader reader;\n protected static TextWriter writer;\n static void Main()\n {\n Debug.Listeners.Clear();\n Debug.Listeners.Add(new ConsoleTraceListener());\n Trace.Listeners.Clear();\n Trace.Listeners.Add(new ConsoleTraceListener());\n\n reader = new StreamReader(Console.OpenStandardInput());\n writer = new StreamWriter(Console.OpenStandardOutput());\n new Solver().Solve();\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}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "b6197f51dbd442cd97f07477165b0f22", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "var incomeString = Read();\n List magicNumbers = new List() {\"144\", \"14\", \"1\"};\n string temp = incomeString;\n while (temp.Contains(magicNumbers[0]) || \n temp.Contains(magicNumbers[1]) || \n temp.Contains(magicNumbers[2]))\n {\n for (int i = 0; i < magicNumbers.Count; i++)\n {\n if (temp.Contains(magicNumbers[i]))\n {\n temp = temp.Replace(magicNumbers[i], \"\");\n }\n }\n }\n if (string.IsNullOrEmpty(temp))\n {\n Console.Write(\"YES\");\n return;\n }\n Console.Write(\"NO\");", "lang_cluster": "C#", "compilation_error": true, "code_uid": "118f1fc0d15e349d6c4362a17a744081", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442_\u0430\u0434\u0440\u0435\u0441\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s;\n s = Console.ReadLine();\n if (s[0] == 'f')\n s = s.Insert(3, \"://\");\n if (s[0] == 'h')\n s = s.Insert(4, \"://\");\n s = s.Insert(s.IndexOf(\"ru\"), \".\");\n if(s[s.LastIndexOf(\"ru\") + 1].CompareTo(' ') != 0)\n {\n s = s.Insert(s.IndexOf(\"ru\") + 2, \"/\");\n }\n Console.WriteLine(s);\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "0d9a955e600d08f0b8c584d977715528", "src_uid": "4c999b7854a8a08960b6501a90b3bba3", "difficulty": 1100.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Helpers;\n\nnamespace Solution\n{\n class Program\n {\n\n 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 var n = firstRow.Pair.Item1;\n var m = firstRow.Pair.Item2;\n\n var busNumber = 0;\n\n for (int i = 0; i < n; i++)\n {\n var total = secdRow.Items.ElementAt(i);\n\n var 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}\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing Helpers;\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 var itemArray = _firstRow.Pair.Item1.ToCharArray();\n var totalSwap = int.Parse(_firstRow.Pair.Item2);\n\n for (int i = 1; i < itemArray.Length; i++)\n {\n var currentItem = itemArray[i];\n for (int j = totalSwap; j > 0 && totalSwap > 0; j--)\n {\n var swapToIndex = i - j;\n if (swapToIndex < 0) continue;\n\n var 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 var 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}\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\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 var 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}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "efab20b86407da5c056093d4efec59d6", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "difficulty": 1400.0}
{"lang": "MS C#", "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_cluster": "C#", "compilation_error": true, "code_uid": "149a122dcc08d994e0c2cafc100338ae", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "difficulty": 1400.0}
{"lang": "MS C#", "source_code": "\nusing 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\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}\nusing Helpers;\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}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "922fc22c78644005ee276bfe1ae16129", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "difficulty": 1400.0}
{"lang": "MS C#", "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_cluster": "C#", "compilation_error": true, "code_uid": "9aeb343a108b8e267196103c21e74b27", "src_uid": "e56f6c343167745821f0b18dcf0d0cde", "difficulty": 1400.0}
{"lang": "MS C#", "source_code": " class Program\n {\n public static string Reverse(string s)\n {\n char[] charArray = s.ToCharArray();\n Array.Reverse(charArray);\n return new string(charArray);\n }\n static void Main(string[] args)\n {\n string n = Console.ReadLine();\n string m = Console.ReadLine();\n if (m==Reverse(n))\n {\n Console.Write(\"yes\");\n }\n else\n {\n Console.Write(\"no\");\n }\n Console.ReadKey();\n \n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "219a9ee3949d5a62873fc10aa470d1d7", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\n\nnamespace Main\n{\n\tclass MainClass\n\t{\n\t\tpublic static void Main (string[] args)\n\t\t{\t\n\t\t\tstring line1 = Console.ReadLine ();\n\t\t\tstring line2 = Console.ReadLine ();\n\n\n\t\t\tstring result = \"\";\n\t\t\tfor (int i = 0; i < line2.Length; i++) {\n\t\t\t\tresult = line2[line2.Length - 1 - i];\n\t\t\t}\n\t\t\tline2 = result;\n\n\t\t\tresult = \"NO\";\n\t\t\tif (line1.Equals (line2)) {\n\t\t\t\tresult = \"YES\";\n\t\t\t}\n\t\t\tConsole.WriteLine(result);\n\t\t}\n\t}\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "a93fbf6862c317bf5463f51b5d48d114", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Linq;\n public static string Reverse(string s)\n {\n char[] charArray = s.ToCharArray();\n Array.Reverse(charArray);\n return new string(charArray);\n }\n static void Main(string[] args)\n {\n string n = Console.ReadLine();\n string m = Console.ReadLine();\n if (n==Reverse(m))\n {\n Console.Write(\"yes\");\n }\n else\n {\n Console.Write(\"no\");\n }\n Console.ReadKey();\n\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "03905bf480db24bdb6e950aac06dac43", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\n\nnamespace NEwTechTEst\n{\n class Program\n {\n static void Main(string[] args)\n {\n var n = Console.ReadLine();\n var m = Console.ReadLine();\n var rev = m.Reverse();\n Console.WriteLine(n==string.Join(\"\",rev)?\"YES\":\"NO\");\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "d912de38d73e0a3f8fc166e03d66aa2f", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "MS C#", "source_code": " public static string Reverse(string s)\n {\n char[] charArray = s.ToCharArray();\n Array.Reverse(charArray);\n return new string(charArray);\n }\n static void Main(string[] args)\n {\n string n = Console.ReadLine();\n string m = Console.ReadLine();\n if (m==Reverse(n))\n {\n Console.Write(\"yes\");\n }\n else\n {\n Console.Write(\"no\");\n }\n Console.ReadKey();\n \n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "cd462c4dc83009af28ce3259bf644cfc", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "MS C#", "source_code": " class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n string input2 = Console.ReadLine();\n\n if (input2.Length != input.Length)\n Console.WriteLine(\"NO\");\n\n else\n {\n for (int i = 0; i < input.Length; i++)\n {\n if(input[i] != input2[input.Length-i-1])\n {\n Console.WriteLine(\"NO\");\n break;\n }\n else if(i == input.Length-1)\n {\n Console.WriteLine(\"YES\");\n }\n }\n }\n\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "957846b6b8f5b6eefdd9a7a7ca598e8b", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApplication8\n{\n class Program\n {\n public static string Reverse(string s)\n {\n char[] charArray = s.ToCharArray();\n Array.Reverse(charArray);\n return new string(charArray);\n }\n static void Main(string[] args)\n {\n string n = Console.ReadLine();\n string m = Console.ReadLine();\n if (m == Reverse(n))\n {\n Console.Write(\"yes\");\n }\n else\n {\n Console.Write(\"no\");\n }\n return 0;\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "3e783b03770bf7f231c09e03d16265c4", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "MS C#", "source_code": "#include \n#include \n#include \n#include \n#include \n#include \nusing namespace std;\ntypedef long long ll;\n\nint main(int argc, const char * argv[]) {\n string s,t;\n cin>>s>>t;\n int len = (int)t.length();\n for(int i = 0;i 0))\n {\n long counter1 = y.Length-1;\n long counter2 = 0;\n for (int i = 0; i < x.Length; i++)\n {\n \n if (x[i] == y[counter1])\n {\n counter2++;\n }\n counter1--;\n\n }\n if (counter2 == x.Length)\n {\n Console.WriteLine(\"YES\");\n }\n else\n {\n Console.WriteLine(\"NO\");\n }\n }\n \n }\n\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "fa71d085f865b08bd0833341dd00300c", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace _40_A\n{\n class Program\n {\n static void Main(string[] args)\n {\n string s1 = Console.ReadLine();\n string s2 = Console.ReadLine();\n int n = s1.Length;\n char ch;\n StringBuilder sb1 = new StringBuilder(s1);\n char[] y = s2.ToCharArray();\n for (int i = 0; i <= n / 2; i++)\n {\n ch = sb1[i];\n sb1[i] = sb1[n - 1];\n sb1[n - 1] = ch;\n n--;\n }\n s1 = sb1.ToString();\n if (s1.Equals(s2))\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n Console.ReadLine(); ReadLine();\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "f4d1d310ffcd7a8bda6559c483f7665c", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "\ufeffusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net.Http.Headers;\nusing System.Text;\nusing System.Threading;\nusing System.Threading.Tasks;\nnamespace ConsoleApp2Framework\n{\n class Program\n {\n static void Main(string[] args)\n {\n Console.WriteLine(Console.ReadLine() == new string(Console.ReadLine().ToCharArray().Reverse().ToArray()) ?\"YES\":\"NO\"); \n }\n }\n}\n\n \n \n \n\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "9b982f934c7d881b8f8e87450837d993", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace translation\n{\n class Program\n {\n static void Main(string[] args)\n {\n string input = Console.ReadLine();\n string input2 = Console.ReadLine();\n\n\n char[] translate = input.ToCharArray();\n\t Array.Reverse(translate);\n\t string tr= new string(translate);\n\n int result = string.Compare(input2,tr );\n if(result ==0 )\n Console.WriteLine(\"YES\");\n else\n Console.WriteLine(\"NO\");\n \n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "09dab0bc43aa76fe3abc36fca6775596", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Runtime.InteropServices.ComTypes;\nusing System.Text;\n\nnamespace ConsoleApp1\n{\n class Program\n {\n static void Main(string[] args)\n {\n var str1 = Console.ReadLine();\n var str2 = Console.ReadLine();\n var rev = str1.Reverse();\n var sb = new string(rev.ToArray());\n Console.WriteLine(str2.Equals(sb) ? \"YES\" : \"NO\");\n }\n \n\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "b2de3e95ffa0ddb973c3309002b9bbb2", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Numerics;\n\nclass Program\n{\n Program() {\n Char[] a = Console.ReadLine().ToCharArray();\n Array.Reverse(a);\n Console.WriteLine(new string(a) == Console.ReadLine() ? \"YES\" : \"NO\");\n }\n\n static void Main(string[] args)\n {\n new Program();\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "71245adbe6348e8c84c91c5e1f50de44", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "MS C#", "source_code": "\ufeff\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.27004.2005\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Pabandykem\", \"Pabandykem\\Pabandykem.csproj\", \"{A9EFBD61-018B-4B67-8F49-6DDCCB4AB5FD}\"\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{A9EFBD61-018B-4B67-8F49-6DDCCB4AB5FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{A9EFBD61-018B-4B67-8F49-6DDCCB4AB5FD}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{A9EFBD61-018B-4B67-8F49-6DDCCB4AB5FD}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{A9EFBD61-018B-4B67-8F49-6DDCCB4AB5FD}.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 = {B540FE07-7FB0-4ABA-9F93-7B2E45355A39}\n\tEndGlobalSection\nEndGlobal\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "6fac4ced0bb5152650a1cacbc0896549", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace ConsoleApp6\n{\n\n class Program\n {\n static void Main(string[] args)\n {\n var s = Console.ReadLine();\n var t= Console.ReadLine();\n int ct = 0;\n if(s.Length!=t.Length)\n { Console.WriteLine(\"NO\"); }\n else\n {\n for (int i = 0; i < s.Length; i++)\n {\n if(s[i]!=t[t.Length-1-i])\n {\n ct++;\n Console.WriteLine(\"NO\");\n break; }\n }\n if(ct==0)\n {\n Console.WriteLine(\"YES\");\n }\n }\n \n\n\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "f978d58845e2f78a1a7a19a904867bdc", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "namespace Iran\n{\n class Amir\n {\n public static void Main()\n {\n string a=Console.ReadLine();\n string b=Console.ReadLine();\n bool ok=true;\n if(a.Length!=b.Length)\n ok=false;\n for(int i=0;ok&&i 100 || T.Length > 100)\n { Environment.Exit(0); }\n Translation Translate = new Translation();\n string Ans = Translate.Trans(S, T);\n Console.WriteLine(Ans);\n\n }\n }\n}\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace codeforces\n{\n class Translation\n {\n public string Trans(string S, string T)\n {\n string Temp = ReverseString(S);\n string Yes = \"YES\";\n string No = \"No\";\n if (Temp == T)\n { return Yes; }\n else\n { return No; }\n\n \n }\n public static string ReverseString(string s)\n {\n char[] arr = s.ToCharArray();\n Array.Reverse(arr);\n return new string(arr);\n }\n }\n}\n\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "0048274d6d7d274124fb489ed4a7c299", "src_uid": "35a4be326690b58bf9add547fb63a5a5", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "[10:35 PM, 8/18/2020] Bhargav IIIT: using System;\nnamespace Iran\n{\n class Amir\n {\n public static void Main()\n {\n string a=Console.ReadLine();\n string b=Console.ReadLine();\n bool ok=true;\n if(a.Length!=b.Length)\n ok=false;\n for(int i=0;ok&&i int.Parse(s)).ToList();\n\n var partyDictionary = new List>();\n for (var i = 1; i < parties.Count; i++)\n {\n partyDictionary.Add(new KeyValuePair(i + 1, parties[i]));\n }\n\n var orderedParties = partyDictionary.OrderByDescending(p => p.Value);\n\n var coalitionSize = parties[0];\n var maxAllyPartySize = parties[0] / 2;\n var parliamentSize = parties.Sum();\n\n var coalitionParties = new HashSet();\n coalitionParties.Add(1);\n\n foreach (var party in orderedParties)\n {\n if (party.Value <= maxAllyPartySize)\n {\n coalitionParties.Add(party.Key);\n coalitionSize += party.Value;\n }\n\n if (coalitionSize * 2 > parliamentSize && coalitionParties.Count < parties.Count)\n {\n Console.WriteLine(string.Join(' ', coalitionParties));\n return;\n }\n }\n\n Console.WriteLine(\"0\");\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "180f835a8507aae03e2603e37d0d8255", "src_uid": "0a71fdaaf08c18396324ad762b7379d7", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace Console\n{\n class Program\n {\n static void Main()\n {\n MyTask();\n }\n\n private static void MyTask()\n {\n var input = System.Console.ReadLine();\n var count = int.Parse(input);\n \n var inputs = System.Console.ReadLine().Split();\n var list = inputs.Select(int.Parse).ToList();\n\n var totalVotes = list.Sum(a => a);\n var aliceVotes = list.First();\n var alice\u0421oalition = new List\n {\n 1\n };\n\n for (int i = 1; i < list.Count; i++)\n {\n if (aliceVotes > 0.5f * totalVotes)\n break;\n\n if (list[i] * 2 <= list[0])\n {\n aliceVotes += list[i]; \n alice\u0421oalition.Add(i + 1);\n }\n }\n\n if (aliceVotes > 0.5f * totalVotes)\n {\n System.Console.WriteLine(alice\u0421oalition.Count);\n var result = new StringBuilder();\n alice\u0421oalition.ForEach(a => result.Append(a + \" \"));\n System.Console.WriteLine(new string(result.ToString().SkipLast(1).ToArray()));\n }\n else\n {\n System.Console.WriteLine(0);\n }\n\n\n }\n }\n}\n\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "4a0316db0a9195d9c27117a005416090", "src_uid": "0a71fdaaf08c18396324ad762b7379d7", "difficulty": 800.0}
{"lang": "Mono C#", "source_code": " static void Main(string[] args)\n {\n\n string s = Console.ReadLine();\n\n if (s.Length > 100) { Console.WriteLine(\"\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443\"); }\n else { Console.WriteLine(\"\u041a\u043e\u043b\u0438\u0435\u0441\u0442\u0432\u043e nineteen \u0432 \u0441\u0442\u0440\u043e\u043a\u0435: \" + countstr(s, \"nineteen\")); }\n\n\n Console.ReadLine();\n }\n\n public static int countstr(string s,string str)\n {\n\n int count = 0;\n int index = 0;\n\n \n while(s.Contains(str[index]))\n {\n for(int i=0;i 100) { Console.WriteLine(\"\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443\"); }\n else { Console.WriteLine(\"\u041a\u043e\u043b\u0438\u0435\u0441\u0442\u0432\u043e nineteen \u0432 \u0441\u0442\u0440\u043e\u043a\u0435: \" + countstr(s, \"nineteen\")); }\n\n\n Console.ReadLine();\n }\n\n public static int countstr(string s,string str)\n {\n\n int count = 0;\n int index = 0;\n\n \n while(s.Contains(str[index]))\n {\n for(int i=0;i 100) { Console.WriteLine(\"\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443\"); }\n else { Console.WriteLine(\"\u041a\u043e\u043b\u0438\u0435\u0441\u0442\u0432\u043e nineteen \u0432 \u0441\u0442\u0440\u043e\u043a\u0435: \" + countstr(s, \"nineteen\")); }\n\n\n Console.ReadLine();\n }\n\n public static int countstr(string s,string str)\n {\n\n int count = 0;\n int index = 0;\n\n \n while(s.Contains(str[index]))\n {\n for(int i=0;i 100) { Console.WriteLine(\"\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443\"); }\n else { Console.WriteLine(\"\u041a\u043e\u043b\u0438\u0435\u0441\u0442\u0432\u043e nineteen \u0432 \u0441\u0442\u0440\u043e\u043a\u0435: \" + countstr(s, \"nineteen\")); }\n\n\n Console.ReadLine();\n }\n\n public static int countstr(string s,string str)\n {\n\n int count = 0;\n int index = 0;\n\n \n while(s.Contains(Convert.ToString(str[index])))\n {\n for(int i=0;i 100) { Console.WriteLine(\"\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443\"); }\n else { Console.WriteLine(\"\u041a\u043e\u043b\u0438\u0435\u0441\u0442\u0432\u043e nineteen \u0432 \u0441\u0442\u0440\u043e\u043a\u0435: \" + countstr(s, \"nineteen\")); }\n\n\n Console.ReadLine();\n }\n\n public static int countstr(string s,string str)\n {\n\n int count = 0;\n int index = 0;\n\n \n while(s.Contains(str[index]))\n {\n for(int i=0;i 100) { Console.WriteLine(\"\u0421\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443\"); }\n else { Console.WriteLine(\"\u041a\u043e\u043b\u0438\u0435\u0441\u0442\u0432\u043e nineteen \u0432 \u0441\u0442\u0440\u043e\u043a\u0435: \" + countstr(s, \"nineteen\")); }\n\n\n Console.ReadLine();\n }\n\n public static int countstr(string s,string str)\n {\n\n int count = 0;\n int index = 0;\n\n \n while(s.Contains(str[index]))\n {\n for(int i=0;i months = new List();\n\n months.AddRange(Array.ConvertAll(Console.ReadLine().Split(' '), x => { return int.Parse(x); }));\n months.Sort();\n\n int s = 0;\n for (int i = months.Count-1; i > 0; i--)\n {\n if (s >= k)\n {\n Console.WriteLine(months.Count - i - 1);\n return;\n }\n s += months[i];\n }\n if (s >= k)\n {\n Console.WriteLine(months.Count - i - 1);\n return;\n }\n Console.WriteLine(\"-1\");\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "d04b7fa95fd0bbb6bb62bafe455705d4", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "\ufeffusing System;\n\n\nnamespace codebusinesstrip\n{\n class Program\n {\n private static void Main(string[] args)\n {\n int k, temp, s2 = 0;\n int[] ai = new int[12];\n k = Convert.ToInt32(Console.ReadLine());\n for (int i = 0; i < 12; i++)\n ai[i] = Convert.ToInt32(Console.ReadLine());\n\n if (k == 0)\n {\n Console.WriteLine(0);2\n\n }\n else\n {\n for (int j = 0; j < 12; j++)\n for (int i = 0; i < 11; i++)\n {\n if (ai[i] > ai[i + 1])\n {\n temp = ai[i];\n ai[i] = ai[i + 1];\n ai[i + 1] = temp;\n }\n }\n\n for (int i = 11; i >= 0; i--)\n {\n if (k > 0)\n {\n k -= ai[i];\n s2++;\n }\n }\n Console.WriteLine(k <= 0 ? s2 : -1);\n\n }\n }\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "f5b9263108ae053bb36484f8ede15ec6", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": " class Program\n {\n\n static void Main(string[] args)\n {\n int k, m; // k - \u0447\u0438\u0441\u043b\u043e k, m - \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\n string s = Console.In.ReadLine();\n k = int.Parse(s);\n string[] parts = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n m = parts.Length;\n int[] a = new int[m];\n for (int i = 0; i < m; i++)\n {\n a[i] = int.Parse(parts[i]);\n }\n for (int i = a.Length - 1; i > 0; i--)\n for (int j = 0; j < i; j++)\n if (a[j] > a[j + 1])\n {\n int tmp = a[j];\n a[j] = a[j + 1];\n a[j + 1] = tmp;\n }\n\n int res = 0;\n int sum = 0;\n while (sum < k)\n {\n res++;\n sum += a[a.Length-res];\n \n }\n Console.WriteLine(res);\n }\n \n\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "141c965fefca89b32ff327d79a142bf2", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A.\u041a\u043e\u043c\u0430\u043d\u0434\u0438\u0440\u043e\u0432\u043a\u0430\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = int.Parse(Console.ReadLine());\n var mas = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int a;\n int sum = 0;\n int l = mas.Length;\n\n for(int i = 0; i < l - 1; i++)\n {\n for(int j = i; j < l; j++)\n {\n if (mas[j] > mas[i])\n {\n a = mas[j];\n mas[j] = mas[i];\n mas[i] = a;\n }\n }\n }\n\n l = 0;\n\n foreach (int x in mas)\n {\n if (sum >= k) break;\n sum += x;\n l++;\n }\n\n Console.WriteLine(l);\n Console.ReadLine();\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "07690604015de77dd811426407ec7ac7", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Linq;\n\n class Program\n {\n\n static void Main(string[] args)\n {\n int k, m; // k - \u0447\u0438\u0441\u043b\u043e k, m - \u0434\u043b\u0438\u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\n string s = Console.In.ReadLine();\n k = int.Parse(s);\n string[] parts = Console.ReadLine().Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n m = parts.Length;\n int[] a = new int[m];\n for (int i = 0; i < m; i++)\n {\n a[i] = int.Parse(parts[i]);\n }\n for (int i = a.Length - 1; i > 0; i--)\n for (int j = 0; j < i; j++)\n if (a[j] > a[j + 1])\n {\n int tmp = a[j];\n a[j] = a[j + 1];\n a[j + 1] = tmp;\n }\n\n int res = 0;\n int sum = 0;\n while (sum < k)\n {\n res++;\n sum += a[a.Length-res];\n \n }\n Console.WriteLine(res);\n }\n \n\n }\n}\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "a32361a39ef2c4a9df59230bc601ba6b", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A.\u041a\u043e\u043c\u0430\u043d\u0434\u0438\u0440\u043e\u0432\u043a\u0430\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = int.Parse(Console.ReadLine());\n var mas = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int a;\n int sum = 0;\n int l = mas.Length;\n\n for(int i = 0; i < l - 1; i++)\n {\n for(int j = i; j < l; j++)\n {\n if (mas[j] > mas[i])\n {\n a = mas[j];\n mas[j] = mas[i];\n mas[i] = a;\n }\n }\n }\n\n l = 0;\n\n foreach (int x in mas)\n {\n if (sum >= k) break;\n sum += x;\n l++;\n }\n\n Console.WriteLine(l);\n \n Console.ReadLine();\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "89d0b45082e823e970f063d92d0415de", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "\ufeff\nMicrosoft Visual Studio Solution File, Format Version 11.00\n# Visual Studio 2010\nGlobal\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n", "lang_cluster": "C#", "compilation_error": true, "code_uid": "e67dce20d47accecc87212c6c1b67875", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "Mono C#", "source_code": "namespace a149\n{\n class Program\n {\n static int[] BubbleSort(int[] mas)\n {\n int temp;\n for (int i = 0; i < mas.Length; i++)\n {\n for (int j = i + 1; j < mas.Length; j++)\n {\n if (mas[i] > mas[j])\n {\n temp = mas[i];\n mas[i] = mas[j];\n mas[j] = temp;\n }\n }\n }\n return mas;\n }\n\n static void Main(string[] args)\n { \n int k = Convert.ToInt16(Console.ReadLine());\n int[] mas = Console.ReadLine().Split(' ').Select(e => Convert.ToInt32(e)).ToArray();\n BubbleSort(mas);\n int sum = mas.Sum();\n if (sum < k)\n Console.WriteLine(-1);\n else\n if (k == 0)\n Console.WriteLine(0);\n else\n if (mas[11] >= k)\n Console.WriteLine(1);\n else\n if (mas[11] + mas[10] >= k)\n Console.WriteLine(2);\n else\n if (mas[11] + mas[10] + mas[9] >= k)\n Console.WriteLine(3);\n Console.ReadLine();\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "93ee52cac567d61f74842e24cba4aa16", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace A.\u041a\u043e\u043c\u0430\u043d\u0434\u0438\u0440\u043e\u0432\u043a\n{\n class Program\n {\n static void Main(string[] args)\n {\n int k = int.Parse(Console.ReadLine());\n var mas = Console.ReadLine().Split().Select(int.Parse).ToArray();\n int a;\n int sum = 0;\n int l = mas.Length;\n\n for(int i = 0; i < l - 1; i++)\n {\n for(int j = i; j < l; j++)\n {\n if (mas[j] > mas[i])\n {\n a = mas[j];\n mas[j] = mas[i];\n mas[i] = a;\n }\n }\n }\n\n l = 0;\n\n foreach (int x in mas)\n {\n if (sum >= k) break;\n sum += x;\n l++;\n }\n\n Console.WriteLine(l);\n Console.ReadLine();\n }\n }", "lang_cluster": "C#", "compilation_error": true, "code_uid": "ed2505f121916d8d8ca99d4e9381ac89", "src_uid": "59dfa7a4988375febc5dccc27aca90a8", "difficulty": 900.0}
{"lang": "MS C#", "source_code": "#define test\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing System.IO;\nusing System.Xml.Linq;\nusing System.Xml;\nusing System.Diagnostics;\nusing IFlowUtils;\nusing System.Data;\nusing ConsoleApplication5;\nnamespace ConsoleApplication7\n{\n\n\n\n class Program\n {\n public static void Main(string[] args)\n {\n int money = int.Parse(Console.ReadLine());\n int p1 = int.Parse(Console.ReadLine());\n int p2 = int.Parse(Console.ReadLine()) - int.Parse(Console.ReadLine());\n Console.WriteLine(money/Math.Min(p1,p2));\n } \n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "26d23ecae145fbf962f3b003111cc861", "src_uid": "0ee9abec69230eab25de51aef0984f8f", "difficulty": 1700.0}
{"lang": "MS C#", "source_code": "\ufeffusing System;\nusing System.Numerics;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.IO;\nusing System.Net.Http.Headers;\nusing System.Security.Cryptography;\nusing System.Text;\n//using Algorithms.Set_33;\n\nclass Solution\n{\n private class Tokenizer\n {\n private string currentString = null;\n\n private string[] tokens = null;\n\n private int tokenNumber = 0;\n\n private static readonly char[] Separators = { ' ' };\n\n public T NextToken(Func parser)\n {\n return parser(this.GetNextToken());\n }\n\n public string NextToken()\n {\n return this.GetNextToken();\n }\n\n public int NextInt()\n {\n return this.NextToken(int.Parse);\n }\n\n public long NextLong()\n {\n return this.NextToken(long.Parse);\n }\n\n private string GetNextToken()\n {\n if (this.currentString == null || this.tokenNumber == this.tokens.Length)\n {\n this.currentString = this.GetNextString();\n\n while (this.currentString != null && this.currentString.Equals(string.Empty))\n {\n this.currentString = this.GetNextString();\n }\n\n if (this.currentString == null)\n {\n throw new Exception(\"End of input\");\n }\n\n this.tokens = this.currentString.Split(Separators, StringSplitOptions.RemoveEmptyEntries);\n this.tokenNumber = 0;\n }\n\n return this.tokens[this.tokenNumber++];\n }\n\n private string GetNextString()\n {\n string content = Console.ReadLine();\n if (content == null)\n {\n return null;\n }\n\n return content.Trim();\n }\n }\n\n static void Main()\n {\n //Console.SetIn(new StreamReader(File.OpenRead(\"input.txt\")));\n //StreamWriter writer = new StreamWriter(File.Create(\"output.txt\"));\n //Console.SetOut(writer);\n\n Tokenizer tokenizer = new Tokenizer();\n long n = tokenizer.NextLong();\n long a = tokenizer.NextLong();\n long b = tokenizer.NextLong();\n long c = tokenizer.NextLong();\n\n Console.WriteLine(Guest.Solve(n, a, b, c));\n\n //writer.Close();\n }\n\n public class Guest\n {\n public static long Solve(long n, long a, long b, long c)\n {\n if (b - c > a || n < b)\n {\n return n / a;\n }\n\n long result = 0;\n long buffer;\n\n while (n >= b)\n {\n buffer = n / b;\n result += buffer;\n n = n - buffer * (b - c);\n }\n\n return result + n / Math.Min(a, b);\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "1dde3db68dd5e8d6628b6235dae36edc", "src_uid": "0ee9abec69230eab25de51aef0984f8f", "difficulty": 1700.0}
{"lang": "MS C#", "source_code": "\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing System.IO;\nusing System.Xml.Linq;\nusing System.Xml;\nusing System.Diagnostics;\nusing IFlowUtils;\nusing System.Data;\nusing ConsoleApplication5;\nnamespace ConsoleApplication7\n{\n\n\n\n class Program\n {\n public static void Main(string[] args)\n {\n int money = int.Parse(Console.ReadLine());\n int p1 = int.Parse(Console.ReadLine());\n int p2 = int.Parse(Console.ReadLine()) - int.Parse(Console.ReadLine()));\n Console.WriteLine(money/Math.Min(p1,p2));\n } \n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "4df7d51090d046ae6351da2b6c838054", "src_uid": "0ee9abec69230eab25de51aef0984f8f", "difficulty": 1700.0}
{"lang": "MS C#", "source_code": "\ufeffusing System;\nusing System.IO;\n\nusing Algorithms.Set_33;\n\nclass Solution\n{\n private class Tokenizer\n {\n private string currentString = null;\n\n private string[] tokens = null;\n\n private int tokenNumber = 0;\n\n private static readonly char[] Separators = { ' ' };\n\n public T NextToken(Func parser)\n {\n return parser(this.GetNextToken());\n }\n\n public string NextToken()\n {\n return this.GetNextToken();\n }\n\n public int NextInt()\n {\n return this.NextToken(int.Parse);\n }\n\n public long NextLong()\n {\n return this.NextToken(long.Parse);\n }\n\n private string GetNextToken()\n {\n if (this.currentString == null || this.tokenNumber == this.tokens.Length)\n {\n this.currentString = this.GetNextString();\n\n while (this.currentString != null && this.currentString.Equals(string.Empty))\n {\n this.currentString = this.GetNextString();\n }\n\n if (this.currentString == null)\n {\n throw new Exception(\"End of input\");\n }\n\n this.tokens = this.currentString.Split(Separators, StringSplitOptions.RemoveEmptyEntries);\n this.tokenNumber = 0;\n }\n\n return this.tokens[this.tokenNumber++];\n }\n\n private string GetNextString()\n {\n string content = Console.ReadLine();\n if (content == null)\n {\n return null;\n }\n\n return content.Trim();\n }\n }\n\n static void Main()\n {\n //Console.SetIn(new StreamReader(File.OpenRead(\"input.txt\")));\n //StreamWriter writer = new StreamWriter(File.Create(\"output.txt\"));\n //Console.SetOut(writer);\n\n Tokenizer tokenizer = new Tokenizer();\n long n = tokenizer.NextLong();\n long a = tokenizer.NextLong();\n long b = tokenizer.NextLong();\n long c = tokenizer.NextLong();\n\n Console.WriteLine(Guest.Solve(n, a, b, c));\n\n //writer.Close();\n }\n\n public class Guest\n {\n public static long Solve(long n, long a, long b, long c)\n {\n if (b - c > a || n < b)\n {\n return n / a;\n }\n\n long result = 0;\n long buffer;\n\n if (n >= b)\n {\n buffer = (n - b) / (b - c);\n result += buffer;\n n -= buffer * (b - c);\n }\n\n while (n >= b)\n {\n buffer = n / b;\n result += buffer;\n n = n - buffer * (b - c);\n }\n\n return result + n / Math.Min(a, b);\n }\n }\n}", "lang_cluster": "C#", "compilation_error": true, "code_uid": "2402543cecd388d42bd420c50b09b8ca", "src_uid": "0ee9abec69230eab25de51aef0984f8f", "difficulty": 1700.0}
{"lang": "Mono C#", "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 Int64 n=Int64.Parse(Console.ReadLine());\n string[]s=Console.ReadLine().Split(' ');\n int[]a=new int[n];\n for(int i=0;i0)\n {\n if(a[0]<=15)\n {\n for(int i=1;i