Submission #128408

#TimeUsernameProblemLanguageResultExecution timeMemory
128408MatesV13Magnus (COCI18_magnus)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; string s, okk; int ok, honi; int main (){ ios::sync_with_stdio(0); cin.tie(0); cin >> s;  okk = "HONI";  for (int i=0 ; i<s.size() ; i++){    if (s[i]==okk[ok]){ ok++; if(ok==4){ ok=0; honi++; } } }  cout << honi; return 0; }

Compilation message (stderr)

magnus.cpp:9:2: error: stray '\302' in program
   okk = "HONI";
  ^
magnus.cpp:9:3: error: stray '\240' in program
   okk = "HONI";
   ^
magnus.cpp:10:2: error: stray '\302' in program
   for (int i=0 ; i<s.size() ; i++){
  ^
magnus.cpp:10:3: error: stray '\240' in program
   for (int i=0 ; i<s.size() ; i++){
   ^
magnus.cpp:11:2: error: stray '\302' in program
     if (s[i]==okk[ok]){
  ^
magnus.cpp:11:3: error: stray '\240' in program
     if (s[i]==okk[ok]){
   ^
magnus.cpp:11:5: error: stray '\302' in program
     if (s[i]==okk[ok]){
     ^
magnus.cpp:11:6: error: stray '\240' in program
     if (s[i]==okk[ok]){
      ^
magnus.cpp:19:2: error: stray '\302' in program
   cout << honi;
  ^
magnus.cpp:19:3: error: stray '\240' in program
   cout << honi;
   ^
magnus.cpp: In function 'int main()':
magnus.cpp:10:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i=0 ; i<s.size() ; i++){
                   ~^~~~~~~~~