結果

問題 No.2510 Six Cube Sum Counting
ユーザー 沙耶花沙耶花
提出日時 2023-10-20 22:17:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 781 bytes
コンパイル時間 4,798 ms
コンパイル使用メモリ 267,412 KB
実行使用メモリ 191,064 KB
最終ジャッジ日時 2023-10-20 22:19:30
合計ジャッジ時間 119,187 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,723 ms
191,064 KB
testcase_01 AC 3,768 ms
190,984 KB
testcase_02 TLE -
testcase_03 AC 3,608 ms
190,984 KB
testcase_04 AC 3,522 ms
190,984 KB
testcase_05 AC 3,547 ms
190,984 KB
testcase_06 AC 3,615 ms
190,984 KB
testcase_07 AC 3,611 ms
190,984 KB
testcase_08 AC 3,560 ms
190,984 KB
testcase_09 AC 3,717 ms
190,984 KB
testcase_10 AC 3,587 ms
190,984 KB
testcase_11 AC 3,565 ms
190,984 KB
testcase_12 AC 3,607 ms
190,984 KB
testcase_13 AC 3,526 ms
190,984 KB
testcase_14 AC 3,566 ms
190,984 KB
testcase_15 AC 3,558 ms
190,984 KB
testcase_16 AC 3,515 ms
190,984 KB
testcase_17 AC 3,513 ms
190,984 KB
testcase_18 AC 3,594 ms
190,984 KB
testcase_19 AC 3,574 ms
190,984 KB
testcase_20 AC 3,720 ms
190,984 KB
testcase_21 AC 3,747 ms
190,984 KB
testcase_22 AC 3,788 ms
191,064 KB
testcase_23 AC 3,835 ms
190,984 KB
testcase_24 AC 3,913 ms
191,064 KB
testcase_25 AC 3,596 ms
190,984 KB
testcase_26 AC 3,611 ms
190,984 KB
testcase_27 AC 3,841 ms
190,984 KB
testcase_28 AC 3,587 ms
190,984 KB
testcase_29 AC 3,951 ms
191,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001

//map<int,int> mp[305];

int main(){
	
	long long ans = 0;
	/*
	for(int i=0;i<=300;i++){
		for(int j=i;j<=300;j++){
			for(int k=j;k<=300;k++){
				mp[k][i*i*i+j*j*j+k*k*k]++;
			}
		}
	}
	*/
	long long X;
	cin>>X;
	map<int,int> cmp;
	for(int i=0;i<=300;i++){
		
		for(int j=i;j>=0;j--){
			for(int k=j;k>=0;k--){
				cmp[i*i*i+j*j*j+k*k*k]++;
			}
		}
		
		for(int j=i;j<=300;j++){
			for(int k=j;k<=300;k++){
				int v = i*i*i+j*j*j+k*k*k;
				if(cmp.count(X-v))ans += cmp[X-v];
				
			}
		}
	}
	cout<<ans<<endl;
	
	return 0;
}
0