(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #483428

#TimeUsernameProblemLanguageResultExecution timeMemory
483428rainboyVepar (COCI21_vepar)C11
70 / 70
150 ms12744 KiB
#include <stdio.h> #define A 10000000 int pp[A], n; void init() { static char composite[A + 1]; int a, b; for (a = 2; a <= A; a++) { if (composite[a]) continue; pp[n++] = a; for (b = a + a; b <= A; b += a) composite[b] = 1; } } int count(int a, int p) { return a < p ? 0 : count(a / p, p) + a / p; } int main() { int t; init(); scanf("%d", &t); while (t--) { int a, b, c, d, i, da; scanf("%d%d%d%d", &a, &b, &c, &d); da = 1; for (i = 0; i < n; i++) if (count(b, pp[i]) - count(a - 1, pp[i]) > count(d, pp[i]) - count(c - 1, pp[i])) { da = 0; break; } printf(da ? "DA\n" : "NE\n"); } return 0; }

Compilation message (stderr)

Main.c: In function 'main':
Main.c:28:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   28 |  scanf("%d", &t);
      |  ^~~~~~~~~~~~~~~
Main.c:32:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   32 |   scanf("%d%d%d%d", &a, &b, &c, &d);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...