Codeforces Round 952 (Div. 4) | Maximum Multiple Sum | Good Prefixes | Manhattan Circle
ฝัง
- เผยแพร่เมื่อ 8 ก.ย. 2024
- 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
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
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 ?
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
@@LearnCodeHS yeah but do we need i/p array , i mean we can do it withkut ip array right
@@ishaansharma6553you can but. Input array se tc pr frk nhi padga and What other operations you perform are taken into consideration TC analysis
@@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
@@ishaansharma6553 That's even nice bro. I couldn't think of it during contest