結果

問題 No.2942 Sigma Music Game Level Problem
ユーザー highlighterhighlighter
提出日時 2024-09-17 10:56:16
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 692 bytes
コンパイル時間 5,758 ms
コンパイル使用メモリ 309,768 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-06 10:49:02
合計ジャッジ時間 12,210 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 3 ms
5,248 KB
testcase_03 WA -
testcase_04 AC 2 ms
5,248 KB
testcase_05 AC 2 ms
5,248 KB
testcase_06 AC 3 ms
5,248 KB
testcase_07 AC 3 ms
5,248 KB
testcase_08 AC 3 ms
5,248 KB
testcase_09 AC 3 ms
5,248 KB
testcase_10 AC 3 ms
5,248 KB
testcase_11 AC 166 ms
5,248 KB
testcase_12 WA -
testcase_13 AC 334 ms
5,248 KB
testcase_14 AC 189 ms
5,248 KB
testcase_15 AC 138 ms
5,248 KB
testcase_16 AC 298 ms
5,248 KB
testcase_17 AC 76 ms
5,248 KB
testcase_18 AC 233 ms
5,248 KB
testcase_19 AC 399 ms
5,248 KB
testcase_20 AC 117 ms
5,248 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 124 ms
6,816 KB
testcase_24 AC 3 ms
6,816 KB
testcase_25 AC 3 ms
6,816 KB
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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<long long> tree(200001);
	for(;N--;){
		scanf("%d",&b);
		tree.add(b,1LL);
		tree.add(b,(long long)(b)*1000001LL);
	}
	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);
			long long ans=tree.sum(l,r+1);
			printf("%lld %lld\n",ans%1000001LL,ans/1000001LL);
			continue;
		}
		long long l;
		scanf("%lld",&l);
		tree.add(l,1LL);
		tree.add(l,l*1000001LL);
	}
	if(!check){
		printf("Not Find!\n");
	}
}
0