Codeforces Round 952 (Div. 4) | Maximum Multiple Sum | Good Prefixes | Manhattan Circle

Codeforces Round 952 (Div. 4) | Maximum Multiple Sum | Good Prefixes | Manhattan Circle
Codeforces Round 952 (Div. 4) - Live Solving
#coding
#programming
#competitive programming
#software developer
#software engineer
#interview preparation
#interview experience
#dsa
#132

Пікірлер: 9

  • @LearnCodeHS
    @LearnCodeHSАй бұрын

    D. Manhattan Circle #include using namespace std; //check you variables naming,can be repeating #define int long long int void solve(){ int n,m; cin>>n>>m; vector v(n,vector(m)); for(int i=0;iv[i][j]; } } int io=0; int jo=0; int cnt=0; bool f=true; for(int i=0;i

  • @ishaansharma6553
    @ishaansharma6553Ай бұрын

    do we need to create an array in manhattan circle , it only increases time complexity , we can do the que without it also . And i am an beginner in cf so can you suggest why you use signed main etc is there any boilerplate code or something to do this ?

  • @LearnCodeHS

    @LearnCodeHS

    Ай бұрын

    The only array I have is the input array. Didn't get you? yes its a boilerplate code and because I am using macro #define int long long , the main function cannot have return type long long , so used 'signed' because signed and int both are same

  • @ishaansharma6553

    @ishaansharma6553

    Ай бұрын

    @@LearnCodeHS yeah but do we need i/p array , i mean we can do it withkut ip array right

  • @LearnCodeHS

    @LearnCodeHS

    Ай бұрын

    @@ishaansharma6553you can but. Input array se tc pr frk nhi padga and What other operations you perform are taken into consideration TC analysis

  • @ishaansharma6553

    @ishaansharma6553

    Ай бұрын

    @@LearnCodeHS you took i/p array and traversed on it for result , i just computed answer in input itself and didnt store it like other

  • @LearnCodeHS

    @LearnCodeHS

    Ай бұрын

    @@ishaansharma6553 That's even nice bro. I couldn't think of it during contest