Submission #931220

#TimeUsernameProblemLanguageResultExecution timeMemory
931220hugsfromadictoMean (info1cup19_mean)C++14
0 / 100
0 ms348 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define int long long using namespace std; const int M = 1e18; const int mxN = 205; int a[mxN]; void _() { int n; cin >> n; for(int i = 0; i < n; ++i) cin >> a[i]; int sm = a[0]; for(int i = 1; i < n; ++i) { sm = (a[i] + sm) / 2; } cout << sm; } main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int tc = 1; //cin>>tc; while(tc--) { _(); } }

Compilation message (stderr)

mean.cpp:24:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   24 | main()
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...