/ Vijos /

记录详情

Compile Error

foo.cpp:1:1: error: 'include' does not name a type
 include <stdio.h>
 ^
foo.cpp: In function 'bool judge1(int*, int)':
foo.cpp:4:83: warning: unused variable 'i' [-Wunused-variable]
 const int INF=1<<30; bool judge1(int l[MAXN+1],int n){ bool flag=true; int t; int i; if(n==0){ return true; } if(n%2==0){ flag=false; } t=n/2; if(l[1]<l[2]){ //左子树,右子树<根 if(flag==false){ l[n+1]=INF; } for(i=1;i<=t;i++){ if(l[i]<l[i*2]&&l[i]<l[i*2+1]){ } else{return false;} } return true; } else{ if(flag==false){ l[n+1]=-INF; } for(i=1;i<=n/2;i++){ if(l[i]>l[i2]&&l[i]>l[i2+1]){
                                                                                   ^
foo.cpp: At global scope:
foo.cpp:8:1: error: expected unqualified-id before 'return'
 return true;
 ^
foo.cpp:9:1: error: expected declaration before '}' token
 }
 ^
foo.cpp: In function 'bool judge1(int*, int)':
foo.cpp:7:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1897 学姐吃牛排
语言
C++
递交时间
2014-11-01 08:33:23
评测时间
2014-11-01 11:09:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes