Submission #1122006

#TimeUsernameProblemLanguageResultExecution timeMemory
1122006vjudge1Calvinball championship (CEOI15_teams)C++17
0 / 100
1 ms504 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int sz=2e6+5; const int INF=1e18; const int MOD=1e6+7; int arr[sz]; void solve() { int n; cin>>n; for(int i=0;i<n;i++) cin>>arr[i]; int res=1; for(int i=0;i<n;i++) res+=(arr[i]*(i+1))%MOD; cout<<res-(n*(n+1)/2)+1; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t=1; //cin>>t; while(t--) { solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...