C++ tutorial Input: cin >> num; or scanf("%d", &num) Output: cout << num << '\n'; or printf("%d", num) Basic structure #include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(0); // statements } References C++ reference Containers library Strings library Algorithms library