# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
15217 | BothEarRim | 분배 (kriii3_Q) | C++98 | 8 ms | 1720 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |