hiho week 109 register

Ended

Participants:438

Verdict:Runtime Error
Score:0 / 100
Submitted:2016-08-01 11:32:24

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "iostream"
#include "stdio.h"
using namespace std;
class Tower{
public:int p,q,f;
public:
    Tower(){
    f=0;
    }
    void setpq(int p,int q){
    this->p=p;
    this->q=q;
    this->f=f;
    }
    void setf(int f){
    this->f=f;
    }
};
int main(){
    int n,p,q,k;
    int a,b,c=0,d=-1,h=0;
    cout<<"please"<<endl;
    cin>>n;
    Tower *t=new Tower[n]();
    for(int i=0;i<n;i++){
        cin>>p;
        cin>>q;
        t[i].setpq(p,q);
    }
    for(int j=0;j<n-1;j++){
        cin>>a;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX