CSES - Putka Open 2015 – finaali - Results
Submission details
Task:Sanat
Sender:
Submission time:2015-12-20 20:51:56 +0200
Language:C++
Status:READY
Result:34
Feedback
groupverdictscore
#1ACCEPTED34
Test results
testverdicttimescore
#1ACCEPTED0.22 s34details

Code

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#define ll long long
#define N (2<<16)

using namespace std;

int main () {
	int n;
	cin>>n;
	for (int i = 0; i < n; i++) {
		string s;
		cin>>s;
		double v = 0;
		for (char c : s) if (c == 'a') v += 0.001;
		for (char c : s) if (c == 'b') v += -0.001;
		for (char c : s) if (c == 'c') v += -1;
		for (char c : s) if (c == 'd') v += -0.018;
		for (char c : s) if (c == 'e') v += 0.025;
		for (char c : s) if (c == 'f') v += -0.09;
		for (char c : s) if (c == 'g') v += -0.09;
		for (char c : s) if (c == 'h') v += -0.01;
		for (char c : s) if (c == 'i') v += 0.015;
		for (char c : s) if (c == 'k') v += 0.02;
		for (char c : s) if (c == 'l') v += 0.015;
		for (char c : s) if (c == 'm') v += -0.03;
		for (char c : s) if (c == 'n') v += 0.03;
		for (char c : s) if (c == 'o') v += -0.03;
		for (char c : s) if (c == 'p') v += -0.023;
		for (char c : s) if (c == 'q') v += -1;
		for (char c : s) if (c == 'r') v += -0.021;
		for (char c : s) if (c == 's') v += 0.025;
		for (char c : s) if (c == 't') v += 0.025;
		for (char c : s) if (c == 'u') v += -0.035;
		for (char c : s) if (c == 'v') v += 0.02;
		for (char c : s) if (c == 'w') v += -1;
		for (char c : s) if (c == 'x') v += -1;
		for (char c : s) if (c == 'y') v += -0.2;
		for (char c : s) if (c == 'z') v += -1;

		if (v >= 0) {
			cout<<"10-4"<<endl;
		} else {
			cout<<"QAQ"<<endl;
		}
	}
}

Test details

Test 1

Verdict: ACCEPTED

input
95000
pursua
zoomata
mantelilastu
jamming
...

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

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