# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
981998 | dimashhh | Skyscraper (JOI16_skyscraper) | C++17 | 1791 ms | 524288 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e2 + 5, MOD = 1e9 + 7;
int n,l,a[N];
unordered_map<int,int> dp[N][N][2][2];
void add(int &x,int y){
x += y;
if(x >= MOD) x -= MOD;
}
void test(){
cin >> n >> l;
for(int i = 1;i <= n;i++) {
cin >> a[i];
}
sort(a + 1,a + n + 1);
if(n == 1) {
cout << 1;
return;
}
dp[1][1][0][0][-a[1] * 2] = 1;
dp[1][1][0][1][-a[1]] = dp[1][1][1][0][-a[1]] = 1;
for(int i = 1;i < n;i++){
a[i] = a[i+1];
for(int j = 1;j <= i;j++){
for(int s = 0;s < 2;s++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |