#include
using namespace std;
Struct tree {
Int pick;
Int sum;
};
Struct SUM {
Int b;
};
Int main () {
Int n, m, a=0;
Int Max=0;
Int c=0;
Cin> N> m;
Tree tr [m];
The SUM su [100000];
for(int i=0; i
Cin> Tr [I] sum;
for(int j=0; J
Cin> Tr [j]. Pick;
Tr [j]. Pick=abs (tr [j]. Pick);
Tr [I] sum=tr [I] sum - tr [j]. Pick;
Su [I]. B=su [I]. B + tr [j]. Pick;
}
C=c + tr [I] sum;
If (su [I] b> Su (Max). B) {
Max=I;
} else if (su [I]. B==su [r]. Max b& & i
}
}
Cout
CodePudding user response:
What wrong, come out, I run the code without error,CodePudding user response: