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