This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
int n; cin>>n; | |
std::vector<pair <int, pair<string, int>>> apiData; | |
for(int i = 0; i < n;i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author : MrTwinkleSharma | |
#include<climits> | |
#include<iostream> | |
using namespace std; | |
const int N = 200010; | |
int children[N], | |
nextChild[N], | |
cumulativeResourcesOfCity[N], | |
resourcesPerCity[N], toCity[N], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
//Dimension of city | |
int m,n; | |
//Just a flag to be used for storing record of place which was visited | |
bool visited[10001][10001]; | |
//To Represent Mumbai City |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
//Graph Data Structure | |
unordered_map<int,vector<int>> adjList_Graph1,adjList_Graph2; | |
int cities_covered = 0; | |
void FunctionForGraph1(int i,vector<bool>& flag, stack<int>& mystack) |