Code
#include <stdio.h>
// Function to check if a triangle can be formed
char* canFormTriangle(int a, int b, int c) {
if (a + b > c && b + c > a && a + c > b)
return "YES";
else
return "NO";
}
int main() {
int T;
scanf("%d", &T);
while (T--) {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
printf("%s\n", canFormTriangle(a, b, c));
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1047 3buj
- Contest
- TLE_Headquarters - round #1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-03-27 16:08:23
- Judged At
- 2024-11-11 03:39:41
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 332.0 KiB