結果
| 問題 | No.2942 Sigma Music Game Level Problem |
| コンテスト | |
| ユーザー |
highlighter
|
| 提出日時 | 2024-09-17 07:51:10 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 657 bytes |
| 記録 | |
| コンパイル時間 | 4,741 ms |
| コンパイル使用メモリ | 375,360 KB |
| 実行使用メモリ | 13,184 KB |
| 最終ジャッジ日時 | 2026-05-08 05:22:47 |
| 合計ジャッジ時間 | 20,311 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 24 |
ソースコード
#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
#define int long long
signed main(){
int N,Q,b;
scanf("%d%d%d",&N,&Q,&b);
fenwick_tree<int> tree1(200001);
fenwick_tree<long long> tree2(200001);
for(;N--;){
scanf("%d",&b);
tree1.add(b,1);
tree2.add(b,b);
}
bool check=false;
for(;Q--;){
scanf("%d",&b);
if(b==3){
scanf("%d",&b);
continue;
}
if(b==2){
check=true;
int l,r;
scanf("%d%d",&l,&r);
printf("%d %lld\n",tree1.sum(l,r+1),tree2.sum(l,r+1));
continue;
}
int l;
scanf("%d",&l);
tree1.add(l,1);
tree2.add(l,l);
}
if(!check){
printf("Not Find!\n");
}
}
highlighter