QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#372577#5442. Referee Without Reducup-team3294#WA 26ms27132kbC++231.0kb2024-03-31 15:50:552024-03-31 15:50:57

Judging History

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

  • [2024-03-31 15:50:57]
  • 评测
  • 测评结果:WA
  • 用时:26ms
  • 内存:27132kb
  • [2024-03-31 15:50:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=3e6+5;
const int mod=998244353;
int fac[N];
int ifac[N];
long long ppow(long long a,long long b){
	long long res=1;
	while(b>0){
		if(b&1) res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
void solve() {
    int n,m;
    long long count=0;
    cin>>n>>m;
    map<int,int>q;
    for(int i=1;i<=n;i++){
	}
   /* vector<vector<int>>a((n+4),vector<int>(m+4));
	      for(int i=1;i<=n;i++){
    	for(int j=1;j<=m;j++){
    		cin>>a[i][j];
    		if(i!=1||j!=1)
    		q[a[i][j]]++;
		}
	}
	count=fac[n*m-1];
	for(auto v:q){
		count=(1LL*count*ifac[v.second])%mod;
	}
	cout<<count<<"\n";*/
}
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	int t;
	fac[0]=1,ifac[0]=1;
	for(int i=1;i<=3e6;i++) fac[i]=(1ll*fac[i-1]*i)%mod;
	ifac[3000000]=ppow(fac[3000000],mod-2);
	//cout<<fac[5]<<" "<<ppow(2,5)<<"\n";
	for(int i=3e6-1;i>=1;i--) ifac[i]=(1ll*ifac[i+1]*(i+1))%mod;
	cin>>t;
	while(t--) {
		solve();
	}
}

详细

Test #1:

score: 0
Wrong Answer
time: 26ms
memory: 27132kb

input:

2
4 4
1 2 3 4
3 4 1 2
1 2 4 1
4 3 3 2
3 9
1 8 1 1 8 1 1 8 1
1 8 8 8 8 8 8 8 1
1 1 1 8 8 8 1 1 1

output:


result:

wrong answer Answer contains longer sequence [length = 2], but output contains 0 elements