CSES - Putka Open 2015 – finaali - Results
Submission details
Task:Neliöt
Sender:
Submission time:2015-12-20 13:59:58 +0200
Language:C++
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.07 s1details
#20.08 s2details
#30.10 s3details

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);
	int tcs;
	cin>>tcs;
	for (int tc=0;tc<tcs;tc++){
		vector<ll> a(4);
		for (int i=0;i<4;i++){
			cin>>a[i];
		}
		sort(a.begin(), a.end());
		
		if (a[0]==a[1]&&a[1]==a[2]){
			if (a[3]==a[0]*3){
				cout<<"10-4\n";
				goto loppu;
			}
		}
		if (a[0]==a[1]&&a[0]*2==a[2]){
			if (a[1]+a[2]==a[3]){
				cout<<"10-4\n";
				goto loppu;
			}
		}
		if (a[0]==a[1]&&a[1]==a[2]&&a[2]==a[3]){
			cout<<"10-4\n";
			goto loppu;
		}
		cout<<"QAQ\n";
		loppu:;
	}
}

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
10-4
10-4
QAQ
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
10-4
QAQ
QAQ
10-4
10-4
...

Test 3

Group: 3

Verdict:

input
100000
821863964 821863964 821863964 ...

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

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