結果
| 問題 | No.1318 ABCD quadruplets |
| コンテスト | |
| ユーザー |
tatyam
|
| 提出日時 | 2020-07-12 03:54:13 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 539 bytes |
| 記録 | |
| コンパイル時間 | 1,957 ms |
| コンパイル使用メモリ | 232,748 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2026-06-11 08:26:15 |
| 合計ジャッジ時間 | 17,449 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 TLE * 3 |
ソースコード
#pragma GCC target("avx")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using uint = uint32_t;
int main(){
uint n, m;
cin >> n >> m;
uint ans[1600001] = {};
for(uint a = 0; a <= m; a++) for(uint b = 0; b <= m; b++) for(uint c = 0; c <= m; c++){
uint x = a * a + a * b + a * c + b * b + b * c + c * c;
uint y = a + b + c;
for(uint d = 0, k = x; d <= m && k <= n; d++, k += y + d + d - 1) ans[k]++;
}
for(uint i = 0; i <= n; i++) printf("%u\n", ans[i]);
}
tatyam