#C10135. Minimum Number of Guards in a Complete Graph
Minimum Number of Guards in a Complete Graph
Minimum Number of Guards in a Complete Graph
Given a complete graph of N vertices (each representing a castle), determine the minimum number of guards required to ensure that every castle is guarded. In a complete graph, every pair of distinct vertices is connected by a unique edge. This means that a guard placed in any castle can effectively guard all castles. Formally, for a complete graph with N nodes, only one guard is sufficient since every node is connected to every other node. In mathematical notation, if the set of castles is represented as \(V\) and \(|V| = N\), then the minimum number of guards required is 1.
Example:
- Input:
5
- Output:
1
inputFormat
The input consists of a single integer \(N\) \((1 \leq N \leq 10^9)\) representing the number of castles.
Input is read from standard input (stdin).
outputFormat
Output a single integer, which is the minimum number of guards required to guard all castles. The answer is always \(1\), as one guard can guard every castle in a complete graph.
Output is written to standard output (stdout).
## sample1
1