結果

問題 No.398 ハーフパイプ(2)
ユーザー kotamanegi
提出日時 2016-07-16 00:11:39
言語 C++11
(gcc 4.8.5)
結果
AC  
実行時間 488 ms
コード長 1,406 Byte
コンパイル時間 418 ms
使用メモリ 86,316 KB
最終ジャッジ日時 2019-09-08 00:51:56

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
0_0.txt AC 478 ms
86,296 KB
0_1.txt AC 467 ms
86,308 KB
0_2.txt AC 472 ms
86,312 KB
1_0.txt AC 474 ms
86,312 KB
1_1.txt AC 476 ms
86,312 KB
1_2.txt AC 477 ms
86,312 KB
1_3.txt AC 475 ms
86,312 KB
1_4.txt AC 482 ms
86,316 KB
1_5.txt AC 478 ms
86,312 KB
99_system_test1.txt AC 474 ms
86,308 KB
99_system_test2.txt AC 476 ms
86,312 KB
99_system_test3.txt AC 483 ms
86,316 KB
99_system_test4.txt AC 468 ms
86,312 KB
99_system_test5.txt AC 472 ms
86,312 KB
99_system_test6.txt AC 482 ms
86,312 KB
99_system_test7.txt AC 481 ms
86,312 KB
99_system_test8.txt AC 471 ms
86,312 KB
99_system_test9.txt AC 460 ms
86,308 KB
99_system_test10.txt AC 474 ms
86,312 KB
99_system_test11.txt AC 469 ms
86,312 KB
99_system_test12.txt AC 467 ms
86,316 KB
99_system_test13.txt AC 474 ms
86,316 KB
99_system_test14.txt AC 473 ms
86,312 KB
99_system_test15.txt AC 455 ms
86,316 KB
99_system_test16.txt AC 464 ms
86,312 KB
99_system_test17.txt AC 465 ms
86,316 KB
99_system_test18.txt AC 462 ms
86,312 KB
99_system_test19.txt AC 460 ms
86,316 KB
99_system_test20.txt AC 472 ms
86,308 KB
99_system_test21.txt AC 464 ms
86,312 KB
99_system_test22.txt AC 464 ms
86,312 KB
99_system_test23.txt AC 471 ms
86,316 KB
99_system_test24.txt AC 478 ms
86,308 KB
99_system_test25.txt AC 469 ms
86,316 KB
99_system_test26.txt AC 463 ms
86,312 KB
99_system_test27.txt AC 464 ms
86,316 KB
99_system_test28.txt AC 465 ms
86,312 KB
99_system_test29.txt AC 462 ms
86,316 KB
99_system_test30.txt AC 464 ms
86,312 KB
99_system_test31.txt AC 466 ms
86,316 KB
99_system_test32.txt AC 466 ms
86,308 KB
99_system_test33.txt AC 462 ms
86,312 KB
99_system_test34.txt AC 473 ms
86,312 KB
99_system_test35.txt AC 484 ms
86,316 KB
99_system_test36.txt AC 478 ms
86,316 KB
99_system_test37.txt AC 476 ms
86,316 KB
99_system_test38.txt AC 465 ms
86,312 KB
99_system_test39.txt AC 471 ms
86,316 KB
99_system_test40.txt AC 471 ms
86,308 KB
99_system_test41.txt AC 477 ms
86,316 KB
99_system_test42.txt AC 458 ms
86,312 KB
99_system_test43.txt AC 468 ms
86,312 KB
99_system_test44.txt AC 477 ms
86,312 KB
99_system_test45.txt AC 466 ms
86,308 KB
99_system_test46.txt AC 468 ms
86,308 KB
99_system_test47.txt AC 472 ms
86,308 KB
99_system_test48.txt AC 479 ms
86,316 KB
99_system_test49.txt AC 475 ms
86,316 KB
99_system_test50.txt AC 462 ms
86,316 KB
99_system_test51.txt AC 470 ms
86,312 KB
99_system_test52.txt AC 466 ms
86,316 KB
99_system_test53.txt AC 469 ms
86,312 KB
99_system_test54.txt AC 476 ms
86,312 KB
99_system_test55.txt AC 485 ms
86,316 KB
99_system_test56.txt AC 461 ms
86,312 KB
99_system_test57.txt AC 472 ms
86,316 KB
99_system_test58.txt AC 476 ms
86,312 KB
99_system_test59.txt AC 477 ms
86,312 KB
99_system_test60.txt AC 472 ms
86,316 KB
99_system_test61.txt AC 478 ms
86,312 KB
99_system_test62.txt AC 477 ms
86,316 KB
99_system_test63.txt AC 466 ms
86,312 KB
99_system_test64.txt AC 471 ms
86,312 KB
99_system_test65.txt AC 475 ms
86,312 KB
99_system_test66.txt AC 476 ms
86,312 KB
99_system_test67.txt AC 470 ms
86,316 KB
99_system_test68.txt AC 467 ms
86,312 KB
99_system_test69.txt AC 468 ms
86,312 KB
99_system_test70.txt AC 475 ms
86,312 KB
99_system_test71.txt AC 473 ms
86,312 KB
99_system_test72.txt AC 454 ms
86,308 KB
99_system_test73.txt AC 466 ms
86,312 KB
99_system_test74.txt AC 469 ms
86,316 KB
99_system_test75.txt AC 466 ms
86,316 KB
99_system_test76.txt AC 477 ms
86,308 KB
99_system_test77.txt AC 481 ms
86,316 KB
99_system_test78.txt AC 466 ms
86,316 KB
99_system_test79.txt AC 469 ms
86,316 KB
99_system_test80.txt AC 467 ms
86,316 KB
99_system_test81.txt AC 474 ms
86,316 KB
99_system_test82.txt AC 470 ms
86,316 KB
99_system_test83.txt AC 458 ms
86,316 KB
99_system_test84.txt AC 476 ms
86,312 KB
99_system_test85.txt AC 472 ms
86,312 KB
99_system_test86.txt AC 481 ms
86,308 KB
99_system_test87.txt AC 484 ms
86,312 KB
99_system_test88.txt AC 488 ms
86,308 KB
99_system_test89.txt AC 475 ms
86,312 KB
99_system_test90.txt AC 468 ms
86,316 KB
99_system_test91.txt AC 463 ms
86,312 KB
99_system_test92.txt AC 472 ms
86,312 KB
99_system_test93.txt AC 471 ms
86,312 KB
99_system_test94.txt AC 463 ms
86,312 KB
99_system_test95.txt AC 462 ms
86,316 KB
99_system_test96.txt AC 471 ms
86,316 KB
99_system_test97.txt AC 465 ms
86,312 KB
99_system_test98.txt AC 465 ms
86,308 KB
99_system_test99.txt AC 470 ms
86,312 KB
99_system_test100.txt AC 467 ms
86,312 KB
99_system_test101.txt AC 470 ms
86,316 KB
99_system_test102.txt AC 473 ms
86,312 KB
system_test1.txt AC 481 ms
86,312 KB
system_test2.txt AC 485 ms
86,316 KB
system_test3.txt AC 458 ms
86,312 KB
system_test4.txt AC 483 ms
86,312 KB
system_test5.txt AC 475 ms
86,316 KB
system_test6.txt AC 475 ms
86,312 KB
system_test7.txt AC 471 ms
86,312 KB
system_test8.txt AC 469 ms
86,316 KB
テストケース一括ダウンロード

ソースコード

diff #
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include<map>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <iomanip>
using namespace std;
#define MAX_MOD 1000000007
#define REP(i,n) for(int i = 0;i < n;++i)
long long dp[7][500][101][101] = {};
int main() {
	for (int i = 0;i <= 100;++i) {
		dp[0][0][0][i] = 1;
	}
	for (int i = 0;i <= 100;++i) {
		for (int q = 0;q <= i;++q) {
			dp[1][0][q][i] += dp[0][0][0][i];
		}
		for (int q = i + 1;q <= 100;++q) {
			dp[1][0][i][q] += dp[0][0][0][i];
		}
	}
	for (int i = 2;i < 6;++i) {
		for (int q = 0;q <= i * 100 - 200;q++) {
			for (int j = 0;j <= 100;++j) {
				for (int k = j;k <= 100;++k) {
					for (int h = 0;h < j;++h) {
						dp[i][q + j][h][k] += dp[i - 1][q][j][k];
					}
					for (int h = j;h <= k;++h) {
						dp[i][q + h][j][k] += dp[i - 1][q][j][k];
					}
					for (int h = k + 1;h <= 100;++h) {
						dp[i][q + k][j][h] += dp[i - 1][q][j][k];
					}
				}
			}
		}
	}
	double x;
	cin >> x;
	int ok = x*4;
	long long ans = 0;
	for (int i = 0;i <= 100;++i) {
		for (int q = i;q <= 100;++q) {
			ans += dp[5][ok][i][q];
		}
	}
	cout << ans << endl;
}
0