Joining with Friend You are going from Dhaka to Chittagong by train and you came to know one of your old friends is going from city Chittagong to Sylhet. You also know that both the trains will have a stoppage at junction Akhaura at almost same time.…
11722 - Joining with Friend You are going from Dhaka to Chittagong by train and you came to know one of your old friends is goingfrom city Chittagong to Sylhet. You also know that both the trains will have a stoppage at junctionAkhaura at almost same…
#include<bits/stdc++.h> using namespace std; int t1,t2,s1,s2,w; int get(int b) { ; int d=s2-s1; int y=s2-b; ; if(y<=t1+d) return (y-t1)*(y-t1); if(y<=t2) return d*(y-t1+y-t1-d); if(y<=t2+d) return s-(t2+d-y)*(t2+d-y); return s; } int main()…
链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2769&mosmsg=Submission+received+with+ID+13959080 Problem J: Joining with Friend You are going from Dhaka to Chittagong by train…