提出 #69114844


ソースコード 拡げる

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(), v.end()

int main() {
  ll N, K;
  cin >> N >> K;

  ll len = 1<<N;
  vector<ll> ans(len);
  rep(i, 0, len) {
    ans[i] = K*(i+1)/len-K*i/len;
  }

  if (K%len == 0) cout << 0 << endl;
  else cout << 1 << endl;
  rep(i, 0, len) cout << ans[i] << " ";
  cout << endl;
}

提出情報

提出日時
問題 D - Least Unbalanced
ユーザ oogiri
言語 C++ 20 (gcc 12.2)
得点 400
コード長 491 Byte
結果 AC
実行時間 70 ms
メモリ 12840 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 2
AC × 25
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3572 KiB
00_sample_01.txt AC 1 ms 3608 KiB
01_random_00.txt AC 1 ms 3496 KiB
01_random_01.txt AC 1 ms 3484 KiB
01_random_02.txt AC 1 ms 3408 KiB
01_random_03.txt AC 1 ms 3540 KiB
01_random_04.txt AC 1 ms 3500 KiB
01_random_05.txt AC 1 ms 3580 KiB
01_random_06.txt AC 1 ms 3508 KiB
01_random_07.txt AC 1 ms 3536 KiB
01_random_08.txt AC 1 ms 3508 KiB
01_random_09.txt AC 1 ms 3524 KiB
01_random_10.txt AC 1 ms 3556 KiB
01_random_11.txt AC 1 ms 3728 KiB
01_random_12.txt AC 2 ms 3596 KiB
01_random_13.txt AC 2 ms 3508 KiB
01_random_14.txt AC 3 ms 3500 KiB
01_random_15.txt AC 5 ms 3628 KiB
01_random_16.txt AC 10 ms 4244 KiB
01_random_17.txt AC 19 ms 5180 KiB
01_random_18.txt AC 35 ms 7376 KiB
01_random_19.txt AC 70 ms 12840 KiB
01_random_20.txt AC 2 ms 3488 KiB
01_random_21.txt AC 5 ms 3608 KiB
01_random_22.txt AC 1 ms 3616 KiB