Codeforces Round #104 (Div. 2) D

来源:互联网 发布:淘宝升级天猫 编辑:程序博客网 时间:2024/04/25 02:29

简单贪心,数字小的放前面

#include<iostream>#include<vector>#include<algorithm>#include<cstdio>#include<queue>#include<stack>#include<string>#include<map>#include<set>#include<iomanip>#include<cassert>using namespace std;const int inf = 0x3f3f3f3f;const double oo = 10e9;const double eps = 10e-7;const int maxn=2123456;int a1,a2,a3,a4;string z;int abs(int a){    if(a<0)    {        return -a;    }    return a;}bool yes1(){     if(a1>=a3 && a2>=a3)    {           return true;    }    return false;             }bool yes2(){    if(a1>=a4 && a2>=a4)    {        return true;    }    return false;}bool yes3(){    if(a1-a3>=1 && a2>=a3)     {        return true;    }     return false;}bool yes4(){    if(a1>=a3 && a2-a3>=1)    {        return true;    }    return false;}int fuck(){    z.clear();    if( a3>a4 )     {           if(!yes1())        {            return 0;        }        else return 1;       }       else if ( a3<a4 )    {        if(!yes2())        {            return 0;        }               else        {            return 2;        }    }     else if(a3==a4)    {        if(yes3())        {            return 3;        }        else        {            if(yes4())            {                return 4;            }            else            {                return 0;            }        }    }    assert(false);}    int main(){    int temp;    while(cin>>a1>>a2>>a3>>a4)    {        if( abs(a3-a4) >=2 )        {            cout<<"-1"<<endl;        }        else        {            temp=fuck();            if(temp == 1)            {                for(int i=1;i<=a1-a3;i++)                {                    printf("4");                }                for(int i=1;i<=a3;i++)                {                    printf("47");                }                for(int i=1;i<=a2-a3;i++)                {                       printf("7");                }                cout<<endl;            }            else if(temp==2)            {                printf("74");                 for(int i=1;i<=a1-a4;i++)                {                    printf("4");                }                                           for(int i=1;i<=a4-2;i++)                {                    printf("74");                }                for(int i=1;i<=a2-a4;i++)                {                    printf("7");                }                printf("74");                cout<<endl;            }            else if(temp==3)            {                for(int i=1;i<=a1-a3-1;i++)                {                    printf("4");                }                for(int i=1;i<=a3;i++)                {                    printf("47");                }                for(int i=1;i<=a2-a3;i++)                {                    printf("7");                }                printf("4\n");            }                    else if(temp==4)            {                   printf("7");                for(int i=1;i<=a1-a3;i++)                {                    printf("4");                }                for(int i=1;i<=a3;i++)                {                    printf("47");                }                for(int i=1;i<=a2-a3-1;i++)                {                                   printf("7");                }                cout<<endl;            }                else if(temp==0)            {                cout<<"-1"<<endl;            }        }    }    return 0;   }→Judgement ProtocolTest: #1, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 1 1Output4774Answer4774Checker Logok answer is 4774Test: #1, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 1 1Output4774Answer4774Checker Logok answer is 4774Test: #2, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 7 3 1Output-1Answer-1Checker Logok answer is -1Test: #2, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 7 3 1Output-1Answer-1Checker Logok answer is -1Test: #3, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 7 4 7Output-1Answer-1Checker Logok answer is -1Test: #3, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 7 4 7Output-1Answer-1Checker Logok answer is -1Test: #4, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1 1 1Output-1Answer-1Checker Logok answer is -1Test: #4, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1 1 1Output-1Answer-1Checker Logok answer is -1Test: #5, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 1 2Output7474Answer7474Checker Logok answer is 7474Test: #5, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 1 2Output7474Answer7474Checker Logok answer is 7474Test: #6, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1 2 1Output-1Answer-1Checker Logok answer is -1Test: #6, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1 2 1Output-1Answer-1Checker Logok answer is -1Test: #7, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 2 1Output4747Answer4747Checker Logok answer is 4747Test: #7, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 2 1Output4747Answer4747Checker Logok answer is 4747Test: #8, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 3 1 1Output447774Answer447774Checker Logok answer is 447774Test: #8, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 3 1 1Output447774Answer447774Checker Logok answer is 447774Test: #9, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 2 1 2Output74474Answer74474Checker Logok answer is 74474Test: #9, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 2 1 2Output74474Answer74474Checker Logok answer is 74474Test: #10, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1 3 1Output-1Answer-1Checker Logok answer is -1Test: #10, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1 3 1Output-1Answer-1Checker Logok answer is -1Test: #11, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 7 1 1Output44444477777774Answer44444477777774Checker Logok answer is 44444477777774Test: #11, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 7 1 1Output44444477777774Answer44444477777774Checker Logok answer is 44444477777774Test: #12, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 7 2 1Output44474777777Answer44474777777Checker Logok answer is 44474777777Test: #12, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 7 2 1Output44474777777Answer44474777777Checker Logok answer is 44474777777Test: #13, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 3 2 2Output474774Answer474774Checker Logok answer is 474774Test: #13, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 3 2 2Output474774Answer474774Checker Logok answer is 474774Test: #14, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 3 2 1Output4447477Answer4447477Checker Logok answer is 4447477Test: #14, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 3 2 1Output4447477Answer4447477Checker Logok answer is 4447477Test: #15, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 2 2Output44747774Answer44747774Checker Logok answer is 44747774Test: #15, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 2 2Output44747774Answer44747774Checker Logok answer is 44747774Test: #16, time: 170 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #16, time: 170 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #17, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444474Test: #17, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444474Test: #18, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 3 5Output-1Answer-1Checker Logok answer is -1Test: #18, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 3 5Output-1Answer-1Checker Logok answer is -1Test: #19, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 3 7Output-1Answer-1Checker Logok answer is -1Test: #19, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 3 7Output-1Answer-1Checker Logok answer is -1Test: #20, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 7 1 1Output74777777Answer74777777Checker Logok answer is 74777777Test: #20, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 7 1 1Output74777777Answer74777777Checker Logok answer is 74777777Test: #21, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput8 3 2 1Output44444447477Answer44444447477Checker Logok answer is 44444447477Test: #21, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput8 3 2 1Output44444447477Answer44444447477Checker Logok answer is 44444447477Test: #22, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1000000 1000000Output-1Answer-1Checker Logok answer is -1Test: #22, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1000000 1000000Output-1Answer-1Checker Logok answer is -1Test: #23, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4584 45854 25 685Output-1Answer-1Checker Logok answer is -1Test: #23, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4584 45854 25 685Output-1Answer-1Checker Logok answer is -1Test: #24, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1 1 2Output-1Answer-1Checker Logok answer is -1Test: #24, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1 1 2Output-1Answer-1Checker Logok answer is -1Test: #25, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 1000000 3 1Output-1Answer-1Checker Logok answer is -1Test: #25, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 1000000 3 1Output-1Answer-1Checker Logok answer is -1Test: #26, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 58458 2 1Output444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 444747777777777777777777777777...7777777777777777777777777777777Test: #26, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 58458 2 1Output444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 444747777777777777777777777777...7777777777777777777777777777777Test: #27, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput845 8549 54 8Output-1Answer-1Checker Logok answer is -1Test: #27, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput845 8549 54 8Output-1Answer-1Checker Logok answer is -1Test: #28, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 100000 100000Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #28, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 100000 100000Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #29, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 499 500Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #29, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 499 500Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #30, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 100000 100001Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #30, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 100000 100001Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #31, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput845488 44884 9945 9944Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #31, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput845488 44884 9945 9944Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #32, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 7 4 5Output74447474747774Answer74447474747774Checker Logok answer is 74447474747774Test: #32, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 7 4 5Output74447474747774Answer74447474747774Checker Logok answer is 74447474747774Test: #33, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 8 5 4Output444747474747777Answer444747474747777Checker Logok answer is 444747474747777Test: #33, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 8 5 4Output444747474747777Answer444747474747777Checker Logok answer is 444747474747777Test: #34, time: 130 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 400000 400001Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #34, time: 130 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 400000 400001Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #35, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4585 4588 98 99Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #35, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4585 4588 98 99Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #36, time: 110 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 2 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444774Test: #36, time: 110 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 2 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444774Test: #37, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 100000 1 2Output747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 747777777777777777777777777777...7777777777777777777777777777774Test: #37, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 100000 1 2Output747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 747777777777777777777777777777...7777777777777777777777777777774Test: #38, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput86451 754 85 84Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #38, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput86451 754 85 84Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #39, time: 50 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput98654 4844 1001 1000Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #39, time: 50 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput98654 4844 1001 1000Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #40, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput5 5 1 2Output7444477774Answer7444477774Checker Logok answer is 7444477774Test: #40, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput5 5 1 2Output7444477774Answer7444477774Checker Logok answer is 7444477774Test: #41, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput5 5 2 1Output4444747777Answer4444747777Checker Logok answer is 4444747777Test: #41, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput5 5 2 1Output4444747777Answer4444747777Checker Logok answer is 4444747777Test: #42, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 1 1Output44477774Answer44477774Checker Logok answer is 44477774Test: #42, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 1 1Output44477774Answer44477774Checker Logok answer is 44477774Test: #43, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 2 2Output44747774Answer44747774Checker Logok answer is 44747774Test: #43, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 2 2Output44747774Answer44747774Checker Logok answer is 44747774Test: #44, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 3 3Output47474774Answer47474774Checker Logok answer is 47474774Test: #44, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput4 4 3 3Output47474774Answer47474774Checker Logok answer is 47474774Test: #45, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 9 4 5Output7444444747474777774Answer7444444747474777774Checker Logok answer is 7444444747474777774Test: #45, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 9 4 5Output7444444747474777774Answer7444444747474777774Checker Logok answer is 7444444747474777774Test: #46, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput100 100 4 5Output74444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Answer74444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #46, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput100 100 4 5Output74444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Answer74444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #47, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1 2Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #47, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1 2Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #48, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 47 46Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #48, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 47 46Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #49, time: 110 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 999999 1000000Output747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Answer747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Checker Logok answer is 747474747474747474747474747474...4747474747474747474747474747474Test: #49, time: 110 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 999999 1000000Output747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Answer747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Checker Logok answer is 747474747474747474747474747474...4747474747474747474747474747474Test: #50, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput54585 4584 458 954Output-1Answer-1Checker Logok answer is -1Test: #50, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput54585 4584 458 954Output-1Answer-1Checker Logok answer is -1Test: #51, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 6 1 3Output-1Answer-1Checker Logok answer is -1Test: #51, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 6 1 3Output-1Answer-1Checker Logok answer is -1Test: #52, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 6 2 3Output744447477774Answer744447477774Checker Logok answer is 744447477774Test: #52, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 6 2 3Output744447477774Answer744447477774Checker Logok answer is 744447477774Test: #53, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 10 2 1Output4444474777777777Answer4444474777777777Checker Logok answer is 4444474777777777Test: #53, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 10 2 1Output4444474777777777Answer4444474777777777Checker Logok answer is 4444474777777777Test: #54, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 3 1 1Output4444447774Answer4444447774Checker Logok answer is 4444447774Test: #54, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 3 1 1Output4444447774Answer4444447774Checker Logok answer is 4444447774Test: #55, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput47 74 8 9Output7444444444444444444444444444444444444444747474747474747777777777777777777777777777777777777777777777777777777777777777774Answer7444444444444444444444444444444444444444747474747474747777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #55, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput47 74 8 9Output7444444444444444444444444444444444444444747474747474747777777777777777777777777777777777777777777777777777777777777777774Answer7444444444444444444444444444444444444444747474747474747777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #56, time: 60 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput458445 445 6 7Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #56, time: 60 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput458445 445 6 7Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #57, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 10000 10001Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #57, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 10000 10001Output744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer744444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #58, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 978 977Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #58, time: 160 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 978 977Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #59, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 1000 1 2Output744444477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer744444477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 744444477777777777777777777777...7777777777777777777777777777774Test: #59, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 1000 1 2Output744444477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer744444477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 744444477777777777777777777777...7777777777777777777777777777774Test: #60, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 10 1 1Output74777777777Answer74777777777Checker Logok answer is 74777777777Test: #60, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 10 1 1Output74777777777Answer74777777777Checker Logok answer is 74777777777Test: #61, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput70 60 20 21Output7444444444444444444444444444444444444444444444444447474747474747474747474747474747474747477777777777777777777777777777777777777774Answer7444444444444444444444444444444444444444444444444447474747474747474747474747474747474747477777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #61, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput70 60 20 21Output7444444444444444444444444444444444444444444444444447474747474747474747474747474747474747477777777777777777777777777777777777777774Answer7444444444444444444444444444444444444444444444444447474747474747474747474747474747474747477777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #62, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput57 59 3 4Output74444444444444444444444444444444444444444444444444444447474777777777777777777777777777777777777777777777777777777774Answer74444444444444444444444444444444444444444444444444444447474777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #62, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput57 59 3 4Output74444444444444444444444444444444444444444444444444444447474777777777777777777777777777777777777777777777777777777774Answer74444444444444444444444444444444444444444444444444444447474777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444444444444444444...7777777777777777777777777777774Test: #63, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 5 5Output44444747474747777774Answer44444747474747777774Checker Logok answer is 44444747474747777774Test: #63, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 5 5Output44444747474747777774Answer44444747474747777774Checker Logok answer is 44444747474747777774Test: #64, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput69 84 25 24Output444444444444444444444444444444444444444444444747474747474747474747474747474747474747474747474777777777777777777777777777777777777777777777777777777777777Answer444444444444444444444444444444444444444444444747474747474747474747474747474747474747474747474777777777777777777777777777777777777777777777777777777777777Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #64, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput69 84 25 24Output444444444444444444444444444444444444444444444747474747474747474747474747474747474747474747474777777777777777777777777777777777777777777777777777777777777Answer444444444444444444444444444444444444444444444747474747474747474747474747474747474747474747474777777777777777777777777777777777777777777777777777777777777Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777777Test: #65, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput25 94 11 12Output74444444444444474747474747474747474777777777777777777777777777777777777777777777777777777777777777777777777777777777774Answer74444444444444474747474747474747474777777777777777777777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444747474747474747...7777777777777777777777777777774Test: #65, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput25 94 11 12Output74444444444444474747474747474747474777777777777777777777777777777777777777777777777777777777777777777777777777777777774Answer74444444444444474747474747474747474777777777777777777777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 744444444444444747474747474747...7777777777777777777777777777774Test: #66, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1000000 4 5Output-1Answer-1Checker Logok answer is -1Test: #66, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1000000 4 5Output-1Answer-1Checker Logok answer is -1Test: #67, time: 80 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 1000000 2 3Output744444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer744444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 744444747777777777777777777777...7777777777777777777777777777774Test: #67, time: 80 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput7 1000000 2 3Output744444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer744444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 744444747777777777777777777777...7777777777777777777777777777774Test: #68, time: 110 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444474Test: #68, time: 110 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444474Test: #69, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput45 65 31 32Output74444444444444474747474747474747474747474747474747474747474747474747474747477777777777777777777777777777777774Answer74444444444444474747474747474747474747474747474747474747474747474747474747477777777777777777777777777777777774Checker Logok answer is 744444444444444747474747474747...7777777777777777777777777777774Test: #69, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput45 65 31 32Output74444444444444474747474747474747474747474747474747474747474747474747474747477777777777777777777777777777777774Answer74444444444444474747474747474747474747474747474747474747474747474747474747477777777777777777777777777777777774Checker Logok answer is 744444444444444747474747474747...7777777777777777777777777777774Test: #70, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput31 32 30 31Output747474747474747474747474747474747474747474747474747474747474774Answer747474747474747474747474747474747474747474747474747474747474774Checker Logok answer is 747474747474747474747474747474747474747474747474747474747474774Test: #70, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput31 32 30 31Output747474747474747474747474747474747474747474747474747474747474774Answer747474747474747474747474747474747474747474747474747474747474774Checker Logok answer is 747474747474747474747474747474747474747474747474747474747474774Test: #71, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1000000 1 1Output747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 747777777777777777777777777777...7777777777777777777777777777777Test: #71, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1000000 1 1Output747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 747777777777777777777777777777...7777777777777777777777777777777Test: #72, time: 80 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1000000 1 1Output477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 477777777777777777777777777777...7777777777777777777777777777774Test: #72, time: 80 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1000000 1 1Output477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 477777777777777777777777777777...7777777777777777777777777777774Test: #73, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput50000 1000000 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #73, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput50000 1000000 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #74, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput74544 1 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444474Test: #74, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput74544 1 1 1Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...Checker Logok answer is 444444444444444444444444444444...4444444444444444444444444444474Test: #75, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 3 4Output-1Answer-1Checker Logok answer is -1Test: #75, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 3 4Output-1Answer-1Checker Logok answer is -1Test: #76, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1000 2 1Output-1Answer-1Checker Logok answer is -1Test: #76, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 1000 2 1Output-1Answer-1Checker Logok answer is -1Test: #77, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 10 1 2Output-1Answer-1Checker Logok answer is -1Test: #77, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 10 1 2Output-1Answer-1Checker Logok answer is -1Test: #78, time: 130 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1000000 999999Output474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474...Answer474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474...Checker Logok answer is 474747474747474747474747474747...7474747474747474747474747474747Test: #78, time: 130 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1000000 1000000 1000000 999999Output474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474...Answer474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474...Checker Logok answer is 474747474747474747474747474747...7474747474747474747474747474747Test: #79, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 2 1 1Output747Answer747Checker Logok answer is 747Test: #79, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 2 1 1Output747Answer747Checker Logok answer is 747Test: #80, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1 1 1Output474Answer474Checker Logok answer is 474Test: #80, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 1 1 1Output474Answer474Checker Logok answer is 474Test: #81, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 2 1Output4747Answer4747Checker Logok answer is 4747Test: #81, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 2 1Output4747Answer4747Checker Logok answer is 4747Test: #82, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 2 2Output-1Answer-1Checker Logok answer is -1Test: #82, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 2 2 2Output-1Answer-1Checker Logok answer is -1Test: #83, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 3 1 1Output7477Answer7477Checker Logok answer is 7477Test: #83, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 3 1 1Output7477Answer7477Checker Logok answer is 7477Test: #84, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 4 1 1Output74777Answer74777Checker Logok answer is 74777Test: #84, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 4 1 1Output74777Answer74777Checker Logok answer is 74777Test: #85, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 3 2 2Output74747Answer74747Checker Logok answer is 74747Test: #85, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 3 2 2Output74747Answer74747Checker Logok answer is 74747Test: #86, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 5 2 2Output7474777Answer7474777Checker Logok answer is 7474777Test: #86, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput2 5 2 2Output7474777Answer7474777Checker Logok answer is 7474777Test: #87, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 2 2 1Output-1Answer-1Checker Logok answer is -1Test: #87, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 2 2 1Output-1Answer-1Checker Logok answer is -1Test: #88, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 100 2 2Output44444444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Answer44444444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 444444447477777777777777777777...7777777777777777777777777777774Test: #88, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 100 2 2Output44444444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Answer44444444747777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777774Checker Logok answer is 444444447477777777777777777777...7777777777777777777777777777774Test: #89, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 4 3 3Output7474747Answer7474747Checker Logok answer is 7474747Test: #89, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput3 4 3 3Output7474747Answer7474747Checker Logok answer is 7474747Test: #90, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput30 30 29 29Output474747474747474747474747474747474747474747474747474747474774Answer474747474747474747474747474747474747474747474747474747474774Checker Logok answer is 474747474747474747474747474747474747474747474747474747474774Test: #90, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput30 30 29 29Output474747474747474747474747474747474747474747474747474747474774Answer474747474747474747474747474747474747474747474747474747474774Checker Logok answer is 474747474747474747474747474747474747474747474747474747474774Test: #91, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 1 2Output74444444447777777774Answer74444444447777777774Checker Logok answer is 74444444447777777774Test: #91, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 1 2Output74444444447777777774Answer74444444447777777774Checker Logok answer is 74444444447777777774Test: #92, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput999999 1000000 999999 999999Output747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Answer747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Checker Logok answer is 747474747474747474747474747474...7474747474747474747474747474747Test: #92, time: 90 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput999999 1000000 999999 999999Output747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Answer747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747...Checker Logok answer is 747474747474747474747474747474...7474747474747474747474747474747Test: #93, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 11 1 1Output444444444777777777774Answer444444444777777777774Checker Logok answer is 444444444777777777774Test: #93, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 11 1 1Output444444444777777777774Answer444444444777777777774Checker Logok answer is 444444444777777777774Test: #94, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 2 2Output44444444747777777774Answer44444444747777777774Checker Logok answer is 44444444747777777774Test: #94, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 10 2 2Output44444444747777777774Answer44444444747777777774Checker Logok answer is 44444444747777777774Test: #95, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput100 200 5 5Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #95, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput100 200 5 5Output444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Answer444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447474747477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...Checker Logok answer is 444444444444444444444444444444...7777777777777777777777777777774Test: #96, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 11 10 10Output747474747474747474747Answer747474747474747474747Checker Logok answer is 747474747474747474747Test: #96, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput10 11 10 10Output747474747474747474747Answer747474747474747474747Checker Logok answer is 747474747474747474747Test: #97, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput5 10 2 3Output744474777777774Answer744474777777774Checker Logok answer is 744474777777774Test: #97, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput5 10 2 3Output744474777777774Answer744474777777774Checker Logok answer is 744474777777774Test: #98, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 8 1 1Output44444777777774Answer44444777777774Checker Logok answer is 44444777777774Test: #98, time: 10 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput6 8 1 1Output44444777777774Answer44444777777774Checker Logok answer is 44444777777774Test: #99, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 9 2 2Output-1Answer-1Checker Logok answer is -1Test: #99, time: 30 ms., memory: 1372 KB, exit code: 0, checker exit code: 0, verdict: OKInput1 9 2 2Output-1Answer-1Checker Logok answer is -1