# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15251 | kyma123 | 분배 (kriii3_Q) | C++98 | 27 ms | 1112 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#include <vector>
#include <math.h>
using namespace std;
vector<int> num;
int main(){
int n, k;
scanf("%d %d",&n, &k);
for(int i=0;i<powf(2,k);i++){
for(int j=0;j<powf(2,n-k-1);j++){
printf("%d ", i*(int)powf(2,n-k-1)+j);
printf("%d ", (int)powf(2,n)-1-i*(int)powf(2,n-k-1)-j);
}
putchar('\n');
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |