結果

問題 No.810 割った余りの個数
ユーザー mzkrmzkr
提出日時 2019-05-06 05:53:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 64,364 KB
実行使用メモリ 101,872 KB
最終ジャッジ日時 2023-09-09 04:24:43
合計ジャッジ時間 35,647 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,199 ms
4,380 KB
testcase_01 AC 1,198 ms
4,380 KB
testcase_02 WA -
testcase_03 AC 1,201 ms
4,376 KB
testcase_04 AC 1,200 ms
4,376 KB
testcase_05 AC 1,198 ms
4,380 KB
testcase_06 AC 1,198 ms
4,376 KB
testcase_07 WA -
testcase_08 AC 1,198 ms
4,380 KB
testcase_09 AC 1,199 ms
4,376 KB
testcase_10 AC 1,200 ms
4,376 KB
testcase_11 AC 1,199 ms
4,380 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1,199 ms
4,380 KB
testcase_15 AC 1,199 ms
4,376 KB
testcase_16 AC 1,199 ms
4,376 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1,200 ms
4,380 KB
testcase_20 TLE -
testcase_21 TLE -
testcase_22 AC 1,563 ms
4,376 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

uint8_t d[130000000];

int main() {
  int l, r, m;
  cin >> l >> r >> m;
  for (int i = l; i <= r; ++i) {
    d[i % m / 8] |= 1 << i % m % 8;
  }

  int c = 0;
  for (int i = 0; i < 130000000; ++i) {
    for (int j = 0; j < 8; ++j) {
      if (d[i] << j >> 7) c++;
    }
  }
  cout << c << endl;
  return 0;
}
0