Submission #982623

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9826232024-05-14 14:04:18dimashhhSkyscraper (JOI16_skyscraper)C++17
100 / 100
168 ms87232 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e2 + 5, MOD = 1e9 + 7;
int n,l,a[N];
int dp[N][N][2][2][N*10];
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;
}
if(a[2] - a[1] + a[2] - a[1] <= l) dp[2][1][0][0][(a[2]-a[1])*2] = 1;
if(a[2] - a[1] <= l) dp[2][1][0][1][a[2]-a[1]] = dp[2][1][1][0][a[2]-a[1]] = 1;
a[n+1] = 10000;
for(int i = 2;i <= n;i++){
for(int j = 1;j <= i;j++){
for(int s = 0;s < 2;s++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...