From 28fbb2433bf4baff80c3d27fd4eeb6b19742a320 Mon Sep 17 00:00:00 2001 From: chahatagrawal117 <42664727+chahatagrawal117@users.noreply.github.com> Date: Mon, 21 Oct 2019 14:30:39 +0530 Subject: [PATCH] Update shortest distance bw two node.cpp Added fast Input/Output to the code for it to calculate shortest distance for a dataset of 10^7 elements(previous constraint was 10^6). --- shortest distance bw two node.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shortest distance bw two node.cpp b/shortest distance bw two node.cpp index ffcd900da..f90edfea0 100644 --- a/shortest distance bw two node.cpp +++ b/shortest distance bw two node.cpp @@ -56,6 +56,9 @@ void psd(vector adj[], int src, int des, int v){ int main() { + ios_base::sync_with_stdio(0); + cin.tie(0); + cout.tie(0); int v = 8; vector adj[v]; add_edge(adj, 0, 1);