結果
| 問題 | No.2154 あさかつの参加人数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-09 21:38:30 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 378 bytes |
| 記録 | |
| コンパイル時間 | 2,713 ms |
| コンパイル使用メモリ | 81,352 KB |
| 実行使用メモリ | 61,972 KB |
| 最終ジャッジ日時 | 2026-05-02 06:09:47 |
| 合計ジャッジ時間 | 33,648 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 25 |
ソースコード
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
int[] sum = new int[N];
while(M-->0){
int L = sc.nextInt();
sum[N-L]++;
int R = sc.nextInt();
sum[N-R]--;
}
int now = 0;
for(int sub:sum){
now += sub;
System.out.println(now);
}
}
}