| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 871484 | Sir_Ahmed_Imran | Kangaroo (CEOI16_kangaroo) | C++17 | 137 ms | 182792 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
///~~~LOTA~~~///
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define li long int
#define ld long double
#define append push_back
#define add insert
#define nl '\n'
#define ff first
#define ss second
#define pii pair<int,int>
#define pic pair<int,char>
#define all(x) (x).begin(),(x).end()
#define sum(a) accumulate(all(a),0)
#define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL)
#define terminator main
#define N 201
int mod=1e9+7;
int dp[2][N][N][N];
int pre[2][N][N][N];
void solve(){
int n,m,o,p,q,r;
pre[0][1][1][1]=1;
pre[1][1][1][1]=1;
for(int i=2;i<N;i++){
for(int j=1;j<=i;j++){
for(int k=1;k<=i;k++){
if(j!=k) dp[1][i][j][k]=pre[0][i-1][j][k-(k>j)];
pre[1][i][j][k]=(pre[1][i][j-1][k]+dp[1][i][j][k])%mod;
}
for(int k=i;k>0;k--){
if(j!=k) dp[0][i][k][j]=pre[1][i-1][k-1][j-(j>k)];
pre[0][i][k][j]=(pre[0][i][k+1][j]+dp[0][i][k][j])%mod;
}
}
}
cin>>n>>p>>q;
cout<<(dp[0][n][p][q]+dp[1][n][p][q])%mod;
}
int main(){
L0TA;
solve();
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
