Submission #4051132
Source Code Expand
#include <iostream> #include <string> using namespace std; int main(){ string S,T,atmark,message,odd; int lenS,lenT,flag; cin >>S>>T; lenS = S.size(); lenT = T.size(); atmark = "atcoder"; flag = 1; for(int i=0;i<lenS;i++){ if(S[i]==T[i]){ flag=1; } else if(S[i]!='@' || T[i]!='@'){ if(S[i]=='@'){ int sameflag; sameflag = 0; for(int j=0;j<7;j++){ if(T[i]==atmark[j]){ sameflag = 1; } } if(sameflag!=1){ flag=0; break; } } else{ int sameflag; sameflag = 0; for(int j=0;j<7;j++){ if(S[i]==atmark[j]){ sameflag = 1; } } if(sameflag!=1){ break; } } } else if(){ flag=0; break; } } if(flag==1){ message="You can win"; } else{ message="You will lose"; } cout<<message<<endl; }
Submission Info
Submission Time | |
---|---|
Task | B - AtCoderトランプ |
User | kentaro0407 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1022 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:44:13: error: expected primary-expression before ‘)’ token else if(){ ^