Submission #4168

# Submission time Handle Problem Language Result Execution time Memory
4168 2013-09-02T22:30:06 Z dbfud 덩치 (KOI13_body) C++
18 / 18
0 ms 1672 KB
#include <iostream>
#include <string>
using namespace std;

struct body
{
       int weight ;
       int height ; 
       int position ;
       body() { weight = 0 ; height = 0;  position = 1; } ; 
};

int main()
{
    body BodyData[50] ; 
    int numChild = 0 ;
    cin >> numChild ;
    
    for(int i = 0; i < numChild ; i++)
      cin >> BodyData[i].weight >> BodyData[i].height ;
   
    for(int i = 0; i < numChild ; i++ )
      for( int j = 0; j < numChild ; j++ )
      {
           if( (BodyData[i].weight < BodyData[j].weight ) &&
               (BodyData[i].height < BodyData[j].height ) )
               BodyData[i].position++ ;
      }
   
    for(int i = 0; i < numChild ; i++)
            cout << BodyData[i].position << " " ; 
            
   
    
    return 0;
} 
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct
3 Correct 0 ms 1672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1672 KB Output is correct
2 Correct 0 ms 1672 KB Output is correct