結果
| 問題 |
No.1229 ラグビーの得点パターン
|
| コンテスト | |
| ユーザー |
SAIKI_R_A
|
| 提出日時 | 2020-09-18 21:23:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 1,497 bytes |
| コンパイル時間 | 903 ms |
| コンパイル使用メモリ | 94,272 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-22 08:38:21 |
| 合計ジャッジ時間 | 1,832 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <string>
#include <iomanip>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <complex>
#include <ctime>
#include<bitset>
//#include <boost/multiprecision/cpp_int.hpp>
//namespace mp = boost::multiprecision;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef int itn;
const ll LINF = 1e18;
const int INF = 1e9;
//マクロ定義
#define vvint(vec,n,m,l) vector<vector<int>> vec(n, vector<int>(m,l)); // lで初期化
#define vvll(vec,n,m,l) vector<vector<ll>> vec(n,vector<ll>(m,l));
#define vint vector<int>
#define pint pair<int,int>
#define rep(i,a) for(ll i=0;i<(a);i++)
#define all(x) (x).begin(),(x).end()
#define debug system("pause") //デバッグ用
#define ret return 0
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
using Graph = vector<vector<ll>>;
#define ketasitei setprecision(15) //15桁表示
const ll MOD = 1000000007;
const double PI = 3.1415926535897932;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
ll ans = 0;
if (n == 0)
{
cout << 1 << endl;
ret;
}
rep(i, n)
{
rep(j, n)
{
rep(k, n)
{
if (5 * i + 2 * j + 3 * k == n && j<=i)
ans++;
}
}
}
cout << ans << endl;
return 0;
}
SAIKI_R_A