CSES - HIIT Open 2018 - Results
Submission details
Task:Coins
Sender:KnowYourArchitecture
Submission time:2018-05-26 12:33:26 +0300
Language:C++
Status:READY
Result:
Test results
testverdicttime
#10.30 sdetails
#2ACCEPTED0.33 sdetails
#30.36 sdetails
#4ACCEPTED0.30 sdetails
#50.29 sdetails

Code

#include <bits/stdc++.h>

using namespace std;
typedef long long int ll;

ll ss[3];
int main() {
	ll n, a, s, m=0, ms=0;

	cin>>n;
	while(n--){
		cin>>a>>s;
		ss[s]+=a;
		if(m<a)m=a,ms=s;
		//cout<<ss[1]<<' '<<ss[2]<<' '<<m<<' '<<ms<<'\n';
		if(ss[1]<ss[2] && ms==2)cout<<"<\n";
		else if(ss[2]<ss[1] && ms==1)cout<<">\n";
		else cout<<"?\n";
	}
}

Test details

Test 1

Verdict:

input
200000
175878 1
146174 1
4939 2
181388 1
...

correct output
>
>
>
>
>
...

user output
>
>
>
>
>
...

Test 2

Verdict: ACCEPTED

input
200000
1 2
2 1
3 2
4 1
...

correct output
<
>
<
>
<
...

user output
<
>
<
>
<
...

Test 3

Verdict:

input
200000
1 1
2 1
3 1
4 1
...

correct output
>
>
>
>
>
...

user output
>
>
>
>
>
...

Test 4

Verdict: ACCEPTED

input
200000
1 1
2 1
3 1
4 1
...

correct output
>
>
>
>
>
...

user output
>
>
>
>
>
...

Test 5

Verdict:

input
200000
188909 2
58944 1
26824 1
143263 2
...

correct output
<
<
?
<
<
...

user output
<
<
<
<
<
...