제출 #1111364

#제출 시각아이디문제언어결과실행 시간메모리
1111364RuichenTrains (BOI24_trains)C++17
0 / 100
3 ms1872 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; long long ans=0; cin >> n; vector<long long> a(n); a[0]=1; vector<int> v(n),x(n); for(int i=0; i<n; i++){ cin >> v[i] >> x[i]; for(int j=i+v[i]; j<(x[i]+1)*v[i]+i; j+=v[i]){ a[j]+=a[i]; } ans+=a[i]; } cout << ans << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...