Submission #15217

#TimeUsernameProblemLanguageResultExecution timeMemory
15217BothEarRim분배 (kriii3_Q)C++98
24 / 24
8 ms1720 KiB
#include <iostream> #include <sstream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <cmath> #include <utility> #include <locale> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <list> #include <set> #include <climits> #include <cfloat> #include <map> #include <functional> using namespace std; const double PI=acos(-1); int N, K; int get2_(int in) { return 1<<in; } int main() // 제3회 kriiicon { scanf("%d %d", &N, &K); int row = get2_(K), col = get2_(N-K), cnt1 = 0, cnt2 = get2_(N)-1; for(int i=0; i<row; i++) { for(int j=0; j<col; j+=2) printf("%d %d ", cnt1++, cnt2--); printf("\n"); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...