結果
| 問題 |
No.2762 Counting and Deleting
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2024-05-23 18:23:00 |
| 言語 | cLay (20241019-1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 4,406 ms |
| コンパイル使用メモリ | 175,924 KB |
| 実行使用メモリ | 12,780 KB |
| 最終ジャッジ日時 | 2024-12-20 19:00:26 |
| 合計ジャッジ時間 | 34,596 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 TLE * 6 |
ソースコード
#define MD 998244353
int@n,@q,k[n]{};
string@s;
rep(q){
int@t,@l--,@r;
if(t==1){
while(l<r){
if(k[l]){
int x=k[l];
k[l]>?=r;
l=x;
}else{
k[l]=r;
l+=1;
}
}
}else{
Mint f,g;
while(l<r){
if(k[l]){
l=k[l];
}else{
if(s[l]=='0'){
f+=g;
}else{
g+=f+1;
}
l+=1;
}
}
wt(f+g);
}
}
tails