結果

問題 No.2154 あさかつの参加人数
ユーザー 沙耶花沙耶花
提出日時 2022-12-09 21:22:34
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 875 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 4,099 ms
コンパイル使用メモリ 258,996 KB
実行使用メモリ 5,156 KB
最終ジャッジ日時 2023-08-04 21:13:27
合計ジャッジ時間 24,260 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 857 ms
4,944 KB
testcase_01 AC 852 ms
5,156 KB
testcase_02 AC 872 ms
4,940 KB
testcase_03 AC 875 ms
4,872 KB
testcase_04 AC 849 ms
4,984 KB
testcase_05 AC 142 ms
4,508 KB
testcase_06 AC 474 ms
4,376 KB
testcase_07 AC 487 ms
4,524 KB
testcase_08 AC 533 ms
4,676 KB
testcase_09 AC 324 ms
4,376 KB
testcase_10 AC 451 ms
4,396 KB
testcase_11 AC 751 ms
4,976 KB
testcase_12 AC 519 ms
4,384 KB
testcase_13 AC 249 ms
4,380 KB
testcase_14 AC 533 ms
4,400 KB
testcase_15 AC 524 ms
4,504 KB
testcase_16 AC 590 ms
4,452 KB
testcase_17 AC 563 ms
4,444 KB
testcase_18 AC 664 ms
4,392 KB
testcase_19 AC 72 ms
4,380 KB
testcase_20 AC 626 ms
4,968 KB
testcase_21 AC 287 ms
4,376 KB
testcase_22 AC 554 ms
4,908 KB
testcase_23 AC 657 ms
4,796 KB
testcase_24 AC 749 ms
4,824 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