| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
他说 编译错误?????帮忙拉#include<stdio.h>
#include<algorithm>
using namespace std;
struct bnode
{
int hi;
int wi;
}in[20002];
bool cmp(bnode a,bnode b)
{
if(a.wi!=b.wi) return a.wi>b.wi;
else return a.hi<b.hi;
}
int main()
{
int time,i,j,l,k,n,num,tem,tkey,ti;
int numnum[20002],numnum1[20002];
scanf("%d",&time);
for(i=0;i<time;i++)
{
scanf("%d",&num);
for(j=0;j<num;j++)
scanf("%d%d",&in[j].wi,&in[j].hi);
sort(in,in+num,cmp);
n=0;numnum[0]=in[0].hi;numnum1[0]=in[0].wi;k=0;
for(j=1;j<num;j++)
{
tkey=0;
for(l=0;l<=k;l++)
{
if(in[j].hi<numnum[l]&&in[j].wi<numnum1[l])
{
if(tkey==0)
{
tkey=1;
ti=l;
tem=numnum[l];
}
else
{
if(tem>numnum[l])
{
tem=numnum[l];
ti=l;
}
}
}
}
if(tkey==1)
{
numnum[ti]=in[j].hi;
numnum1[ti]=in[j].wi;
}
else
{
numnum[++k]=in[j].hi;
numnum1[k]=in[j].wi;
}
}
printf("%d\n",k+1);
}
return 0;
}
他输出
Main.c
cstdio(39) : error C2143: syntax error : missing '{' before ':'
cstdio(39) : error C2059: syntax error : ':'
cstdio(41) : error C2143: syntax error : missing '{' before ':'
cstdio(41) : error C2059: syntax error : ':'
cstdio(41) : error C2143: syntax error : missing '{' before ':'
cstdio(41) : error C2059: syntax error : ':'
cstdio(41) : error C2143: syntax error : missing '{' before ':'
cstdio(41) : error C2059: syntax error : ':'
cstdio(42) : error C2143: syntax error : missing '{' before ':'
cstdio(42) : error C2059: syntax error : ':'
cstdio(42) : error C2143: syntax error : missing '{' before ':'
cstdio(42) : error C2059: syntax error : ':'
cstdio(42) : error C2143: syntax error : missing '{' before ':'
cstdio(42) : error C2059: syntax error : ':'
cstdio(43) : error C2143: syntax error : missing '{' before ':'
cstdio(43) : error C2059: syntax error : ':'
cstdio(43) : error C2143: syntax error : missing '{' before ':'
cstdio(43) : error C2059: syntax error : ':'
cstdio(43) : error C2143: syntax error : missing '{' before ':'
cstdio(43) : error C2059: syntax error : ':'
cstdio(44) : error C2143: syntax error : missing '{' before ':'
cstdio(44) : error C2059: syntax error : ':'
cstdio(44) : error C2143: syntax error : missing '{' before ':'
cstdio(44) : error C2059: syntax error : ':'
cstdio(44) : error C2143: syntax error : missing '{' before ':'
cstdio(44) : error C2059: syntax error : ':'
cstdio(45) : error C2143: syntax error : missing '{' before ':'
cstdio(45) : error C2059: syntax error : ':'
cstdio(45) : error C2143: syntax error : missing '{' before ':'
cstdio(45) : error C2059: syntax error : ':'
cstdio(45) : error C2143: syntax error : missing '{' before ':'
cstdio(45) : error C2059: syntax error : ':'
cstdio(46) : error C2143: syntax error : missing '{' before ':'
cstdio(46) : error C2059: syntax error : ':'
cstdio(46) : error C2143: syntax error : missing '{' before ':'
cstdio(46) : error C2059: syntax error : ':'
cstdio(46) : error C2143: syntax error : missing '{' before ':'
cstdio(46) : error C2059: syntax error : ':'
cstdio(47) : error C2143: syntax error : missing '{' before ':'
cstdio(47) : error C2059: syntax error : ':'
cstdio(47) : error C2143: syntax error : missing '{' before ':'
cstdio(47) : error C2059: syntax error : ':'
cstdio(47) : error C2143: syntax error : missing '{' before ':'
cstdio(47) : error C2059: syntax error : ':'
cstdio(48) : error C2143: syntax error : missing '{' before ':'
cstdio(48) : error C2059: syntax error : ':'
cstdio(48) : error C2143: syntax error : missing '{' before ':'
cstdio(48) : error C2059: syntax error : ':'
cstdio(48) : error C2143: syntax error : missing '{' before ':'
cstdio(48) : error C2059: syntax error : ':'
cstdio(49) : error C2143: syntax error : missing '{' before ':'
cstdio(49) : error C2059: syntax error : ':'
cstdio(49) : error C2143: syntax error : missing '{' before ':'
cstdio(49) : error C2059: syntax error : ':'
cstdio(50) : error C2143: syntax error : missing '{' before ':'
cstdio(50) : error C2059: syntax error : ':'
cstdio(50) : error C2143: syntax error : missing '{' before ':'
cstdio(50) : error C2059: syntax error : ':'
cstdio(51) : error C2143: syntax error : missing '{' before ':'
cstdio(51) : error C2059: syntax error : ':'
cstdio(51) : error C2143: syntax error : missing '{' before ':'
cstdio(51) : error C2059: syntax error : ':'
cstdio(51) : error C2143: syntax error : missing '{' before ':'
cstdio(51) : error C2059: syntax error : ':'
cstdio(52) : error C2143: syntax error : missing '{' before ':'
cstdio(52) : error C2059: syntax error : ':'
cstdio(52) : error C2143: syntax error : missing '{' before ':'
cstdio(52) : error C2059: syntax error : ':'
cstdio(52) : error C2143: syntax error : missing '{' before ':'
cstdio(52) : error C2059: syntax error : ':'
cstdio(53) : error C2143: syntax error : missing '{' before ':'
cstdio(53) : error C2059: syntax error : ':'
cstdio(53) : error C2143: syntax error : missing '{' before ':'
cstdio(53) : error C2059: syntax error : ':'
cstdio(53) : error C2143: syntax error : missing '{' before ':'
cstdio(53) : error C2059: syntax error : ':'
cstdio(54) : error C2143: syntax error : missing '{' before ':'
cstdio(54) : error C2059: syntax error : ':'
cstdio(54) : error C2143: syntax error : missing '{' before ':'
cstdio(54) : error C2059: syntax error : ':'
cstdio(54) : error C2143: syntax error : missing '{' before ':'
cstdio(54) : error C2059: syntax error : ':'
cstdio(55) : error C2143: syntax error : missing '{' before ':'
cstdio(55) : error C2059: syntax error : ':'
cstdio(55) : error C2143: syntax error : missing '{' before ':'
cstdio(55) : error C2059: syntax error : ':'
cstdio(55) : error C2143: syntax error : missing '{' before ':'
cstdio(55) : error C2059: syntax error : ':'
cstdio(56) : error C2143: syntax error : missing '{' before ':'
cstdio(56) : error C2059: syntax error : ':'
cstring(19) : error C2143: syntax error : missing '{' before ':'
cstring(19) : error C2059: syntax error : ':'
cstring(19) : error C2143: syntax error : missing '{' before ':'
cstring(19) : error C2059: syntax error : ':'
cstring(19) : error C2143: syntax error : missing '{' before ':'
cstring(19) : error C2059: syntax error : ':'
cstring(21) : error C2143: syntax error : missing '{' before ':'
cstring(21) : error C2059: syntax error : ':'
cstring(21) : error C2143: syntax error : missing '{' before ':'
cstring(21) : error C2059: syntax error : ':'
cstring(21) : error C2143: syntax error : missing '{' before ':'
cstring(21) : fatal error C1003: error count exceeds 100; stopping compilation
为什么呀!
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator