Submission #100977

#TimeUsernameProblemLanguageResultExecution timeMemory
100977KLPP새로운 문제 (COCI19_akvizna)C++14
20 / 130
7 ms768 KiB
#include<bits/stdc++.h> using namespace std; typedef long long int lld; double DP[101][101]; int main(){ int n,k; scanf("%d %d",&n,&k); DP[0][0]=0; for(int i=1;i<=n;i++){ for(int j=1;j<=k && j<=i;j++){ DP[i][j]=0; //cout<<i<<" A "<<j<<endl; for(int l=j-1;l<i;l++){ double d=(double)(i-l)/i; //cout<<l<<" "<<d<<endl; DP[i][j]=max(DP[i][j],DP[l][j-1]+d); } //printf("%lf ",DP[i][j]); //cout<<endl; }//printf("\n"); } printf("%.10lf\n",DP[n][k]); return 0; }

Compilation message (stderr)

akvizna.cpp: In function 'int main()':
akvizna.cpp:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&n,&k);
   ~~~~~^~~~~~~~~~~~~~~
#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...
#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...
#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...