結果
| 問題 | No.2055 12x34... |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-21 04:11:39 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 562 bytes |
| 記録 | |
| コンパイル時間 | 11,320 ms |
| コンパイル使用メモリ | 443,100 KB |
| 最終ジャッジ日時 | 2026-01-03 15:54:37 |
| 合計ジャッジ時間 | 12,813 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
In file included from main.cpp:1:
In function 'std::string vtos(const T&) [with T = long unsigned int]',
inlined from 'std::string toString(const T&) [with T = long unsigned int]' at testlib.h:667:18,
inlined from 'std::string __testlib_indexToArgv(int)' at testlib.h:5434:23:
testlib.h:601:41: warning: '<anonymous>' may be used uninitialized [-Wmaybe-uninitialized]
601 | return vtos(t, std::is_integral<T>());
| ^
testlib.h: In function 'std::string __testlib_indexToArgv(int)':
testlib.h:5434:23: note: '<anonymous>' was declared here
5434 | + toString(__testlib_argv.size()) + ")");
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In function 'std::string vtos(const T&) [with T = int]',
inlined from 'std::string toString(const T&) [with T = int]' at testlib.h:667:18,
inlined from 'void Validator::writeTestMarkup()' at testlib.h:2588:43:
testlib.h:601:41: warning: '<anonymous>' may be used uninitialized [-Wmaybe-uninitialized]
601 | return vtos(t, std::is_integral<T>());
| ^
testlib.h: In member function 'void Validator::writeTestMarkup()':
testlib.h:2588:43: note: '<anonymous>' was declared here
2588 | markup += toString(c - 256);
| ~~~~~~~~^~~~~~~~~
In function 'std::string vtos(const T&) [with T = int]',
inlined from 'char InStream::readChar(char)' at testlib.h:3265:61:
testlib.h:601:41: warning: '<anonymous>' may be used uninitialized [-Wmaybe-uninitialized]
601 | return vtos(t, std::is_integral<T>());
| ^
testlib.h: In member function 'char InStream::readChar(char)':
testlib.h:3265:61: note: '<anonymous>' was declared here
3265 | quit(_pe, ("Unexpected character " + ("#" + vtos(int(found))) + ", but '" + std::string(1, c) +
| ~~~~^~~~~~
ソースコード
#include "testlib.h"
#include <bits/stdc++.h>
#define mod 998244353
using namespace std;
int main(int argc, char* argv[]){
registerValidation(argc, argv);
long long n=inf.readLong(2ll,200000ll);inf.readEoln();
vector<long long> a=inf.readLongs(n,1ll,1000000000ll);inf.readEoln();
inf.readEof();
map<long long,long long> dp;
for(int i=0;i<n;i++){
dp[a[i]]++;
dp[a[i]]+=dp[a[i]-1];
dp[a[i]]%=mod;
}
long long res=0;
for(auto &nx : dp){
res+=nx.second;res%=mod;
}
res+=(mod-n);res%=mod;
cout << res << "\n";
return 0;
}