Contest Duration: ~ (local time) (150 minutes) Back to Home

Submission #4032367

Source Code Expand

Copy
```#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
using namespace std;
char s[1<<16];
int a[1<<16],b[1<<16];
int f[1<<16][2];
const int MOD=998244353;
{a+=b;return a>=MOD?a-MOD:a;}
inline int sub(int a,int b)
{a-=b;return a<0?a+MOD:a;}
inline int mul(int a,int b)
{return 1LL*a*b%MOD;}
inline int ksm(int a,int b)
{
int ans=1;
for(;b;b>>=1,a=mul(a,a))
if(b&1)ans=mul(ans,a);
return ans;
}
int fac[1<<16],ifac[1<<16];
#define C(x,y) mul(fac[x],mul(ifac[x-y],ifac[y]))
int Deal(int n,int m)
{
f[0][0]=1;
for(int j=1;j<=m;j++){
f[0][j&1]=mul(fac[j],fac[j]);
for(int i=1;i<=n;i++)
//fij=fi-1j*i*j+fij-1*j^2
}
int als=0;
for(int i=0;i<=n;i++)
return als;
}
int main()
{
scanf("%s",s+1);
int s1=0,s2=0,n=strlen(s+1);
for(int i=1;i<=n;i++)
a[i]=s[i]-'0';
scanf("%s",s+1);
for(int i=1;i<=n;i++)
b[i]=s[i]-'0';
for(int i=1;i<=n;i++)
if(a[i]+b[i]==2)++s1;
else if(a[i])++s2;
fac[0]=ifac[0]=1;
for(int i=1;i<=10000;i++)
fac[i]=mul(fac[i-1],i);
ifac[n]=ksm(fac[n],MOD-2);
for(int i=n-1;i;--i)
ifac[i]=mul(ifac[i+1],i+1);
printf("%d",Deal(s1,s2));
return 0;
}```

#### Submission Info

Submission Time 2019-01-17 23:07:29+0900 E - Shuffle and Swap luogu_bot2 C++ (GCC 5.4.1) 1700 1441 Byte AC 80 ms 512 KB

#### Compile Error

```./Main.cpp: In function ‘int main()’:
./Main.cpp:42:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",s+1);
^
./Main.cpp:46:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",s+1);
^
```

#### Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt
Case Name Status Exec Time Memory
sample_01.txt 1 ms 256 KB
sample_02.txt 1 ms 256 KB
sample_03.txt 1 ms 256 KB
sample_04.txt 1 ms 256 KB