//Problem link>>http://www.spoj.com/problems/KIDZEE1I/
#include <iostream>
using namespace std ;
int main ()
{
int t , i , j , k ,cas=1;
cin>>t ;
while (cas<=t)
{
int x ,y , z ;
cin>>x>>y>>z ;
cout<<"Case "<<cas++<<":"<<endl ;
for (i=0 ; i<=x ;i++)
{
for (j=i+1 ; j<=y ; j++)
{
for (k=j+1 ; k<=z ; k++)
{
cout<<i<<" "<<j<<" "<<k<<endl ;
}
}
}
}
return 0;
}
#include <iostream>
using namespace std ;
int main ()
{
int t , i , j , k ,cas=1;
cin>>t ;
while (cas<=t)
{
int x ,y , z ;
cin>>x>>y>>z ;
cout<<"Case "<<cas++<<":"<<endl ;
for (i=0 ; i<=x ;i++)
{
for (j=i+1 ; j<=y ; j++)
{
for (k=j+1 ; k<=z ; k++)
{
cout<<i<<" "<<j<<" "<<k<<endl ;
}
}
}
}
return 0;
}
No comments:
Post a Comment