### Re: 10973 - Triangle Counting

Posted:

**Sat Jun 15, 2013 12:10 pm**Just a tip, especially for those who get TLE and RTE

1. A brute force O(n^3) approach can get Accepted (with use of

2. Vertices in the input CAN be greater than

3. You only need to count triangles up to vertex

1. A brute force O(n^3) approach can get Accepted (with use of

*scanf*and good memory allocation)2. Vertices in the input CAN be greater than

*n*(check problem description)3. You only need to count triangles up to vertex

*n*