Pagini recente » Cod sursa (job #261954) | Cod sursa (job #2335223) | Istoria paginii runda/oni_2012_ziua1_clasele_xi-xii | Cod sursa (job #306660) | Cod sursa (job #2970547)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("inundatii.in");
ofstream fout("inundatii.out");
long long ans , n , x , y , z , lx , ly , lz;
int main()
{
fin >> n >> lx >> ly >> lz;
for(int i = 1 ; i < n ; ++ i){
fin >> x >> y >> z;
x -= i , y -= i , z -= i;
ans = ans + lx + ly + lz - x - y - z;
}
fout << ans << '\n';
return 0;
}