DMD compiler is expected to support import std;
directive starting from version v2.086.0, as documented in its changelog. This may be very useful for competitive programming because just a single line of code can provide access to the whole standard library. Similar to how just a single line #include <bits/stdc++.h>
is often used in C++ solutions instead of multiple include directives.
But something seems to be wrong with the D compiler used by the codeforces platform, as can be checked via https://mirror.codeforces.com/problemset/customtest
This code gets stuck:
import std;
void main() { printf("hello\n"); }
Replacing import std;
with import std.stdio;
helps:
import std.stdio;
void main() { printf("hello\n"); }
MikeMirzayanov, could you please check what's wrong? Thanks!
PS. I would also appreciate if my solution 114610491 submitted during Educational Codeforces Round 108 (Rated for Div. 2) could be re-judged after fixing the compiler. But that's not super important in the grand scheme of things.