Submission #962932

# Submission time Handle Problem Language Result Execution time Memory
962932 2024-04-14T09:53:33 Z vjudge1 Fibonacci representations (CEOI18_fib) C++14
0 / 100
1 ms 348 KB
#include<bits/stdc++.h>

using namespace std;

#define int long long

const int N=1e5+10, mod=1e9+7;
int n, a[N], f[N];

int32_t main(){
   ios_base::sync_with_stdio(false);
   cin.tie(nullptr);
   cin >> n;
   for (int i=1; i<=n; ++i) cin >> a[i];
   for (int i=1; i<=n; ++i){
      sort(a+1, a+i+1);
      f[1]=(a[1]+1)/2;
      for (int j=2; j<=i; ++j){
         f[j]=(f[j-1]*(a[j]-a[j-1]+2)/2-1+mod)%mod;
      }
      cout << f[i] << '\n';
   }
   return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -