id
stringlengths 23
61
| messages
listlengths 1
1
|
---|---|
tree_distanceequaltriad_counting_diff_5_100_7eef190682
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n7 9\n3 9\n1 5\n2 6\n2 8\n6 9\n5 6\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_101_9fe6105341
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 3\n6 7\n2 9\n2 3\n4 5\n7 8\n3 8\n5 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_102_16337d0582
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n5 7\n2 7\n4 7\n8 9\n3 4\n1 9\n6 9\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_103_4743a0fb5e
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 7\n5 9\n3 7\n6 9\n2 4\n2 3\n7 8\n2 9\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_104_e0a41e7435
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 4\n5 8\n2 7\n3 7\n7 9\n5 7\n1 2\n6 7\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_105_839b8587a0
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n3 9\n4 7\n4 9\n4 8\n1 8\n4 5\n1 6\n2 7\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_106_88c0143e28
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 6\n3 6\n7 9\n1 7\n6 9\n4 8\n5 7\n4 9\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_107_d39f9a08e6
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n6 8\n4 6\n1 5\n1 7\n3 6\n6 9\n1 6\n2 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_108_50f704da3b
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 8\n3 7\n5 6\n7 8\n5 8\n5 9\n1 4\n1 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_109_70494c32f2
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 3\n3 7\n2 9\n1 6\n3 6\n1 8\n5 9\n4 9\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_110_5ff33d1fd7
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 6\n3 6\n6 7\n1 6\n5 6\n1 8\n2 9\n4 9\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_111_d80f3c414b
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 8\n1 2\n4 9\n1 3\n1 7\n3 5\n2 9\n5 6\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_112_07eaf034dd
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 3\n4 8\n1 2\n5 9\n2 4\n2 6\n3 9\n1 7\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_113_83f5c1cc61
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 6\n7 9\n1 8\n6 7\n3 5\n2 3\n2 8\n4 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_114_a02ea6de3e
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 2\n5 9\n5 7\n1 3\n7 8\n4 5\n1 5\n6 7\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_115_544d61fcf8
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 9\n3 4\n2 5\n7 9\n8 9\n2 3\n3 6\n3 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_116_fe3a03c6f0
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n3 4\n3 9\n3 8\n2 7\n2 3\n6 7\n2 5\n1 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_117_158d9aecdd
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n5 6\n1 5\n3 8\n1 7\n2 5\n6 9\n2 4\n5 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_118_0e391d5cd4
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n7 8\n3 7\n1 9\n8 9\n5 7\n6 9\n4 7\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_119_0ffd457e9c
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 9\n1 2\n2 5\n2 8\n1 7\n2 4\n6 8\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_120_961df2e4e8
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 5\n3 7\n7 9\n1 6\n4 7\n1 3\n7 8\n2 6\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_121_de9555cafa
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n1 7\n1 3\n4 7\n2 5\n3 6\n3 8\n7 9\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_122_8abed92dfb
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 3\n7 8\n2 8\n1 6\n1 5\n5 9\n4 6\n2 6\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_123_91b02e6f99
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 4\n3 5\n7 8\n6 9\n1 4\n2 8\n2 6\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_124_2fa45ff52b
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n4 7\n3 6\n3 8\n1 5\n2 9\n7 9\n6 9\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_125_02bd19a718
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n2 5\n1 6\n1 3\n4 7\n3 7\n2 6\n5 9\n6 8\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_126_05210187b0
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n6 8\n2 6\n3 9\n3 6\n4 7\n3 5\n1 7\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_5_127_dbcc06d9bf
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 9 vertices, labeled from `1` to `9`. It contains the following 8 undirected edges:\n3 5\n4 9\n4 6\n6 8\n4 7\n1 6\n5 6\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 9) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_0_346552a898
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 2\n2 3\n4 5\n2 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_1_46b47f7adf
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n1 2\n3 4\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_2_ec5ef082af
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n1 2\n2 5\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_3_7f7ca077c6
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n2 4\n1 3\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_4_ec88779c2a
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n3 4\n1 4\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_5_0ad85f00d1
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 3\n1 5\n1 2\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_6_1361eca02c
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n3 4\n2 4\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_7_d030d80136
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n1 2\n1 5\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_8_416a4ad2c8
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 2\n1 4\n3 4\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_9_7cd0f2a1d6
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 3\n3 4\n2 5\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_10_f8e5fc6b66
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n3 4\n1 5\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_11_3b56152bf8
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n2 5\n1 2\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_12_7f920534c7
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 2\n1 3\n2 5\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_13_69edd797ce
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 3\n2 5\n1 2\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_14_d22fd04ef7
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n1 2\n4 5\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_15_ec4f930fe3
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n4 5\n2 5\n1 5\n3 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_16_727f21ac8d
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n1 2\n4 5\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_17_1d15def91c
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 2\n2 4\n2 5\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_18_952d257738
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n3 4\n4 5\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_19_5f24916de2
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n1 3\n3 5\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_20_e3d3ea2d9a
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n4 5\n3 5\n1 5\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_21_e08586199a
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n1 5\n1 4\n3 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_22_eb09e20365
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n1 3\n1 2\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_23_e9d4ad62fd
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n2 5\n1 4\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_24_643f392335
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n4 5\n1 2\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_25_3e613f0dfe
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 3\n3 5\n3 4\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_26_55e18bd754
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n1 4\n1 3\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_27_5465c80df4
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n2 4\n2 5\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_28_796ffcdb31
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n2 3\n4 5\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_29_2315398205
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 3\n1 3\n1 5\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_30_d7849a25f0
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n1 2\n2 3\n3 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_31_64b65dae1b
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 3\n2 3\n3 4\n3 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_32_f8dcf54dca
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 3\n2 3\n4 5\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_33_35dd7d8e89
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n1 3\n1 5\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_34_2c882d7dd0
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n4 5\n1 3\n2 4\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_35_2678fba240
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n1 2\n2 3\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_36_bce7935185
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n1 4\n2 3\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_37_8439c61813
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n3 4\n1 3\n2 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_38_c7c6a8324c
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 3\n4 5\n1 2\n3 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_39_1235731f13
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n4 5\n2 4\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_40_85c6f89d55
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n1 2\n2 3\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_41_d0890f174a
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n2 5\n1 3\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_42_e7e5ebbd58
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n3 4\n4 5\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_43_ea3e9815de
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n4 5\n3 4\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_44_1511ae95e5
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n2 4\n1 3\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_45_53a12a724b
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n4 5\n1 3\n2 5\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_46_c831ab0afb
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n2 3\n1 2\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_47_c24a9fddc8
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n4 5\n1 2\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_48_b590b2eac9
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n2 5\n1 2\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_49_d48a2e8ba8
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n2 4\n4 5\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_50_2e9cea158a
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n1 5\n3 5\n1 2\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_51_5091d38b0b
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n1 3\n2 5\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_52_1878db0c64
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 4\n2 4\n2 3\n2 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_53_797df20520
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n4 5\n3 5\n2 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_54_6ec6480fd2
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n3 5\n1 3\n2 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_55_4c60355a24
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n1 4\n2 4\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_56_d1b93e74fc
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n4 5\n3 5\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_57_118cd1811e
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n2 5\n1 4\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_58_ee43e85fcd
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n1 5\n3 4\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_59_1b28545d69
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n3 5\n1 2\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_60_1c95156066
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n1 2\n1 3\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_61_c8a600e3c1
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n3 4\n1 2\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_62_7e550ae8f3
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 2\n1 4\n3 5\n1 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_63_b41454383e
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 2\n2 4\n2 5\n3 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_64_eddfe765bc
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n1 2\n3 4\n2 3\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_65_9176ec00a7
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 5\n2 5\n4 5\n1 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_66_67b64392dc
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n3 4\n2 3\n2 5\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_67_e30163825d
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 5\n3 5\n1 5\n3 4\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_68_a117718c43
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 3\n4 5\n3 4\n1 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_69_2cabf6ff47
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n1 5\n2 5\n2 3\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_70_dea544bc08
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n3 4\n1 5\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
tree_distanceequaltriad_counting_diff_1_71_85b671fca5
|
[
{
"content": "You are given a **tree** (i.e., a connected undirected graph with no cycles) with 5 vertices, labeled from `1` to `5`. It contains the following 4 undirected edges:\n2 4\n3 5\n1 4\n4 5\n\nPlease compute the number of three-vertex sets (a triad of vertices A, B, and C such that 1 β€ A < B < C β€ 5) for which the **pairwise distances** are all equal β that is, the distance between A and B, between A and C, and between B and C are all the same. The distance between two vertices is the number of edges on the shortest path connecting them.",
"role": "user"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.