P6949 [ICPC 2018 WF] Triangles
题目描述
For your trip to Beijing, you have brought plenty of puzzle books, many of them containing challenges like the following: how many triangles can be found in Figure I.1 ?

Figure I.1 : Illustration of Sample Input $2$ .
While these puzzles keep your interest for a while, you quickly get bored with them and instead start thinking about how you might solve them algorithmically. Who knows, maybe a problem like that will actually be used in this year's contest. Well, guess what? Today is your lucky day!
输入格式
无
输出格式
无
说明/提示
Time limit: 6 s, Memory limit: 1024 MB.