You are viewing a single comment's thread. Return to all comments →
#include<iostream> using namespace std; int main(){ long n,q,sum=0; cin>>n>>q; for(int i=0;i<q;i++){ long a,b,c; cin>>a>>b>>c; sum+=(b-a+1)*c; } cout<<sum/n; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Filling Jars
You are viewing a single comment's thread. Return to all comments →