Time Exceeded
/in/foo.c: In function 'main': /in/foo.c:9:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] if (a[i] & a[j] > a[i] ^ a[j]) ~~~~~^~~~~~ /in/foo.c:9:14: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] if (a[i] & a[j] > a[i] ^ a[j]) ~~~~~^~~~~~~~~~~~~
代码
#include <stdio.h>
int main(void) {
int n, a[100005], ans = 0;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = 1; i <= n; i++)
for (int j = 1; j < i; j++)
if (a[i] & a[j] > a[i] ^ a[j])
ans++;
printf("%d", ans);
return 0;
}
信息
- 递交者
- 类型
- 递交
- 题目
- P1002 统计
- 语言
- C
- 递交时间
- 2024-08-27 19:32:25
- 评测时间
- 2024-08-27 19:32:25
- 评测机
- 分数
- 0
- 总耗时
- ≥8017ms
- 峰值内存
- ≥704.0 KiB