ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

c++ acc problem
Posted by Oncea Beniamin 27 Dec 2007 18:59
#include <iostream>
#include <stdlib.h>
long long x[150001],y[150001];
using namespace std;

int main(int argc, char *argv[])
{
    long n,f[101],i,j;
    for(i=0;i<=100;i++) f[i]=0;
    cin>>n;
    for(i=0;i<n;i++)
         {cin>>x[i]>>y[i];
         f[y[i]]=1;}
    for(i=100;i>=0;i--)
       if(f[i]==1)
         for(j=0;j<n;j++)
           if(y[j]==i)
             cout<<x[j]<<" "<<y[j]<<endl;
  system("PAUSE");
  return 0;
}
Re: c++ acc problem
Posted by insi 31 Jul 2008 01:12
put // before system("PAUSE");