#include <iostream> using namespace std; int main(int argc, char** argv) { int n; cin>>n; int l[1000],r[1000],h[1000]; for(int i=1;i<=n;i++){ cin>>h[i]>>l[i]>>r[i]; } for(int i=1;i<=n;i++){ int L=0,R=0,h1=0,h2=0; for(int j=1;j<=n;j++){ if(h[j]<h[i]){ if(h[j]>h1&&l[j]<l[i]){ L=j; } if(h[j]>h2&&r[j]>r[i]){ R=j; } } } cout<<L<<" "<<R<<endl; } return 0; }
标签:std,int,平台,小球,&&,1000 From: https://www.cnblogs.com/wangyueshuo/p/17519705.html