Submission #534897

# Submission time Handle Problem Language Result Execution time Memory
534897 2022-03-09T06:11:42 Z leinad2 Star Trek (CEOI20_startrek) C++17
0 / 100
1 ms 204 KB
#include<bits/stdc++.h>
using namespace std;
int n, i, j, k, a, b, c, d, mod=1e9+7;
int f(int a, int b)
{
    if(b==0)return 1;
    int p=f(a, b/2);
    if(b%2)return ((1LL*p*p)%mod*a)%mod;
    else return (1LL*p*p)%mod;
}
main()
{
    cin>>a>>a;
    cout<<f(2, a)-1;
}

Compilation message

startrek.cpp:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   11 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -