結果
問題 | No.2942 Sigma Music Game Level Problem |
ユーザー |
![]() |
提出日時 | 2024-09-29 12:44:29 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 637 bytes |
コンパイル時間 | 6,554 ms |
コンパイル使用メモリ | 336,764 KB |
実行使用メモリ | 5,760 KB |
最終ジャッジ日時 | 2024-11-07 21:55:12 |
合計ジャッジ時間 | 22,421 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 21 WA * 3 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll=long long;#include <atcoder/all>using namespace atcoder;int main(){int n,q,l;cin>>n>>q>>l;fenwick_tree<int> sum(200001);fenwick_tree<ll> level(200001);bool query2=false;for(int i=0;i<n;i++){int a;cin>>a;sum.add(a,1);level.add(a,a);}for(int i=0;i<q;i++){int t;cin>>t;if(t==1){int l;cin>>l;sum.add(l,1);level.add(l,l);}if(t==2){query2=true;int l,r;cin>>l>>r;cout<<sum.sum(l,r+1)<<' '<<level.sum(l,r+1)<<endl;}if(t==3){int l;cin>>l;}}if(!query2)cout<<"Not Find!\n";}