結果

問題 No.2154 あさかつの参加人数
ユーザー 沙耶花沙耶花
提出日時 2022-12-09 21:22:34
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 1,061 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 4,834 ms
コンパイル使用メモリ 255,336 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-22 19:23:27
合計ジャッジ時間 26,363 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 995 ms
5,248 KB
testcase_01 AC 1,023 ms
5,376 KB
testcase_02 AC 1,061 ms
5,376 KB
testcase_03 AC 1,022 ms
5,376 KB
testcase_04 AC 982 ms
5,376 KB
testcase_05 AC 174 ms
5,376 KB
testcase_06 AC 598 ms
5,376 KB
testcase_07 AC 582 ms
5,376 KB
testcase_08 AC 614 ms
5,376 KB
testcase_09 AC 369 ms
5,376 KB
testcase_10 AC 506 ms
5,376 KB
testcase_11 AC 855 ms
5,376 KB
testcase_12 AC 602 ms
5,376 KB
testcase_13 AC 281 ms
5,376 KB
testcase_14 AC 601 ms
5,376 KB
testcase_15 AC 569 ms
5,376 KB
testcase_16 AC 665 ms
5,376 KB
testcase_17 AC 623 ms
5,376 KB
testcase_18 AC 754 ms
5,376 KB
testcase_19 AC 82 ms
5,376 KB
testcase_20 AC 708 ms
5,376 KB
testcase_21 AC 314 ms
5,376 KB
testcase_22 AC 621 ms
5,376 KB
testcase_23 AC 759 ms
5,376 KB
testcase_24 AC 882 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001



int main(){
	
	int n,m;
	cin>>n>>m;
	
	vector a(n+2,0);
	rep(i,m){
		int x,y;
		cin>>x>>y;
		x = n-x;
		a[x] ++;
		y = n-y+1;
		a[y] --;
	}
	rep(i,n)a[i+1] += a[i];
	rep(i,n){
		cout<<a[i]<<endl;
	}
	
	return 0;
}
0