Visitor Messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamik
    New Member
    • Aug 2009
    • 7

    Hello mac11, just thak you for answering my question about flushing. Can you help me solve this problem http://day0.ioi2009.org/data/Area.pdf ??? Just this is my solution but cheking system don\t accept it....
    #include<iostre am>
    #include<cstdio >
    using namespace std;
    main (){
    int i,j,n,m,maxi,ma xj,max=0,a;
    scanf ("%i %i",&n,&m);
    for (i=1; i<=m; i++){
    for (j=1; j<=n; j++){
    scanf ("%i",&a);
    printf ("0 %i %i\n",j,i);
    fflush(stdout);
    if (a>max){
    max=a;
    maxi=i;
    maxj=j;
    }
    if (i==m&&j==n-1){break;}
    }
    }
    printf ("1 %i %i\n",maxj,maxi );
    fflush(stdout);
    getchar();
    getchar();
    return 0;
    }
Working...