Submission #405363

# Submission time Handle Problem Language Result Execution time Memory
405363 2021-05-16T09:51:15 Z MeGustaElArroz23 Calvinball championship (CEOI15_teams) C++14
0 / 100
4 ms 448 KB
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;

const ll mod=1000007;

ll power(int a, int b){
    if (b==0) return 1;
    ll sol=power(a,b/2)%mod;
    if (b%2) sol*=a;
    return sol%mod;
}

int main(){
    int n;
    cin >> n;
    vi v(n);
    for (int i=n-1;i>=0;i--) cin >>v[i];
    ll sol=0;
    for (int i=0;i<n;i++) sol+=power(v[i],i);
    cout << sol%mod;
}
# 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 296 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
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 292 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 4 ms 332 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 448 KB Output isn't correct
2 Halted 0 ms 0 KB -