結果
| 問題 | No.287 場合の数 |
| コンテスト | |
| ユーザー |
moti
|
| 提出日時 | 2015-10-17 09:37:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3,107 ms / 5,000 ms |
| コード長 | 685 bytes |
| 記録 | |
| コンパイル時間 | 839 ms |
| コンパイル使用メモリ | 96,644 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 00:02:39 |
| 合計ジャッジ時間 | 31,279 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
using namespace std;
#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
map<int, int> m;
int main() {
int n; cin >> n;
rep(a, n+1) rep(b, n+1) rep(c, n+1) rep(d, n+1) {
m[a+b+c+d]++;
}
ll ans = 0;
rep(e, n+1) rep(f, n+1) rep(g, n+1) rep(h, n+1) {
ans += m[6*n-(e+f+g+h)];
}
cout << ans << endl;
return 0;
}
moti