CSES - Putka Open 2015 – finaali - Results
Submission details
Task:Sanat
Sender:
Submission time:2015-12-20 15:53:40 +0200
Language:C++
Status:READY
Result:56
Feedback
groupverdictscore
#1ACCEPTED56
Test results
testverdicttimescore
#1ACCEPTED0.06 s56details

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:55:12: warning: array subscript has type 'char' [-Wchar-subscripts]
    t+=lol[c];
            ^

Code

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

int lol[300];

// VOI LOL MIKÄ TEHTÄVÄ

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	lol['a']=1;
	lol['b']=-10;
	lol['c']=-500;
	lol['d']=-10;
	lol['e']=4;
	lol['f']=-500;
	lol['g']=-500;
	lol['h']=3;
	lol['i']=-2;
	lol['j']=10;
	lol['k']=-2;
	lol['l']=7;
	lol['m']=2;
	lol['n']=4;
	lol['o']=-2;
	lol['p']=2;
	lol['q']=-500;
	lol['r']=8;
	lol['s']=-2;
	lol['t']=4;
	lol['u']=5;
	lol['v']=6;
	lol['w']=-500;
	lol['x']=-500;
	lol['y']=-5;
	lol['z']=-500;
	int su=0;
	for (int i=0;i<300;i++){
		if (lol[i]!=-500){
			su+=lol[i];
		}
	}
	//cout<<su<<endl;
	int n;
	cin>>n;
	for (int i=0;i<n;i++){
		string s;
		cin>>s;
		int t=0;
		for (char c:s){
			t+=lol[c];
		}
		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
QAQ
10-4
QAQ
10-4
...