//#define EXTENDSTACKSIZE

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

namespace CF
{
    internal class Program
    {
        private const int stackSize = 64 * 1024 * 1024;

        private static void Run()
        {
            using (var sr = new InputReader(Console.In))
//            using (var sr = new InputReader(new StreamReader("input.txt")))
            using (var sw = Console.Out)
//            using (var sw = new StreamWriter("output.txt"))
            using (var task = new Task(sr, sw)) {
                task.Solve();
//                Console.ReadKey();
            }
        }

        private static void Main(string[] args)
        {
#if EXTENDSTACKSIZE
            var threadStart = new ThreadStart(Run);
            var thread = new Thread(threadStart, stackSize);
            thread.Start();
            thread.Join();
#else
            Run();
#endif
        }
    }

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            var k = sr.NextInt32();
            var m = sr.NextInt32();
            var forces = sr.ReadArrayOfInt32();
            Array.Sort(forces, (a, b) => -a.CompareTo(b));
            var equalFirst = 0;
            for (var i = 1; i < forces.Length; i++)
            {
                if (forces[i] == forces[0])
                {
                    equalFirst++;
                }
                else
                {
                    break;
                }
            }

            var d = n - equalFirst - 1;
            if (d >= m)
            {
                var sum = 0L;
                var different = new List<Pair>();
                var curr = forces[equalFirst + 1];
                different.Add(new Pair { Value = curr, Count = 1 });
                for (var i = equalFirst + 2; i < n; i++) {
                    if (forces[i] == curr) {
                        different[different.Count - 1].Count++;
                    }
                    else {
                        curr = forces[i];
                        different.Add(new Pair { Value = curr, Count = 1 });
                    }
                }

                var index = different.Count - 1;
                for (var i = 0; i < m; i++) {
                    var last = different[index];
                    if (index > 1) {
                        last.Count--;
                        if (last.Count == 0) {
                            index--;
                        }
                    }
                    else {
                        break;
                    }
                }

                sum = (equalFirst + 1L) * forces[0];
                index = 0;
                while (true) {
                    if (index == different.Count)
                        break;
                    if (m > 0) {
                        var last = different[index];
                        sum += last.Value + 1L;
                        last.Count--;
                        if (last.Count == 0) {
                            index++;
                        }

                        m--;
                    }
                    else {
                        var last = different[index];
                        sum += last.Value;
                        last.Count--;
                        if (last.Count == 0) {
                            index++;
                        }
                    }
                }

                var res = (double) sum / (n - m);
                sw.WriteLine(res.ToString("F7"));
            }
            else
            {
                m -= d;
                var need = (equalFirst + 1L) * k;
                if (need <= m)
                {
                    var res = forces[0] + k;
                    sw.WriteLine(res);
                }
                else
                {
                    if (m > equalFirst)
                    {
                        m -= equalFirst;
                        var res = forces[0];
                        if (m >= k)
                        {
                            res += k;
                        }
                        else
                        {
                            res += m;
                        }

                        sw.WriteLine(res);
                    }
                    else
                    {
                        var res = (double) ((equalFirst + 1) * forces[0] + m) / (equalFirst + 1.0);
                        sw.WriteLine(res.ToString("F7"));
                    }
                }
            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

class Pair
{
    public int Value { get; set; }

    public int Count { get; set; }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(ReadNextToken());
    }

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

    public long NextInt64()
    {
        return Int64.Parse(ReadNextToken());
    }

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();

            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}


//#define EXTENDSTACKSIZE

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

namespace CF
{
    internal class Program
    {
        private const int stackSize = 64 * 1024 * 1024;

        private static void Run()
        {
            using (var sr = new InputReader(Console.In))
//            using (var sr = new InputReader(new StreamReader("input.txt")))
            using (var sw = Console.Out)
//            using (var sw = new StreamWriter("output.txt"))
            using (var task = new Task(sr, sw)) {
                task.Solve();
//                Console.ReadKey();
            }
        }

        private static void Main(string[] args)
        {
#if EXTENDSTACKSIZE
            var threadStart = new ThreadStart(Run);
            var thread = new Thread(threadStart, stackSize);
            thread.Start();
            thread.Join();
#else
            Run();
#endif
        }
    }

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            var k = sr.NextInt32();
            var m = sr.NextInt32();
            var forces = sr.ReadArrayOfInt32();
            Array.Sort(forces, (a, b) => -a.CompareTo(b));
            var equalFirst = 0;
            for (var i = 1; i < forces.Length; i++)
            {
                if (forces[i] == forces[0])
                {
                    equalFirst++;
                }
                else
                {
                    break;
                }
            }

            var d = n - equalFirst - 1;
            if (d >= m)
            {
                var sum = 0L;
                var different = new List<Pair>();
                var curr = forces[equalFirst + 1];
                different.Add(new Pair { Value = curr, Count = 1 });
                for (var i = equalFirst + 2; i < n; i++) {
                    if (forces[i] == curr) {
                        different[different.Count - 1].Count++;
                    }
                    else {
                        curr = forces[i];
                        different.Add(new Pair { Value = curr, Count = 1 });
                    }
                }

                var index = different.Count - 1;
                for (var i = 0; i < m; i++) {
                    var last = different[index];
                        last.Count--;
                        if (last.Count == 0) {
                            index--;
                        }
                }

                sum = (equalFirst + 1L) * forces[0];
                index = 0;
                var num = equalFirst + 1L;
                while (true) {
                    if (index == different.Count)
                        break;
                    if (m > 0) {
                        var last = different[index];
                        if (last.Count > 0) {
                            sum += last.Value + 1L;
                            last.Count--;
                            num++;
                        }

                        if (last.Count == 0) {
                            index++;
                        }

                        m--;
                    }
                    else {
                        var last = different[index];
                        if (last.Count > 0) {
                            sum += last.Value;
                            last.Count--;
                            num++;
                        }

                        if (last.Count == 0) {
                            index++;
                        }
                    }
                }

                var res = (double) sum / num;
                sw.WriteLine(res.ToString("F7"));
            }
            else
            {
                m -= d;
                var need = (equalFirst + 1L) * k;
                if (need <= m)
                {
                    var res = forces[0] + k;
                    sw.WriteLine(res);
                }
                else
                {
                    if (m > equalFirst)
                    {
                        m -= equalFirst;
                        var res = forces[0];
                        if (m >= k)
                        {
                            res += k;
                        }
                        else
                        {
                            res += m;
                        }

                        sw.WriteLine(res);
                    }
                    else
                    {
                        var res = (double) ((equalFirst + 1) * forces[0] + m) / (equalFirst + 1.0);
                        sw.WriteLine(res.ToString("F7"));
                    }
                }
            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

class Pair
{
    public int Value { get; set; }

    public int Count { get; set; }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(ReadNextToken());
    }

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

    public long NextInt64()
    {
        return Int64.Parse(ReadNextToken());
    }

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();

            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}


//#define EXTENDSTACKSIZE

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

namespace CF
{
    internal class Program
    {
        private const int stackSize = 64 * 1024 * 1024;

        private static void Run()
        {
            using (var sr = new InputReader(Console.In))
//            using (var sr = new InputReader(new StreamReader("input.txt")))
            using (var sw = Console.Out)
//            using (var sw = new StreamWriter("output.txt"))
            using (var task = new Task(sr, sw)) {
                task.Solve();
//                Console.ReadKey();
            }
        }

        private static void Main(string[] args)
        {
#if EXTENDSTACKSIZE
            var threadStart = new ThreadStart(Run);
            var thread = new Thread(threadStart, stackSize);
            thread.Start();
            thread.Join();
#else
            Run();
#endif
        }
    }

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            var k = sr.NextInt32();
            var m = sr.NextInt32();
            var forces = sr.ReadArrayOfInt32();
            Array.Sort(forces, (a, b) => -a.CompareTo(b));
            var equalFirst = 0;
            for (var i = 1; i < forces.Length; i++)
            {
                if (forces[i] == forces[0])
                {
                    equalFirst++;
                }
                else
                {
                    break;
                }
            }

            var d = n - equalFirst - 1;
            if (d >= m)
            {
                var sum = 0L;
                var different = new List<Pair>();
                var curr = forces[equalFirst + 1];
                different.Add(new Pair { Value = curr, Count = 1 });
                for (var i = equalFirst + 2; i < n; i++) {
                    if (forces[i] == curr) {
                        different[different.Count - 1].Count++;
                    }
                    else {
                        curr = forces[i];
                        different.Add(new Pair { Value = curr, Count = 1 });
                    }
                }

                var index = different.Count - 1;
                for (var i = 0; i < m; i++) {
                    var last = different[index];
                    if (index > 1) {
                        last.Count--;
                        if (last.Count == 0) {
                            index--;
                        }
                    }
                    else {
                        break;
                    }
                }

                sum = (equalFirst + 1L) * forces[0];
                index = 0;
                while (true) {
                    if (index == different.Count)
                        break;
                    if (m > 0) {
                        var last = different[index];
                        if (last.Count > 0) {
                            sum += last.Value + 1L;
                            last.Count--;
                        }

                        if (last.Count == 0) {
                            index++;
                        }

                        m--;
                    }
                    else {
                        var last = different[index];
                        if (last.Count > 0) {
                            sum += last.Value;
                            last.Count--;
                        }

                        if (last.Count == 0) {
                            index++;
                        }
                    }
                }

                var res = (double) sum / (n - m);
                sw.WriteLine(res.ToString("F7"));
            }
            else
            {
                m -= d;
                var need = (equalFirst + 1L) * k;
                if (need <= m)
                {
                    var res = forces[0] + k;
                    sw.WriteLine(res);
                }
                else
                {
                    if (m > equalFirst)
                    {
                        m -= equalFirst;
                        var res = forces[0];
                        if (m >= k)
                        {
                            res += k;
                        }
                        else
                        {
                            res += m;
                        }

                        sw.WriteLine(res);
                    }
                    else
                    {
                        var res = (double) ((equalFirst + 1) * forces[0] + m) / (equalFirst + 1.0);
                        sw.WriteLine(res.ToString("F7"));
                    }
                }
            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

class Pair
{
    public int Value { get; set; }

    public int Count { get; set; }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(ReadNextToken());
    }

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

    public long NextInt64()
    {
        return Int64.Parse(ReadNextToken());
    }

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();

            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}


//#define EXTENDSTACKSIZE

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

namespace CF
{
    internal class Program
    {
        private const int stackSize = 64 * 1024 * 1024;

        private static void Run()
        {
            using (var sr = new InputReader(Console.In))
//            using (var sr = new InputReader(new StreamReader("input.txt")))
            using (var sw = Console.Out)
//            using (var sw = new StreamWriter("output.txt"))
            using (var task = new Task(sr, sw)) {
                task.Solve();
//                Console.ReadKey();
            }
        }

        private static void Main(string[] args)
        {
#if EXTENDSTACKSIZE
            var threadStart = new ThreadStart(Run);
            var thread = new Thread(threadStart, stackSize);
            thread.Start();
            thread.Join();
#else
            Run();
#endif
        }
    }

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            var k = sr.NextInt32();
            var m = sr.NextInt32();
            var forces = sr.ReadArrayOfInt32();
            Array.Sort(forces, (a, b) => -a.CompareTo(b));
            var equalFirst = 0;
            for (var i = 1; i < forces.Length; i++)
            {
                if (forces[i] == forces[0])
                {
                    equalFirst++;
                }
                else
                {
                    break;
                }
            }

            var d = n - equalFirst - 1;
            if (d >= m)
            {
                var sum = 0L;
                var different = new List<Pair>();
                var curr = forces[equalFirst + 1];
                different.Add(new Pair { Value = curr, Count = 1 });
                for (var i = equalFirst + 2; i < n; i++) {
                    if (forces[i] == curr) {
                        different[different.Count - 1].Count++;
                    }
                    else {
                        curr = forces[i];
                        different.Add(new Pair { Value = curr, Count = 1 });
                    }
                }

                var index = different.Count - 1;
                var tmpM = m;
                for (var i = 0; i < tmpM; i++) {
                    if (index > 0) {
                        var last = different[index];
                        last.Count--;
                        if (last.Count == 0) {
                            index--;
                        }

                        m--;
                    }
                    else {
                        var last = different[index];
                        if (last.Count == 1) {
                            last.Count--;
                            m--;
                        }

                        break;
                    }
                }

                sum = (equalFirst + 1L) * forces[0];
                index = 0;
                var num = equalFirst + 1L;
                while (true) {
                    if (index == different.Count)
                        break;
                    if (m > 0) {
                        var last = different[index];
                        if (last.Count > 0) {
                            sum += last.Value + 1L;
                            last.Count--;
                            num++;
                        }

                        if (last.Count == 0) {
                            index++;
                        }

                        m--;
                    }
                    else {
                        var last = different[index];
                        if (last.Count > 0) {
                            sum += last.Value;
                            last.Count--;
                            num++;
                        }

                        if (last.Count == 0) {
                            index++;
                        }
                    }
                }

                var res = (double) sum / num;
                sw.WriteLine(res.ToString("F7"));
            }
            else
            {
                m -= d;
                var need = (equalFirst + 1L) * k;
                if (need <= m)
                {
                    var res = forces[0] + k;
                    sw.WriteLine(res);
                }
                else
                {
                    if (m > equalFirst)
                    {
                        m -= equalFirst;
                        var res = forces[0];
                        if (m >= k)
                        {
                            res += k;
                        }
                        else
                        {
                            res += m;
                        }

                        sw.WriteLine(res);
                    }
                    else
                    {
                        var res = (double) ((equalFirst + 1) * forces[0] + m) / (equalFirst + 1.0);
                        sw.WriteLine(res.ToString("F7"));
                    }
                }
            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

class Pair
{
    public int Value { get; set; }

    public int Count { get; set; }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(ReadNextToken());
    }

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

    public long NextInt64()
    {
        return Int64.Parse(ReadNextToken());
    }

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();

            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}


//#define EXTENDSTACKSIZE

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;

namespace CF
{
    internal class Program
    {
        private const int stackSize = 64 * 1024 * 1024;

        private static void Run()
        {
            using (var sr = new InputReader(Console.In))
//            using (var sr = new InputReader(new StreamReader("input.txt")))
            using (var sw = Console.Out)
//            using (var sw = new StreamWriter("output.txt"))
            using (var task = new Task(sr, sw)) {
                task.Solve();
//                Console.ReadKey();
            }
        }

        private static void Main(string[] args)
        {
#if EXTENDSTACKSIZE
            var threadStart = new ThreadStart(Run);
            var thread = new Thread(threadStart, stackSize);
            thread.Start();
            thread.Join();
#else
            Run();
#endif
        }
    }

    internal class Task : IDisposable
    {
        private readonly InputReader sr;
        private readonly TextWriter sw;
        private bool isDispose;

        public Task(InputReader sr, TextWriter sw)
        {
            this.sr = sr;
            this.sw = sw;
        }

        public void Solve()
        {
            var n = sr.NextInt32();
            var k = sr.NextInt32();
            var m = sr.NextInt32();
            var forces = sr.ReadArrayOfInt32();
            Array.Sort(forces, (a, b) => -a.CompareTo(b));
            var equalFirst = 0;
            for (var i = 1; i < forces.Length; i++)
            {
                if (forces[i] == forces[0])
                {
                    equalFirst++;
                }
                else
                {
                    break;
                }
            }

            var d = n - equalFirst - 1;
            if (d >= m)
            {
                var sum = 0L;
                for (var i = 0; i < n - m; i++)
                {
                    sum += forces[i];
                }

                var res = (double) sum / (n - m);
                sw.WriteLine(res.ToString("F7"));
            }
            else
            {
                m -= d;
                var need = (equalFirst + 1L) * k;
                if (need <= m)
                {
                    var res = forces[0] + k;
                    sw.WriteLine(res);
                }
                else
                {
                    if (m > equalFirst)
                    {
                        m -= equalFirst;
                        var res = forces[0];
                        if (m >= k)
                        {
                            res += k;
                        }
                        else
                        {
                            res += m;
                        }

                        sw.WriteLine(res);
                    }
                    else
                    {
                        var res = (double) ((equalFirst + 1) * forces[0] + m) / (equalFirst + 1.0);
                        sw.WriteLine(res.ToString("F7"));
                    }
                }
            }
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!isDispose) {
                if (disposing) {
                    if(sr != null)
                        sr.Dispose();

                    if(sw != null)
                        sw.Dispose();
                }

                isDispose = true;
            }
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;
    private string[] buffer;
    private int seek;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(ReadNextToken());
    }

    private string ReadNextToken()
    {
        if (buffer == null || seek == buffer.Length) {
            seek = 0;
            buffer = NextSplitStrings();
        }

        return buffer[seek++];
    }

    public long NextInt64()
    {
        return Int64.Parse(ReadNextToken());
    }

    public int[] ReadArrayOfInt32()
    {
        return ReadArray(Int32.Parse);
    }

    public long[] ReadArrayOfInt64()
    {
        return ReadArray(Int64.Parse);
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();

            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}


using System;
using System.Linq;

namespace CodeForcesB
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] three = Console.ReadLine().Split(' ');
            int n = int.Parse(three[0]);
            int k = int.Parse(three[1]);
            int m = int.Parse(three[2]);

            int[] arr = new int[n];
            string[] temp = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
            {
                arr[i] = int.Parse(temp[i]);
            }
            Array.Sort(arr);
            if (k > m)
            {
                k = m;
            }

            double[] scores = new double[m+1];
            for (int rem = 0; rem <= m; rem++)
            {
                double score = 0;
                for (int i = rem; i < n; i++)
                {
                    score += arr[i];
                }
                score += min(m-rem, (n-rem)*k);
                if (n - rem > 0)
                {
                    score /= (n - rem);
                }
                scores[rem] = score;
            }
            Console.WriteLine(scores.Max());
        }
        static double min(double a, double b)
        {
            return a > b ? b : a;
        }
    }
}


using System;
using System.Linq;

namespace CodeForcesB
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] three = Console.ReadLine().Split(' ');
            int n = int.Parse(three[0]);
            int k = int.Parse(three[1]);
            int m = int.Parse(three[2]);

            int[] arr = new int[n];
            string[] temp = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
            {
                arr[i] = int.Parse(temp[i]);
            }
            Array.Sort(arr);
            if (k > m)
            {
                k = m;
            }

            long[] suffixSum = new long[n];
            suffixSum[n - 1] = arr[n - 1];
            for (int i = n-2; i >= 0; i--)
            {
                suffixSum[i] = arr[i] + suffixSum[i + 1];
            }

            double[] scores = new double[m+1];
            for (int rem = 0; rem <= m; rem++)
            {
                if (rem >= n)
                {
                    continue;
                }
                double score = suffixSum[rem];
                score += min(m-rem, (n-rem)*k);
                score /= (n - rem);
                scores[rem] = score;
            }
            Console.WriteLine(scores.Max());
            //Console.ReadKey();
        }
        static double min(double a, double b)
        {
            return a > b ? b : a;
        }
    }
}


using System;
using System.Linq;

namespace CodeForcesB
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] three = Console.ReadLine().Split(' ');
            int n = int.Parse(three[0]);
            int k = int.Parse(three[1]);
            int m = int.Parse(three[2]);

            int[] arr = new int[n];
            string[] temp = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
            {
                arr[i] = int.Parse(temp[i]);
            }
            Array.Sort(arr);
            if (k > m)
            {
                k = m;
            }

            double[] scores = new double[m];
            for (int rem = 0; rem < m; rem++)
            {
                double score = 0;
                for (int i = rem; i < n; i++)
                {
                    score += arr[i];
                }
                score += min(m-rem, (n-rem)*k);
                if (n - rem > 0)
                {
                    score /= (n - rem);
                }
                scores[rem] = score;
            }
            Console.WriteLine(scores.Max());
        }
        static double min(double a, double b)
        {
            return a > b ? b : a;
        }
    }
}


//C# TOPCHEG KCTA
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace template1
{
    class Program
    {
        const int N = 100000;
        private static int[] ReadIntLine()
        {
            string[] tokens = Console.ReadLine().Split(' ');
            return Array.ConvertAll(tokens, int.Parse);
        }
        static bool IsVowel(char c)
        {
            return ((c == 'a') || (c == 'u') || (c == 'i') || (c == 'e') || (c == 'o'));
        }
        static void Main(string[] args)
        {
            int[] nmk = ReadIntLine();
            int n = nmk[0];
            int k = nmk[1];
            int m = nmk[2];
            int[] a = ReadIntLine();
            Array.Sort(a);
            long sum = 0;
            double ans = 0;
            for(int i = n - 1; i >= 0; i--)
            {
                //Console.WriteLine(a[i]);
                sum += a[i];
                if (i > m)
                    continue;
                long maxAdd = Math.Min(m - i, (n - i) * ((long) k));
                ans = Math.Max(ans, ((double) sum + maxAdd) / (n - i));
            }
            Console.WriteLine(ans);
        }
    }
}


// Try Codeforces
// author: Leonardone @ NEETSDKASU

fn main() {
    let mut stdin = String::new();
    std::io::Read::read_to_string(
        &mut std::io::stdin(),
        &mut stdin).unwrap();
    let mut stdin = stdin.split_whitespace();
    let mut get = || stdin.next().unwrap();
    macro_rules! get {
        ($t:ty) => (get().parse::<$t>().unwrap());
        () => (get!(i64));
    }

    let n = get!(usize);
    let k = get!(usize);
    let m = get!(usize);
    let mut xs = vec![];
    for _ in 0..n {
        xs.push(get!());
    }
    xs.sort();
    let mut ys = vec![0; n+1];
    for i in 0..xs.len() {
        ys[i+1] = ys[i] + xs[i];
    }
    let mut ans = 0.0;
    for i in 0..n {
        if i > m {
            break;
        }
        let sum = ys[n]-ys[i];
        let r = m - i;
        let u = std::cmp::min(r, (n - i) * k);
        let sum = sum + u as i64;
        let avg = sum as f64 / (n - i) as f64;
        if avg > ans {
            ans = avg;
        }
    }
    println!("{}", ans);
}


#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input! {
        n: usize,
        k: usize,
        m: usize,
        a: [f64; n],
    }
    let mut a = a;
    a.sort_by(|x, y| x.partial_cmp(y).unwrap());
    let mut ma = -1.0;
    let mut sum = 0.0;
    for i in 0..n {
        sum += a[i];
    }
    for i in 0..min(n, m + 1) {
        let rem = m - i;
        let mut avg = sum / (n - i) as f64;
        avg += min((n - i) as i64 * k as i64, rem as i64) as f64
            / (n - i) as f64;
        if ma < avg { ma = avg; }
        sum -= a[i];
    }
    puts!("{}\n", ma);
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input! {
        n: usize,
        k: usize,
        m: usize,
        a: [f64; n],
    }
    let mut a = a;
    a.sort_by(|x, y| x.partial_cmp(y).unwrap());
    let mut ma = -1.0;
    let mut sum = 0.0;
    for i in 0..n {
        sum += a[i];
    }
    for i in 0..min(n, m) {
        let rem = m - i;
        let mut avg = sum / (n - i) as f64;
        avg += min((n - i) as i64 * k as i64, rem as i64) as f64
            / (n - i) as f64;
        if ma < avg { ma = avg; }
        sum -= a[i];
    }
    puts!("{}\n", ma);
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input! {
        n: usize,
        k: usize,
        m: usize,
        a: [f64; n],
    }
    let mut a = a;
    a.sort_by(|x, y| x.partial_cmp(y).unwrap());
    let mut ma = -1.0;
    let mut sum = 0.0;
    for i in 0..n {
        sum += a[i];
    }
    for i in 0..min(n, m) {
        let rem = m - i;
        let mut avg = sum / (n - i) as f64;
        avg += min((n - i) * k, rem) as f64 / (n - i) as f64;
        if ma < avg { ma = avg; }
        sum -= a[i];
    }
    puts!("{}\n", ma);
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input! {
        n: usize,
        k: usize,
        m: usize,
        a: [f64; n],
    }
    let mut ma = -1.0;
    let mut sum = 0.0;
    for i in 0..n {
        sum += a[i];
    }
    for i in 0..min(n, m) {
        let rem = m - i;
        let mut avg = sum / (n - i) as f64;
        avg += min((n - i) * k, rem) as f64 / (n - i) as f64;
        if ma < avg { ma = avg; }
        sum -= a[i];
    }
    puts!("{}\n", ma);
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"

	"math"
	"sort"
)

func main() {
	n, k, m := readInt3()
	a := readInts()

	sort.Sort(sort.Reverse(sort.IntSlice(a)))
	if m < k {
		k = m
	}
	var s float64
	var r float64

	for i := 1; i <= n; i++ {
		s += float64(a[i-1])
		ds := math.Min(float64(m-(n-i)), float64(k)*float64(i))
		r1 := (s+ds) / float64(i)
		if ds >= 0 && r1 > r {
			r = r1
		}
	}

	fmt.Println(r)
}

var (
	stdin = bufio.NewReader(os.Stdin)
)

func readLine() string {
	s, _ := stdin.ReadString('\n')
	return s
}

func readInts() (r []int) {
	reader := strings.NewReader(readLine())
	for {
		var x int
		_, err := fmt.Fscan(reader, &x)
		if err != nil {
			break
		}
		r = append(r, x)
	}
	return
}

func readInt3() (int, int, int) {
	a := readInts()
	return a[0], a[1], a[2]
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func min(x, y int64) int64 {
	if x < y {
		return x
	}
	return y
}

func max(x, y int64) int64 {
	if x > y {
		return x
	}
	return y
}

func main() {
	defer writer.Flush()
	var n, k, m int
	var t1, tot, cum, mm int64
	arr := []int64{}
	scanf("%d %d %d\n", &n, &k, &m)

	for i := 0; i < n; i++ {
		scanf("%d", &t1)
		arr = append(arr, t1)
		tot += t1
	}
	sort.Slice(arr, func(i, j int) bool {
		return arr[i] < arr[j]
	})

	ansf := float64(0)
	tem := float64(0)

	for i := 0; i < n; i++ {
		mm = int64(m - i)
		canInc := min(mm, int64(n-i)*int64(k))
		t1 = tot - cum + canInc

		tem = float64(t1)
		tem /= float64(n - i)

		if tem > ansf {
			ansf = tem
		}
		cum += arr[i]
	}

	printf("%.10f", ansf)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func min(x, y int64) int64 {
	if x < y {
		return x
	}
	return y
}

func max(x, y int64) int64 {
	if x > y {
		return x
	}
	return y
}

func main() {
	defer writer.Flush()
	var n, k, m int
	var t1, tot, cum, mm int64
	arr := []int64{}
	scanf("%d %d %d\n", &n, &k, &m)

	for i := 0; i < n; i++ {
		scanf("%d", &t1)
		arr = append(arr, t1)
		tot += t1
	}
	sort.Slice(arr, func(i, j int) bool {
		return arr[i] < arr[j]
	})

	ansf := float64(0)
	tem := float64(0)

	for i := 0; i < n; i++ {
		mm = int64(m - i)
		if mm < 0 {
			break
		}
		canInc := min(mm, int64(n-i)*int64(k))
		t1 = tot - cum + canInc

		tem = float64(t1)
		tem /= float64(n - i)

		if tem > ansf {
			ansf = tem
		}
		cum += arr[i]
	}

	printf("%.10f", ansf)
}


<?php
list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
$d = explode(" ", trim(fgets(STDIN)));
rsort($d);
$e = 0;
for($x = 0; $x < $a; $x++)
{
     $f = $d[$x] + $b;
     if($f < $e)
     {
          break;
     }
     else
     {
          $e = $f;
     }
}
print number_format($e, 6, ".", "");
?>


<?php
list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
$d = explode(" ", trim(fgets(STDIN)));
rsort($d);
if($c < $a)
{
    $e = array_slice($d, 0, $a - $c);
    $g = array_sum($e) / count($e);
    $d[0]++;
    $h = array_sum($d) / $a;
    $f = max($g, $h);
}
elseif($c == $a)
{
     $f = $d[0] + 1;
}
elseif($c > $a)
{
     $c -= $a;
     $c++;
     $f = $d[0] + min($b, $c);
}
print number_format($f, 6, ".", "") . "\n";
?>


<?php
list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
$d = explode(" ", trim(fgets(STDIN)));
rsort($d);
if($c < $a)
{
    $e = array_slice($d, 0, $a - $c);
    $f = array_sum($e) / count($e);
}
elseif($c == $a)
{
     $f = $d[0] + 1;
}
elseif($c > $a)
{
     $c -= $a;
     $c++;
     $f = $d[0] + min($b, $c);
}
print number_format($f, 6, ".", "") . "\n";
?>


<?php
list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
$d = explode(" ", trim(fgets(STDIN)));
rsort($d);
if($c <= $a)
{
    $e = array_slice($d, 0, $a - $c);
    $f = array_sum($e) / count($e);
}
else
{
     $c -= $a;
     $f = $d[0] + min($b, $c);
}
print number_format($f, 6, ".", "") . "\n";
?>


<?php
list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
$d = explode(" ", trim(fgets(STDIN)));
rsort($d);
if($c < $a)
{
    $e = array_slice($d, 0, $a - $c);
    $f = array_sum($e) / count($e);
}
elseif($c == $a)
{
     $f = $d[0] + 1;
}
elseif($c > $a)
{
     $c -= $a;
     $f = $d[0] + min($b, $c);
}
print number_format($f, 6, ".", "") . "\n";
?>


<?php
	fscanf(STDIN, "%d %d %d", $n,$k,$m);
	$a = fscanf(STDIN, str_pad("",2*$n,"%d"));
	//print_r($a);
	rsort($a, SORT_NUMERIC);
	$m = $a[0]+min($k,$m);
	echo $m;
?>


<?php
	fscanf(STDIN, "%d %d %d", $n,$k,$m);
	$a = fscanf(STDIN, str_pad("",2*$n,"%d"));
	//print_r($a);
	rsort($a, SORT_NUMERIC);
	$m = $a[0]+$k;
	echo $m;
?>


<?php
list($n, $k, $m) = explode(" ", trim(fgets(STDIN)));
$v = explode(" ", trim(fgets(STDIN)));
sort($v);
$total=$ans=0;
for($i=0;$i<$n;$i++)
$total+=$v[$i];
//print $total."\n";
for($i=0;$i<=min($m,$n-1);$i++)
    {
        $baki=$n-$i;
        $temp=$total+min($m-$i,$baki*$k);
        $ans=max($ans,$temp/$baki);
        $total-=$v[$i];
       // print $total."\n";
    }
print number_format($ans, 15, ".", "") . "\n";
?>


<?php
list($n, $k, $m) = explode(" ", trim(fgets(STDIN)));
$v = explode(" ", trim(fgets(STDIN)));
sort($v);
$total=$ans=0;
for($i=0;$i<$n;$i++)
$total+=$v[$i];
//print $total."\n";
for($i=0;$i<=min($m,$n-1);$i++)
    {
        $baki=$n-$i;
        $temp=$total+min($m-$i,$baki*$k);
        $ans=max($ans,$temp/$baki);
        $total-=$v[$i];
       // print $total."\n";
    }
print number_format($ans, 6, ".", "") . "\n";
?>


<?php
list($n, $k, $m) = explode(" ", trim(fgets(STDIN)));
$v = explode(" ", trim(fgets(STDIN)));
sort($v);
$total=$ans=0;
for($i=0;$i<$n;$i++)
$total+=$v[$i];
//print $total."\n";
for($i=0;$i<=min($m,$n-1);$i++)
    {
        $baki=$n-$i;
        $temp=$total+min($m-$i,$baki*$k);
        $ans=max($ans,$temp/$baki);
        $total-=$v[$i];
       // print $total."\n";
    }
print number_format($ans, 5, ".", "") . "\n";
?>


n, k, m = map(int, raw_input().split())
a = sorted(map(int, raw_input().split()))
s = sum(a)
v = 0

for i in range(min(n, m)):
    v = max(float(s + min(k * (n - i), (m - i))) / (n - i), v)
    s -= a[i]

print v


n, k, m = map(int, raw_input().split())
a = sorted(map(int, raw_input().split()))
s = sum(a)
v = 0

for i in range(min(n, m + 1)):
    v = max(float(s + min(k * (n - i), (m - i))) / (n - i), v)
    s -= a[i]

print v


n, k, m = map(int, raw_input().split())
a = sorted(map(int, raw_input().split()))

p = min(n - 1, m)
m = m - p
a = a[p:]

print float(sum(a) + min(k * len(a), m)) / len(a)


n, k, m = map(int, raw_input().split())
a = sorted(map(int, raw_input().split()))
s = sum(a)
v = 0

for i in range(n):
    v = max(float(s + min(k * (n - i), (m - i))) / (n - i), v)
    s -= a[i]

print v


n, k, m = map(int, raw_input().split())
a = map(float, raw_input().split())

a.sort(reverse=True)

su = sum(a)
best = -1
for i in xrange(0, min(m, n-1) + 1):
    remaining = n - i
    avg = (su + min(m - i, k * remaining)) / remaining
    best = max(best, avg)
    this = a.pop()
    su -= this

print best


from __future__ import division
from sys import stdin, stdout

def write(x):
    stdout.write(str(x) + "\n")

n, k, m = map(int, stdin.readline().split())
a = map(int, stdin.readline().split())

a.sort()
if m <= n - 1:
    a = a[m:]
else:
    a = a[-1:]
    m -= n - 1
    if m >= k:
        a[0] += k
    else:
        a[0] += m

fl = len(a) + 0.0
res = 0
for ele in a:
    res += ele / fl

write(res)


from __future__ import division
from sys import stdin, stdout

def write(x):
    stdout.write(str(x) + "\n")

n, k, m = map(int, stdin.readline().split())
a = map(float, stdin.readline().split())

a.sort(key=lambda x:-x)

su = sum(a)
canadd = min(m, k*n)
best = (su + canadd) / n
for i in xrange(1, min(m, n-1) + 1):
    this = a.pop()
    su -= this
    remaning = (n-i)
    canadd = min(m-i, k*remaning)
    avg = (su + canadd) / remaning
    best = max(best, avg)

write(best)


from __future__ import division
from sys import stdin, stdout

def write(x):
    stdout.write(str(x) + "\n")

n, k, m = map(int, stdin.readline().split())
a = map(float, stdin.readline().split())

a.sort()
su = sum(a)
n = len(a)

removed = 0
for ele in a[:-1]:
    if (su + 1) / n > (su - ele) / (n - 1):
        break
    removed += 1
    su -= ele
    n -= 1
    m -= 1

if n * k < m:
    su += n * k
else:
    su += m

write(su/n)


import sys
import math

n, k, m = map(int, raw_input().split())

a = map(int, raw_input().split())
a.sort()
ans = 0
sm = sum(a)
for i in range(0, min(m+1,n)):
    # print m-i,(n-i)*k,sm,  max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    ans = max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    sm -= a[i]
print ans


import sys
import math

MOD = int(1e9+7)

n, k, m = map(int, raw_input().split())

a = map(int, raw_input().split())
a.sort()
ans = 0
sm = sum(a)
for i in range(0, min(m,n)):
    # print m-i,(n-i)*k,sm,  max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    ans = max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    sm -= a[i]
print ans


import sys
import math

MOD = int(1e9+7)

n, k, m = map(int, raw_input().split())

a = map(int, raw_input().split())
ans = 0
sm = sum(a)
for i in range(0, n):
    # print m-i,(n-i)*k,sm
    ans = max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    sm -= a[i]
print ans


import sys
import math

MOD = int(1e9+7)

n, k, m = map(int, raw_input().split())

a = map(int, raw_input().split())
a.sort()
ans = 0
sm = sum(a)
for i in range(0, n):
    # print m-i,(n-i)*k,sm,  max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    ans = max(ans, (sm + min(m-i, (n-i)*k))/float(n-i))
    sm -= a[i]
print ans


n, k, m = map(int, raw_input().split())
a = map(int, raw_input().split())

a.sort()
s = sum(a)
addedpower = min(n * k, m)

answer = (s + addedpower)/float(n)

left = n
for _a in a:
    # remove first k
    s -= _a
    m -= 1
    left -= 1
    addedpower = min(left * k, m)
    if left > 1:
        h = (s + addedpower)/float(left)
        answer = max(answer, h)

print answer


n, k, m = map(int, raw_input().split())
a = map(int, raw_input().split())

a.sort()
s = sum(a)
addedpower = min(n * k, m)

answer = (s + addedpower)/float(n)

left = n
for _a in a:
    # remove first k
    s -= _a
    m -= 1
    if m < 0:
        break
    left -= 1
    addedpower = min(left * k, m)
    if left != 0:
        h = (s + addedpower)/float(left)
        answer = max(answer, h)

print answer


n, k, m = map(int, raw_input().split())
a = map(int, raw_input().split())

a.sort()
s = sum(a)
addedpower = min(n * k, m)

answer = (s + addedpower)/float(n)

left = n
for _a in a:
    # remove first k
    s -= _a
    m -= 1
    left -= 1
    addedpower = min(left * k, m)
    if left != 0:
        h = (s + addedpower)/float(left)
        answer = max(answer, h)

print answer


#!/usr/bin/python2

def ir(): return int(raw_input())
def ia(): return map(int, raw_input().split())

n, k, m = ia()
a = ia()

a.sort()
s = sum(a)

i = 0
ma = 0.0
while True:
    b = min(n*k, m)
    c = (s + b) / float(n)
    if c > ma:
        ma = c

    if n <= 1 or m == 0:
        break

    s -= a[i]; i += 1; m -= 1
    n -= 1

print ("%.16g" % ma)


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 20
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll a[100005];
ll l[100005];
ll r[100005];
ll d[100005];
ll cnt[100005];

int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = n; i > 0; i--)
        a[i] -= a[i-1];
    for(int i = 1; i <= m; i++)
        cin >> l[i] >> r[i] >> d[i] ;
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        cnt[x]++;
        cnt[y+1]--;
    }
    for(int i = 1; i <= k; i++)
        cnt[i] += cnt[i-1];
    for(int i = 1; i <= m; i++)
    {
        long long dd = 1LL * cnt[i] * d[i];
        a[l[i]] += dd;
        a[r[i]+1] -= dd;
    }
    for(int i = 1; i <= n; i++)
        a[i] += a[i-1];
    for(int i = 1; i <= n; i++)
        cout << a[i] << " ";
    return 0;
}


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 20
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll a[100005];
int l[100005];
int r[100005];
int d[100005];
ll cnt[100005];

int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = n; i > 0; i--)
        a[i] -= a[i-1];
    for(int i = 1; i <= m; i++)
        cin >> l[i] >> r[i] >> d[i] ;
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        cnt[x]++;
        cnt[y+1]--;
    }
    for(int i = 1; i <= k; i++)
        cnt[i] += cnt[i-1];
    for(int i = 1; i <= m; i++)
    {
        long long dd = 1LL * cnt[i] * d[i];
        a[l[i]] += dd;
        a[r[i]+1] -= dd;
    }
    for(int i = 1; i <= n; i++)
        a[i] += a[i-1];
    for(int i = 1; i <= n; i++)
        cout << a[i] << " ";
    return 0;
}


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 20
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll a[100005];
ll l[100005];
ll r[100005];
ll d[100005];
ll cnt[100005];

int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = n; i > 0; i--)
        a[i] -= a[i-1];
    for(int i = 1; i <= m; i++)
        cin >> l[i] >> r[i] >> d[i] ;
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        cnt[x]++;
        cnt[y+1]--;
    }
    for(int i = 1; i <= 100005; i++)
        cnt[i] += cnt[i-1];
    for(int i = 1; i <= m; i++)
    {
        long long dd = 1LL * cnt[i] * d[i];
        a[l[i]] += dd;
        a[r[i]+1] -= dd;
    }
    for(int i = 1; i <= n; i++)
        a[i] += a[i-1];
    for(int i = 1; i <= n; i++)
        cout << a[i] << " ";
    return 0;
}


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 18
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll tree[(1<<LOGSZ)+1];
ll tree2[(1<<LOGSZ)+1];
ll a[100005];
vector<pair<int, pii> > ops;
int N = (1<<LOGSZ);

// add v to value at x
void add2(int x, int v) {
  while(x <= N) {
    tree2[x] += v;
    x += (x & -x);
  }
}

// get cumulative sum up to and including x
ll get2(int x) {
  ll res = 0;
  while(x) {
    res += tree2[x];
    x -= (x & -x);
  }
  return res;
}

// add v to value at x
void add(int x, int v) {
  while(x <= N) {
    tree[x] += v;
    x += (x & -x);
  }
}

// get cumulative sum up to and including x
ll get(int x) {
  ll res = 0;
  while(x) {
    res += tree[x];
    x -= (x & -x);
  }
  return res;
}
int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = 1; i <= m; i++)
    {
        int l,r,d;
        cin >> l >> r >> d;
        ops.pb(mp(l, mp(r,d)));
    }
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        add2(x, 1);
        add2(y + 1, -1);
    }
    for(int i = 1; i <= m; i++)
    {
        int num = get2(i);
        int l = ops[i-1].f;
        int r = ops[i-1].s.f;
        int d = ops[i-1].s.s;
        add(l, 1LL * num * d);
        add(r + 1,  -1LL * num * d);
    }
    for(int i = 1; i <= n; i++)
    {
        cout << get(i) + a[i] << " ";
    }
    return 0;
}


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 20
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll a[100005];
int l[100005];
int r[100005];
int d[100005];
int cnt[100005];

int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = n; i > 0; i--)
        a[i] -= a[i-1];
    for(int i = 1; i <= m; i++)
        cin >> l[i] >> r[i] >> d[i] ;
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        cnt[x]++;
        cnt[y+1]--;
    }
    for(int i = 1; i <= k; i++)
        cnt[i] += cnt[i-1];
    for(int i = 1; i <= m; i++)
    {
        long long dd = 1LL * cnt[i] * d[i];
        a[l[i]] += dd;
        a[r[i]+1] -= dd;
    }
    for(int i = 1; i <= n; i++)
        a[i] += a[i-1];
    for(int i = 1; i <= n; i++)
        cout << a[i] << " ";
    return 0;
}


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 17
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll tree[(1<<LOGSZ)+1];
ll tree2[(1<<LOGSZ)+1];
ll a[100005];
vector<pair<int, pii> > ops;
int N = (1<<LOGSZ);

// add v to value at x
void add2(int x, int v) {
  while(x <= N) {
    tree2[x] += v;
    x += (x & -x);
  }
}

// get cumulative sum up to and including x
ll get2(int x) {
  ll res = 0;
  while(x) {
    res += tree2[x];
    x -= (x & -x);
  }
  return res;
}

// add v to value at x
void add(int x, int v) {
  while(x <= N) {
    tree[x] += v;
    x += (x & -x);
  }
}

// get cumulative sum up to and including x
ll get(int x) {
  ll res = 0;
  while(x) {
    res += tree[x];
    x -= (x & -x);
  }
  return res;
}
int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = 1; i <= m; i++)
    {
        int l,r,d;
        cin >> l >> r >> d;
        ops.pb(mp(l, mp(r,d)));
    }
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        add2(x, 1);
        add2(y + 1, -1);
    }
    for(int i = 1; i <= m; i++)
    {
        int num = get2(i);
        int l = ops[i-1].f;
        int r = ops[i-1].s.f;
        int d = ops[i-1].s.s;
        add(l, 1LL * num * d);
        add(r + 1,  -1LL * num * d);
    }
    for(int i = 1; i <= n; i++)
    {
        cout << get(i) + a[i] << " ";
    }
    return 0;
}


#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <deque>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <math.h>
#define pii pair<int, int>
#define pid pair<int, double>
#define pli pair<long long, int>
#define pb push_back
#define llu long long unsigned
#define ll long long
#define vi vector<int>
#define mp make_pair
#define MAX 1000000009
#define MAXSZ 45
#define MOD 1000000007
#define LOGSZ 20
#define EPS 0.000000000001
#define f first
#define s second
using namespace std;

ll tree[(1<<LOGSZ)+1];
ll tree2[(1<<LOGSZ)+1];
ll a[100005];
vector<pair<int, pii> > ops;
int N = (1<<LOGSZ);

// add v to value at x
void add2(int x, int v) {
  while(x <= N) {
    tree2[x] += v;
    x += (x & -x);
  }
}

// get cumulative sum up to and including x
ll get2(int x) {
  ll res = 0;
  while(x) {
    res += tree2[x];
    x -= (x & -x);
  }
  return res;
}

// add v to value at x
void add(int x, int v) {
  while(x <= N) {
    tree[x] += v;
    x += (x & -x);
  }
}

// get cumulative sum up to and including x
ll get(int x) {
  ll res = 0;
  while(x) {
    res += tree[x];
    x -= (x & -x);
  }
  return res;
}
int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = 1; i <= m; i++)
    {
        int l,r,d;
        cin >> l >> r >> d;
        ops.pb(mp(l, mp(r,d)));
    }
    for(int i = 1; i <= k; i++)
    {
        int x,y;
        cin >> x >> y;
        add2(x, 1);
        add2(y + 1, -1);
    }
    for(int i = 1; i <= m; i++)
    {
        int num = get2(i);
        int l = ops[i-1].f;
        int r = ops[i-1].s.f;
        int d = ops[i-1].s.s;
        add(l, 1LL * num * d);
        add(r + 1,  -1LL * num * d);
    }
    for(int i = 1; i <= n; i++)
    {
        cout << get(i) + a[i] << " ";
    }
    return 0;
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
long long int  bit[100010],bi[100010];
void update(int x,int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
long long int  check(int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    int a[100010],i,j,n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<10001;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
int bit[100010],bi[100010];
void update(int x,int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
int check(int x)
{
   // printf("isame bhi aaya\n");
    int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    int a[100010],i,j,n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    int sum;
    for(i=1;i<=n;i++)
    {
        int sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<10001;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]);
    }
    for(i=1;i<=n;i++)
    {
        int sum=check(i);
         sum=sum+a[i-1];
         printf("%d ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
long long int  bit[1000100],bi[1000100];
void update(int x,int num)
{
   // printf("AYA\n");
    for(;x<1000100;x+=x&-x)
        bit[x]+=num;
}
long long int  check(int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    long long int a[1000100],i,j,n,m,k;
    scanf("%lld%lld%lld",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<1000100;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
long long int  bit[1000100],bi[1000100];
void update(int x,int num)
{
   // printf("AYA\n");
    for(;x<1000100;x+=x&-x)
        bit[x]+=num;
}
long long int  check(int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    int a[1000100],i,j,n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<1000100;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<long long int,long long int>,long long int> > vec;
vector<pair<long long int,long long int> > quer;
long long int  bit[100010],bi[100010];
void update(long long int x,long long int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
long long int  check(long long int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    long long int a[100010],i,j,n,m,k;
    scanf("%lld%lld%lld",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%lld",&a[i]);
    }
    long long int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<long long int,long long int> p1;
        pair<pair<long long int,long long int>,long long int> p;
        scanf("%lld%lld%lld",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    long long int r;
    for(i=0;i<k;i++)
    {
        scanf("%lld%lld",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<long long int,long long int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=m;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<100010;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]*1LL);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]*1LL);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
long long int  bit[100010],bi[100010];
void update(int x,long long int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
long long int  check(int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    long long int a[100010],i,j,n,m,k;
    scanf("%lld%lld%lld",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%lld",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<100010;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]*1LL);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]*1LL);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
long long int  bit[100010],bi[100010];
void update(int x,int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
long long int  check(int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    int a[100010],i,j,n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<100010;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<long long int,long long int>,long long int> > vec;
vector<pair<long long int,long long int> > quer;
long long int  bit[100010],bi[100010];
void update(long long int x,long long int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
long long int  check(long long int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    long long int a[100010],i,j,n,m,k;
    scanf("%lld%lld%lld",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%lld",&a[i]);
    }
    long long int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<long long int,long long int> p1;
        pair<pair<long long int,long long int>,long long int> p;
        scanf("%lld%lld%lld",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    long long int r;
    for(i=0;i<k;i++)
    {
        scanf("%lld%lld",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<long long int,long long int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<100010;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]*1LL);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]*1LL);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
vector<pair<pair<int,int>,int> > vec;
vector<pair<int,int> > quer;
long long int  bit[100010],bi[100010];
void update(int x,int num)
{
   // printf("AYA\n");
    for(;x<100010;x+=x&-x)
        bit[x]+=num;
}
long long int  check(int x)
{
   // printf("isame bhi aaya\n");
    long long int sum=0;
    for(;x>=1;x-=x&-x)
      sum=sum+bit[x];
    return sum;
}
int main()
{
    long long int a[100010],i,j,n,m,k;
    scanf("%lld%lld%lld",&n,&m,&k);
    for(i=0;i<n;i++)
    {
        scanf("%lld",&a[i]);
    }
    int l,b,c;
    for(i=0;i<m;i++)
    {
        pair<int,int> p1;
        pair<pair<int,int>,int> p;
        scanf("%d%d%d",&l,&b,&c);
        p1=make_pair(l,b);
        p=make_pair(p1,c);
        vec.push_back(p);

    }
  /*  for(i=0;i<m;i++)
    {
        printf("(%d,%d),%d\n",vec[i].first.first,vec[i].first.second,vec[i].second);
    }*/
    int r;
    for(i=0;i<k;i++)
    {
        scanf("%d%d",&l,&r);
        update(l,1);
        update(r+1,-1);
        pair<int,int> p2;
        p2=make_pair(l,m);
        quer.push_back(p2);
    }
    long long int  sum;
    for(i=1;i<=n;i++)
    {
         sum=check(i);
        bi[i]=sum;
        //printf("frequency of %d==%d\n",i,sum);
    }
     for(i=0;i<1000100;i++)
        bit[i]=0;
       // printf("iasake baad\n");
    for(i=0;i<m;i++)
    {
        //printf("%d\n",i+1);
        update(vec[i].first.first,vec[i].second*bi[i+1]);
        update(vec[i].first.second+1,-vec[i].second*bi[i+1]);
    }
    for(i=1;i<=n;i++)
    {
        long long int  sum=check(i);
         sum=sum+a[i-1];
         printf("%lld ",sum);
    }
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

int n, m, k;
long long a[N];
int ll[4 * N];
int rr[4 * N];
long long cnt[3 * N];
int l[N], r[N], d[N];
int x[N], y[N];
long long cntchg[N];

void build(int root, int l, int r) {
  ll[root] = l;
  rr[root] = r;
  cnt[root] = 0;
  if (l < r) {
    build(2 * root, l, (l + r) / 2);
    build(2 * root + 1, (l + r) / 2 + 1, r);
  }
}

void add(int root, int l, int r, long long c) {
  if (l <= ll[root] && r >= rr[root]) {
    cnt[root] += c;
    return;
  }
  int mid = (ll[root] + rr[root]) / 2;
  if (l <= mid) {
    add(2 * root, l, mid, c);
  }
  if (r > mid) {
    add(2 * root + 1, mid + 1, r, c);
  }
}

long long query(int root, int leaf) {
  if (ll[root] == leaf && rr[root] == leaf)
    return cnt[root];
  if (!(ll[root] <= leaf && rr[root] >= leaf))
    return 0;
  long long res = 0;
  int mid = (ll[root] + rr[root]) / 2;
  res += cnt[root];
  if (leaf <= mid) {
    res += query(2 * root, leaf);
  }
  else {
    res += query(2 * root + 1, leaf);
  }
  return res;
}

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%d", l + i, r + i, d + i);
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  build(1, 1, m);
  for (int i = 0; i < k; ++i) {
    add(1, x[i], y[i], 1);
  }
  for (int i = 1; i <= m; ++i) {
    cntchg[i] = query(1, i);
  }
//  for (int i = 1; i <= m; ++i) {
//    printf("%d ", cntchg[i]);
//  }
//  printf("\n");
  build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    add(1, l[i], r[i], cntchg[i] * d[i]);
  }
  for (int i = 1; i <= n; ++i) {
    a[i] += query(1, i);
  }
  printf("%d", a[1]);
  for (int i = 2; i <= n; ++i) {
    printf(" %d", a[i]);
  }
  printf("\n");
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

int l[N], r[N], x[N], y[N], n, m, k;
long long d[N], a[N];
long long cnt[N];
struct node {
  int l, r;
  long long c;
} tree[4 * N];

void buildTree(int root, int ll, int rr) {
  tree[root].l = ll;
  tree[root].r = rr;
  tree[root].c = 0;
  if (ll == rr) return;
  int mid = (ll + rr) / 2;
  buildTree(root * 2, ll, mid);
  buildTree(root * 2 + 1, mid + 1, rr);
}

void add(int root, int ll, int rr, long long cc) {
  if (tree[root].l >= ll && tree[root].r <= rr) {
    tree[root].c += cc;
    return ;
  }
  int mid = (tree[root].l + tree[root].r) / 2;
  if (rr <= mid) {
    add(root * 2, ll, rr, cc);
  }
  else if (ll >= mid + 1) {
    add(root * 2 + 1, ll, rr, cc);
  }
  else {
    add(root * 2, ll, mid, cc);
    add(root * 2 + 1, mid + 1, rr, cc);
  }
}

long long query(int root, int l) {
  if (l == tree[root].r && l == tree[root].l) {
    return tree[root].c;
  }
  long long res = 0;
  if (l <= tree[root].r && l >= tree[root].l) {
    res += tree[root].c;
  }
  int mid = (tree[root].r + tree[root].l) / 2;
  if (l <= mid) {
    res += query(root * 2, l);
  }
  if (l >= mid + 1) {
    res += query(root * 2 + 1, l);
  }
  return res;
}

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%I64d", l + i, r + i, d + i);
  }
  for (int i = 1; i <= k; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  buildTree(1, 1, m);
  for (int i = 1; i <= k; ++i) {
    add(1, x[i], y[i], 1);
  }
  for (int i = 1; i <= m; ++i) {
    cnt[i] = query(1, i);
  }
  buildTree(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    add(1, l[i], r[i], cnt[i] * d[i]);
  }
  for (int i = 1; i <= n; ++i) {
    a[i] += query(1, i);
  }
  printf("%I64d", a[1]);
  for (int i = 2; i <= n; ++i) {
    printf(" %I64d", a[i]);
  }
  printf("\n");
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

int n, m, k;
long long a[N];
int ll[4 * N];
int rr[4 * N];
long long cnt[3 * N];
int l[N], r[N], d[N];
int x[N], y[N];
long long cntchg[N];

void build(int root, int l, int r) {
  ll[root] = l;
  rr[root] = r;
  cnt[root] = 0;
  if (l < r) {
    build(2 * root, l, (l + r) / 2);
    build(2 * root + 1, (l + r) / 2 + 1, r);
  }
}

void add(int root, int l, int r, long long c) {
  if (l <= ll[root] && r >= rr[root]) {
    cnt[root] += c;
    return;
  }
  int mid = (ll[root] + rr[root]) / 2;
  if (l <= mid) {
    add(2 * root, l, mid, c);
  }
  if (r > mid) {
    add(2 * root + 1, mid + 1, r, c);
  }
}

long long query(int root, int leaf) {
  if (ll[root] == leaf && rr[root] == leaf)
    return cnt[root];
  if (!(ll[root] <= leaf && rr[root] >= leaf))
    return 0;
  long long res = 0;
  int mid = (ll[root] + rr[root]) / 2;
  res += cnt[root];
  if (leaf <= mid) {
    res += query(2 * root, leaf);
  }
  else {
    res += query(2 * root + 1, leaf);
  }
  return res;
}

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%d", l + i, r + i, d + i);
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  build(1, 1, m);
  for (int i = 0; i < k; ++i) {
    add(1, x[i], y[i], 1);
  }
  for (int i = 1; i <= m; ++i) {
    cntchg[i] = query(1, i);
  }
//  for (int i = 1; i <= m; ++i) {
//    printf("%d ", cntchg[i]);
//  }
//  printf("\n");
  build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    add(1, l[i], r[i], cntchg[i] * d[i]);
  }
  for (int i = 1; i <= n; ++i) {
    a[i] += query(1, i);
  }
  printf("%I64d", a[1]);
  for (int i = 2; i <= n; ++i) {
    printf(" %I64d", a[i]);
  }
  printf("\n");
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cassert>

using namespace std;

#define out(x) cerr << #x"=" << x << endl

const int N = 1e5 + 10;

int n, m, k;
int a[N];
int ll[4 * N];
int rr[4 * N];
int cnt[3 * N];
int l[N], r[N], d[N];
int x[N], y[N];
int cntchg[N];

void build(int root, int l, int r) {
  ll[root] = l;
  rr[root] = r;
  cnt[root] = 0;
  if (l < r) {
    build(2 * root, l, (l + r) / 2);
    build(2 * root + 1, (l + r) / 2 + 1, r);
  }
}

void add(int root, int l, int r, int c) {
  if (l <= ll[root] && r >= rr[root]) {
    cnt[root] += c;
    return;
  }
  int mid = (ll[root] + rr[root]) / 2;
  if (l <= mid) {
    add(2 * root, l, mid, c);
  }
  if (r > mid) {
    add(2 * root + 1, mid + 1, r, c);
  }
}

int query(int root, int leaf) {
  if (ll[root] == leaf && rr[root] == leaf)
    return cnt[root];
  if (!(ll[root] <= leaf && rr[root] >= leaf))
    return 0;
  int res = 0;
  int mid = (ll[root] + rr[root]) / 2;
  res += cnt[root];
  if (leaf <= mid) {
    res += query(2 * root, leaf);
  }
  else {
    res += query(2 * root + 1, leaf);
  }
  return res;
}

int main() {
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d%d", l + i, r + i, d + i);
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  build(1, 1, m);
  for (int i = 0; i < k; ++i) {
    add(1, x[i], y[i], 1);
  }
  for (int i = 1; i <= m; ++i) {
    cntchg[i] = query(1, i);
  }
//  for (int i = 1; i <= m; ++i) {
//    printf("%d ", cntchg[i]);
//  }
//  printf("\n");
  build(1, 1, n);
  for (int i = 1; i <= m; ++i) {
    add(1, l[i], r[i], cntchg[i] * d[i]);
  }
  for (int i = 1; i <= n; ++i) {
    a[i] += query(1, i);
  }
  printf("%d", a[1]);
  for (int i = 2; i <= n; ++i) {
    printf(" %d", a[i]);
  }
  printf("\n");
  return 0;
}