0% found this document useful (0 votes)
125 views

Problem OTTGAME

good done

Uploaded by

Sleep Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views

Problem OTTGAME

good done

Uploaded by

Sleep Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

14:40 01/10/2023 SPOJ.

com - Problem OTTGAME

Bài thi thử kỳ thi SW FS - SRV (/SRVTEST/)

(//www.spoj.com/) PROFILE

 News (/SRVTEST/)
 Problems (/SRVTEST/problems/main/)
 Status (/SRVTEST/status)
 Ranking (/SRVTEST/ranks)

 Forum (https://discuss.spoj.com)

SPOJ (/)
time:

Feedback
2023-10-01

09 : 40 : 02

Submit My submissions All submissions Best solutions PDF


(/SRVTEST/submit/OTTGAME/) (/SRVTEST/status/OTTGAME,helloworld23/) (/SRVTEST/status/OTTGAME/) (/SRVTEST/ranks/OTTGAME/) (/SRVTEST/problems/O

OTTGAME - One Two Three

https://www.spoj.com/SRVTEST/problems/OTTGAME/ 1/5
14:40 01/10/2023 SPOJ.com - Problem OTTGAME

Feedback

https://www.spoj.com/SRVTEST/problems/OTTGAME/ 2/5
14:40 01/10/2023 SPOJ.com - Problem OTTGAME

Feedback

https://www.spoj.com/SRVTEST/problems/OTTGAME/ 3/5
14:40 01/10/2023 SPOJ.com - Problem OTTGAME

Example
Input:
5
2 3
1 1
1 2
2 1
6 5
2 3 1 2 2 2
2 3 3 2 3 3
2 2 2 1 2 2
1 1 3 2 1 3
3 1 2 2 2 2
5 4
2 3 1 3 3
1 2 1 3 2

Feedback
3 3 2 3 3
2 2 2 3 3
5 5
2 2 1 2 1
1 1 2 1 1
3 2 1 3 1
3 1 3 3 2
2 3 1 3 3
8 15
1 2 2 1 2 3 3 1
3 2 2 3 3 2 2 1
3 1 1 2 3 3 2 3
1 2 1 1 3 3 3 2
3 3 1 3 2 1 3 2
3 2 1 1 2 2 3 3
3 2 3 1 1 2 1 1
2 1 3 3 3 2 1 2
1 3 2 3 2 1 2 1
2 3 3 3 1 2 3 2
3 2 1 3 1 3 3 3
1 2 1 3 3 3 3 2
1 3 1 2 2 1 1 2
2 2 1 2 3 3 3 3
2 1 1 2 1 2 1 2

Output:
#1 2
#2 5
#3 4 5
#4 4
#5 1 4 6 8

 Submit solution! (/SRVTEST/submit/OTTGAME/)

Added by: phamxuantu1802 (/SRVTEST/users/phamxuantu1802)

Date: 2023-02-24

Time limit: 1s

Source limit: 50000B

Memory limit: 1536MB

Cluster: Cube (Intel G860) (/clusters/)

Languages: C CPP JAVA

Leave a Comment

https://www.spoj.com/SRVTEST/problems/OTTGAME/ 4/5
14:40 01/10/2023 SPOJ.com - Problem OTTGAME

Publish

Notes:
1. Don't post any source code here.
2. Please be careful, leave short comments only. Don't spam here.
3. For more discussion (hints, ideas, solutions) please visit our forum (/SRVTEST/forum).
4. Authors of the problems are allowed to delete the post and use html code here (e.g. to provide some useful links).

Feedback
About SPOJ RSS
(/info/) (/SRVTEST/rss/)

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine (http://sphere-engine.com)™ © by Sphere Research Labs (http://sphere-research.com).

https://www.spoj.com/SRVTEST/problems/OTTGAME/ 5/5

You might also like