Submission #798725

# Submission time Handle Problem Language Result Execution time Memory
798725 2023-07-31T02:05:42 Z tlnk07 Magneti (COCI21_magneti) C++17
0 / 110
1 ms 304 KB
#include<bits/stdc++.h>
using namespace std;

long long n, m, x, s = 1;

int main()
{
	cin >> n >> m;
	for(int i = 1; i <= n; ++i)	cin >> x;
	m -= 1;
	for(int i = 2; i <= n; ++i)
	{
		s *= i;
		m -= x;
		s %= 1000000007;
	}
	int t = n + 1;
	for(int i = 1; i <= m; ++i, ++t)
	{
		s = (s * t / i) % 1000000007;
	}
	cout << s;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 304 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 304 KB Output isn't correct
2 Halted 0 ms 0 KB -