{"id":"84d1ec43-0882-4a76-b01e-5e46c2fbec42","name":"Pillars","description":"<a href=\"https://codeforces.com/contest/474/problem/E\">https://codeforces.com/contest/474/problem/E</a>","inputFormat":".","outputFormat":".","constraints":".","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\r\n static PrintWriter out = new PrintWriter(System.out);\r\n /*\r\n use in for reading input\r\n use out for printing output\r\n */\r\n\r\n public static void main(String[] args) throws IOException {\r\n\r\n // write your code here.\r\n\r\n\r\n\r\n out.close();\r\n }\r\n}\r\n"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"hard","sampleInput":"10 3\r\n2 1 3 6 9 11 7 3 20 18\r\n","sampleOutput":"6\r\n1 4 6 7 8 9 \r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"9b3d7d76-b2ca-458f-80a8-4b37d548024a","name":"Segment Tree For Experts","slug":"segment-tree-for-experts-953","type":0},{"id":"c72de273-9722-456e-90e6-15f17dff887f","name":"Pillars","slug":"pillars","type":1}],"next":{"id":"45c53c89-db8d-48c0-852e-a4b303d1a89e","name":"Domino Principle","type":1,"slug":"domino-principle"},"prev":{"id":"4379e5e8-9f34-4397-9608-726fa2714fc1","name":"K Increasing Subsequence 2","type":1,"slug":"k-increasing-subsequence-2"}}}

Pillars

<a href="https://codeforces.com/contest/474/problem/E">https://codeforces.com/contest/474/problem/E</a>

{"id":"84d1ec43-0882-4a76-b01e-5e46c2fbec42","name":"Pillars","description":"<a href=\"https://codeforces.com/contest/474/problem/E\">https://codeforces.com/contest/474/problem/E</a>","inputFormat":".","outputFormat":".","constraints":".","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\r\n static PrintWriter out = new PrintWriter(System.out);\r\n /*\r\n use in for reading input\r\n use out for printing output\r\n */\r\n\r\n public static void main(String[] args) throws IOException {\r\n\r\n // write your code here.\r\n\r\n\r\n\r\n out.close();\r\n }\r\n}\r\n"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"hard","sampleInput":"10 3\r\n2 1 3 6 9 11 7 3 20 18\r\n","sampleOutput":"6\r\n1 4 6 7 8 9 \r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"9b3d7d76-b2ca-458f-80a8-4b37d548024a","name":"Segment Tree For Experts","slug":"segment-tree-for-experts-953","type":0},{"id":"c72de273-9722-456e-90e6-15f17dff887f","name":"Pillars","slug":"pillars","type":1}],"next":{"id":"45c53c89-db8d-48c0-852e-a4b303d1a89e","name":"Domino Principle","type":1,"slug":"domino-principle"},"prev":{"id":"4379e5e8-9f34-4397-9608-726fa2714fc1","name":"K Increasing Subsequence 2","type":1,"slug":"k-increasing-subsequence-2"}}}
plane

Editor


Loading...

Pillars

hard

https://codeforces.com/contest/474/problem/E

Constraints

.

Format

Input

.

Output

.

Example

Sample Input

10 3 2 1 3 6 9 11 7 3 20 18

Sample Output

6 1 4 6 7 8 9

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode