結果
| 問題 | No.1995 CHIKA Road |
| コンテスト | |
| ユーザー |
kokatsu
|
| 提出日時 | 2022-07-01 22:33:00 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 2,000 ms |
| + 171µs | |
| コード長 | 385 bytes |
| 記録 | |
| コンパイル時間 | 1,168 ms |
| コンパイル使用メモリ | 196,608 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-27 05:24:55 |
| 合計ジャッジ時間 | 4,375 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/core/checkedint.d(814): Warning: cannot inline function `core.checkedint.mulu!().mulu`
ulong mulu()(ulong x, uint y, ref bool overflow)
^
ソースコード
import std;
void main() {
long N, M;
readf("%d %d\n", N, M);
auto A = new long[](M), B = new long[](M);
foreach (i; 0 .. M) readf("%d %d\n", A[i], B[i]);
zip(A, B).sort!"a[1] < b[1]";
long cnt = 1, pos = B[0];
foreach (i; 1 .. M) {
if (pos > A[i]) continue;
++cnt, pos = B[i];
}
long res = (N - 1) * 2 - cnt;
res.writeln;
}
kokatsu