diff options
Diffstat (limited to 'others/volume1/040.pas')
-rw-r--r-- | others/volume1/040.pas | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/others/volume1/040.pas b/others/volume1/040.pas new file mode 100644 index 0000000..919304c --- /dev/null +++ b/others/volume1/040.pas @@ -0,0 +1,27 @@ +var + n, i, c: int16; + x, a, b: int32; + s: array of boolean; + +begin + c := 0; + readln(n, x); + setlength(s, n); + for i := 0 to n - 1 do + s[i] := false; + for i := 0 to n - 1 do + begin + readln(a, b); + if (a <= x) and + (x <= b) then + begin + inc(c); + s[i] := true + end + end; + writeln(c); + for i := 0 to n - 1 do + if s[i] then + write(i + 1, ' '); + writeln +end. |