Submission #8432380


Source Code Expand

#include <bits/stdc++.h>
#define r(i,n) for(long long i = 0; i<n; i++)
typedef long long ll;
using namespace std;

int main() {
  int n,count=0;
  cin >> n;
  vector<int> a(n,0),b(n,0),b2(n,0),c(n,0);
  r(i,n)cin>>a[i];
  r(i,n)cin>>b[i];
  r(i,n)cin>>c[i];
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  sort(c.begin(),c.end());
  r(i,n){
    r(j,n){
      if(b[i]<c[j]){
        b2+=n-j;
      }
    }
  }
  r(i,n){
    r(j,n){
      if(a[i]<b[j])count+=b2[j];
    }
  }
  cout<<count<<endl;
}

Submission Info

Submission Time
Task C - Snuke Festival
User moyuki
Language C++14 (GCC 5.4.1)
Score 0
Code Size 532 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:19:11: error: no match for ‘operator+=’ (operand types are ‘std::vector<int>’ and ‘long long int’)
         b2+=n-j;
           ^