Submission #205307

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2053072020-02-28 13:41:36TadijaSebezBowling (BOI15_bow)C++11
82 / 100
1085 ms1016 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N=11;
const int M=305;
int score[N];
ll dp[M][N][N],tmp[M][N][N];
void Clear(){
for(int i=0;i<M;i++)
for(int j=0;j<N;j++)
for(int k=0;k<N;k++)
tmp[i][j][k]=dp[i][j][k],dp[i][j][k]=0;
}
void Print(int n){
for(int i=0;i<M;i++)
for(int j=0;j<N;j++)
for(int k=0;k<N;k++)
if(dp[i][j][k])
printf("%i %i %i %i %lld\n",n,i,j,k,dp[i][j][k]);
}
void Solve(){
int n;
string str;
scanf("%i",&n);
cin>>str;
for(int i=1;i<=n;i++)scanf("%i",&score[i]);
Clear();
for(int i=0;i<M;i++)if(i==score[n] || score[n]==-1){
string now="";now+=str[n*2-2];now+=str[n*2-1];now+=str[n*2];
//Case 1 xxx
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bow.cpp: In function 'void Solve()':
bow.cpp:24:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%i",&n);
  ~~~~~^~~~~~~~~
bow.cpp:26:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=n;i++)scanf("%i",&score[i]);
                       ~~~~~^~~~~~~~~~~~~~~~
bow.cpp: In function 'int main()':
bow.cpp:104:13: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int t;scanf("%i",&t);
        ~~~~~^~~~~~~~~
#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...