ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Discussion of Problem
1062
. Triathlon
WA #8
Posted by
Ezrah
23 Aug 2011 01:53
Does 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
Posted by
daftcoder [Yaroslavl SU]
23 Aug 2011 11:56
This test could be like
4
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:36
daftcoder [Yaroslavl SU]
wrote 23 August 2011 11:56
This test could be like
4
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.
© 2000–2025
Timus Online Judge Team
. All rights reserved.