# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
902241 | pcc | A Game with Grundy (CCO20_day1problem1) | C++14 | 105 ms | 7448 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;
#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fs first
#define sc second
#define tlll tuple<ll,ll,ll>
const int mxn = 1e5+10;
const ll inf = 2e9+10;
int cnt[mxn*2];
int ans[mxn];
vector<ll> all;
pll range[mxn];
ll N,L,R,Y;
int main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>N>>L>>R>>Y;
for(int i = 0;i<N;i++){
ll a,b,x;
cin>>x>>a>>b;
ll l = -inf,r = inf;
while(l != r){
ll mid = l+(r-l)/2;
if((x-mid)*a<Y*b)r = mid;
else l = mid+1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |