# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1124177 | mychecksedad | Trains (BOI24_trains) | C++17 | 127 ms | 50844 KiB |
/* Author : Mychecksdead */
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD (1000000000+7)
#define MOD1 (998244353)
#define pb push_back
#define all(x) x.begin(), x.end()
#define en cout << '\n'
#define ff first
#define ss second
#define pii pair<int,int>
#define vi vector<int>
const int N = 1e6+100, M = 1e5+10, K = 52, MX = 30, S = 300;
ll n, d[N], x[N];
ll dp[N], A[S][S];
vector<int> to[N], rem[N];
void solve(){
cin >> n;
for(int i = 1; i <= n; ++i){
cin >> d[i] >> x[i];
if(d[i] >= S){
int cur = i;
for(int j = 1; j <= x[i] && cur + d[i] <= n; ++j){
cur += d[i];
to[cur].pb(i);
}
}else{
# | 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... |