#include <iostream> using namespace std; int main(int argc, char** argv) { int n; cin>>n; int H[n],L[n],R[n]; int l1=0,r1=0,h1=0,h2=0; 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 ){ h1=H[j]; r1=j; } if(L[j]<L[i] && H[j]>h1){ h2=H[j]; l1=j; } } } cout<<l1<<" "<<r1<<endl; } return 0; }
标签:h1,r1,int,平台,小球,h2,l1 From: https://www.cnblogs.com/fushuxuan/p/17519637.html