You are viewing a single comment's thread. Return to all comments →
#include <bits/stdc++.h> using namespace std; int main(){ long n,m,a,b,c; cin>>n>>m; long int count=0; for(int i=0; i<m; i++){ cin>>a>>b>>c; count += (b - a+1) * c; } cout<< count/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 →