CSES - Putka Open 2015 – finaali - Results
Submission details
Task:Neliöt
Sender:
Submission time:2015-12-20 13:21:34 +0200
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.17 s1details
#20.18 s2details
#30.28 s3details

Code

#include <iostream>
#include <algorithm>
using namespace std;
int ss[4];
int main() {
	int t;
	cin>>t;
	while(t--) {
		for(int i=0; i<4; ++i) cin>>ss[i];
		sort(ss,ss+4);
		bool ok = 0;
		if (ss[0] == ss[1]) {
			if (2*ss[1]==ss[2]) {
				if (ss[1]+ss[2]==ss[3]) {
					ok=1;
				}
				if (2*ss[1]==ss[2]) {
					ok=1;
				}
			}
		}
		if (ok) {
			cout<<"10-4\n";
		} else {
			cout<<"QAQ\n";
		}
	}
}

Test details

Test 1

Group: 1

Verdict:

input
100000
6 9 3 3
1 3 1 1
3 3 6 9
2 2 4 4
...

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

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

Test 2

Group: 2

Verdict:

input
100000
270 90 90 90
372 914 438 84
304 152 152 304
238 238 714 238
...

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

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

Test 3

Group: 3

Verdict:

input
100000
821863964 821863964 821863964 ...

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

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