Submission #15420051


Source Code Expand

Copy
// dfmt off
T lread(T=long)(){return readln.chomp.to!T;}T[] lreads(T=long)(long n){return iota(n).map!((_)=>lread!T).array;}
T[] aryread(T=long)(){return readln.split.to!(T[]);}void arywrite(T)(T a){a.map!text.join(' ').writeln;}
void scan(L...)(ref L A){auto l=readln.split;foreach(i,T;L){A[i]=l[i].to!T;}}alias sread=()=>readln.chomp();
void dprint(L...)(lazy L A){debug{auto l=new string[](L.length);static foreach(i,a;A)l[i]=a.text;arywrite(l);}}
alias PQueue(T,alias l="b<a")=BinaryHeap!(Array!T,l);import std, core.bitop;
// dfmt on
immutable string YES = "Yes";
immutable string NO = "No";
void main()
{
    auto input = stdin.byLine.map!split.joiner;

    long N;
    N = input.front.to!long;
    input.popFront;

    long K;
    K = input.front.to!long;
    input.popFront;

    long[] A = new long[](cast(size_t)(N));
    foreach (i; 0 .. cast(size_t)(N))
    {
        A[i] = input.front.to!long;
        input.popFront;
    }

    solve(N, K, A);
}

void solve(long N, long K, long[] A)
{
    foreach (i; K .. N)
    {
        writeln(A[i - K] < A[i] ? YES : NO);
    }
}

Submission Info

Submission Time
Task C - Marks
User kotet
Language D (DMD 2.091.0)
Score 300
Code Size 1084 Byte
Status AC
Exec Time 100 ms
Memory 18604 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 20
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
in01.txt AC 9 ms 3696 KB
in02.txt AC 79 ms 14276 KB
in03.txt AC 79 ms 14124 KB
in04.txt AC 79 ms 14040 KB
in05.txt AC 77 ms 14184 KB
in06.txt AC 94 ms 14196 KB
in07.txt AC 90 ms 14240 KB
in08.txt AC 64 ms 14332 KB
in09.txt AC 66 ms 14196 KB
in10.txt AC 81 ms 14184 KB
in11.txt AC 80 ms 14132 KB
in12.txt AC 89 ms 18604 KB
in13.txt AC 100 ms 18556 KB
in14.txt AC 70 ms 18364 KB
in15.txt AC 67 ms 18400 KB
in16.txt AC 5 ms 3492 KB
in17.txt AC 7 ms 3632 KB
sample_01.txt AC 2 ms 3680 KB
sample_02.txt AC 2 ms 3632 KB
sample_03.txt AC 2 ms 3580 KB