Submission #129803

#TimeUsernameProblemLanguageResultExecution timeMemory
129803pzdbaLjetopica (COI19_ljetopica)C++14
0 / 100
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; const int mod = 1e9+7; char s[1002], a[1002], b[1002]; int main(){ int n, k; scanf("%d%d", &n, &k); scanf("%s", s+1); scanf("%s", a+1); scanf("%s", b+1); int ans = 0, res = 0; for(int i=1;i<=n;i++){ res = (res*2 + a[i]-'0')%mod; } ans = (ans + res)%mod; res = 0; for(int i=1;i<=n;i++){ res = (res*2 + b[i]-'0')%mod; } ans = (ans + res)%mod; printf("%d\n", ans); }

Compilation message (stderr)

ljetopica.cpp: In function 'int main()':
ljetopica.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &n, &k);
     ~~~~~^~~~~~~~~~~~~~~~
ljetopica.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", s+1);    
     ~~~~~^~~~~~~~~~~
ljetopica.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", a+1);
     ~~~~~^~~~~~~~~~~
ljetopica.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", b+1);
     ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...