Language: C++

#include<iostream>
using namespace std;

main(){
    int n,i,i2,ans=0;
    cin >> n;
    int p[n*3],s[n],b[n],m[n];
    for (i=1;1<=n;i++) cin >> p[i*3-2] >> p[i*3-1] >> p[i*3];
    for (i=1;1<=n;i++) {
        if (p[i*3]<=p[i*3-2] && p[i*3]==p[i2*3-1]) {
            s[n]=p[i*3];
            if (p[i*3-2]<=p[i*3-1])
                m[n]=p[i*3-2]
                b[n]=p[i*3-1]
            }
            if (p[i*3-1]<=p[i*3-2]) {
                m[n]=p[i*3-1]
                b[n]=p[i*3-2]
            }
        }
        else if (p[i*3-1]<=p[i*3-2] && p[i*3-1]==p[i2*3]) {
            s[n]=p[i*3-1];
            if (p[i*3-2]<=p[i*3])
                m[n]=p[i*3-2]
                b[n]=p[i*3]
            }
            if (p[i*3]<=p[i*3-2])
                m[n]=p[i*3]
                b[n]=p[i*3-2]
            }
        }
        else {
            s[n]=p[i*3-2];
            if (p[i*3-1]<=p[i*3])
                m[n]=p[i*3-1]
                b[n]=p[i*3]
            }
            if (p[i*3]<=p[i*3-1])
                m[n]=p[i*3]
                b[n]=p[i*3-1]
            }
        }
    } 
    for (i=1;i<=n;i++){
        for (i2=i+1;i2<=n;i2++){
            if (s[i]==s[i2] && m[i]==m[i2] && b[i]==b[i2]) ans++
        }
    }
    cout << ans << endl;
}




Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:30: error: expected ';' before 'b'
   13 |                 m[n]=p[i*3-2]
      |                              ^
      |                              ;
   14 |                 b[n]=p[i*3-1]
      |                 ~             
a.cc:17:30: error: expected ';' before 'b'
   17 |                 m[n]=p[i*3-1]
      |                              ^
      |                              ;
   18 |                 b[n]=p[i*3-2]
      |                 ~             
a.cc:21:9: error: 'else' without a previous 'if'
   21 |         else if (p[i*3-1]<=p[i*3-2] && p[i*3-1]==p[i2*3]) {
      |         ^~~~
a.cc:24:30: error: expected ';' before 'b'
   24 |                 m[n]=p[i*3-2]
      |                              ^
      |                              ;
   25 |                 b[n]=p[i*3]
      |                 ~             
a.cc:28:28: error: expected ';' before 'b'
   28 |                 m[n]=p[i*3]
      |                            ^
      |                            ;
   29 |                 b[n]=p[i*3-2]
      |                 ~           
a.cc: At global scope:
a.cc:31:9: error: expected declaration before '}' token
   31 |         }
      |         ^
a.cc:32:9: error: expected unqualified-id before 'else'
   32 |         else {
      |         ^~~~
a.cc:38:13: error: expected unqualified-id before 'if'
   38 |             if (p[i*3]<=p[i*3-1])
      |             ^~
a.cc:41:13: error: expected declaration before '}' token
   41 |             }
      |             ^
a.cc:42:9: error: expected declaration before '}' token
   42 |         }
      |         ^
a.cc:43:5: error: expected declaration before '}' token
   43 |     }
      |     ^
a.cc:44:5: error: expected unqualified-id before 'for'
   44 |     for (i=1;i<=n;i++){
      |     ^~~
a.cc:44:14: error: 'i' does not name a type
   44 |     for (i=1;i<=n;i++){
      |              ^
a.cc:44:19: error: 'i' does not name a type
   44 |     for (i=1;i<=n;i++){
      |                   ^
a.cc:49:5: error: 'cout' does not name a type
   49 |     cout << ans << endl;
      |     ^~~~
a.cc:50:1: error: expected declaration before '}' token
   50 | }
      | ^