Submission #15268

#TimeUsernameProblemLanguageResultExecution timeMemory
15268ainta분배 (kriii3_Q)C++98
24 / 24
16 ms3140 KiB
#include<stdio.h> #include<vector> #include<algorithm> using namespace std; int n, K; vector<int>E[65536]; int main() { scanf("%d%d",&n,&K); int i, j, cnt = 0; for(i=0;i<(1<<K);i++){ for(j=0;j<(1<<n-K-1);j++){ E[i].push_back(cnt); cnt++; } } cnt = (1<<n); for(i=0;i<(1<<K);i++){ for(j=0;j<(1<<n-K-1);j++){ cnt--; E[i].push_back(cnt); } } for(i=0;i<(1<<K);i++){ for(j=0;j<E[i].size();j++)printf("%d ",E[i][j]); printf("\n"); } }
#Verdict Execution timeMemoryGrader output
Fetching results...