Submission #127735

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1277352019-07-10 04:29:17tmwilliamlin168Bowling (BOI15_bow)C++14
82 / 100
1066 ms3704 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mxN=10;
int q, n, a[mxN];
string s;
ll dp[mxN+1][301][11][11];
struct frame {
vector<int> v;
int b1, b2;
string s;
};
vector<frame> vs, vf;
void solve() {
cin >> n >> s;
for(int i=0; i<n; ++i)
cin >> a[i];
memset(dp, 0, sizeof(dp));
for(int i=0; i<=10; ++i)
for(int j=0; j<=10; ++j)
dp[0][0][i][j]=1;
for(int i=0; i<n; ++i) {
for(int j=0; j<=300; ++j) {
for(frame f : (i<n-1?vs:vf)) {
bool ok=1;
for(int k=0; k<f.s.size()&&ok; ++k)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bow.cpp: In function 'void solve()':
bow.cpp:30:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int k=0; k<f.s.size()&&ok; ++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...