結果
| 問題 | No.287 場合の数 |
| コンテスト | |
| ユーザー |
Maple_Landscape
|
| 提出日時 | 2015-10-09 23:38:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 571 bytes |
| コンパイル時間 | 454 ms |
| コンパイル使用メモリ | 54,752 KB |
| 実行使用メモリ | 8,320 KB |
| 最終ジャッジ日時 | 2024-10-11 18:40:17 |
| 合計ジャッジ時間 | 12,888 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 21 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
3 | main(){
| ^~~~
ソースコード
#include<iostream>
using namespace std;
main(){
int a,b,c,d,e,f,g,h,n,n6,G=0;
cin >> n;
n6 = n*6;
for(a=0;a<=n;++a){
for(b=0;b<=n;++b){
for(c=0;c<=n;++c){
if(a+b+c<n)continue;
for(d=0;d<=n;++d){
if(a+b+c+d<2*n)continue;
for(e=0;e<=n;++e){
if(a+b+c+d+e<3*n)continue;
for(f=0;f<=n;++f){
if(a+b+c+d+e+f<4*n)continue;
for(g=0;g<=n;++g){
if(a+b+c+d+e+f+g>n6)continue;
for(h=0;h<=n;++h){
if(a+b+c+d+e+f+g+h==n6)++G;
}
}
}
}
}
}
}
}
cout << G << endl;
}
Maple_Landscape