제출 #1012597

#제출 시각아이디문제언어결과실행 시간메모리
10125978pete8Mean (info1cup19_mean)C++17
100 / 100
2 ms772 KiB
#include<iostream> #include<stack> #include<map> #include<vector> #include<string> #include<cassert> #include<unordered_map> #include <queue> #include <cstdint> #include<cstring> #include<limits.h> #include<cmath> #include<set> #include<algorithm> #include <iomanip> #include<numeric> #include<bitset> using namespace std; #define ll long long #define f first #define s second #define pii pair<int,int> #define ppii pair<int,pii> #define vi vector<int> #define pb push_back #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define F(n) for(int i=0;i<n;i++) #define lb lower_bound #define ub upper_bound #define fastio ios::sync_with_stdio(false);cin.tie(NULL); #pragma GCC optimize ("03,unroll-lopps") #define int long long using namespace std; const int inf=1e18,lg=30,mx=5e6,minf=-1e9,mxn=2e5+10,mod=1e9+7; int32_t main(){ fastio int n;cin>>n; vector<vector<int>>dp(n,vector<int>(n,0)); for(int i=0;i<n;i++)cin>>dp[i][i]; for(int sz=0;sz<n;sz++)for(int l=0,r=sz;r<n;l++,r++){ for(int k=l+1;k<=r;k++)dp[l][r]=max(dp[l][r],(dp[l][k-1]+dp[k][r])/2); } cout<<dp[0][n-1]; } /* */

컴파일 시 표준 에러 (stderr) 메시지

mean.cpp:32:40: warning: bad option '-funroll-lopps' to pragma 'optimize' [-Wpragmas]
   32 | #pragma GCC optimize ("03,unroll-lopps")
      |                                        ^
mean.cpp:36:14: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   36 | int32_t main(){
      |              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...