0% found this document useful (0 votes)
28 views1 page

XQC Competitive 5

The document is a comprehensive guide on competitive programming, covering fundamental concepts, problem-solving techniques, and various algorithms. It includes sections on input/output methods in Java and C++, complexity analysis, and sorting algorithms. The content is structured to facilitate learning through examples and practical problems.

Uploaded by

Aman Bhandari
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)
28 views1 page

XQC Competitive 5

The document is a comprehensive guide on competitive programming, covering fundamental concepts, problem-solving techniques, and various algorithms. It includes sections on input/output methods in Java and C++, complexity analysis, and sorting algorithms. The content is structured to facilitate learning through examples and practical problems.

Uploaded by

Aman Bhandari
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/ 1

Contents

Acknowledgments iii

Preface xiii

1 Fundamentals 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 What is Competitive Programming? . . . . . . . . . . . . . . . . . . 1
1.1.2 First Problem: Sliding Puzzles . . . . . . . . . . . . . . . . . . . . . . 2
1.2 More Problems! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 More Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5.1 Vasily and Candles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5.2 Kefa and First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6 Even More Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Interlude A 11
1.7 Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7.1 Insertion Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7.2 Merge Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.7.3 Quicksort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.7.4 Sorting Applied . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

You might also like