|  | 
|  | 
| back to board | WA #8 Posted by Ezrah  23 Aug 2011 01:53Does anybody know what #8 test looks like? I'm sure my solution is right, but I can't pass this test.Here it is:
 #include <iostream>
 
 int n;
 int m[100][3];
 
 int main() {
 std::cin >> n;
 for (int i = 0; i < n; ++i) {
 std::cin >> m[i][0] >> m[i][1] >> m[i][2];
 }
 
 for (int i = 0; i < n; ++i) {
 bool found = false;
 for (int j = 0; j < n; ++j) {
 if (j == i) continue;
 if (m[i][0] <= m[j][0] &&
 m[i][1] <= m[j][1] &&
 m[i][2] <= m[j][2]) {
 found = true;
 break;
 }
 }
 std::cout << (found? "No" : "Yes") << std::endl;
 }
 return 0;
 }
Re: WA #8 This test could be like4
 501 501 501
 500 10000 10000
 10000 500 10000
 10000 10000 500
 
 Seems the correct answer is
 No
 Yes
 Yes
 Yes
Re: WA #8 Posted by Ezrah  24 Aug 2011 16:36This test could be like4
 501 501 501
 500 10000 10000
 10000 500 10000
 10000 10000 500
 
 Seems the correct answer is
 No
 Yes
 Yes
 Yes
 Thank you, great test! I could not even imagine such a case. | 
 | 
|