# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1086030 | Mr_Ph | Trains (BOI24_trains) | C++17 | 160 ms | 7872 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;
const int mod=(int)1e9+7;
#define endl '\n'
#define all(arr) arr.begin(),arr.end()
#define allr(arr) arr.rbegin(),arr.rend()
#define sz size()
#define int long long
int dp[100002];
void iforgor()
{
int n;
cin>>n;
dp[0]=1;
int pog=sqrt(n);
vector<vector<int>>dp1(pog,vector<int>(pog));
// cout<<pog<<endl;
vector<vector<array<int,3>>>nig(n);
for(int i=0;i<n;i++)
{
int d,x;
cin>>d>>x;
for(int j=1;j<pog;j++){
int lo=i%j;
dp[i]+=dp1[j][lo];
dp[i]%=mod;
}
for(auto j:nig[i])
{
int lo=j[2],dd=j[1],dp1m=j[0];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |