QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#618168#1. I/O TestWaterZAQiuCompile Error//C++14930b2024-10-06 19:30:152024-10-06 19:30:16

Judging History

你现在查看的是最新测评结果

  • [2024-10-06 19:30:16]
  • 评测
  • [2024-10-06 19:30:15]
  • 提交

config.txt


input_test

#include <bits/stdc++.h>
#define mod 9999973
using namespace std;
const int N=108;
int f[N][N][N];
int n,m;
int main(){
	cin>>n>>m;
	f[0][m][0]=1;
	for(int i=0;i<n;i++){
		for(int j=0;j<=m;j++){
			for(int k=0;j+k<=m;k++){
				f[i+1][j][k]=(f[i+1][j][k]+f[i][j][k])%mod;
				if(j>0){
					f[i+1][j-1][k+1]=(f[i+1][j-1][k+1]+((f[i][j][k])*j)%mod)%mod;
				}
				else if(k>0){
					f[i+1][j][k-1]=(f[i+1][j][k-1]+((f[i][j][k])*k)%mod)%mod;
				}
				else if(j>1){
					f[i+1][j-2][k+2]=(f[i+1][j-2][k+2]+((f[i][j][k])*((j*(j-1))/2)%mod)%mod)%mod;
				}
				else if(k>1){
					f[i+1][j][k-2]=(f[i+1][j][k-2]+((f[i][j][k])*((k*(k-1))/2)%mod)%mod)%mod;
				}
				else if(j>0&&k>0){
					f[i+1][j-1][k]=(f[i+1][j-1][k]+((f[i][j][k])*((k*j))%mod)%mod)%mod;
				}
			}
		}
	}
	int ans=0;
	for(int i=0;i<=m;i++){
		for(int j=0;i+j<=m;j++){
			ans+=f[n][i][j];
		}
	}
	cout<<ans<<"\n";
	
	return 0;
}

output_test


Details

Invalid Configuration File: failed to read Nin and Nout