Submission #3223561


Source Code Expand

#include <iostream>
#include <string>
using namespace std;

int main() {
  string s;
  cin >> s;
  int N=s.size()
  
  string ans="yes";
  
  for(int i=0;i<N;++i){
    for(int j=i+1;j<N;++j){
      if(s[i]==s[j])
        ans="no";
    }
  }
  
  cout<<ans<<endl;
}

Submission Info

Submission Time
Task B - Varied
User masemase
Language C++14 (GCC 5.4.1)
Score 0
Code Size 285 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:3: error: expected ‘,’ or ‘;’ before ‘string’
   string ans="yes";
   ^
./Main.cpp:15:9: error: ‘ans’ was not declared in this scope
         ans="no";
         ^
./Main.cpp:19:9: error: ‘ans’ was not declared in this scope
   cout<<ans<<endl;
         ^