Submission #5900021


Source Code Expand

Copy
#include <bits/stdc++.h>
#define clr(x) memset(x,0,sizeof x)
#define For(i,a,b) for (int i=(a);i<=(b);i++)
#define Fod(i,b,a) for (int i=(b);i>=(a);i--)
#define fi first
#define se second
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define outval(x) cerr<<#x" = "<<x<<endl
#define outtag(x) cerr<<"---------------"#x"---------------"<<endl
#define outarr(a,L,R) cerr<<#a"["<<L<<".."<<R<<"] = ";\
						For(_x,L,R)cerr<<a[_x]<<" ";cerr<<endl;
using namespace std;
typedef long long LL;
LL read(){
	LL x=0,f=0;
	char ch=getchar();
	while (!isdigit(ch))
		f|=ch=='-',ch=getchar();
	while (isdigit(ch))
		x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
const int N=505,mod=998244353;
int Pow(int x,int y){
	int ans=1;
	for (;y;y>>=1,x=(LL)x*x%mod)
		if (y&1)
			ans=(LL)ans*x%mod;
	return ans;
}
void Add(int &x,int y){
	if ((x+=y)>=mod)
		x-=mod;
}
void Del(int &x,int y){
	if ((x-=y)<0)
		x+=mod;
}
int Add(int x){
	return x>=mod?x-mod:x;
}
int Del(int x){
	return x<0?x+mod:x;
}
int n,c,d;
int a[N],b[N];
void IN(){
	static char s[N];
	cin>>s+1;
	n=strlen(s+1);
	For(i,1,n)
		a[i]=s[i]-'0';
	cin>>s+1;
	For(i,1,n)
		b[i]=s[i]-'0';
}

int main(){
	IN();
	For(i,1,n)
		if (a[i]&&!b[i])
			c++;
		else if (a[i]&&b[i])
			d++;
	
	return 0;
}

Submission Info

Submission Time
Task E - Shuffle and Swap
User zhouzhendong
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1325 Byte
Status
Exec Time 100 ms
Memory 256 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt
Partial 0 / 1200 sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt, subtask_1_16.txt, subtask_1_17.txt, subtask_1_18.txt, subtask_1_19.txt, subtask_1_20.txt, subtask_1_21.txt, subtask_1_22.txt, subtask_1_23.txt, subtask_1_24.txt, subtask_1_25.txt, subtask_1_26.txt, subtask_1_27.txt, subtask_1_28.txt, subtask_1_29.txt, subtask_1_30.txt, subtask_1_31.txt, subtask_1_32.txt, subtask_1_33.txt, subtask_1_34.txt, subtask_1_35.txt, subtask_1_36.txt, subtask_1_37.txt, subtask_1_38.txt, subtask_1_39.txt, subtask_1_40.txt, subtask_1_41.txt, subtask_1_42.txt
All 0 / 500 sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt, subtask_1_16.txt, subtask_1_17.txt, subtask_1_18.txt, subtask_1_19.txt, subtask_1_20.txt, subtask_1_21.txt, subtask_1_22.txt, subtask_1_23.txt, subtask_1_24.txt, subtask_1_25.txt, subtask_1_26.txt, subtask_1_27.txt, subtask_1_28.txt, subtask_1_29.txt, subtask_1_30.txt, subtask_1_31.txt, subtask_1_32.txt, subtask_1_33.txt, subtask_1_34.txt, subtask_1_35.txt, subtask_1_36.txt, subtask_1_37.txt, subtask_1_38.txt, subtask_1_39.txt, subtask_1_40.txt, subtask_1_41.txt, subtask_1_42.txt, subtask_2_01.txt, subtask_2_02.txt, subtask_2_03.txt, subtask_2_04.txt, subtask_2_05.txt, subtask_2_06.txt, subtask_2_07.txt, subtask_2_08.txt, subtask_2_09.txt, subtask_2_10.txt, subtask_2_11.txt, subtask_2_12.txt, subtask_2_13.txt, subtask_2_14.txt, subtask_2_15.txt, subtask_2_16.txt, subtask_2_17.txt, subtask_2_18.txt, subtask_2_19.txt, subtask_2_20.txt, subtask_2_21.txt, subtask_2_22.txt, subtask_2_23.txt, subtask_2_24.txt, subtask_2_25.txt, subtask_2_26.txt, subtask_2_27.txt, subtask_2_28.txt, subtask_2_29.txt, subtask_2_30.txt, subtask_2_31.txt, subtask_2_32.txt, subtask_2_33.txt, subtask_2_34.txt, subtask_2_35.txt, subtask_2_36.txt, subtask_2_37.txt, subtask_2_38.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
subtask_1_01.txt 1 ms 256 KB
subtask_1_02.txt 1 ms 256 KB
subtask_1_03.txt 1 ms 256 KB
subtask_1_04.txt 1 ms 256 KB
subtask_1_05.txt 1 ms 256 KB
subtask_1_06.txt 1 ms 256 KB
subtask_1_07.txt 1 ms 256 KB
subtask_1_08.txt 1 ms 256 KB
subtask_1_09.txt 1 ms 256 KB
subtask_1_10.txt 1 ms 256 KB
subtask_1_11.txt 1 ms 256 KB
subtask_1_12.txt 1 ms 256 KB
subtask_1_13.txt 1 ms 256 KB
subtask_1_14.txt 1 ms 256 KB
subtask_1_15.txt 1 ms 256 KB
subtask_1_16.txt 1 ms 256 KB
subtask_1_17.txt 1 ms 256 KB
subtask_1_18.txt 1 ms 256 KB
subtask_1_19.txt 1 ms 256 KB
subtask_1_20.txt 1 ms 256 KB
subtask_1_21.txt 1 ms 256 KB
subtask_1_22.txt 1 ms 256 KB
subtask_1_23.txt 1 ms 256 KB
subtask_1_24.txt 1 ms 256 KB
subtask_1_25.txt 1 ms 256 KB
subtask_1_26.txt 1 ms 256 KB
subtask_1_27.txt 1 ms 256 KB
subtask_1_28.txt 1 ms 256 KB
subtask_1_29.txt 1 ms 256 KB
subtask_1_30.txt 1 ms 256 KB
subtask_1_31.txt 1 ms 256 KB
subtask_1_32.txt 1 ms 256 KB
subtask_1_33.txt 1 ms 256 KB
subtask_1_34.txt 1 ms 256 KB
subtask_1_35.txt 1 ms 256 KB
subtask_1_36.txt 1 ms 256 KB
subtask_1_37.txt 1 ms 256 KB
subtask_1_38.txt 1 ms 256 KB
subtask_1_39.txt 1 ms 256 KB
subtask_1_40.txt 1 ms 256 KB
subtask_1_41.txt 1 ms 256 KB
subtask_1_42.txt 1 ms 256 KB
subtask_2_01.txt 97 ms 256 KB
subtask_2_02.txt 97 ms 256 KB
subtask_2_03.txt 96 ms 256 KB
subtask_2_04.txt 99 ms 256 KB
subtask_2_05.txt 97 ms 256 KB
subtask_2_06.txt 98 ms 256 KB
subtask_2_07.txt 98 ms 256 KB
subtask_2_08.txt 98 ms 256 KB
subtask_2_09.txt 98 ms 256 KB
subtask_2_10.txt 97 ms 256 KB
subtask_2_11.txt 97 ms 256 KB
subtask_2_12.txt 97 ms 256 KB
subtask_2_13.txt 98 ms 256 KB
subtask_2_14.txt 99 ms 256 KB
subtask_2_15.txt 98 ms 256 KB
subtask_2_16.txt 98 ms 256 KB
subtask_2_17.txt 99 ms 256 KB
subtask_2_18.txt 97 ms 256 KB
subtask_2_19.txt 97 ms 256 KB
subtask_2_20.txt 97 ms 256 KB
subtask_2_21.txt 98 ms 256 KB
subtask_2_22.txt 100 ms 256 KB
subtask_2_23.txt 97 ms 256 KB
subtask_2_24.txt 98 ms 256 KB
subtask_2_25.txt 97 ms 256 KB
subtask_2_26.txt 97 ms 256 KB
subtask_2_27.txt 97 ms 256 KB
subtask_2_28.txt 97 ms 256 KB
subtask_2_29.txt 96 ms 256 KB
subtask_2_30.txt 97 ms 256 KB
subtask_2_31.txt 97 ms 256 KB
subtask_2_32.txt 98 ms 256 KB
subtask_2_33.txt 98 ms 256 KB
subtask_2_34.txt 99 ms 256 KB
subtask_2_35.txt 98 ms 256 KB
subtask_2_36.txt 97 ms 256 KB
subtask_2_37.txt 97 ms 256 KB
subtask_2_38.txt 97 ms 256 KB