{"id":"a5a49b10-6292-42b4-b1a5-97e524b2b181","name":"Longest Good Segment","description":"<a href=\"https://www.codechef.com/problems/LGSEG\">https://www.codechef.com/problems/LGSEG</a>","inputFormat":".","outputFormat":".","constraints":".","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\nclass 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":"easy","sampleInput":"","sampleOutput":"","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":"ebd4bd7d-3745-4e3b-9603-da905237841b","name":"Binary Lifting For Experts","slug":"binary-lifting-for-experts-971","type":0},{"id":"6b8f1dd2-aad0-4142-8531-d8402642326c","name":"Longest Good Segment","slug":"longest-good-segment","type":1}],"next":{"id":"83ae5fef-9140-4730-980b-b9dcf39c2799","name":"Tree And Extra Edge","type":1,"slug":"tree-and-extra-edge"},"prev":{"id":"1e97a56a-756b-4c70-ada0-605fd74618ee","name":"Learning Dishes","type":1,"slug":"learning-dishes"}}}

Longest Good Segment

<a href="https://www.codechef.com/problems/LGSEG">https://www.codechef.com/problems/LGSEG</a>

{"id":"a5a49b10-6292-42b4-b1a5-97e524b2b181","name":"Longest Good Segment","description":"<a href=\"https://www.codechef.com/problems/LGSEG\">https://www.codechef.com/problems/LGSEG</a>","inputFormat":".","outputFormat":".","constraints":".","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\nclass 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":"easy","sampleInput":"","sampleOutput":"","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":"ebd4bd7d-3745-4e3b-9603-da905237841b","name":"Binary Lifting For Experts","slug":"binary-lifting-for-experts-971","type":0},{"id":"6b8f1dd2-aad0-4142-8531-d8402642326c","name":"Longest Good Segment","slug":"longest-good-segment","type":1}],"next":{"id":"83ae5fef-9140-4730-980b-b9dcf39c2799","name":"Tree And Extra Edge","type":1,"slug":"tree-and-extra-edge"},"prev":{"id":"1e97a56a-756b-4c70-ada0-605fd74618ee","name":"Learning Dishes","type":1,"slug":"learning-dishes"}}}
plane

Editor


Loading...

Longest Good Segment

easy

https://www.codechef.com/problems/LGSEG

Constraints

.

Format

Input

.

Output

.

Example

Sample Output

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode