結果

問題 No.3621 Find Schröder Coordinate in Nonresonant Case
コンテスト
ユーザー lif4635
提出日時 2026-08-10 06:18:13
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.90.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 623 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,937 ms
コンパイル使用メモリ 454,756 KB
実行使用メモリ 12,132 KB
最終ジャッジ日時 2026-08-10 20:53:49
合計ジャッジ時間 11,408 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include "testlib.h"
using namespace std;

long long mod = 998'244'353;

int main() {
    registerValidation();
    int N = inf.readInt(3, 200'000);
    inf.readEoln();
    for (int i = 0; i < N; ++i) {
        long long ai = inf.readLong(0LL, 998'244'353LL);
        if (i == 0){
            ensure(ai == 0);
        }
        if (i == 1){
            long long  x = ai;
            for (int j = 2; j < N; ++j){
                x = x * ai % mod;
                ensure(x != ai);
            }
        }
        if (i == N-1) inf.readEoln();
        else inf.readSpace();
    }
    inf.readEof();
}
0