Cod sursa(job #3004985)
Utilizator | Data | 16 martie 2023 18:37:26 | |
---|---|---|---|
Problema | Submultimi | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.26 kb |
#include<fstream>
using namespace std;
ifstream F("submultimi.in");
ofstream G("submultimi.out");
int n,i,j;
int main()
{
for(F>>n,i=1;i<(1<<n);G<<'\n',++i)
for(j=0;j<n;++j)
if(i&(1<<j))
G<<j+1<<' ';
return 0;
}