結果
| 問題 |
No.2154 あさかつの参加人数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-09 21:38:30 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 378 bytes |
| コンパイル時間 | 4,388 ms |
| コンパイル使用メモリ | 78,540 KB |
| 実行使用メモリ | 70,012 KB |
| 最終ジャッジ日時 | 2024-10-14 21:07:16 |
| 合計ジャッジ時間 | 62,389 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 7 TLE * 18 |
ソースコード
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);
}
}
}