QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#466305 | #1089. Biological Software Utilities | Kevin5307 | AC ✓ | 4ms | 3860kb | C++23 | 977b | 2024-07-07 17:56:59 | 2024-07-07 17:56:59 |
Judging History
answer
//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
const ll mod=998244353;
ll n;
cin>>n;
if(n&1) die("0");
if(n==2) die("1");
ll ans=1;
for(int i=n/2+1;i<=n;i++)
ans=ans*i%mod;
for(int i=1;i<n/2-1;i++)
ans=ans*n%mod;
cout<<ans<<'\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
input:
1
output:
0
result:
ok 1 number(s): "0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
2
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
3
output:
0
result:
ok 1 number(s): "0"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
4
output:
12
result:
ok 1 number(s): "12"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
7788
output:
178152092
result:
ok 1 number(s): "178152092"
Test #6:
score: 0
Accepted
time: 4ms
memory: 3624kb
input:
1000000
output:
178454094
result:
ok 1 number(s): "178454094"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
12346
output:
751958800
result:
ok 1 number(s): "751958800"
Test #8:
score: 0
Accepted
time: 4ms
memory: 3848kb
input:
999996
output:
690785929
result:
ok 1 number(s): "690785929"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
6
output:
720
result:
ok 1 number(s): "720"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
10
output:
30240000
result:
ok 1 number(s): "30240000"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
99
output:
0
result:
ok 1 number(s): "0"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
100
output:
934178078
result:
ok 1 number(s): "934178078"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
20
output:
245111072
result:
ok 1 number(s): "245111072"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
38745
output:
0
result:
ok 1 number(s): "0"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
3848
output:
928659530
result:
ok 1 number(s): "928659530"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
347835
output:
0
result:
ok 1 number(s): "0"
Test #17:
score: 0
Accepted
time: 1ms
memory: 3648kb
input:
234234
output:
745247398
result:
ok 1 number(s): "745247398"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
12
output:
818069491
result:
ok 1 number(s): "818069491"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
98
output:
648803799
result:
ok 1 number(s): "648803799"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
124
output:
159487965
result:
ok 1 number(s): "159487965"
Test #21:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
1024
output:
318674437
result:
ok 1 number(s): "318674437"
Test #22:
score: 0
Accepted
time: 2ms
memory: 3860kb
input:
524288
output:
495260023
result:
ok 1 number(s): "495260023"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
524289
output:
0
result:
ok 1 number(s): "0"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
999999
output:
0
result:
ok 1 number(s): "0"
Test #25:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
999997
output:
0
result:
ok 1 number(s): "0"