#include <iostream> using namespace std; int main() { int n; int h[1001],l[1001],r[1001]; cin>>n; for(int i=1;i<=n;i++){ cin>>h[i]>>l[i]>>r[i]; } for(int i=1;i<=n;i++){ int l1=0,r1=0; for(int j=1;j<=n;j++){ if(h[i]>h[j]){ if(l[j]<l[i]){ l1=j; } if(r[j]>r[i]){ r1=j; } } } cout<<l1<<" "<<r1<<endl; } return 0; }
标签:std,int,平台,小球,main,1001 From: https://www.cnblogs.com/As10016/p/17519706.html