0_0_13804169_8207.cpp:1:2454: fatal error: GCC4.9.2/lib/gcc/x86_64-w64-mingw32/4.9.2/include/iostream>usin: Invalid argument
#include<iostream>using namespace std;typedef struct p{ int weight; int speed; int num; /\num��ԭ���Ĵ��� int pre;}Mouse;void sort(Mouse m[],int n) //����{ int i,j,k; Mouse temp; for(i=1;i<=n;i++) { k=i; for(j=i+1;j<=n;j++) { if(m[j].weight<m[k].weight) k=j; else if(m[j].weight==m[k].weight&&m[j].speed>m[k].speed) k=j; } if(k!=i) { temp=m[k]; m[k]=m[i]; m[i]=temp; } }}int main(){ int i=1,j,n=1,data[1001],a,b; int f[1001]; Mouse m[1001]; while(cin>>a>>b) { m[n].num = n; //ԭ���Ĵ��� m[n].weight = a; m[n].speed = b; n++; } sort(m,n-1); f[1]=1; a=1; b=1; m[1].pre=1; for(i = 2; i < n; i++) { f[i]=1; m[i].pre=i; //�ʼʱÿ����ǰ�›ö���Լ������§Ú�����Ϊ1 for(j=1; j<i;j++) if(m[i].weight>m[j].weight&&m[i].speed<m[j].speed&&f[j] + 1 >f[i]) //���������� { f[i]=f[j]+1; m[i].pre=j; //i��ǰ�߸�Ϊj } if(f[i]>a) //�ҳ�����ֵ����a,ͬʱ�����ֵ���¡À�i����b { a=f[i]; b=i; } } cout<<a<<endl; i=0; while(f[b]+1) //��f[b]==1ʱ��m[b].pre=b,f[b]--��-1����ѭ��,data[i]�Ѿ��ﵽa�ˣ��˺��ֵ�����ÈÉ { data[i]=m[b].num; b=m[b].pre; //��m[b]��ǰ�߸���b��ѭ�� i++; f[b]--; } for(i=a-1;i>=0;i--) cout<<data[i]<<endl; return 0;}
^
compilation terminated.
|