제출 #525610

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5256102022-02-12 06:41:05ParsaEs유적 3 (JOI20_ruins3)C++17
100 / 100
390 ms18716 KiB
//InTheNameOfGOD
//PRS;)
#include<iostream>
#define Fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
const int xn = 2e3 + 5;
ll cnt[xn][xn], pr[xn][xn], dp[xn];
bool vis[xn << 1];
ll pp(ll x, ll y)
{
if(y < 1) return 1;
if(y < 2) return x;
ll ret = pp(x, y / 2);
ret = (ret * ret) % mod;
if(y & 1) ret = (ret * x) % mod;
return ret;
}
int main()
{
Fast
int n;
cin >> n;
for(int i = 0; i <= n; i++) cnt[0][i] = 1;
for(int i = 1; i <= n; i++) for(int j = i; j <= n; j++)
cnt[i][j] = (cnt[i - 1][j - 1] + cnt[i][j - 1]) % mod;
pr[n * 2 + 1][0] = dp[0] = 1;
for(ll i = 1; i <= n; i++) for(ll j = 1; j <= i; j++)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...