Compile Error
foo.c: In function 'main': foo.c:11:19: error: redeclaration of 'x' with no linkage 11 | long long x = p - q; | ^ foo.c:7:25: note: previous declaration of 'x' with type 'long long int' 7 | long long l, r, x; | ^ foo.c:11:23: error: 'p' undeclared (first use in this function) 11 | long long x = p - q; | ^ foo.c:11:23: note: each undeclared identifier is reported only once for each function it appears in
Code
#include <stdio.h>
int main() {
int t;
scanf("%d", &t);
while (t--) {
long long l, r, x;
scanf("%lld %lld %lld", &l, &r, &x);
long long q = l;
long long x = p - q;
if (p >= l && p <= r) {
printf("%lld %lld\n", p, q);
} else {
printf("-1 -1\n");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1186 Equal to X
- Contest
- Brain Booster #9
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2025-04-06 16:35:57
- Judged At
- 2025-04-06 16:35:57
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes