第六周A题 - 几何概型 Time Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Description 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…
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. You wanted to see y…
#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()…