CodeChef submission 738305 (C++ 4.3.2) plaintext list. Status: WA, problem COLCHAIN, contest . By kostroma (kostroma), 2011-11-23 17:01:18.

#include <iostream> #include <stdio.h> #include <vector> #include <string> #include <algorithm> #include <set> #include <memory.h> using namespace std; #define pb push_back #define mp make_pair typedef pair <int, int> pi; typedef long long li; void solve(); int main () { #ifndef ONLINE_JUDGE #endif int t=1; cin>>t; while (t--) solve(); return 0; } #define int li int n, m; int mod=1000000007; int dp[100500][2]; { if (!w) return 1; if (w%2) } void solve() { cin>>n>>m; int fact=1; for (int i=1; i<=m; i++) fact=(fact*i)%mod; dp[m+1][0]=(fact*( (m*(m-1)/2) %mod ))%mod; dp[m+1][1]=(fact*m)%mod; for (int i=m+1; i<n; i++) { } cout<<(dp[n][true]+dp[n][false])%mod<<endl; }

## Comments

**Please login at the top to post a comment.**