/**
 * Given a list of archaeological sites, this function identifies the sites that have cultural significance.
 *
 * @param archaeologicalSites A list of tuples representing the archaeological sites. Each tuple contains
 * the name of the site (string), its age in years (integer), and a boolean
 * indicating whether it has cultural significance or not.
 * @return A list of tuples representing the sites that have cultural significance. Each tuple contains the
 * name of the site and its age.
 */
fun findCulturalSignificance(archaeologicalSites: List<Triple<String, Int, Boolean>>): List<Pair<String, Int>> {

    // Initialize an empty list to store the significant sites
    val significantSites = mutableListOf<Pair<String, Int>>()

    // Loop through each archaeological site
    for (site in archaeologicalSites) {
        // Check if the site has cultural significance
        if (site.third) {
            // Add the site to the list of significant sites
            significantSites.add(Pair(site.first, site.second))
        }
    }

    return significantSites
}

// Example usage
val sites = listOf(
    Triple("Ancient City", 2500, true),
    Triple("Lost Temple", 3500, false),
    Triple("Mysterious Ruins", 5000, true),
    Triple("Buried Tombs", 2000, true)
)
/**
 * Given a list of archaeological sites, this function identifies the sites that have cultural significance.
 *
 * @param archaeologicalSites A list of tuples representing the archaeological sites. Each tuple contains
 * the name of the site (string), its age in years (integer), and a boolean
 * indicating whether it has cultural significance or not.
 * @return A list of tuples representing the sites that have cultural significance. Each tuple contains the
 * name of the site and its age.
 */
fun findCulturalSignificance(archaeologicalSites: List<Triple<String, Int, Boolean>>): List<Pair<String, Int>> {
/**
 * Given a list of archaeological sites, this function identifies the sites that have cultural significance.
 *
 * @param archaeologicalSites A list of tuples representing the archaeological sites. Each tuple contains
 * the name of the site (string), its age in years (integer), and a boolean
 * indicating whether it has cultural significance or not.
 * @return A list of tuples representing the sites that have cultural significance. Each tuple contains the
 * name of the site and its age.
 */
fun findCulturalSignificance(archaeologicalSites: List<Triple<String, Int, Boolean>>): List<Pair<String, Int>> {

    // Initialize an empty list to store the significant sites
    val significantSites = mutableListOf<Pair<String, Int>>()

    // Loop through each archaeological site
    for (site in archaeologicalSites) {
        // Check if the site has cultural significance
        if (site.third) {
            // Add the site to the list of significant sites
            significantSites.add(Pair(site.first, site.second))
        }
    }

    return significantSites
}

// Example usage
val sites = listOf(
    Triple("Ancient City", 2500, true),
    Triple("Lost Temple", 3500, false),
    Triple("Mysterious Ruins", 5000, true),
    Triple("Buried Tombs", 2000, true)
)