# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15217 | BothEarRim | 분배 (kriii3_Q) | C++98 | 8 ms | 1720 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 <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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |