結果

問題 No.2600 Avator Height
ユーザー 👑 kakel-sankakel-san
提出日時 2024-01-28 21:50:42
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 1,046 bytes
コンパイル時間 7,406 ms
コンパイル使用メモリ 157,044 KB
実行使用メモリ 212,016 KB
最終ジャッジ日時 2024-01-28 21:50:58
合計ジャッジ時間 15,295 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
34,980 KB
testcase_01 AC 156 ms
58,536 KB
testcase_02 AC 177 ms
58,536 KB
testcase_03 AC 155 ms
58,552 KB
testcase_04 AC 156 ms
58,544 KB
testcase_05 AC 153 ms
58,552 KB
testcase_06 AC 151 ms
58,536 KB
testcase_07 AC 146 ms
58,560 KB
testcase_08 AC 177 ms
58,548 KB
testcase_09 AC 150 ms
58,528 KB
testcase_10 AC 149 ms
58,536 KB
testcase_11 AC 147 ms
58,544 KB
testcase_12 AC 147 ms
58,536 KB
testcase_13 AC 146 ms
58,544 KB
testcase_14 AC 145 ms
58,552 KB
testcase_15 AC 162 ms
58,552 KB
testcase_16 AC 145 ms
58,544 KB
testcase_17 AC 148 ms
58,544 KB
testcase_18 AC 157 ms
58,552 KB
testcase_19 AC 157 ms
58,544 KB
testcase_20 AC 155 ms
58,552 KB
testcase_21 AC 164 ms
58,544 KB
testcase_22 AC 162 ms
58,544 KB
testcase_23 AC 172 ms
58,544 KB
testcase_24 AC 112 ms
44,324 KB
testcase_25 AC 156 ms
212,016 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (103 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var r = new long[200001];
        r[1] = 1;
        r[2] = 1;
        var e = new long[200001];
        e[1] = 1;
        e[2] = 3;
        var mod = 998_244_353;
        for (var i = 3; i < r.Length; ++i)
        {
            r[i] = (r[i - 2] + r[i - 1]) % mod;
            e[i] = (e[i - 2] + e[i - 1]) % mod;
        }
        var q = NN;
        var ans = new long[q];
        for (var i = 0; i < q; ++i)
        {
            var n = NN;
            ans[i] = (5 * r[n] % mod * r[n] % mod - e[n] * e[n] % mod + mod) % mod;
        }
        WriteLine(string.Join("\n", ans));
    }
}
0