結果

問題 No.2154 あさかつの参加人数
ユーザー chestnut_68chestnut_68
提出日時 2022-12-10 00:39:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 1,008 ms / 2,000 ms
コード長 738 bytes
コンパイル時間 4,040 ms
コンパイル使用メモリ 223,656 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-04-22 23:29:16
合計ジャッジ時間 25,193 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,002 ms
6,816 KB
testcase_01 AC 1,008 ms
6,940 KB
testcase_02 AC 997 ms
6,940 KB
testcase_03 AC 993 ms
6,940 KB
testcase_04 AC 990 ms
6,940 KB
testcase_05 AC 174 ms
5,376 KB
testcase_06 AC 561 ms
5,376 KB
testcase_07 AC 561 ms
5,376 KB
testcase_08 AC 617 ms
5,376 KB
testcase_09 AC 355 ms
5,376 KB
testcase_10 AC 508 ms
5,376 KB
testcase_11 AC 876 ms
5,376 KB
testcase_12 AC 620 ms
5,376 KB
testcase_13 AC 287 ms
5,376 KB
testcase_14 AC 616 ms
5,376 KB
testcase_15 AC 577 ms
5,376 KB
testcase_16 AC 678 ms
5,376 KB
testcase_17 AC 651 ms
5,376 KB
testcase_18 AC 779 ms
5,376 KB
testcase_19 AC 82 ms
5,376 KB
testcase_20 AC 728 ms
5,376 KB
testcase_21 AC 321 ms
5,376 KB
testcase_22 AC 618 ms
5,376 KB
testcase_23 AC 761 ms
5,376 KB
testcase_24 AC 883 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint1000000007;
using namespace std;
#define rep1(a)          for(int z = 0; z < a; z++)
#define rep2(i, a)       for(int i = 0; i < a; i++)
#define rep3(i, a, b)    for(int i = a; i < b; i++)
#define rep4(i, a, b, c) for(int i = a; i < b; i += c)
#define overload4(a, b, c, d, e, ...) e
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
const int MOD=1e9+7;
const int64_t INF = 1LL<<60;
int main(){
	int N,M;cin>>N>>M;
	vector<int> A(N+2,0);
	rep(M){
		int L,R;cin>>L>>R;
		L--,R--;
		A[R]++;
		A[L+1]--;
	}
	rep(i,N){
		A[i+1]+=A[i];
		//cout<<A[i]<<endl;
	}
	reverse(A.begin(),A.end());
	rep(i,2,N+2)cout<<A[i]<<endl;
}
0