比赛 |
20120706 |
评测结果 |
WTTTTTTTTW |
题目名称 |
校草 |
最终得分 |
0 |
用户昵称 |
CC |
运行时间 |
0.000 s |
代码语言 |
C++ |
内存使用 |
0.00 MiB |
提交时间 |
2012-07-06 11:43:13 |
显示代码纯文本
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <map>
using namespace std;
struct man {
int a[5],index;
}f[1000005];
int t[1000005],ans[1000005];
bool done[1000005];
int n,e[4];
bool cmp(man x,man y) {
return x.a[e[1]] < y.a[e[1]];
}
void solve() {
for (int i = 1;i <= n;i++)
for (int j = i + 1;j <= n;j++)
if (f[i].a[e[1]] < f[j].a[e[1]] && f[i].a[e[2]] < f[j].a[e[2]] && f[i].a[e[3]] < f[j].a[e[3]]) {
if (!done[j]) {
done[j] = 1;
ans[++ans[0]] = j;
}
}
}
int main() {
freopen("hjjhvf.in","r",stdin);
freopen("hjjhvf.out","w",stdout);
scanf("%d", &n);
for (int i = 1;i <= n;i++) {
scanf("%d%d%d%d", &f[i].a[1], &f[i].a[2], &f[i].a[3], &f[i].a[4]);
f[i].index = i;
}
e[1] = 1;e[2] = 2,e[3] = 3;
solve();
e[1] = 1;e[2] = 2;e[3] = 4;
solve();
e[1] = 1;e[2] = 3;e[3] = 4;
solve();
e[1] = 2;e[2] = 3;e[3] = 4;
solve();
sort(ans + 1,ans + ans[0] + 1);
printf("%d\n", ans[0]);
for (int i = 1;i <= ans[0];i++) {
printf("%d\n", ans[i]);
}
return 0;
}