結果
| 問題 | No.287 場合の数 |
| コンテスト | |
| ユーザー |
Lay_ec
|
| 提出日時 | 2015-10-10 00:20:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 707 bytes |
| 記録 | |
| コンパイル時間 | 656 ms |
| コンパイル使用メモリ | 80,848 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 18:40:31 |
| 合計ジャッジ時間 | 2,030 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 22 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>
using namespace std;
int main()
{
long long n;
cin>>n;
vector<long long> sum4(4*n+1,0);
for(int a=0;a<=n;a++){
for(int b=0;b<=n;b++){
for(int c=0;c<=n;c++){
for(int d=0;d<=n;d++){
sum4[a+b+c+d]++;
}
}
}
}
long long res=0;
for(int i=0;i<=4*n;i++){
res+=sum4[i]*sum4[6*n-i];
}
cout<<res<<endl;
return 0;
}
Lay_ec