Sponsors

Tag: problem: (C) Bus Solution In C/C++

Codeforces Round #436 (Div....

#include <bits/stdc++.h> using namespace std; int main(){ int k,sum=0,end,cap,f,tank; for(cin>>end>>cap>>f>>k,tank=cap;k--;f=end-f) if(tank<f||cap<end-f) return cout<<-1,0; else if(tank>=end+(k?end-f:0))...

Advertisement

spot_img