mercredi 23 décembre 2015

long time debug in c++ [on hold]

#include <bits/stdc++.h>
using namespace std;
class chain{
    pair<long,long> a[100003];
    long n;
    long f[100003];
public:
    void read(long n1){
        this->n = n1;
        long x,y;
        for (long i=0;i<this->n;i++){
            scanf("%ld%ld",&x,&y);
            this->a[i] = {x,y};
        }
        sort(a,a+n1);
    }
} ch;
int main(){
    long n;
    cin >> n;
    ch.read(n);
    return 0;
}

I set debug at line 3. Why does it take a long time to debug at this step? Morever, it take long time to build program too.

Aucun commentaire:

Enregistrer un commentaire