結果

問題 No.1934 Four Fruits
ユーザー ushiroushiro
提出日時 2023-02-25 12:00:11
言語 C#
(.NET 7.0.402)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 8,629 bytes
コンパイル時間 7,433 ms
コンパイル使用メモリ 145,048 KB
実行使用メモリ 163,824 KB
最終ジャッジ日時 2023-10-11 11:51:51
合計ジャッジ時間 8,697 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
28,648 KB
testcase_01 AC 49 ms
28,932 KB
testcase_02 AC 47 ms
28,700 KB
testcase_03 AC 48 ms
30,664 KB
testcase_04 AC 49 ms
28,792 KB
testcase_05 AC 49 ms
28,712 KB
testcase_06 AC 49 ms
28,652 KB
testcase_07 AC 49 ms
30,656 KB
testcase_08 AC 49 ms
28,652 KB
testcase_09 AC 49 ms
163,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 121 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
/home/judge/data/code/Main.cs(18,17): warning CS0414: フィールド 'Program.flg' が割り当てられていますが、値は使用されていません [/home/judge/data/code/main.csproj]
/home/judge/data/code/Main.cs(25,16): warning CS0414: フィールド 'Program.mod' が割り当てられていますが、値は使用されていません [/home/judge/data/code/main.csproj]
/home/judge/data/code/Main.cs(26,19): warning CS0414: フィールド 'Program.alpha' が割り当てられていますが、値は使用されていません [/home/judge/data/code/main.csproj]
/home/judge/data/code/Main.cs(17,17): warning CS0414: フィールド 'Program.inf' が割り当てられていますが、値は使用されていません [/home/judge/data/code/main.csproj]
/home/judge/data/code/Main.cs(371,61): warning CA2200: キャッチされた例外が再スローされると、スタック情報が変更されます [/home/judge/data/code/main.csproj]
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

class Program
{
    #region library
    static int n = 0;
    static int r = 0;
    static int c = 0;
    static string s = "";
    static long sum = 0;
    static long cnt = 0;
    static long max = long.MinValue;
    static long min = long.MaxValue;
    static long inf = long.MaxValue / 2;
    static bool flg = false;
    static long[] arr;
    static char[,] map;
    static long[,] imap;
    static Queue<int> qx = new Queue<int>();
    static Queue<int> qy = new Queue<int>();
    static Queue<int> qk = new Queue<int>();
    static int mod = 1000000007;
    static string alpha = "abcdefghijklmnopqrstuvwxyz";

    public class Input
    {
        static readonly char[] separator = { ' ', '\r', '\n' };
        readonly StreamReader sr;
        readonly Queue<string> queue;
        public Input(string path = "")
        {
            queue = new Queue<string>();
            if (string.IsNullOrEmpty(path))
            {
                sr = new StreamReader(Console.OpenStandardInput());
            }
            else
            {
                sr = new StreamReader(path);
            }
        }
        public void SetText(IEnumerable<string> items)
        {
            foreach (var item in items)
            {
                SetText(item);
            }
        }
        public bool SetText(string s)
        {
            if (s == null) return false;
            foreach (var elem in s.Trim()
                .Split(separator, StringSplitOptions.RemoveEmptyEntries))
            {
                queue.Enqueue(elem);
            }
            return true;
        }
        public bool Any()
        {
            return queue.Any() || Read();
        }
        bool Read()
        {
            if (!SetText(sr.ReadLine())) return false;
            if (!queue.Any()) return Read();
            return queue.Any();
        }
        public string Next()
        {
            if (!queue.Any() && !Read())
            {
                return "";
            }
            return queue.Dequeue();
        }
        bool Accumulate(int n)
        {
            while (queue.Count() < n)
            {
                if (!Read()) return false;
            }
            return true;
        }
        public int NextInt()
        {
            return int.Parse(Next());
        }
        public long NextLong()
        {
            return long.Parse(Next());
        }
        public double NextDouble()
        {
            return double.Parse(Next());
        }
        T[] NextT<T>(int n, T offset, Func<string, T> parse, Func<T, T, T> add)
        {
            if (!Accumulate(n)) return null;
            var a = new T[n];
            for (int i = 0; i < n; i++)
                a[i] = add(parse(queue.Dequeue()), offset);
            return a;
        }
        public string[] Next(int n)
        {
            return NextT(n, "", x => x, (x, y) => x);
        }
        public int[] NextInt(int n, int offset = 0)
        {
            return NextT(n, offset, int.Parse, (x, y) => x + y);
        }
        public long[] NextLong(int n, long offset = 0)
        {
            return NextT(n, offset, long.Parse, (x, y) => x + y);
        }
        public double[] NextDouble(int n, double offset = 0.0)
        {
            return NextT(n, offset, double.Parse, (x, y) => x + y);
        }
    }
    static Input input;
    static int Int()
    {
        return input.NextInt();
    }
    static long Long()
    {
        return input.NextLong();
    }
    static double Double()
    {
        return input.NextDouble();
    }
    static string Text()
    {
        return input.Next();
    }
    static void wl(object obj = null)
    {
        Console.WriteLine(obj);
    }
    static void w(object obj)
    {
        Console.Write(obj);
    }
    static void YES()
    {
        wl("YES");
    }
    static void NO()
    {
        wl("NO");
    }
    static void YN(bool b)
    {
        if (b)
            YES();
        else
            NO();
    }
    static void Yes()
    {
        wl("Yes");
    }
    static void No()
    {
        wl("No");
    }
    static void yn(bool b)
    {
        if (b)
            Yes();
        else
            No();
    }
    static void Sum()
    {
        wl(sum);
    }
    static void Cnt()
    {
        wl(cnt);
    }
    static void Max()
    {
        wl(max);
    }
    static void Min()
    {
        wl(min);
    }
    static void SetArray(long[] array = null)
    {
        if (array != null)
        {
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = Long();
            }
        }
        else
        {
            if (n == 0)
            {
                n = Int();
            }

            arr = new long[n];
            for (int i = 0; i < n; i++)
            {
                arr[i] = Long();
            }
        }
    }
    static void ShowArray(long[] array = null)
    {
        if (array != null)
        {
            wl(string.Join(" ", array));
        }
        else if (arr != null)
        {
            wl(string.Join(" ", arr));
        }
    }
    static void CompressArray()
    {
        var list = arr.ToList();
        list = list.OrderBy(x => x).ToList();

        var dic = new Dictionary<long, long>();
        var cnt = 0;
        for (int i = 0; i < list.Count; i++)
        {
            if (!dic.ContainsKey(list[i]))
            {
                dic.Add(list[i], cnt);
                cnt++;
            }
        }

        var arr2 = new long[arr.Length];
        for (int i = 0; i < arr.Length; i++)
        {
            arr2[i] = dic[arr[i]];
        }
        arr = arr2;
    }
    static void SetMap(char[,] map2 = null)
    {
        if (r == 0 && c == 0)
        {
            r = Int();
            c = Int();
        }

        if (map2 != null)
        {
            for (int i = 0; i < r; i++)
            {
                s = Text();
                for (int j = 0; j < c; j++)
                {
                    map2[i, j] = s[j];
                }
            }
        }
        else
        {
            map = new char[r, c];
            for (int i = 0; i < r; i++)
            {
                s = Text();
                for (int j = 0; j < c; j++)
                {
                    map[i, j] = s[j];
                }
            }
        }
    }
    static void RotateMap()
    {
        var map2 = new char[c, r];
        for (int i = 0; i < r; i++)
        {
            for (int j = 0; j < c; j++)
            {
                map2[j, r - i - 1] = map[i, j];
            }
        }
        map = map2;
    }
    static void SetIMap(long[,] imap2 = null)
    {
        if (r == 0 && c == 0)
        {
            r = Int();
            c = Int();
        }

        if (imap2 != null)
        {
            for (int i = 0; i < r; i++)
            {
                for (int j = 0; j < c; j++)
                {
                    imap2[i, j] = Long();
                }
            }
        }
        else
        {
            imap = new long[r, c];
            for (int i = 0; i < r; i++)
            {
                for (int j = 0; j < c; j++)
                {
                    imap[i, j] = Long();
                }
            }
        }
    }
    static void ShowMap(char[,] map2 = null)
    {
        for (int i = 0; i < r; i++)
        {
            for (int j = 0; j < c; j++)
            {
                if (map2 != null)
                    w(map2[i, j] + " ");
                else
                    w(map[i, j] + " ");
            }
            wl();
        }
    }
    static void ShowIMap(long[,] imap2 = null)
    {
        for (int i = 0; i < r; i++)
        {
            for (int j = 0; j < c; j++)
            {
                if (imap2 != null)
                    w(imap2[i, j] + " ");
                else
                    w(imap[i, j] + " ");
            }
            wl();
        }
    }
    #endregion

    #region main
    static void Main(string[] args)
    {
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(sw);
        input = new Input();

        try
        {
            Solve();
        }
        catch (Exception ex)
        {
            wl(ex);
            if (!(args.Length >= 1 && args[0] == "/debug")) throw ex;
        }
        Console.Out.Flush();
    }

    public static void Solve()
    {
        var a = Int();
        var b = Int();
        var c = Int();
        wl(a ^ b ^ c);
    }

    #endregion

}
0