(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 #483429

#TimeUsernameProblemLanguageResultExecution timeMemory
483429rainboyHop (COCI21_hop)C11
110 / 110
30 ms1260 KiB
#include <stdio.h> #define N 1000 int main() { static int aa[N]; int n, i, j; scanf("%d", &n); for (i = 0; i < n; i++) { long long x; scanf("%lld", &x); aa[i] = 0; while (1LL << aa[i] + 1 <= x) aa[i]++; } for (j = 1; j < n; j++) { for (i = 0; i < j; i++) printf("%d ", (aa[i] >> 4) != (aa[j] >> 4) ? 1 : ((aa[i] >> 2) != (aa[j] >> 2) ? 2 : 3)); printf("\n"); } return 0; }

Compilation message (stderr)

Main.c: In function 'main':
Main.c:15:23: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   15 |   while (1LL << aa[i] + 1 <= x)
      |                 ~~~~~~^~~
Main.c:9:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
Main.c:13:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |   scanf("%lld", &x);
      |   ^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...