CSES - Putka Open 2015 – finaali - Results
Submission details
Task:Sanat
Sender:
Submission time:2015-12-20 16:53:28 +0200
Language:C++
Status:READY
Result:6
Feedback
groupverdictscore
#1ACCEPTED6
Test results
testverdicttimescore
#1ACCEPTED0.07 s6details

Code

#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef long double ld;

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	char c1='i';//englanti
	char c2='a';//suomi
	int n;
	cin>>n;
	for (int i=0;i<n;i++){
		int t=0;
		string s;
		cin>>s;
		for (char c:s){
			if (c==c1){
				t--;
			}
			if (c==c2){
				t++;
			}
		}
		if (t==0){
			if (rand()%2==0){
				cout<<"10-4\n";
			}
			else{
				cout<<"QAQ\n";
			}
		}
		else{
			if (t>0){
				cout<<"10-4\n";
			}
			else{
				cout<<"QAQ\n";
			}
		}
	}
}

Test details

Test 1

Verdict: ACCEPTED

input
95000
pursua
zoomata
mantelilastu
jamming
...

correct output
10-4
10-4
10-4
QAQ
QAQ
...

user output
10-4
10-4
10-4
QAQ
10-4
...