Вітаю Вас, Гость

Задача А
var i,k,S,h,d,x,y:integer;
    vh, vd:real;
begin
    readln(k);
    S:=0;h:=0;
    for i:=1 to k do
      begin
       readln(x,y);
       S:=S+x;
       h:=h+y
      end;
    d:=S-h;
    vh:=h/S*100;
    vd:=d/S*100;
    writeln(S);
    writeln(vh:0:2,' ',vd:0:2)
end.


Задача В
var s : string;
    i : integer;
    f : boolean;
begin
  while not Eof() do begin
     readln(s);
     f:=true;
     for i:=1 to length(s) div 2 do
       if s[i]<>s[length(s)-i+1] then begin writeln('No');f:=false;break;end;
     if f  then writeln('Yes');
  end;
end.


Задача С
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
        class Program
        {
                static void Main(string[] args)
                {

                        List<int> m = new List<int>();
                        List<List<int>> b = new List<List<int>>();
                        for (int i = 0; i < 5; i++)
                        {
                                string [] s = Console.ReadLine().Split();
                                m = new List<int>();
                                for (int j = 0; j < 5; j++)
                                {
                                        m.Add(Int32.Parse(s[j]));
                                }
                                b.Add(m);
                        }

                        Console.Write(Class1.Get(b));
                }
        }

        public static class Class1
        {
                public static int Get(List<List<int>> test)
                {
                        int res = 0;


                        int row = FindRow(test);
                        int column = FindClumn(test[row - 1]);
                        res = Math.Abs(row - 3) + Math.Abs(column - 3);
                        return res;
                }

                private static int FindClumn(List<int> ints)
                {

                        int t = 0;
                        for (int i = 0; i < 5; i++)
                        {
                                if (ints[i] == 1)
                                {
                                        t = i + 1;
                                        break;
                                }
                        }
                        return t;
                }

                public static bool hasOne(List<int> m)
                {

                        int t = 0;
                        for (int i = 0; i < 5; i++)
                        {
                                if (m[i] == 1)
                                        return true;
                        }
                        return false;
                }

                public static int FindRow(List<List<int>> test)
                {
                        int res = 0;
                        for (int i = 0; i < 5; i++)
                        {
                                if (hasOne(test[i]))
                                {
                                        res = i + 1;
                                        break;
                                }
                        }
                        return res;
                }

        }
}

Задача D
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Contest
{
        class Program
        {
                static void Main(string[] args)
                {
                        string[] nk = Console.ReadLine().Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
                        string[] coords = Console.ReadLine().Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);

                        int n = int.Parse(nk[0]), k = int.Parse(nk[1]);
                        List<int> sortedCoords = (new List<string>(coords)).ConvertAll(s => int.Parse(s));
                        sortedCoords.Sort();

                        if (k > n)
                                Console.Write("-1");
                        else
                                Console.Write("{0} {0}", sortedCoords[n - k] + " ");
                }
        }
}


Задача Е
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
        class Program
        {
                static void Main(string[] args)
                {
                        int n = int.Parse(Console.ReadLine());
                        int result = 0;
                        while (n > 1)
                        {
                                n = (n % 3 == 0) ? n / 3 : n / 3 + 1;
                                result++;
                        }
                        Console.Write(result);
                }
        }
}