CSES - Putka Open 2015 – finaali - Results
Submission details
Task:Sanat
Sender:
Submission time:2015-12-20 15:25:17 +0200
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp:6:15: error: 'c' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
               ^
input/code.cpp:6:17: error: 'f' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
                 ^
input/code.cpp:6:19: error: 'g' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
                   ^
input/code.cpp:6:21: error: 'q' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
                     ^
input/code.cpp:6:23: error: 'w' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
                       ^
input/code.cpp:6:25: error: 'x' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
                         ^
input/code.cpp:6:27: error: 'z' was not declared in this scope
 char vier[7]={c,f,g,q,w,x,z};
                           ^
input/code.cpp: In function 'int main()':
input/code.cpp:28:14: warning: the address of 'int suomi()' will always evaluate as 'true' [-Waddress]
     if (suomi) cout<<"10-4\n";...

Code

#include <bits/stdc++.h>
typedef long long ll;

using namespace std;

char vier[7]={c,f,g,q,w,x,z};
string s;

int suomi() {
  for (unsigned int i=0;i<s.size();i++) {
      for (int j=0;j<7;j++) {
	if (s[i]==vier[j]) return 0;
      }
  }
  return 1;
  for (unsigned int i=1;i<s.size();i++) {
    if (s[i-1]==s[i]) return 1;
  }
}

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin>>n;
  for (int i=0;i<n;i++) {
    cin>>s;
    if (suomi) cout<<"10-4\n";
    else cout<<"QAQ\n";
  }
}