Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- int main()
- {
- int t;
- cin>>t;
- for(int i=1; i<=t; i++)
- {
- int a=0,b=0,c=0,d=100000,e=100000,f=100000;
- int n;
- cin>>n;
- while(n--)
- {
- int x1,y1,z1,x2,y2,z2;
- cin>>x1>>y1>>z1>>x2>>y2>>z2;
- a=max(a,x1);
- b=max(b,y1);
- c=max(c,z1);
- d=min(d,x2);
- e=min(e,y2);
- f=min(f,z2);
- //cout<<d<<" "<<e<<" "<<f<<endl;
- }
- int k=0, val=(d-a)*(e-b)*(f-c);
- val=max(val,k);
- printf("Case %d: %d\n",i,val);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement