home
data-structures-and-algorithms-in-java-interview-prep
interactive-problems
3-coloring-official
Profile
Logout
Editor
Login
Theme1
Theme2
Theme3
Theme4
Redirecting to
NADOS
Lost Tree
Manhattan Rectangle
Bear And Prime 100
Flamingoes Of Mystery
Chocolate Bunny
Lost Numbers
Guess The Array
Guessing The Greatest Version
Guess The Kth Zero
3 Coloring
Rpd And Rap Sheet
Strange Device
Pick Heroes
Kuroni And The Celebration
Tree Diameter
Take A Guess
Nastia And A Hidden Permutation
Rocket
Dwarves, Hats And Extrasensory Abilities
Question
History
Solution
Stats
3 Coloring
easy
Prev
Next
Check the link
https://codeforces.com/problemset/problem/1503/B
Input Format
Check the link
Output Format
Check the link
Question Video
Comment
Comment
Post Comment
Constraints
Check the link
Sample Input
Check the link
Sample Output
Check the link
Asked in Companies
Related Topics
Update Your Profile
Your profile is incomplete!
Please
click here
to complete your profile to continue submitting questions.
Video Solution
Code Solution
{ }
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
fold
Alt-L|Ctrl-F1
unfold
Alt-Shift-L|Ctrl-Shift-F1
Gotoend
Ctrl-End
Gotostart
Ctrl-Home
Movelinesup
Alt-Up
Movelinesdown
Alt-Down
Undo
Ctrl-Z
Redo
Ctrl-Shift-Z|Ctrl-Y
Replace
Ctrl-H
Togglecomment
Ctrl-/
ToggleBlockComment
Ctrl-Shift-/
Removeline
Ctrl-D
{ }
Run
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
fold
Alt-L|Ctrl-F1
unfold
Alt-Shift-L|Ctrl-Shift-F1
Gotoend
Ctrl-End
Gotostart
Ctrl-Home
Movelinesup
Alt-Up
Movelinesdown
Alt-Down
Undo
Ctrl-Z
Redo
Ctrl-Shift-Z|Ctrl-Y
Replace
Ctrl-H
Togglecomment
Ctrl-/
ToggleBlockComment
Ctrl-Shift-/
Removeline
Ctrl-D
{ }
Run
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
fold
Alt-L|Ctrl-F1
unfold
Alt-Shift-L|Ctrl-Shift-F1
Gotoend
Ctrl-End
Gotostart
Ctrl-Home
Movelinesup
Alt-Up
Movelinesdown
Alt-Down
Undo
Ctrl-Z
Redo
Ctrl-Shift-Z|Ctrl-Y
Replace
Ctrl-H
Togglecomment
Ctrl-/
ToggleBlockComment
Ctrl-Shift-/
Removeline
Ctrl-D
Id
Name