Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109459 陈铎文 奇怪的国家 C++ Runtime Error 1 MS 276 KB 311 2025-02-09 09:35:54

Tests(2/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char a[40],b[40]; cin>>a>>b; int max=0; char c[strlen(a)]; for(int i=0;i<strlen(a);i++){ if(a[i]=='0' and b[i]=='0'){ c[i]='1'; } else if(a[i]=='1' and b[i]=='1'){ c[i]='1'; } else{ c[i]='0'; } } cout<<c; }


Run Info:

*** stack smashing detected ***: ./Main terminated