Submission #1213015

#TimeUsernameProblemLanguageResultExecution timeMemory
1213015vincentbucourt1Rack (eJOI19_rack)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int MOD = 1e9 + 7; int N, numIter; int ans = 1; long long modular(long long base, long long exp, int mod) { long long res = 1; while (exp > 0) { if (exp % 2 == 1) res= (res * base) % mod; exp = exp >> 1; base = (base * base) % mod; } return res; } signed main() { cin >> N >> numIter; numIter--; for (int i = 0; i <= 63; i++) { bool filled = (numIter & (1 << i)); if (N - i - 1 >= 0) { ans += (modular(2, N - i - 1, MOD)) * filled; ans %= MOD; } } cout << ans << "\n"; }

Compilation message (stderr)

rack.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.