Submission #490927

#TimeUsernameProblemLanguageResultExecution timeMemory
490927rainboyLjetopica (COI19_ljetopica)C11
0 / 100
0 ms204 KiB
#include <stdio.h> #define N 1000 #define MD 1000000007 int pp2[N + 1]; void init() { int i; pp2[0] = 1; for (i = 1; i <= N; i++) pp2[i] = pp2[i - 1] * 2 % MD; } int main() { static char cc[N + 1], aa[N + 2], bb[N + 2]; int n, k; init(); scanf("%d%d%s%s%s", &n, &k, cc, aa, bb); printf("%lld\n", (long long) (pp2[n - 1] + pp2[n] - 1) % MD * pp2[k] % MD); return 0; }

Compilation message (stderr)

ljetopica.c: In function 'main':
ljetopica.c:21:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |  scanf("%d%d%s%s%s", &n, &k, cc, aa, bb);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...