結果

問題 No.1318 ABCD quadruplets
ユーザー auauaauaua
提出日時 2020-12-19 14:28:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,038 bytes
コンパイル時間 1,559 ms
コンパイル使用メモリ 169,176 KB
実行使用メモリ 4,592 KB
最終ジャッジ日時 2023-10-21 09:12:13
合計ジャッジ時間 11,008 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 47 ms
4,348 KB
testcase_14 AC 1,337 ms
4,348 KB
testcase_15 AC 11 ms
4,348 KB
testcase_16 AC 1,895 ms
4,348 KB
testcase_17 AC 31 ms
4,348 KB
testcase_18 AC 1,172 ms
4,348 KB
testcase_19 AC 382 ms
4,348 KB
testcase_20 AC 40 ms
4,348 KB
testcase_21 AC 187 ms
4,348 KB
testcase_22 AC 18 ms
4,592 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
#define endl '\n'
#define vec vector<ll>
#define mat vector<vector<ll> >
#define fi first
#define se second
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef long double ld;
typedef complex<double> Complex;
const ll INF=1e9+7;
const ll inf=INF*INF;
const int mod=1e9+7;
const ll MAX=500010;
const double PI=acos(-1.0);




signed main(){
    ll n,m;cin>>n>>m;
    vector<ll>ans(n+1);
    rep(i,m+1){
        rep(j,m+1){
            rep(k,m+1){
                ll x=i*i+j*j+k*k+i*j+j*k+k*i;
                ll y=i+j+k;
                ll d=0;
                while(d<=m&&d*d+x+y*d<=n){
                    ans[d*d+x+y*d]++;
                    d++;
                }
            }
        }
    }
    rep(i,n+1){
        cout<<ans[i]<<endl;
    }
}
0